Remove interactive VM lifetime step cap

This commit is contained in:
gamer147
2026-07-29 19:02:55 -04:00
parent f7751c2b93
commit fa911db1d6
6 changed files with 50 additions and 13 deletions

13
godot/GodotVmOptions.cs Normal file
View File

@@ -0,0 +1,13 @@
using Age.Engine.Vm;
/// <summary>Separates bounded diagnostic runs from the persistent interactive AGE session.</summary>
public static class GodotVmOptions
{
public const long DiagnosticMaxSteps = 20_000_000;
public static VmOptions Create(bool selftest, bool ignoreExitRequests)
=> new(
MaxSteps: selftest ? DiagnosticMaxSteps : long.MaxValue,
IgnoreExitRequests: ignoreExitRequests,
NoSaveDat: selftest);
}

View File

@@ -391,10 +391,7 @@ public partial class Main : Godot.Control
if (histFile != null) { _hist = new Age.Engine.Diagnostics.HistogramTraceSink();
sink = new Age.Engine.Diagnostics.CompositeTraceSink(_trace, _hist); }
_vm = new VirtualMachine(script, table, _host,
new VmOptions(
MaxSteps: 20_000_000,
IgnoreExitRequests: nativeDebugMenu,
NoSaveDat: _selftest),
GodotVmOptions.Create(_selftest, nativeDebugMenu),
provider, sink,
sharedProfile: sharedProfile,
nativeDatStore: nativeSaveStore,