diff options
author | Maxime Dénès <mail@maximedenes.fr> | 2014-11-10 14:23:56 +0100 |
---|---|---|
committer | Maxime Dénès <mail@maximedenes.fr> | 2014-11-10 14:23:56 +0100 |
commit | 33bf52f9881fb457f566478ade3f92550b91c6ba (patch) | |
tree | 9b356d23531f62cf361dc3016585d005989a1b40 | |
parent | f361f6b0316ed32a120b9133d5583caea777207f (diff) |
Fix #3282: VM confused by let bindings in fixpoints.
I'm afraid this fix is a bit heuristic, but it seems to generate correct code in
all cases.
-rw-r--r-- | kernel/cbytegen.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/cbytegen.ml b/kernel/cbytegen.ml index 6fd1c689f..7aad20599 100644 --- a/kernel/cbytegen.ml +++ b/kernel/cbytegen.ml @@ -289,7 +289,7 @@ let add_grab arity lbl cont = else Krestart :: Klabel lbl :: Kgrab (arity - 1) :: cont let add_grabrec rec_arg arity lbl cont = - if Int.equal arity 1 then + if Int.equal arity 1 && rec_arg < arity then Klabel lbl :: Kgrabrec 0 :: Krestart :: cont else Krestart :: Klabel lbl :: Kgrabrec rec_arg :: |