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 187, Thu Jul 29 14:00:37 2010 UTC revision 188, Thu Jul 29 22:28:39 2010 UTC
# Line 24  Line 24 
24            (* end case *))            (* end case *))
25    
26    (* expression translation *)    (* expression translation *)
27      fun cvtExpr (env, exp) = (case exp      fun cvtExpr (env, lhs, exp) = (case exp
28             of S.E_Var x => IL.VAR(lookup env x)             of S.E_Var x => [(lhs, IL.VAR(lookup env x))]
29              | S.E_Lit lit => IL.LIT lit              | S.E_Lit lit => [(lhs, IL.LIT lit)]
30              | S.E_Tuple xs => raise Fail "E_Tuple not implemeted"              | S.E_Tuple xs => raise Fail "E_Tuple not implemeted"
31              | S.E_Apply(f, tyArgs, args, ty) =>              | S.E_Apply(f, tyArgs, args, ty) => let
32              | S.E_Cons args => IL.CONS(List.map (lookup env) args)                  val args' = List.map (lookup env) args
33                    in
34                      TranslateBasis.translate (lhs, f, tyArgs, args')
35                    end
36                | S.E_Cons args => [(lhs, IL.CONS(List.map (lookup env) args))]
37            (* end case *))            (* end case *))
38    
39      and cvtStmt (env, stm) = (case stm      and cvtStmt (env, stm) = (case stm

Legend:
Removed from v.187  
changed lines
  Added in v.188

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