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 3837, Mon May 9 16:38:09 2016 UTC revision 3838, Mon May 9 18:40:57 2016 UTC
# Line 144  Line 144 
144          id : Stamp.stamp,               (* variable's unique ID *)          id : Stamp.stamp,               (* variable's unique ID *)
145          name : string,                  (* variable's name *)          name : string,                  (* variable's name *)
146          ty : Ty.ty,                     (* variable's type *)          ty : Ty.ty,                     (* variable's type *)
         xty : APITypes.t option,        (* the variable's external type (for inputs and outputs) *)  
147          kind : global_kind,             (* the variable kind *)          kind : global_kind,             (* the variable kind *)
148          updated : bool,                 (* true if the global variable is modified in the *)          updated : bool,                 (* true if the global variable is modified in the *)
149                                          (* global-update code *)                                          (* global-update code *)
# Line 161  Line 160 
160          id : Stamp.stamp,               (* variable's unique ID *)          id : Stamp.stamp,               (* variable's unique ID *)
161          name : string,                  (* variable's name *)          name : string,                  (* variable's name *)
162          ty : Ty.ty,                     (* variable's type *)          ty : Ty.ty,                     (* variable's type *)
163          xty : APITypes.t option,        (* the variable's external type (for outputs) *)          output : bool,                  (* true for output variables *)
164          props : PropList.holder          props : PropList.holder
165        }        }
166    
# Line 208  Line 207 
207    
208      structure GlobalVar =      structure GlobalVar =
209        struct        struct
210          fun new (kind, isUpdated, name, ty, apiTy) = GV{          fun new (kind, isUpdated, name, ty) = GV{
211                  id = Stamp.new(),                  id = Stamp.new(),
212                  name = name,                  name = name,
213                  ty = ty,                  ty = ty,
                 xty = apiTy,  
214                  kind = kind,                  kind = kind,
215                  updated = isUpdated,                  updated = isUpdated,
216                  binding = ref NONE,                  binding = ref NONE,
# Line 226  Line 224 
224          fun bindingOf (GV{binding, ...}) = !binding          fun bindingOf (GV{binding, ...}) = !binding
225          fun setBinding (GV{binding, ...}, x) = (binding := SOME x)          fun setBinding (GV{binding, ...}, x) = (binding := SOME x)
226          fun ty (GV{ty, ...}) = ty          fun ty (GV{ty, ...}) = ty
         fun apiType (GV{xty, ...}) = xty  
227          fun isInput (GV{kind=InputVar, ...}) = true          fun isInput (GV{kind=InputVar, ...}) = true
228            | isInput _ = false            | isInput _ = false
229          fun useCount (GV{useCnt, ...}) = !useCnt          fun useCount (GV{useCnt, ...}) = !useCnt
# Line 258  Line 255 
255    
256      structure StateVar =      structure StateVar =
257        struct        struct
258          fun new (name, ty, apiTy) = SV{          fun new (isOut, name, ty) = SV{
259                  id = Stamp.new(),                  id = Stamp.new(),
260                  name = name,                  name = name,
261                  ty = ty,                  ty = ty,
262                  xty = apiTy,                  output = isOut,
263                  props = PropList.newHolder()                  props = PropList.newHolder()
264                }                }
265          fun name (SV{name, ...}) = name          fun name (SV{name, ...}) = name
266          fun ty (SV{ty, ...}) = ty          fun ty (SV{ty, ...}) = ty
267          fun apiType (SV{xty, ...}) = xty          fun isOutput (SV{output, ...}) = output
         fun isOutput (SV{xty=NONE, ...}) = false  
           | isOutput _ = true  
268          fun same (SV{id=a, ...}, SV{id=b, ...}) = Stamp.same(a, b)          fun same (SV{id=a, ...}, SV{id=b, ...}) = Stamp.same(a, b)
269          fun compare (SV{id=a, ...}, SV{id=b, ...}) = Stamp.compare(a, b)          fun compare (SV{id=a, ...}, SV{id=b, ...}) = Stamp.compare(a, b)
270          fun hash (SV{id, ...}) = Stamp.hash id          fun hash (SV{id, ...}) = Stamp.hash id

Legend:
Removed from v.3837  
changed lines
  Added in v.3838

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