-
Notifications
You must be signed in to change notification settings - Fork 87
Separability axis basics #3854
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
Separability axis basics #3854
Conversation
Nice design write-up. For these comments, I have not looked at all at the implementation — just working through consequences of the design. Should So I continue to wonder about making separability a part of the |
44ea17c
to
7f23c66
Compare
Note on mod bounds for |
7f23c66
to
500be1b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Sorry this took so long to review.
42d1ec4
to
a59ae1f
Compare
Co-authored-by: Richard Eisenberg <[email protected]>
Co-authored-by: Richard Eisenberg <[email protected]>
Co-authored-by: Richard Eisenberg <[email protected]>
Co-authored-by: Richard Eisenberg <[email protected]>
Co-authored-by: Richard Eisenberg <[email protected]>
Co-authored-by: Richard Eisenberg <[email protected]>
fce7b48
to
8a8d570
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed most recent commit
Small plea: unless there's a good reason, could you avoid rebasing while a patch is under active review? GitHub lacks a mechanism for me to know which commits I've reviewed and which I haven't, and rebasing clobbers the timeline (which would otherwise be such an indication). If/when rebasing is necessary, then it's helpful for commit messages to have some variability, just to use as identifiers (of course, rebasing changes the hash, so we need something to identify the commit). It can just be a little keyboard smash for all I care, but it gives a way of tracking commits across rebases. :) Thanks! |
Ack, sorry! I usually rebase when going back to the feature to avoid another review cycle for fixes due to the rebase, but I didn't consider the effect on your review. I think GitHub can track which commits you reviewed though? At least I recall it keep tracking the new additions for me when I'm reviewing PRs. Maybe rebase breaks that? |
Yes rebase breaks that. GitHub also tracks files that I've seen, but at a per-file granularity, which is only marginally useful. (Rebasing the way you have does make sense! It's just too bad that GitHub doesn't accommodate that good workflow so well.) |
Add the separability jkind axis. Separability is a shallow, non-modal axis going
non_float < separable < non_separable
, withnon_float
denoting types whose values are not pointers toDouble_tag
blocks,separable
denoting types with either all values being pointers toDouble_tag
blocks or none, andnon_separable
denoting all types.Add jkinds
non_float_value
, for non-float values, andimmutable_separable_value
, for floats. I'm not sold on the second jkind and will likely drop it from the final version of this PR.Change other jkinds to
non_float
orseparable
where appropriate. In particular, defaultimmutable_data
tonon_float
. This will exclude floats fromimmutable_data
, but will mark records, variants and otherimmutable_data
types asnon_float
. Sinceimmutable_data
almost always appears in a covariant positions, this seems like the best choice.Separability is a shallow axis, so it should not affect with-bounds. Semantics of separability for product layouts are to be determined, but it seems like all products should be non-float?
('a : non_float_value) or_null
will be madenon_float
in a future PR.t : non_separable_value
will provide an escape hatch from existing OCaml separability checks (e.g. for existential) in a future PR. Those checks will also themselves take into account separability annotations.any_non_null
will be changed toany_separable
, with arrays acceptingany_separable
elements, in a future PR.