Skip to content

Conversation

@larshum
Copy link
Contributor

@larshum larshum commented Oct 27, 2025

This PR includes a number of smaller changes to the compiler intended to reduce the amount of generated code, thereby reducing compilation times (as a lot of time is spent in the OCaml compiler). It includes the code for PRs #961 and #962.

After this PR, the compiler will:

  • Print ASCII strings as string literals in the OCaml AST, drastically reducing the amount of generated code.
    • Previously, each character was printed as an encoded integer on a separate line.
    • New function were added in boot to efficiently perform this conversion.
  • Omit the introduction of unused variables in the TmSeqEdge pattern.
    • Also, the length is computed in the then-branch rather than before the match, and only when it is needed.
  • Omit the never case of a sequence of matches when all constructors are matched on.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is actually important to keep for the tup version of building and testing, it let's tup to know to build in this folder rather than adjacent to each original file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry, I don't know why it was removed.

@david-broman david-broman merged commit 658b91a into miking-lang:develop Nov 12, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants