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

SCM Repository

[diderot] Diff of /branches/lamont_dev/src/compiler/IL/ssa-fn.sml
ViewVC logotype

Diff of /branches/lamont_dev/src/compiler/IL/ssa-fn.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 198, Mon Aug 2 21:26:57 2010 UTC revision 199, Mon Aug 2 21:34:31 2010 UTC
# Line 100  Line 100 
100      val mkSTABILIZE : unit -> stmt      val mkSTABILIZE : unit -> stmt
101      val mkEXIT : unit -> stmt      val mkEXIT : unit -> stmt
102    
103      val newVar : string -> var      structure Var : sig
104            val new : string -> var
105            val same : var * var -> bool
106            val compare : var * var -> order
107            val hash : var -> word
108            val toString : var -> string
109            structure Map : ORD_MAP where type Key.ord_key = var
110            structure Set : ORD_SET where type Key.ord_key = var
111            structure Tbl : MONO_HASH_TABLE where type Key.hash_key = var
112          end
113    
114    end    end
115    
# Line 222  Line 231 
231      fun mkSTABILIZE () = mkSTM STABILIZE      fun mkSTABILIZE () = mkSTM STABILIZE
232      fun mkEXIT () = mkSTM EXIT      fun mkEXIT () = mkSTM EXIT
233    
234      fun newVar name = V{      structure Var =
235          struct
236            fun new name = V{
237              name = name,              name = name,
238              id = Stamp.new(),              id = Stamp.new(),
239              useCnt = ref 0,              useCnt = ref 0,
240              props = PropList.newHolder()              props = PropList.newHolder()
241            }            }
242            fun same (V{id=a, ...}, V{id=b, ...}) = Stamp.same(a, b)
243            fun compare (V{id=a, ...}, V{id=b, ...}) = Stamp.compare(a, b)
244            fun hash (V{id, ...}) = Stamp.hash id
245            fun toString (V{name, id, ...}) = name ^ Stamp.toString id
246            local
247              structure V =
248                struct
249                  type ord_key = var
250                  val compare = compare
251                end
252            in
253            structure Map = RedBlackMapFn (V)
254            structure Set = RedBlackSetFn (V)
255            end
256            structure Tbl = HashTableFn (
257              struct
258                type hash_key = var
259                val hashVal = hash
260                val sameKey = same
261              end)
262          end
263    
264    end    end

Legend:
Removed from v.198  
changed lines
  Added in v.199

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