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

SCM Repository

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

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

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

revision 1831, Fri Apr 13 13:33:40 2012 UTC revision 1832, Fri Apr 13 14:38:33 2012 UTC
# Line 165  Line 165 
165      fun cvtExp (env : env, lhs, exp) = (case exp      fun cvtExp (env : env, lhs, exp) = (case exp
166             of S.E_Var x => [IL.ASSGN(lhs, IL.VAR(lookup env x))]             of S.E_Var x => [IL.ASSGN(lhs, IL.VAR(lookup env x))]
167              | S.E_Lit lit => [IL.ASSGN(lhs, IL.LIT lit)]              | S.E_Lit lit => [IL.ASSGN(lhs, IL.LIT lit)]
168            | S.E_RadiusQuery (S.E_Lit lit) => [IL.ASSGN(lhs,IL.RQUERY lit)]
169              | S.E_Tuple xs => raise Fail "E_Tuple not implemeted"              | S.E_Tuple xs => raise Fail "E_Tuple not implemeted"
170              | S.E_Apply(f, tyArgs, args, ty) => let              | S.E_Apply(f, tyArgs, args, ty) => let
171                  val args' = List.map (lookup env) args                  val args' = List.map (lookup env) args
# Line 264  Line 265 
265                            | (env, NONE) => raise Fail "unimplemented" (* FIXME *)                            | (env, NONE) => raise Fail "unimplemented" (* FIXME *)
266                          (* end case *)                          (* end case *)
267                        end                        end
268              | S.S_Foreach(x, e, blk) => let
269                  val x' = lookup env x
270                          val assigns = cvtExp (env, x', e)
271                          val join = newJoin (env, 1)
272                          val (cfg, _) = cvtBlock (state, env, (0, join)::joinStk, blk)
273                 in
274                    IL.Node.mkFOREACH(x',(IL.CFG.mkBlock assigns),cfg)
275                 end
276    
277                    | S.S_New(strandId, args) => let                    | S.S_New(strandId, args) => let
278                        val nd = IL.Node.mkNEW{                        val nd = IL.Node.mkNEW{
279                                strand = strandId,                                strand = strandId,

Legend:
Removed from v.1831  
changed lines
  Added in v.1832

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