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 1863, Thu Apr 26 18:26:54 2012 UTC revision 1864, Mon Apr 30 12:51:00 2012 UTC
# Line 78  Line 78 
78        | FOREACH of {        | FOREACH of {
79          pred : node ref,          pred : node ref,
80          cond : var,          cond : var,
81            stmBranch: node ref,
82          succ : node ref          succ : node ref
83        }        }
84        | NEW of {                        (* create new strand instance *)        | NEW of {                        (* create new strand instance *)
# Line 307  Line 308 
308                  setB (0, lhs);                  setB (0, lhs);
309                  new (MASSIGN{pred = ref dummy, stm = (lhs, rator, args), succ = ref dummy})                  new (MASSIGN{pred = ref dummy, stm = (lhs, rator, args), succ = ref dummy})
310                end                end
311          fun mkFOREACH((lhs,rhs),stmBlck) = (          fun mkFOREACH {cond,stmBranch} = (
312            new (FOREACH{pred = ref dummy, cond = (lhs, rhs), stmBlock = ref stmBlck, succ = ref dummy}))            new (FOREACH{pred = ref dummy, cond = cond, stmBranch = ref stmBranch, succ = ref dummy}))
313     fun mkNEW {strand, args} = new (NEW{     fun mkNEW {strand, args} = new (NEW{
314                  pred = ref dummy, strand = strand, args = args, succ = ref dummy                  pred = ref dummy, strand = strand, args = args, succ = ref dummy
315                })                })
# Line 397  Line 398 
398                  | SAVE{succ, ...} => [!succ]                  | SAVE{succ, ...} => [!succ]
399                  | EXIT _ => []                  | EXIT _ => []
400                (* end case *))                (* end case *))
401    
402          fun setTrueBranch (ND{kind=COND{trueBranch, ...}, ...}, nd) = trueBranch := nd          fun setTrueBranch (ND{kind=COND{trueBranch, ...}, ...}, nd) = trueBranch := nd
403            | setTrueBranch (nd, _) = raise Fail("setTrueBranch on " ^ toString nd)            | setTrueBranch (nd, _) = raise Fail("setTrueBranch on " ^ toString nd)
404          fun setFalseBranch (ND{kind=COND{falseBranch, ...}, ...}, nd) = falseBranch := nd          fun setFalseBranch (ND{kind=COND{falseBranch, ...}, ...}, nd) = falseBranch := nd
405            | setFalseBranch (nd, _) = raise Fail("setFalseBranch on " ^ toString nd)            | setFalseBranch (nd, _) = raise Fail("setFalseBranch on " ^ toString nd)
406        fun setStmBranch (ND{kind=FOREACH{stmBranch, ...}, ...}, nd) = stmBranch := nd
407              | setStmBranch (nd, _) = raise Fail("setStmBranch on " ^ toString nd)
408          fun addEdge (nd1, nd2) = (          fun addEdge (nd1, nd2) = (
409                if hasSucc nd1                if hasSucc nd1
410                  then (                  then (

Legend:
Removed from v.1863  
changed lines
  Added in v.1864

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