Where can I find documentation for the OCaml bytecode instructions ?
In The Compiler Backend: Bytecode and Native code - Real World OCaml, it is explained how to output the bytecode using ocamlc -dinstr
(which is not mentioned in OCaml - Batch compilation (ocamlc)) and they point for details to http://cadmium.x9c.fr/distrib/caml-instructions.pdf but that document is from 2010, and it does not mention the instruction I am interested in.
Indeed, some of my code generates the bytecode instruction strictbranchif
, for which I cannot find any information.
If I understand the code correctly, ocaml/bytecomp/emitcode.ml
seems to imply that it has the same meaning as branchif
(?) and ocaml/bytecomp/bytegen.ml
seems to imply that it is generated in specific conditions involving &&
and ||
(?)
This makes me think that the instruction strictbranchif
is currently a synonym to branchif
, and maybe it was created to be used for future optimizations ?