-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide WrapperValue and WrapperStorable interfaces
Currently, Cadence interpreter.SomeValue is opaque to packages like Atree, so interpreter.SomeValue is treated as atomic value. This causes a container wrapped by interpreter.SomeValue to be treated as atomic value since it is opaque. Given this, the integration between Cadence and Atree does not establish parent-child relationship of a wrapped container since the inner values of interpreter.SomeValue are not visible to Atree. Resolving this issue requires modifying onflow/cadence to unwrap containers wrapped by interpreter.SomeValue. This commit simplifies and reduces the amount of changes needed by onflow/cadence by providing two new interfaces here: - WrapperValue - WrapperStorable When Cadence passes objects that implement these interfaces, Atree will call the interface functions (that implement unwrapping) when setting child-parent callbacks. This approach simplifies changes needed by integration in Cadence to allow Atree to support containers wrapped by interpreter.SomeValue.
- Loading branch information
Showing
8 changed files
with
871 additions
and
33 deletions.
There are no files selected for viewing
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
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
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
Oops, something went wrong.