Wire Sys4ScriptProvider into CLI run/play/sweep; validate real subroutine execution
Integration: ADDILL executes ADDILLSUB + CALCREVISE and returns to its own exit. Sweep (execution on): 284/297 exit clean, 13 STEP-LIMIT (input/state-gated ADV scenes that now spin headless once subroutine global-writes drive their loops — state divergence, not a call-script bug; 0 depth-cap, 0 unresolved, 0 crashes). Removed the dead _halted field (halt propagates via FrameOutcome). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -24,9 +24,10 @@ public sealed class GameSession
|
||||
public void SeedString(int addr, string value) => GlobalStrings[addr] = value;
|
||||
|
||||
/// <summary>Run one scene: seed a fresh VM from session state, execute, merge final state back.</summary>
|
||||
public SceneResult RunScene(Script script, OpcodeTable table, IHost host, VmOptions? options = null)
|
||||
public SceneResult RunScene(Script script, OpcodeTable table, IHost host,
|
||||
VmOptions? options = null, IScriptProvider? provider = null)
|
||||
{
|
||||
var vm = new VirtualMachine(script, table, host, options);
|
||||
var vm = new VirtualMachine(script, table, host, options, provider);
|
||||
foreach (var kv in Globals) vm.Globals[kv.Key] = kv.Value;
|
||||
foreach (var kv in GlobalStrings) vm.GlobalStrings[kv.Key] = kv.Value;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user