bugc: carry the call-site source range on invoke/return contexts#263
Merged
Conversation
A function call's caller JUMP (invoke) and continuation JUMPDEST (return) previously carried only the callee's identity and definition range — never the source range of the call expression itself. Stepping onto either mapped to the callee's definition, not to the call site. Compose the call-site `code` range (already in hand as the call op's operationDebug) flat alongside the invoke and return contexts. invoke/return and code are disjoint keys, so this is plain flat composition. Behavior and the invoke/return identity are unchanged. Covers the real caller JUMP (O0/O1) and the continuation JUMPDEST. Deferred: the TCO back-edge JUMP (needs the call-site loc threaded into the tail-call IR) and inlined calls (the surviving instruction already carries the callee-body range, so the call site must be gathered rather than flat-composed) — both follow separately.
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.
A function call's caller JUMP (
invoke) and continuation JUMPDEST(
return) previously carried only the callee's identity and definitionrange — never the source range of the call expression itself. A debugger
stepping onto either mapped to the callee's definition, not to the call
site (
add(3, 4)).This composes the call-site
coderange — already in hand as the callop's
operationDebug— flat alongside theinvokeandreturncontexts.invoke/returnandcodeare disjoint keys, so it is plain flatcomposition (no gather). The invoke/return identity and runtime behavior
are unchanged.
Scope
invoke) at O0/O1 —terminator.ts.return) —block.ts.Deferred (follow-ups, noted honestly)
tail-call IR object; not available at that emission site today.
the callee-body
coderange, so the call site must be gathered withit (two colliding
codekeys), not flat-composed. That is a distinct,more involved change and lands separately.