SCM Repository
Diff of /branches/pure-cfg/src/compiler/simplify/simplify.sml
Parent Directory
|
Revision Log
|
Patch
revision 798, Mon Apr 11 19:37:56 2011 UTC | revision 799, Mon Apr 11 19:44:59 2011 UTC | |
---|---|---|
# | Line 31 | Line 31 |
31 | val strands = ref [] | val strands = ref [] |
32 | fun setInitially init = (case !initially | fun setInitially init = (case !initially |
33 | of NONE => initially := SOME init | of NONE => initially := SOME init |
34 | (* FIXME: the check for multiple initially decls should happen in type checking *) | |
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 |
# | Line 64 | Line 65 |
65 | S.Program{ | S.Program{ |
66 | globals = List.rev(!globals), | globals = List.rev(!globals), |
67 | globalInit = mkBlock (!globalInit), | globalInit = mkBlock (!globalInit), |
68 | init = valOf(!initially), | init = (case !initially |
69 | (* FIXME: the check for the initially block should really happen in typechecking *) | |
70 | of NONE => raise Fail "missing initially declaration" | |
71 | | SOME blk => blk | |
72 | (* end case *)), | |
73 | strands = List.rev(!strands) | strands = List.rev(!strands) |
74 | } | } |
75 | end | end |
|
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |