[6/n][vm-rewrite][sui-execution] Update object runtime to use type tags instead of runtime VM types#21070
Closed
tzakian wants to merge 3 commits intotzakian/vm-rewrite-adapter-5from
Closed
[6/n][vm-rewrite][sui-execution] Update object runtime to use type tags instead of runtime VM types#21070tzakian wants to merge 3 commits intotzakian/vm-rewrite-adapter-5from
tzakian wants to merge 3 commits intotzakian/vm-rewrite-adapter-5from
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
489397b to
53ce0a8
Compare
2f24850 to
49f2c90
Compare
53ce0a8 to
04ed3db
Compare
49f2c90 to
b5ffa61
Compare
04ed3db to
89b34cf
Compare
b5ffa61 to
fb777e6
Compare
89b34cf to
208bdfc
Compare
tnowacki
reviewed
Feb 7, 2025
Comment on lines
251
to
254
| let mut obj_runtime: RefMut<ObjectRuntime> = context | ||
| .extensions() | ||
| .get::<NativeContextMut<ObjectRuntime>>() | ||
| .get_mut(); |
Contributor
There was a problem hiding this comment.
Suggested change
| let mut obj_runtime: RefMut<ObjectRuntime> = context | |
| .extensions() | |
| .get::<NativeContextMut<ObjectRuntime>>() | |
| .get_mut(); | |
| let obj_runtime = context.extensions_mut().get::<NativeContextMut<ObjectRuntime>>().borrow_mut(); |
Contributor
There was a problem hiding this comment.
This is the point of doing Deref :)
fb777e6 to
a02ac4b
Compare
208bdfc to
3f44124
Compare
tnowacki
reviewed
Feb 7, 2025
| // NB: We need to borrow the runtime and grab the mutable reference and then pass this into | ||
| // `get_or_fetch_object` so that the lifetime of the returned object is tied to the lifetime of | ||
| // the runtime reference we are creating here and the borrow checker will be happy with us. | ||
| let object_runtime: &NativeContextMut<'_, ObjectRuntime<'_>> = context.extensions().get(); |
Contributor
There was a problem hiding this comment.
Suggested change
| let object_runtime: &NativeContextMut<'_, ObjectRuntime<'_>> = context.extensions().get(); | |
| let object_runtime: &NativeContextMut<'_, ObjectRuntime<'_>> = context.extensions().get(); |
Bit of a nit, but let me message you a cleaner way for this. This seems a bit messy
…gs instead of runtime VM types. Since the VM instance no longer will live across commands/the entire lifetime of the object runtime, this replaces all VM runtime `Type`s with `TypeTag`s or `MoveObjectType`s where appropriate. This also updates the natives and runtime to handle the new `NativeContextExtensions` model. NB: The code in the PR may not be working as future PRs will build on top of this.
…type tags instead of runtime VM types.
…to use type tags instead of runtime VM types.
a02ac4b to
2f9e925
Compare
3f44124 to
66d028f
Compare
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.
Since the VM instance no longer will live across commands/the entire lifetime of the object runtime, this replaces all VM runtime
Types withTypeTags orMoveObjectTypes where appropriate. This also updates the natives and runtime to handle the newNativeContextExtensionsmodel.NB: The code in the PR may not be working as future PRs will build on top of this.