SCM Repository
[diderot] Diff of /trunk/src/compiler/IL/ssa-fn.sml
Diff of /trunk/src/compiler/IL/ssa-fn.sml
Parent Directory
|
Revision Log
|
Patch
12 |
|
|
13 |
structure Op = Op |
structure Op = Op |
14 |
|
|
15 |
datatype stmt = STM of { |
datatype program = Program of { |
16 |
|
globals : var list, |
17 |
|
globalInit : stmt, |
18 |
|
actors : actor list |
19 |
|
(* initialization *) |
20 |
|
} |
21 |
|
|
22 |
|
and actor = Actor of { |
23 |
|
name : Atom.atom, |
24 |
|
params : var list, |
25 |
|
state : var list, |
26 |
|
stateInit : stmt, |
27 |
|
methods : method list |
28 |
|
} |
29 |
|
|
30 |
|
and method = Method of Atom.atom * stmt |
31 |
|
|
32 |
|
and stmt = STM of { |
33 |
id : Stamp.stamp, |
id : Stamp.stamp, |
34 |
props : PropList.holder, |
props : PropList.holder, |
35 |
preds : stmt list ref, |
preds : stmt list ref, |
120 |
fun mkBLOCK args = mkSTM(BLOCK args) |
fun mkBLOCK args = mkSTM(BLOCK args) |
121 |
fun mkIF args = mkSTM(IF args) |
fun mkIF args = mkSTM(IF args) |
122 |
fun mkLOOP args = mkSTM(LOOP args) |
fun mkLOOP args = mkSTM(LOOP args) |
123 |
|
fun mkNEW args = mkSTM(NEW args) |
124 |
fun mkDIE () = mkSTM DIE |
fun mkDIE () = mkSTM DIE |
125 |
fun mkSTABILIZE () = mkSTM STABILIZE |
fun mkSTABILIZE () = mkSTM STABILIZE |
126 |
fun mkEXIT () = mkSTM EXIT |
fun mkEXIT () = mkSTM EXIT |
127 |
|
|
128 |
|
fun newVar name = V{ |
129 |
|
name = name, |
130 |
|
id = Stamp.new(), |
131 |
|
useCnt = ref 0, |
132 |
|
props = PropList.newHolder() |
133 |
|
} |
134 |
|
|
135 |
end |
end |
|
Legend:
Removed from v.196 |
|
changed lines |
|
Added in v.197 |
|
|