Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /trunk/src/compiler/IL/il-basis.sml
ViewVC logotype

View of /trunk/src/compiler/IL/il-basis.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1115 - (download) (annotate)
Thu May 5 04:42:18 2011 UTC (8 years, 4 months ago) by jhr
File size: 1307 byte(s)
  More merging of pure-cfg back into trunk
(* il-basis.sml
 *
 * COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)
 * All rights reserved.
 *
 * These are functions that the various IL optimization passes treat as
 * "black boxes", so we do not need to have a separate operator constructor
 * for each.
 *)

structure ILBasis :> sig

    type name

    val toString : name -> string
    val same : name * name -> bool
    val hash : name -> word

  (* Basis function *)
    val atan2 : name
    val cos : name
    val pow : name
    val sin : name
    val sqrt : name
    val tan : name

    val allFuns : name list

    structure Set : ORD_SET where type Key.ord_key = name
    structure Map : ORD_MAP where type Key.ord_key = name
    structure Tbl : MONO_HASH_TABLE where type Key.hash_key = name

  end = struct

    type name = Atom.atom

    val toString = Atom.toString
    val same = Atom.same
    val hash = Atom.hash

  (* Basis function *)
    val atan2 = Atom.atom "atan2"
    val cos = Atom.atom "cos"
    val pow = Atom.atom "pow"
    val sin = Atom.atom "sin"
    val sqrt = Atom.atom "sqrt"
    val tan = Atom.atom "tan"

    val allFuns = [
	    atan2,
	    cos,
	    pow,
	    sin,
	    sqrt,
	    tan
	  ]

    structure Set = AtomSet
    structure Map = AtomMap
    structure Tbl = AtomTable

  end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0