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

SCM Repository

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

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

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

revision 1300, Thu Jun 9 21:11:47 2011 UTC revision 1301, Thu Jun 9 23:58:40 2011 UTC
# Line 35  Line 35 
35                    | SOME _ => raise Fail "multiple initially declarations"                    | SOME _ => raise Fail "multiple initially declarations"
36                  (* end case *))                  (* end case *))
37            fun simplifyDecl dcl = (case dcl            fun simplifyDecl dcl = (case dcl
38                   of AST.D_Input(x, NONE) => let                   of AST.D_Input(x, desc, NONE) => let
39                        val e' = S.E_Input(Var.monoTypeOf x, Var.nameOf x, NONE)                        val e' = S.E_Input(Var.monoTypeOf x, Var.nameOf x, desc, NONE)
40                        in                        in
41                          globals := x :: !globals;                          globals := x :: !globals;
42                          globalInit := S.S_Assign(x, e') :: !globalInit                          globalInit := S.S_Assign(x, e') :: !globalInit
43                        end                        end
44                    | AST.D_Input(x, SOME e) => let                    | AST.D_Input(x, desc, SOME e) => let
45                        val (stms, x') = simplifyExpToVar (e, [])                        val (stms, x') = simplifyExpToVar (e, [])
46                        val e' = S.E_Input(Var.monoTypeOf x, Var.nameOf x, SOME x')                        val e' = S.E_Input(Var.monoTypeOf x, Var.nameOf x, desc, SOME x')
47                        in                        in
48                          globals := x :: !globals;                          globals := x :: !globals;
49                          globalInit := S.S_Assign(x, e') :: (stms @ !globalInit)                          globalInit := S.S_Assign(x, e') :: (stms @ !globalInit)

Legend:
Removed from v.1300  
changed lines
  Added in v.1301

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