-
Notifications
You must be signed in to change notification settings - Fork 138
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
Merge v1.0 into master #3604
Merged
Merged
Merge v1.0 into master #3604
Conversation
This file contains 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
follow-up from onflow/cadence-internal#249 perform return value conversion/boxing for all invocations, like internal invocations, not just invocation expressions
…tionValue.invoke ensure parameter is properly converted/boxed
…d of FunctionValue.invoke
… instead of FunctionValue.invoke
… FunctionValue.invoke
… FunctionValue.invoke
… of FunctionValue.invoke
This commit removes unreferenced slabs when updating dictionary with enum keys to prevent them from remaining in storage. Background Currently, unreferenced slabs can be created by updating dictionary if the key is enum type and key already exists. More specifically, - Cadence creates and stores enum key (in its own slab) in storage during Transfer() to update underlying atree map element. - If same key already exists, atree map only updates map value without referencing the newly created enum key. - Newly created enum key is not referenced (aka dangling, unreachable) in the underlying atree map. This issue only affects enum key type because enum type is the only type that: - can be used as dictionary key (hashable) and - is transferred to its own slab. Large string key isn't affected by this issue because large string isn't stored in its own slab during Transfer().
Currently enum type is the only composite type that needs to be removed explicitly when used as key to update existing dictionary element. However, (as noted by Supun) Cadence might in the future add support for other composite types as key. This commit removes enum type checking to support new composite key types to be added to Cadence language in the future.
Update version.go
Port bug fixes from internal repo
Prevent leaving unreferenced slabs in storage while updating dictionary with enum key
Fix invocation boxing
…/sync-v1.0-master
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:master commit ed99fbf Collapsed results for better readability
|
turbolent
approved these changes
Oct 8, 2024
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.
Description
Port PRs merged to
v1.0
tomaster
:Conflicts:
Caused by the test added only in the public
v1.0
: #3586.Not really a conflict, just both
internal
andpublic
repos added new tests to the same file.master
branchFiles changed
in the Github PR explorer