Skip to content

bugc: add debug contexts to all unmapped bytecodes#190

Merged
gnidan merged 2 commits intocall-returnfrom
compiler-fix-unmapped-bytecodes
Mar 11, 2026
Merged

bugc: add debug contexts to all unmapped bytecodes#190
gnidan merged 2 commits intocall-returnfrom
compiler-fix-unmapped-bytecodes

Conversation

@gnidan
Copy link
Member

@gnidan gnidan commented Mar 11, 2026

Summary

  • Threads remark/code debug contexts through all 22 previously unmapped compiler-generated instructions
  • Free memory pointer init, return value spill, STOP guard, prologue param stores, prologue return PC save, and deployment wrapper all now carry debug info
  • All 82 instructions across runtime and create programs are now mapped (was 60/82)

Thread remark/code contexts through all compiler-generated
instructions that previously lacked debug info:

- Free memory pointer initialization (remark)
- Return value spill after call continuation (call expr source range)
- STOP guard between main and user functions (remark)
- Function prologue MSTORE for param storage (thread existing remark)
- Function prologue return PC save sequence (thread existing remark)
- Deployment wrapper CODECOPY+RETURN (remark)

All 82 instructions across runtime and create programs now
carry debug contexts (previously 22 were unmapped).
@github-actions
Copy link
Contributor

github-actions bot commented Mar 11, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-03-11 09:14 UTC

…ructions

Add source location info (loc, sourceId) to Ir.Function so EVM
codegen can build code contexts for compiler-generated instructions.

Instructions that map to a source location now use gather contexts
combining both a remark (for debugger tooling) and a code context
(for source highlighting):
- Free memory pointer init → code block / create block range
- Function prologue (param stores, return PC save) → function decl range
- STOP guard → code block range

Deployment wrapper remains remark-only (no corresponding source).
Return value spill already had correct source mapping (call expr).
@gnidan gnidan merged commit 2c36ef8 into call-return Mar 11, 2026
4 checks passed
@gnidan gnidan deleted the compiler-fix-unmapped-bytecodes branch March 11, 2026 09:10
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