summaryrefslogtreecommitdiff
path: root/asmcomp
diff options
context:
space:
mode:
authoralainfrisch <alain@frisch.fr>2016-03-09 13:41:13 +0100
committeralainfrisch <alain@frisch.fr>2016-03-09 13:41:13 +0100
commit8d0f08b20e64975848233841c3510d93dbbdbdb8 (patch)
tree4ff261de24ffe76fc86d9bc58ac494e7ba547187 /asmcomp
parent35f10d6cd008315c7e546a61e8d3f6854a9f391a (diff)
downloadocaml-8d0f08b20e64975848233841c3510d93dbbdbdb8.tar.gz
Fix a probable non-bug.
Commit 39760599e5936fe43215545206393be1310456b7 introduced some bogus logic. Emitting structured constants can register more closures to be emitted. But either the name of these closures is "unique enough", in which case we don't need the already_translated argument in transl_all_functions_and_emit_all_constants (and transl_all_functions does not need to return the set of already emitted functions). Or this is not the case, and the previous code was wrong since it forgot to remember the set returned by transl_all_functions. I've fixed the code assuming the latter in order to be on the safe side, but we would probably have noticed if the former assumption did not hold. I've added a note to the commit mentioned above so that @chambart can have a look at it.
Diffstat (limited to 'asmcomp')
-rw-r--r--asmcomp/cmmgen.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/asmcomp/cmmgen.ml b/asmcomp/cmmgen.ml
index c47b749c84..1e3628f880 100644
--- a/asmcomp/cmmgen.ml
+++ b/asmcomp/cmmgen.ml
@@ -2622,7 +2622,7 @@ let transl_all_functions_and_emit_all_constants cont =
Queue.is_empty functions
then cont
else
- let cont, set = transl_all_functions already_translated cont in
+ let cont, already_translated = transl_all_functions already_translated cont in
let cont = emit_all_constants cont in
aux already_translated cont
in