Fix joins for row likes with incompatible kinds#139
Merged
mshinwell merged 3 commits intooxcaml:mainfrom Aug 5, 2021
Merged
Conversation
This reverts commit c9591dc.
Row likes now have an assumption on fields kinds related to tags
mshinwell
approved these changes
Aug 5, 2021
mshinwell
added a commit
to mshinwell/oxcaml
that referenced
this pull request
May 1, 2023
e3076d2 Unboxed types v1 (oxcaml#139) e68c72d update HACKING.jst.adoc (oxcaml#165) 6c5197b Merge pull request oxcaml#166 from mshinwell/merge-flambda-backend-2023-04-28 0c3dcf9 Fix for ocamldoc 09b9e1c Fix for -zero-alloc-check 71e5e07 Compilation fixes after merge bf66257 Merge flambda-backend changes a2556fc Add `[%exclave]` support (oxcaml#51) ebe9576 Add data race freedom proposal (oxcaml#161) 3f3fc49 Merge pull request oxcaml#159 from riaqn/merge-backend 6c635dc minor changes after merge 99a0d85 Merge flambda-backend changes 2642463 Include the modes of values in debugging information (oxcaml#153) 4ecc8a4 Remove i386 CI check (oxcaml#155) git-subtree-dir: ocaml git-subtree-split: e3076d2
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
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.
Row_likes used to be only contain fields of kind value. This changed with ocaml-flambda/ocaml#396
Now a join can be performed between a float record and a block that contains fields of incompatible type (with some help from GADTs). This is ok most of the time since they come with different tags, but it is possible to build a row like of unknown tag with unannotated fields accesses. Those can only occur on standard blocks. Float records accesses always comes with annotated accesses.
So we can consider a new invariant for row likes:
If they contains fields of kinds other than value, the tag must be known. And no tag can be used for both value and non value contents.
If this ever end up being too restrictive (with changes to the language allowing new kinds of blocks), we could change row like tags to carry fields kinds