feat: add IHost.FrameYield per-opcode hook (no-op headless, parity held)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-07-08 17:29:50 -04:00
parent 82492d8a6c
commit cd93ebae2e
11 changed files with 46 additions and 0 deletions

View File

@@ -122,6 +122,7 @@ public sealed class VirtualMachine
Steps++;
if (_sink.TracingSteps) _sink.Emit(TraceEvent.Step(pc, frame.Script.Instructions[pc], _depth));
int next = Step(frame.Script.Instructions[pc], pc);
_host.FrameYield();
if (next == FRAME_RETURN) { outcome = FrameOutcome.Returned; break; }
if (next == HALT) { outcome = FrameOutcome.Halted; break; }
pc = next;