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

SCM Repository

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

Diff of /trunk/src/compiler/simplify/simplify.sml

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

revision 227, Wed Aug 4 05:27:13 2010 UTC revision 229, Wed Aug 4 15:46:08 2010 UTC
# Line 30  Line 30 
30            val actors = ref []            val actors = ref []
31            fun simplifyDecl dcl = (case dcl            fun simplifyDecl dcl = (case dcl
32                   of AST.D_Input(x, NONE) => let                   of AST.D_Input(x, NONE) => let
33                        val e' = S.E_Input(Var.nameOf x, NONE)                        val e' = S.E_Input(Var.monoTypeOf x, Var.nameOf x, NONE)
34                        in                        in
35                          globals := x :: !globals;                          globals := x :: !globals;
36                          globalInit := S.S_Assign(x, e') :: !globalInit                          globalInit := S.S_Assign(x, e') :: !globalInit
37                        end                        end
38                    | AST.D_Input(x, SOME e) => let                    | AST.D_Input(x, SOME e) => let
39                        val (stms, x') = simplifyExpToVar (e, [])                        val (stms, x') = simplifyExpToVar (e, [])
40                        val e' = S.E_Input(Var.nameOf x, SOME x')                        val e' = S.E_Input(Var.monoTypeOf x, Var.nameOf x, SOME x')
41                        in                        in
42                          globals := x :: !globals;                          globals := x :: !globals;
43                          globalInit := S.S_Assign(x, e') :: (stms @ !globalInit)                          globalInit := S.S_Assign(x, e') :: (stms @ !globalInit)

Legend:
Removed from v.227  
changed lines
  Added in v.229

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