Skip to content

[TM-366] Preprocessing in Lorentz compilation

Maxim Koltsov requested to merge maksbotan/tm-366-compileLorentzWithOptions into master

Description

Problem: default compileLorentz function does simply maps Lorentz code into Michelson code. However, code produced by Lorentz is often not optimal, therefore it would be desirable to make it run the Michelson optimizer on the compiled code.

Solution: introduce CompilationOptions that contain optional config for the Michelson optimizer. Expose new compileLorentzWithOptions function. Make compileLorentz use default optimizer configuration.

Related issue(s)

Resolves TM-366.

Checklist for your Merge Request

Related changes (conditional)

  • Tests (see short guidelines)

    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • Documentation

    • I checked whether I should update the docs and did so if necessary:
    • I updated changelog files of all affected packages released to Hackage if my changes are externally visible.

Stylistic guide (mandatory)

Edited by Maxim Koltsov

Merge request reports