WIP: fix(gnovm): size bound methods by the wrapper, not the wrapped func's package#5852
Draft
ltzmaxwell wants to merge 5 commits into
Draft
WIP: fix(gnovm): size bound methods by the wrapper, not the wrapped func's package#5852ltzmaxwell wants to merge 5 commits into
ltzmaxwell wants to merge 5 commits into
Conversation
Collaborator
🛠 PR Checks SummaryAll Automated Checks passed. ✅ Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
…values Interface-bound method values now resolve their concrete method and receiver at call time (deref, value snapshot, nil panic, embedded-field re-read and dynamic re-dispatch all match Go), instead of binding eagerly. The call-time dispatch is charged via OpCPULazyBoundResolve. Hard-fork: BoundMethodValue gains a persisted Method field (wire/merkle/gas change).
… orthogonal boxed-realm txtar
… package GetShallowSize returned 0 when Func.PkgPath==".uverse", under-counting real, dynamically-allocated wrappers of uverse methods (e.g. `g := addr.String`, a value-method on the concrete uverse address type) by allocBoundMethod; it is now always allocBoundMethod, with counting governed by GC/persistence reachability. Hard-fork: observably changes GC/persist sizing (confirmed via runtime.MemStats: +248 bytes).
9542bc3 to
5761f1a
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.
BoundMethodValue.GetShallowSizereturned 0 when the wrappedFunc'sPkgPathwas".uverse", under-counting a real, dynamically-allocated bmv wrapper of a uverse method — e.g.g := addr.String, a value-method on the concrete uverseaddresstype — byallocBoundMethod(248 bytes; confirmed viaruntime.MemStats).PkgPathof its own (unlikePackageValue/Block/FuncValue, which correctly key on their own package); its size is now alwaysallocBoundMethod, with counting governed by GC/persistence reachability.TestBoundMethodValueGetShallowSizepins the size for uverse-func / lazy (Func==nil) / normal bmvs.