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 3550, Wed Jan 6 15:51:57 2016 UTC revision 3586, Thu Jan 14 14:49:31 2016 UTC
# Line 307  Line 307 
307          fun compare (V{id=a, ...}, V{id=b, ...}) = Stamp.compare(a, b)          fun compare (V{id=a, ...}, V{id=b, ...}) = Stamp.compare(a, b)
308          fun hash (V{id, ...}) = Stamp.hash id          fun hash (V{id, ...}) = Stamp.hash id
309          fun toString (V{name, id, ...}) = name ^ Stamp.toString id          fun toString (V{name, id, ...}) = name ^ Stamp.toString id
310            fun getDef x = (case binding x
311                   of VB_RHS rhs => (case rhs
312                         of GLOBAL gv => (case GlobalVar.bindingOf gv
313                               of SOME x => getDef x
314                                | NONE => rhs
315                              (* end case *))
316                          | VAR x => getDef x
317                          | _ => rhs
318                        (* end case *))
319                    | _ => VAR x
320                  (* end case *))
321        (* properties *)        (* properties *)
322          fun newProp initFn = PropList.newProp (fn (V{props, ...}) => props, initFn)          fun newProp initFn = PropList.newProp (fn (V{props, ...}) => props, initFn)
323          fun newFlag () = PropList.newFlag (fn (V{props, ...}) => props)          fun newFlag () = PropList.newFlag (fn (V{props, ...}) => props)
# Line 425  Line 436 
436                  setB (0, lhs);                  setB (0, lhs);
437                  new (MASSIGN{pred = ref dummy, stm = (lhs, rator, args), succ = ref dummy})                  new (MASSIGN{pred = ref dummy, stm = (lhs, rator, args), succ = ref dummy})
438                end                end
439          fun mkGASSIGN (lhs, rhs) = new (GASSIGN{          fun mkGASSIGN (lhs, rhs) = (
440                  pred = ref dummy, lhs = lhs, rhs = rhs, succ = ref dummy                if not(GlobalVar.isUpdated lhs) then GlobalVar.setBinding(lhs, rhs) else ();
441                })                new (GASSIGN{pred = ref dummy, lhs = lhs, rhs = rhs, succ = ref dummy}))
442          fun mkNEW {strand, args} = new (NEW{          fun mkNEW {strand, args} = new (NEW{
443                  pred = ref dummy, strand = strand, args = args, succ = ref dummy                  pred = ref dummy, strand = strand, args = args, succ = ref dummy
444                })                })

Legend:
Removed from v.3550  
changed lines
  Added in v.3586

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