Skip to content

Uncurry some functions of the Michelson interpreter to exploit OCaml 4.14 more general tailcall optimization

Context

To guarantee that the Michelson interpreter is robust to stack overflows, we had to currify many functions of the Michelson interpreter, especially because the tail-call optimization (TCO) implemented by the OCaml compiler was unable to optimize function calls with more than 5 arguments.

The OCaml compiler (>= 4.14) is now able to apply TCO to all function calls with less than 64 arguments. So we can revert the currification we made before.

Manually testing the MR

The CI should be green and the OCaml typechecker should be happy. However, the reviewers are also needed.

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR

Merge request reports