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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/cfg-ir/ssa-fn.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/cfg-ir/ssa-fn.sml

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

revision 3505, Fri Dec 18 02:47:03 2015 UTC revision 3506, Fri Dec 18 04:03:54 2015 UTC
# Line 137  Line 137 
137          id : Stamp.stamp,               (* variable's unique ID *)          id : Stamp.stamp,               (* variable's unique ID *)
138          name : string,                  (* variable's name *)          name : string,                  (* variable's name *)
139          ty : Ty.ty,                     (* variable's type *)          ty : Ty.ty,                     (* variable's type *)
140          input : bool,                   (* true for input variables *)          kind : global_kind,             (* the variable kind *)
141          props : PropList.holder          props : PropList.holder
142        }        }
143    
144        and global_kind = ConstVar | InputVar | GlobalVar
145    
146    (***** strand state variables *****)    (***** strand state variables *****)
147      and state_var = SV of {      and state_var = SV of {
148          id : Stamp.stamp,               (* variable's unique ID *)          id : Stamp.stamp,               (* variable's unique ID *)
# Line 193  Line 195 
195    
196      structure GlobalVar =      structure GlobalVar =
197        struct        struct
198          fun new (isIn, name, ty) = GV{          fun new (kind, name, ty) = GV{
199                  id = Stamp.new(),                  id = Stamp.new(),
200                  name = name,                  name = name,
201                  ty = ty,                  ty = ty,
202                  input = isIn,                  kind = kind,
203                  props = PropList.newHolder()                  props = PropList.newHolder()
204                }                }
205          fun name (GV{name, ...}) = name          fun name (GV{name, ...}) = name
206          fun uniqueName (GV{id, name, ...}) = name ^ Stamp.toString id          fun uniqueName (GV{id, name, ...}) = name ^ Stamp.toString id
207            fun kind (GV{kind, ...}) = kind
208          fun ty (GV{ty, ...}) = ty          fun ty (GV{ty, ...}) = ty
209          fun isInput (GV{input, ...}) = input          fun isInput (GV{kind=InputVar, ...}) = true
210              | isInput _ = false
211          fun same (GV{id=a, ...}, GV{id=b, ...}) = Stamp.same(a, b)          fun same (GV{id=a, ...}, GV{id=b, ...}) = Stamp.same(a, b)
212          fun compare (GV{id=a, ...}, GV{id=b, ...}) = Stamp.compare(a, b)          fun compare (GV{id=a, ...}, GV{id=b, ...}) = Stamp.compare(a, b)
213          fun hash (GV{id, ...}) = Stamp.hash id          fun hash (GV{id, ...}) = Stamp.hash id

Legend:
Removed from v.3505  
changed lines
  Added in v.3506

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