aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/eurm.ml4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/eurm.ml b/src/eurm.ml
index 2b8cc5b..1e6d7d2 100644
--- a/src/eurm.ml
+++ b/src/eurm.ml
@@ -130,10 +130,14 @@ let compile_stage4 eurmcmds state =
130 in let transform = function 130 in let transform = function
131 | Inc(r) -> [ URMSucc(r) ], state 131 | Inc(r) -> [ URMSucc(r) ], state
132 | Zero(r) -> [ URMZero(r) ], state 132 | Zero(r) -> [ URMZero(r) ], state
133 | Copy(r1, r2) -> [ URMCopy(r1, r2) ], state
133 | EqPredicate(r1, r2, lbl) -> [ URMJump(r1, r2, Hashtbl.find label_table lbl) ], state 134 | EqPredicate(r1, r2, lbl) -> [ URMJump(r1, r2, Hashtbl.find label_table lbl) ], state
134 | Label(_) -> 135 | Label(_) ->
135 let dummy_reg = state.max_reg + 1 136 let dummy_reg = state.max_reg + 1
136 in [ URMZero(dummy_reg) ], add_reg_label state 1 0 137 in [ URMZero(dummy_reg) ], add_reg_label state 1 0
138 | Quit ->
139 let dummy_reg = state.max_reg + 1
140 in [ URMZero(dummy_reg); URMJump(dummy_reg, dummy_reg, -1) ], add_reg_label state 1 0
137 | _ -> failwith "Invalid_argument" 141 | _ -> failwith "Invalid_argument"
138 in build_label_table eurmcmds; apply_transform (transform) state eurmcmds 142 in build_label_table eurmcmds; apply_transform (transform) state eurmcmds
139 143