programs-react: adopt locked inline virtual-activation contract#237
Merged
Conversation
Per architect's rulings on #23, replace the pragmatic invoke-wins reconstruction with the locked contract: - extractCallEvents: expose ALL call events (ordered invoke-before- return) so a co-located invoke+return context is never swallowed as invoke-only. extractCallInfoFromInstruction now returns the first event (display banner unchanged). Parsing split into parseInvoke/parseReturn/parseRevert + collectCallInfos. - buildCallStack close-after semantics: an invoke opens a frame inclusive of its instruction; a return closes it AFTER (deferred until the viewed step advances past it), so a frame is visible while parked on its return-bearing instruction — uniformly for real and virtual frames, and correct for a single-instruction inlined body. - marker-keyed dedup: the caller-JUMP/callee-JUMPDEST collapse now also requires matching inline-ness, so a virtual invoke never merges with an adjacent real invoke of the same name. - generalized membership guard: force-pop trailing virtual frames whose depth exceeds the instruction's inline-marker count (handles nested inlining and residual smear). Tests: close-after lifetime, single-op body, adjacent-site split via the return, marker-keyed dedup, nested (double-marker) inlining, and a real-call close-after regression. 59 programs-react tests green. Verified end-to-end on real O2 (dbl@2 sites): one virtual frame per body, top level between/after, no phantom — holds even pre-de-smear.
Contributor
|
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.
Follow-up to #234 (already merged). Brings the inline virtual-activation call-stack reconstruction up to architect's locked contract from #23. Targets `transform-context`.
#234 shipped a pragmatic version (invoke-wins + dedup + guard). This replaces the reconstruction core with the agreed contract:
extractCallEvents— expose ALL call events on an instruction (ordered invoke-before-return) so a co-located invoke+return context is never swallowed as invoke-only.extractCallInfoFromInstructionnow returns the first event (display banner unchanged). Parsing factored intoparseInvoke/parseReturn/parseRevert+collectCallInfos.Verification
extractCallEventsboth-events ordering; close-after lifetime; single-op body; two adjacent sites split by the return; marker-keyed dedup; nested (double-marker) inlining; and a real-call close-after regression.dblinlined at 2 sites): one virtual frame per body, top level between/after, no phantom — holds even against the current pre-de-smear emission.Notes
⧉ inlinechip +isInlineonCallInfo/CallFramealready landed in web/programs-react: reconstruct inline virtual activations in the tracer #234; this PR is the reconstruction-logic revision only (mockTrace.ts+ its tests).