-
Notifications
You must be signed in to change notification settings - Fork 23
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
(but it doesn't work yet)
They are no longer necessary after the change to do layout checking after cyclicity checking in transl_type_decl
(By fixes, I mean we now have just one layout for the records cases)
But it's still not right - see the test cases
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andvoid
. 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
XXX
s 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.