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

SCM Repository

[diderot] Diff of /branches/lamont_dev/src/compiler/simplify/simplify.sml
ViewVC logotype

Diff of /branches/lamont_dev/src/compiler/simplify/simplify.sml

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

revision 2038, Tue Oct 16 11:31:02 2012 UTC revision 2039, Wed Oct 17 16:10:37 2012 UTC
# Line 134  Line 134 
134                  in                  in
135                    S.S_Assign(x, e') :: stms                    S.S_Assign(x, e') :: stms
136                  end                  end
137          | AST.S_Foreach(x,e,s) => let          | AST.S_Foreach(x,e,s,strandName) => let
138          val (stms, x') = simplifyExpToVar(e,stms)          val (stms, e') = simplifyExp(e,stms)
139          val s' = simplifyBlock(s)          val s' = simplifyBlock(s)
140          in          in
141              S.S_Foreach(x',s'):: stms              S.S_Foreach(x,s',strandName)::S.S_Assign(x, e')::stms
142          end          end
143              | AST.S_IfThenElse(e, s1, s2) => let              | AST.S_IfThenElse(e, s1, s2) => let
144                  val (stms, x) = simplifyExpToVar (e, stms)                  val (stms, x) = simplifyExpToVar (e, stms)
# Line 179  Line 179 
179                    | _ => (stms, S.E_Var x)                    | _ => (stms, S.E_Var x)
180                  (* end case *))                  (* end case *))
181              | AST.E_Lit lit => (stms, S.E_Lit lit)              | AST.E_Lit lit => (stms, S.E_Lit lit)
182          | AST.E_RadiusQuery e1 => let          | AST.E_SphereQuery e1 => let
183           val (stms, e1') = simplifyExp(e1,stms)           val (stms, xs) = simplifyExpsToVars([e1],stms)
184    
185          in          in
186             (stms, S.E_RadiusQuery(e1'))             (stms, S.E_SphereQuery(xs))
187          end          end
188              | AST.E_Tuple es => raise Fail "E_Tuple not yet implemented"              | AST.E_Tuple es => raise Fail "E_Tuple not yet implemented"
189              | AST.E_Apply(f, tyArgs, args, ty) => let              | AST.E_Apply(f, tyArgs, args, ty) => let

Legend:
Removed from v.2038  
changed lines
  Added in v.2039

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