-
Notifications
You must be signed in to change notification settings - Fork 121
AST-53: Pattern-matching objects #296
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
Merged
Merged
Changes from all commits
Commits
Show all changes
70 commits
Select commit
Hold shift + click to select a range
36216f2
AST-53: First steps matching objects
ggreif 3767849
Runs IR now
ggreif dc1f37c
accept codegen problems for now
ggreif 919dfff
fill a few gaps
ggreif fc05b62
elim more asserts
ggreif a0e89f1
test that pattern matching works with shared objects
ggreif b77d174
Fix IR pattern matching
ggreif 23291ed
simplify by intro and use of match_field_pats
ggreif 9e9f3af
fill in last hole
ggreif a917708
simplify
ggreif e8839ad
Refactor
ggreif 1173c7e
Revert "simplify"
ggreif b67e7c8
more refactoring
ggreif 90d8af8
factor out map_obj_pat
ggreif 15a4dc0
reapply botched commit a917708
ggreif 3786d64
factor out replace_obj_pat
ggreif 5977fbd
check result
ggreif 3f485e5
Codegen for object patterns
ggreif 3c2afa9
put tuples and objects on an equal footing
ggreif 2398050
simplify TupP, ObjP compilation
ggreif b98a3ed
simplify a bit
ggreif 698dc3b
tweaks
ggreif ad2753e
WIP: Add tests for object patterns that require subtuping
ggreif 877159c
Fix subtype check
ggreif 71fba00
shuffle fields in testcase
ggreif e59a552
Fix the product-like IR subtyping rules for good.
ggreif b03c4f7
simplify test and run as dfinity
ggreif 450ad1c
Suppress matching on actors when in checking mode
ggreif 6f9d547
review feedback
ggreif f2c6e0f
changed pattern fields to contain names
ggreif 26af249
review feedback, use paths instead of destructuring
ggreif 41111c8
implement error for empty object type
ggreif b8c2748
test mismatched sorts in checking and inferring mode
ggreif da99850
more elaborate tests
ggreif b8b0ed8
Add test case for pattern-matching on “virtual object fields”
nomeata 2c0cdb0
fix a nit
ggreif 0ef0e0a
WIP: remodel the coverage checker
ggreif 9e403e8
fix test
ggreif 2bd2ed4
WIP: further coverage simplification
ggreif 29b8f3c
IR-check fields of pseudo-objects
ggreif 0ea1eb2
undo renaming
ggreif b42677d
backend fix still missing
ggreif de68b56
test iteration over Text
ggreif 800fe77
fix subtyping check Text <: Obj
ggreif fa0f6c3
review feedback
ggreif aea15f5
fix one nit
ggreif 33be7c5
check each pattern field in turn
ggreif c7da3ae
demonstrate different errors that can arise from object pattern bindings
ggreif 7c93fea
accept errors
ggreif 696f228
tweak error message
ggreif c22bb57
use compare instead of repeated comparisons
ggreif a1cb2aa
there is nothing wrong with matching the same field twice
ggreif 9d546d7
redundant parens
ggreif 95f2c36
coverage checking of repeated fields
ggreif 8478b56
fix coverage testcase
ggreif d2fc1fb
disallow matching of mutable fields
ggreif ed7c87d
simplify
ggreif b974eba
use is_mut predicate
ggreif 6e04b8b
fix compilation of object patterns
ggreif f11b967
disable repeated pattern fields
ggreif a3f8199
factor out compile_load_field
ggreif 161d963
revert my local changes
ggreif 73db3ad
define and use infer_pat_fields
ggreif 9cadb38
streamline check_pat_fields
ggreif c33eb9e
eliminate uses of pats_of_obj_pat
ggreif 6dc6a39
elim more pats_of_obj_pat
ggreif c29a7e0
remove all pats_of_obj_pat from the frontend
ggreif bf097c8
add spaces around =
ggreif bf16835
simplify mutability check
ggreif 46e78ff
remove remnants of failed IR-check tests
ggreif File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.