Skip to content

Layouts prototype #48

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

Closed
wants to merge 122 commits into from
Closed

Layouts prototype #48

wants to merge 122 commits into from

Conversation

ccasin
Copy link
Contributor

@ccasin ccasin commented Sep 28, 2022

This is a work-in-progress version of layouts. The goal here is to support inference for a very simple system of just 5 layouts: any, value, immediate, immediate64 and void. We don't have #, and are extremely conservative about where we allow non-value layouts.

There are still many known bugs and plenty of stuff left to do. But some simple examples are starting to work - see testsuite/tests/typing-layouts/basics.ml.

There are many XXXs in the code. Some of these have been resolved but not cleaned up yet. Many are just places I wanted to come back and double check. Others are known bugs.

stedolan and others added 30 commits August 8, 2022 14:35
Type kinds now record more accurate layouts, which mainly improves
performance (because we have to look at the manifest less) but also fixes a few
edge cases (missing cmi files).

After making the layouts stored in abstract type kinds more accurate, the
strategy of trying to duplicate the old behavior of printing just immediacy is
no longer viable, because we're inferring it too well.  New strategy: print
layouts only if there is a layout annotation, which required minor reworking
othe printing code.
They are no longer necessary after the change to do layout checking after
cyclicity checking in transl_type_decl
@ccasin ccasin closed this Nov 22, 2022
antalsz pushed a commit to antalsz/ocaml-jst that referenced this pull request Mar 29, 2023
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