Skip to content

Annotate Wasm AST nodes (Instrs) with bytecode position metadata for tracing/debugging#753

Draft
bbyalcinkaya wants to merge 4 commits intomasterfrom
bytecode-pos
Draft

Annotate Wasm AST nodes (Instrs) with bytecode position metadata for tracing/debugging#753
bbyalcinkaya wants to merge 4 commits intomasterfrom
bytecode-pos

Conversation

@bbyalcinkaya
Copy link
Copy Markdown
Member

This PR adds support for position-annotated instructions in the Wasm AST, enabling execution traces to carry bytecode position metadata for debugging.

Changes

  • Update py-wasm to the version that supports this feature (currently linked to a branch; will point to the released version once the corresponding py-wasm PR is merged)
  • Add #instrWithPos(inner: Instr, posStart: Int, posEnd: Int) syntax
  • Add execution rule to unwrap the wrapper:
rule <instrs> #instrWithPos(I, _, _) => I ... </instrs>
  • Update AST translation in wasm2kast to handle wrapped instructions

Notes

@bbyalcinkaya bbyalcinkaya changed the title Add position-annotated instructions for tracing/debugging Annotate Wasm AST nodes (Instrs) with bytecode position metadata for tracing/debugging Apr 3, 2026
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.

2 participants