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

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

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