Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation from Juvix Tree to Nockma #2614

Merged
merged 25 commits into from
Feb 6, 2024

Conversation

janmasrovira
Copy link
Collaborator

@janmasrovira janmasrovira commented Jan 31, 2024

This PR replaces the JuvixAsm -> Nockma translation with a JuvixTree -> Nockma translation.

We can now enable some of the JuvixTree tests that did not work with JuvixAsm->Nockma because they were too slow.

Notes

We have changed test031: temp stack with branching to avoid using negative numbers (because negative integers are not supported in Nockma).

Three tree tests trace/output lists. Lists are serialised differently by the asm and nockma pretty printers so they cannot share a single test output file. We have created separate nockma output files for these tests (see eg. test028.nockma.out).

@janmasrovira janmasrovira added this to the 0.6.0 milestone Jan 31, 2024
@janmasrovira janmasrovira linked an issue Jan 31, 2024 that may be closed by this pull request
@janmasrovira janmasrovira force-pushed the 2606-translation-from-juvixtree-to-nockma branch from 104611c to 155429f Compare January 31, 2024 17:44
@paulcadman paulcadman marked this pull request as ready for review February 2, 2024 17:32
@paulcadman paulcadman force-pushed the 2606-translation-from-juvixtree-to-nockma branch from 3a16e26 to 78ab6df Compare February 2, 2024 17:33
@lukaszcz lukaszcz self-requested a review February 5, 2024 14:22
@lukaszcz lukaszcz force-pushed the 2606-translation-from-juvixtree-to-nockma branch from 555c21a to 04a54b7 Compare February 5, 2024 14:23
Copy link
Collaborator

@lukaszcz lukaszcz left a comment

Choose a reason for hiding this comment

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

Well done! Now the JuvixTree tests can be compiled to Nockma and evaluated in reasonable time. Closures are still very slow, and maybe we'll need to think harder about them in the future, but for now it's fine.

We should still do in separate PRs:

  • Tests for the Nockma backend that go all the way from Juvix input, not only from the intermediate JuvixTree language. The native/WASM compilation pipeline tests could be modified for this purpose.
  • Make the tests run the external Nockma interpreter in addition to our internal one.

@paulcadman paulcadman merged commit 10e2a23 into main Feb 6, 2024
4 checks passed
@paulcadman paulcadman deleted the 2606-translation-from-juvixtree-to-nockma branch February 6, 2024 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Translation from JuvixTree to Nockma
3 participants