feat(vm): emit Opcode::Debugger for debugger; statements#5100
feat(vm): emit Opcode::Debugger for debugger; statements#5100tkshsbcue wants to merge 1 commit intoboa-dev:mainfrom
Opcode::Debugger for debugger; statements#5100Conversation
|
Hey @jedel1043 I've been looking into the VM's bytecode pipeline and noticed |
Previously, the bytecompiler silently ignored `debugger;` statements (empty match arm). This adds a dedicated `Opcode::Debugger` so the statement is represented in bytecode and visible during tracing. Currently a no-op, this lays groundwork for future debugger integration to intercept these points.
0f6b0e4 to
b02180d
Compare
Test262 conformance changes
Fixed tests (2):Broken tests (175):Tested main commit: |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5100 +/- ##
===========================================
+ Coverage 47.24% 59.15% +11.90%
===========================================
Files 476 564 +88
Lines 46892 62677 +15785
===========================================
+ Hits 22154 37074 +14920
- Misses 24738 25603 +865 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Adds a dedicated
Opcode::Debuggerthat the bytecompiler emits fordebugger;statements. Previously these were silently ignored (empty match arm in the bytecompiler); now they are represented in bytecode and visible during tracing.Currently a no-op — this lays groundwork for future debugger integration to intercept these points.
Before:
debugger;produced no bytecode at allAfter:
Changes
vm/opcode/mod.rs— newDebuggervariant ingenerate_opcodes!, module declaration and re-exportvm/opcode/debugger/mod.rs— new file, no-op operation implementationbytecompiler/statement/mod.rs— emitDebuggeropcode instead of ignoring the statementvm/flowgraph/mod.rs— handleInstruction::Debuggerin flowgraph generationvm/code_block.rs— handleInstruction::Debuggerin operand displayTest plan
cargo checkandcargo check --features tracepasscargo test -p boa_engine— all 183 tests pass, zero regressionscargo test -p insta-bytecode— bytecode snapshot tests passdebugger;appears in trace output viaboa -t -e 'debugger; 1+1;'