summaryrefslogtreecommitdiff
path: root/src/constant_fold.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/constant_fold.ml')
-rw-r--r--src/constant_fold.ml5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/constant_fold.ml b/src/constant_fold.ml
index 2c46f38b..15772168 100644
--- a/src/constant_fold.ml
+++ b/src/constant_fold.ml
@@ -123,11 +123,14 @@ and is_constant_fexp (FE_aux (FE_Fexp (_, exp), _)) = is_constant exp
let rec run frame =
match frame with
| Interpreter.Done (state, v) -> v
+ | Interpreter.Fail _ ->
+ (* something went wrong, raise exception to abort constant folding *)
+ assert false
| Interpreter.Step (lazy_str, _, _, _) ->
run (Interpreter.eval_frame frame)
| Interpreter.Break frame ->
run (Interpreter.eval_frame frame)
- | Interpreter.Effect_request (st, Interpreter.Read_reg (reg, cont)) ->
+ | Interpreter.Effect_request (out, st, stack, Interpreter.Read_reg (reg, cont)) ->
(* return a dummy value to read_reg requests which we handle above
if an expression finally evals to it, but the interpreter
will fail if it tries to actually use. See value.ml *)