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 JuvixTree to Nockma #2606

Closed
paulcadman opened this issue Jan 29, 2024 · 0 comments · Fixed by #2614
Closed

Translation from JuvixTree to Nockma #2606

paulcadman opened this issue Jan 29, 2024 · 0 comments · Fixed by #2614
Assignees
Milestone

Comments

@paulcadman
Copy link
Collaborator

paulcadman commented Jan 29, 2024

JuvixTree is a new intermediate language in the compiler between JuvixCore and JuvixAsm (see #2581). JuvixTree has been designed to make it simpler to write an efficient compilation to Nockma.

The work for this issue is to replace the JuvixAsm -> Nockma compilation with JuvixTree -> Nockma.

@paulcadman paulcadman added enhancement New feature or request pending-review labels Jan 29, 2024
@paulcadman paulcadman changed the title Translation from JuvixTree to Nock Translation from JuvixTree to Nockma Jan 29, 2024
@paulcadman paulcadman added this to the 0.6.0 milestone Jan 30, 2024
@janmasrovira janmasrovira linked a pull request Jan 31, 2024 that will close this issue
paulcadman added a commit that referenced this issue Feb 6, 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](https://github.com/anoma/juvix/blob/22ee87f0e7b82d44bc467014c4c1d26b9f4c2ce2/tests/Tree/positive/test031.jvt)
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](https://github.com/anoma/juvix/blob/22ee87f0e7b82d44bc467014c4c1d26b9f4c2ce2/tests/Tree/positive/out/test028.nockma.out)).

* Closes #2606

---------

Co-authored-by: Paul Cadman <git@paulcadman.dev>
Co-authored-by: Lukasz Czajka <lukasz@heliax.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants