//
// Ariadne.Generator's copy of the scripts in this file: the code that actually runs. Edits here are overwritten.
// In the copy beside the script, #line paths are relative to it; the compiled code uses full paths.
#pragma warning disable
using System.Collections.Generic;
using Ariadne;
namespace Vellum.WasmProbe
{
partial class Hidden
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public int Run__seen;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Run.seen");
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Vellum.WasmProbe.Gates context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public Hidden()
{
}
protected Hidden(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
{ if (reader.TryField("Count", out int loaded)) { this.Count = loaded; } else if (!reader.HasField("Count")) { throw new global::System.IO.InvalidDataException("Hidden's save has no field 'Count', which has no initializer to fall back on. Give it one."); } }
}
protected Hidden(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Field("Count");
lister.Local("Run.seen");
}
#pragma warning restore
protected override void __SaveFields(global::Ariadne.IArcWriter writer)
{
base.__SaveFields(writer);
#line 61 "ProbeTypes.cs"
writer.Field("Count", this.Count);
#line default
}
public partial class __Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Run.seen":
#line 65 "ProbeTypes.cs"
writer.Local("Run.seen", this.Run__seen);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
base.LoadLocals(reader);
{ if (reader.TryLocal("Run.seen", out int loaded)) { this.Run__seen = loaded; } }
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, Gates gates)
{
#line hidden
ref int seen = ref __frame.Run__seen;
switch (__frame.ResumeKey)
{
case "wait": goto wait;
}
#line 65 "ProbeTypes.cs"
seen = 0;
#line hidden
wait:
#line 68 "ProbeTypes.cs"
while (!gates.Open.Contains("go"))
#line hidden
{
#line 70 "ProbeTypes.cs"
seen++;
#line 71 "ProbeTypes.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 74 "ProbeTypes.cs"
Count = seen;
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "wait":
__frame.SaveLocal("Run.seen", writer);
break;
}
}
}
}
namespace Vellum.WasmProbe
{
partial class Widening
{
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class __Frame : global::Ariadne.Frame
{
public global::Vellum.WasmProbe.Widening.Wrap__Frame Run____call_start_frame;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
{
global::Ariadne.IArcPartLister scope = lister.Scope("Run.start/", typeof(global::Vellum.WasmProbe.Widening.Wrap__Frame));
if (scope != null)
{
global::Vellum.WasmProbe.Widening.Wrap__Frame.ListParts(scope);
}
}
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected override global::Ariadne.Frame __CreateFrame()
{
return new __Frame();
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
public partial class Wrap__Frame : global::Ariadne.Frame
{
public int Wrap__left;
public ItemType Wrap__kept;
public global::Ariadne.Frame Wrap____call_deeper_frame;
public static void ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Local("Wrap.kept");
lister.Local("Wrap.left");
lister.Polymorphic("Wrap.deeper/", typeof(global::Vellum.WasmProbe.Widening.Wrap__Frame<>));
}
}
[global::System.CodeDom.Compiler.GeneratedCode("Ariadne.Generator", "1.0")]
protected override bool __Resume(global::Vellum.WasmProbe.Gates context, global::Ariadne.TickTime __time)
{
return Run__Passage((__Frame)__CurrentFrame, __time, context);
}
protected override void __SaveLocals(global::Ariadne.IArcWriter writer)
{
Run__LocalsToSave((__Frame)__CurrentFrame, 0, writer);
}
public Widening()
{
}
protected Widening(global::Ariadne.IArcReader reader, global::Ariadne.AutoLoadEveryField load) : base(reader)
{
{ if (reader.TryField("Log", out string loaded)) { this.Log = loaded; } }
}
protected Widening(global::Ariadne.IArcReader reader)
: this(reader, default(global::Ariadne.AutoLoadEveryField))
{
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private static void __ListParts(global::Ariadne.IArcPartLister lister)
{
lister.Field("Log");
{
global::Ariadne.IArcPartLister scope = lister.Scope("Run.start/", typeof(global::Vellum.WasmProbe.Widening.Wrap__Frame));
if (scope != null)
{
global::Vellum.WasmProbe.Widening.Wrap__Frame.ListParts(scope);
}
}
}
#pragma warning restore
protected override void __SaveFields(global::Ariadne.IArcWriter writer)
{
base.__SaveFields(writer);
#line 80 "ProbeTypes.cs"
writer.Field("Log", this.Log);
#line default
}
#pragma warning disable
public partial class __Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack();
base.LoadLocals(reader);
{
if (reader.TryScope("Run.start/", out global::Ariadne.IArcReader scope))
{
this.Run____call_start_frame = new global::Vellum.WasmProbe.Widening.Wrap__Frame();
this.Run____call_start_frame.LoadLocals(scope);
}
}
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack();
base.AttachWaits(slot);
if (this.Run____call_start_frame != null) { this.Run____call_start_frame.AttachWaits(slot); }
}
public override void EndWaits()
{
global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack();
base.EndWaits();
if (this.Run____call_start_frame != null) { this.Run____call_start_frame.EndWaits(); }
}
}
#pragma warning restore
public partial class Wrap__Frame
{
public override void SaveLocal(string key, global::Ariadne.IArcWriter writer)
{
switch (key)
{
case "Wrap.kept":
#line 96 "ProbeTypes.cs"
writer.Local("Wrap.kept", this.Wrap__kept);
#line hidden
return;
case "Wrap.left":
#line 94 "ProbeTypes.cs"
writer.Local("Wrap.left", this.Wrap__left);
#line hidden
return;
}
#line default
base.SaveLocal(key, writer);
}
}
#pragma warning disable
public partial class Wrap__Frame
{
public override void LoadLocals(global::Ariadne.IArcReader reader)
{
global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack();
base.LoadLocals(reader);
{ if (reader.TryLocal("Wrap.kept", out ItemType loaded)) { this.Wrap__kept = loaded; } }
{ if (reader.TryLocal("Wrap.left", out int loaded)) { this.Wrap__left = loaded; } }
{
if (reader.TryScope("Wrap.deeper/", out global::Ariadne.IArcReader scope))
{
this.Wrap____call_deeper_frame = global::Ariadne.Frame.Build(typeof(global::Vellum.WasmProbe.Widening.Wrap__Frame<>), scope);
this.Wrap____call_deeper_frame.LoadLocals(scope);
}
}
}
public override void AttachWaits(global::Ariadne.WakeSlot slot)
{
global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack();
base.AttachWaits(slot);
if (this.Wrap____call_deeper_frame != null) { this.Wrap____call_deeper_frame.AttachWaits(slot); }
}
public override void EndWaits()
{
global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack();
base.EndWaits();
if (this.Wrap____call_deeper_frame != null) { this.Wrap____call_deeper_frame.EndWaits(); }
}
}
#pragma warning disable
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected bool Run__Passage(__Frame __frame, global::Ariadne.TickTime __time, Gates gates)
{
#line hidden
switch (__frame.ResumeKey)
{
case "start": goto start;
}
#line hidden
start:
#line 117 "ProbeTypes.cs"
using (__frame.Enter("start")) { if (__frame.Run____call_start_frame == null) { __frame.Run____call_start_frame = new global::Vellum.WasmProbe.Widening.Wrap__Frame(); } if (!Wrap__Passage(__frame.Lend(__frame.Run____call_start_frame), __frame, __time, gates, __frame.ResumeKey == null ? (7) : default(int), __frame.ResumeKey == null ? (2) : default(int))) { return false; } }
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
protected void Run__LocalsToSave(__Frame __frame, int depth, global::Ariadne.IArcWriter writer)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "start":
{ global::Ariadne.IArcWriter scope = writer.Scope("Run.start/"); Wrap__LocalsToSave(__frame.Lend(__frame.Run____call_start_frame), __frame, depth + 1, scope, writer); }
break;
}
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private bool Wrap__Passage(Wrap__Frame __frame, __Frame __arcFrame, global::Ariadne.TickTime __time, Gates gates, ItemType item, int left__argument)
{
#line hidden
ref int left = ref __frame.Wrap__left;
if (__frame.ResumeKey == null)
{
left = left__argument;
}
ref ItemType kept = ref __frame.Wrap__kept;
switch (__frame.ResumeKey)
{
case "wait": goto wait;
case "deeper": goto deeper;
}
#line 96 "ProbeTypes.cs"
kept = item;
#line hidden
wait:
#line 99 "ProbeTypes.cs"
while (!gates.Open.Contains("wrap" + left))
#line hidden
{
#line 101 "ProbeTypes.cs"
__frame.Mark("wait"); return false;
#line hidden
}
#line 104 "ProbeTypes.cs"
Log += Wrapping(typeof(ItemType)) + "@" + left + ";";
#line hidden
{
#line 105 "ProbeTypes.cs"
if (!(left > 0)) goto __end1;
#line hidden
}
#line hidden
deeper:
#line hidden
{
#line 108 "ProbeTypes.cs"
using (__frame.Enter("deeper")) { global::System.Runtime.CompilerServices.RuntimeHelpers.EnsureSufficientExecutionStack(); if (__frame.Wrap____call_deeper_frame == null) { __frame.Wrap____call_deeper_frame = new global::Vellum.WasmProbe.Widening.Wrap__Frame>(); } if (!Wrap__Passage>(__frame.Lend(((global::Vellum.WasmProbe.Widening.Wrap__Frame>)__frame.Wrap____call_deeper_frame)), __arcFrame, __time, gates, __frame.ResumeKey == null ? (new List { kept }) : default(global::System.Collections.Generic.List), __frame.ResumeKey == null ? (left - 1) : default(int))) { return false; } }
#line hidden
}
#line hidden
__end1:
#line 111 "ProbeTypes.cs"
Log += "up" + Wrapping(kept.GetType()) + ";";
#line hidden
__frame.Exit(); return true;
#line default
}
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
private void Wrap__LocalsToSave(Wrap__Frame __frame, __Frame __arcFrame, int depth, global::Ariadne.IArcWriter writer, global::Ariadne.IArcWriter arcWriter)
{
if (depth >= __frame.Cursor.Count)
{
return;
}
switch (__frame.Cursor[depth])
{
case "wait":
__frame.SaveLocal("Wrap.left", writer);
__frame.SaveLocal("Wrap.kept", writer);
break;
case "deeper":
__frame.SaveLocal("Wrap.left", writer);
__frame.SaveLocal("Wrap.kept", writer);
{ global::Ariadne.IArcWriter scope = writer.Scope("Wrap.deeper/"); scope.TypeArguments(typeof(global::System.Collections.Generic.List)); Wrap__LocalsToSave>(__frame.Lend(((global::Vellum.WasmProbe.Widening.Wrap__Frame>)__frame.Wrap____call_deeper_frame)), __arcFrame, depth + 1, scope, arcWriter); }
break;
}
}
}
}