-
Notifications
You must be signed in to change notification settings - Fork 145
Introduce InclusiveRange<T: Integer> type
#2523
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 80 commits
Commits
Show all changes
88 commits
Select commit
Hold shift + click to select a range
ec147bd
Introduce InclusiveRange
darkdrag00nv2 9517f7e
Validate that the step is always non-zero
darkdrag00nv2 f48199c
Validate that step takes the direction of sequence towards end
darkdrag00nv2 d13a39c
More tests
darkdrag00nv2 258e541
Add invalid case tests in checker
darkdrag00nv2 4fbe486
Add interpreter test cases
darkdrag00nv2 9458718
Use nil for location range of composite value
darkdrag00nv2 c962d1c
Add missing semicolon
darkdrag00nv2 5a01dde
Convert and assert needle value at callsite
darkdrag00nv2 87cdcc5
Store a lazy lookup table for IntegerValue in interpreter
darkdrag00nv2 ac00e1e
Format the error message for sequence moving away from end.
darkdrag00nv2 fc47776
Break mod operation into multiple lines.
darkdrag00nv2 74af213
Format NewInclusiveRangeValueWithStep call into multiple lines
darkdrag00nv2 18b4859
Declare and initialize result on the same line
darkdrag00nv2 a867b65
fix lint
darkdrag00nv2 e36333e
return early in contains if needle = lower/upper bound
darkdrag00nv2 d36a76e
remove runtime/format/range.go as it not needed
darkdrag00nv2 91ea40f
Add import/export support for InclusiveRange
darkdrag00nv2 6fd4f27
Add encoding/decoding/storage tests and fix bugs
darkdrag00nv2 5386f43
Add conformance checks for CompositeValue which are not CompositeType
darkdrag00nv2 d72ddf5
Add more tests - values, dynamic casting, ccf, json
darkdrag00nv2 ae29179
Make cachedIntegerValues a global value
darkdrag00nv2 efb0b74
Ensure that inner type is an integer in runtime type constructor
darkdrag00nv2 96fe558
Remove dead code for super type of InclusiveRangeType
darkdrag00nv2 4dac857
Take Sema type in param instead of calculating in constructor
darkdrag00nv2 aa36e25
Split out construction of InclusiveRange into a third-private function
darkdrag00nv2 6b03f03
Add more tests case for ccf encoding/decoding
darkdrag00nv2 b1d81fa
Remove redundant error from return type
darkdrag00nv2 cec3966
Return InclusiveRangeType from exportInclusiveRangeType
darkdrag00nv2 2c9b4a3
Update runtime/tests/checker/range_value_test.go
darkdrag00nv2 184189b
use []error instead of []interface{}
darkdrag00nv2 d981a16
Update runtime/stdlib/range.go
darkdrag00nv2 0a9b4f8
Update runtime/stdlib/range.go
darkdrag00nv2 be883f8
Update runtime/interpreter/value_range.go
darkdrag00nv2 8440ae7
Update runtime/interpreter/value_range.go
darkdrag00nv2 44d4d62
Update runtime/interpreter/value_range.go
darkdrag00nv2 2b31f2c
Update runtime/interpreter/value.go
darkdrag00nv2 e582b6c
use constructor instead of direct init; also fix compilation error
darkdrag00nv2 112114f
Use TypeValue instead of PathLinkValue in encoding_test
darkdrag00nv2 dec5f50
Extract sequence direction check to a separate function
darkdrag00nv2 47fc917
Predefine list of fields and use in conformance check
darkdrag00nv2 6fbc1a5
Use type switch for exporting InclusiveRange
darkdrag00nv2 1b1f450
Use type switch in conformance check
darkdrag00nv2 79ff403
Minor nits and add test coverage for Import InclusiveRangeType
darkdrag00nv2 59b0457
Infer type in importing InclusiveRange, also improve readability of c…
darkdrag00nv2 16ddd41
Refactor InclusiveRange import flow and add more test cases
darkdrag00nv2 d43a0c5
Add tests for missing failure scenario
darkdrag00nv2 e94c03f
Fix comment
darkdrag00nv2 c4c13ff
Remove comment.
darkdrag00nv2 ac26a8b
Use `Equal()` instead of `==` and `!=` operators
darkdrag00nv2 5b3d817
Extract elementType as a local variable and use.
darkdrag00nv2 7cca141
Compare with empty string instead of calculating length of string
darkdrag00nv2 bed0e37
Rename TestInclusiveRangeConstructionValid -> TestCheckInclusiveRange…
darkdrag00nv2 5b187d5
Rename TestInclusiveRangeConstructionInvalid -> TestCheckInclusiveRan…
darkdrag00nv2 257043e
Fix typo and build
darkdrag00nv2 1fa90d3
Use decodeCBORArrayWithKnownSize
darkdrag00nv2 7e5c801
Use inline type instead of CBOR array in InclusiveRange type
darkdrag00nv2 80e9f2e
Use stricter multiplicity annotation.
darkdrag00nv2 c7db732
use r.MemberType directly instead of r.ElementType function
darkdrag00nv2 e2a8436
Add TestGetValueForIntegerType
darkdrag00nv2 5de89b1
Add runtime type tests for InclusiveRangeType
darkdrag00nv2 f44c8a5
Fix build and tests since we have Arity support now
darkdrag00nv2 a4d4c96
Add runtime to load and call contains
darkdrag00nv2 1d54260
Handle each level of multi-level type separately.
darkdrag00nv2 131a163
Remove unnecessary nesting.
darkdrag00nv2 d169d09
Extract local variable for invocation.Interpreter
darkdrag00nv2 cf5edc8
Use StaticType.Equal
darkdrag00nv2 e47dbad
Add comment on not metering memory usage of getValueForIntegerType
darkdrag00nv2 5d1b13f
Move GetValueForIntegerType to a new file
darkdrag00nv2 bceada1
Make InclusiveRange of values.go a pointer type
darkdrag00nv2 1f96574
Handle MemberType as potentially nil in InclusiveRangeType
darkdrag00nv2 e6eeaed
Add test case for usage of InclusiveRange without inner type
darkdrag00nv2 5f2ddd8
Add a mutex in range_value_test.go to protect concurrent access to th…
darkdrag00nv2 d97eef6
Add checkParameterizedTypeIsInstantiated
darkdrag00nv2 7904b95
Use IsSameTypeKind
darkdrag00nv2 8732e3d
Add test case in TestCheckTypeArguments
darkdrag00nv2 34a43de
Merge branch 'feature/range-type' into range_type
turbolent 81aed0f
fix qualified string and type ID generation
turbolent 1af52af
improve small integer cache
turbolent 56c8ac7
remove unnecessary assertion
turbolent 9315a88
Separate functions for static type conformance check
darkdrag00nv2 dd77fb7
Add runtime test to save and load InclusiveRange in two transactions
darkdrag00nv2 d80f426
Revert the TestRuntimeStorageMultipleTransactionsInclusiveRangeFuncti…
darkdrag00nv2 10f48af
Add test case for comparing InclusiveRange
darkdrag00nv2 64b1b0d
Add test case for inclusive range instantiation with 2 type args
darkdrag00nv2 4445c56
Add test case to indicate unsupported storage of inclusive range
darkdrag00nv2 db22c2c
Make InclusiveRange type non-storable
darkdrag00nv2 1ca3adc
Remove auth account storage test for InclusiveRange
darkdrag00nv2 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
Large diffs are not rendered by default.
Oops, something went wrong.
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.