-
Notifications
You must be signed in to change notification settings - Fork 622
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
vmlogic: maintain memory by a Box #11614
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but please mind I have no expertise here :)
This is a part of an effort to drop the lifetime from the `VMLogic` structure in order to make it more straightforward to have it live for a longer duration alongside the instance and not force our hand in pretty much "create-execute contract-drop" flow.
f2a0b40
to
5bfbe8a
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #11614 +/- ##
==========================================
+ Coverage 71.46% 71.48% +0.02%
==========================================
Files 788 788
Lines 160854 160854
Branches 160854 160854
==========================================
+ Hits 114947 114992 +45
+ Misses 40887 40843 -44
+ Partials 5020 5019 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…11615) `VMLogic` containing a lifetime makes it difficult to have it live for any longer than a short sequence of `instantiate-link-run` and is one of the reasons why we're forced to have some unsafe code in our linking code. This refactor replaces some of the reference fields with `Arc`s, `Box`es, etc. This is not a complete refactor, I intend to do the remainder as a follow-up. Based on #11614 Part of #11319
This is a part of an effort to drop the lifetime from the
VMLogic
structure in order to make it more straightforward to have it live for a longer duration alongside the instance and not force our hand in pretty much "create-execute contract-drop" flow.Part of #11319