Skip to content

bugc: map return epilogue instructions to source location#197

Merged
gnidan merged 1 commit intocall-returnfrom
compiler-return-epilogue-maps
Apr 1, 2026
Merged

bugc: map return epilogue instructions to source location#197
gnidan merged 1 commit intocall-returnfrom
compiler-return-epilogue-maps

Conversation

@gnidan
Copy link
Copy Markdown
Member

@gnidan gnidan commented Apr 1, 2026

Summary

  • Return epilogue (PUSH/MLOAD/JUMP) now carries the source location of the return statement instead of a remark-only context
  • Uses the IR return terminator's operationDebug which already has the source range from irgen
  • Adds test verifying return JUMP has code context with source location

The function-return PUSH/MLOAD/JUMP sequence previously had
remark-only debug context. Now uses the IR return terminator's
operationDebug, which carries the source location of the
return statement. This lets debuggers map the epilogue back
to the BUG source.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-04-01 21:06 UTC

@gnidan gnidan merged commit 9c5d1a0 into call-return Apr 1, 2026
4 checks passed
@gnidan gnidan deleted the compiler-return-epilogue-maps branch April 1, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant