Remove interactive VM lifetime step cap
This commit is contained in:
13
godot/GodotVmOptions.cs
Normal file
13
godot/GodotVmOptions.cs
Normal 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);
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user