Skip to main content

Class WasmStackFrame

Represents a stack frame of a WebAssembly function loaded from binary.

Assembly: WaaS.Core.dll
View Source
Declaration
public class WasmStackFrame : IStackFrameCore, IVersionedDisposable<ushort>

Implements:
WaaS.Runtime.IStackFrameCore, WaaS.IVersionedDisposable<T>

Properties

Function

View Source
Declaration
public InstanceFunction Function { get; }

Instance

View Source
Declaration
public Instance Instance { get; }

Version

View Source
Declaration
public ushort Version { get; }

Methods

GetResultLength(ushort)

View Source
Declaration
public int GetResultLength(ushort version)
Returns

System.Int32

Parameters
TypeName
System.UInt16version

Dispose(ushort)

View Source
Declaration
public void Dispose(ushort version)
Parameters
TypeName
System.UInt16version

MoveNext(ushort, Waker)

View Source
Declaration
public StackFrameState MoveNext(ushort version, Waker waker)
Returns

WaaS.Runtime.StackFrameState

Parameters
TypeName
System.UInt16version
WaaS.Runtime.Wakerwaker

TakeResults(ushort, Span<StackValueItem>)

View Source
Declaration
public void TakeResults(ushort version, Span<StackValueItem> dest)
Parameters
TypeName
System.UInt16version
System.Span<WaaS.Runtime.StackValueItem>dest

DoesTakeResults(ushort)

View Source
Declaration
public bool DoesTakeResults(ushort version)
Returns

System.Boolean

Parameters
TypeName
System.UInt16version

PushResults(ushort, Span<StackValueItem>)

View Source
Declaration
public void PushResults(ushort version, Span<StackValueItem> source)
Parameters
TypeName
System.UInt16version
System.Span<WaaS.Runtime.StackValueItem>source

Get(ExecutionContext, InstanceFunction, ReadOnlySpan<StackValueItem>)

View Source
Declaration
public static WasmStackFrame Get(ExecutionContext context, InstanceFunction function, ReadOnlySpan<StackValueItem> inputValues)
Returns

WaaS.Runtime.WasmStackFrame

Parameters
TypeName
WaaS.Runtime.ExecutionContextcontext
WaaS.Runtime.InstanceFunctionfunction
System.ReadOnlySpan<WaaS.Runtime.StackValueItem>inputValues

GetLocal(int)

View Source
Declaration
public ref StackValueItem GetLocal(int index)
Returns

WaaS.Runtime.StackValueItem

Parameters
TypeName
System.Int32index

End()

View Source
Declaration
public void End()

PushFrame(IInvocableFunction, Span<StackValueItem>)

View Source
Declaration
public void PushFrame(IInvocableFunction function, Span<StackValueItem> parameters)
Parameters
TypeName
WaaS.Runtime.IInvocableFunctionfunction
System.Span<WaaS.Runtime.StackValueItem>parameters

Push(uint)

View Source
Declaration
public void Push(uint value)
Parameters
TypeName
System.UInt32value

Push(ulong)

View Source
Declaration
public void Push(ulong value)
Parameters
TypeName
System.UInt64value

Push(float)

View Source
Declaration
public void Push(float value)
Parameters
TypeName
System.Singlevalue

Push(double)

View Source
Declaration
public void Push(double value)
Parameters
TypeName
System.Doublevalue

Push(StackValueItem)

View Source
Declaration
public void Push(StackValueItem value)
Parameters
TypeName
WaaS.Runtime.StackValueItemvalue

Pop()

View Source
Declaration
public StackValueItem Pop()
Returns

WaaS.Runtime.StackValueItem

Jump(uint)

View Source
Declaration
public void Jump(uint index)
Parameters
TypeName
System.UInt32index

EnterBlock(Label)

View Source
Declaration
public void EnterBlock(Label label)
Parameters
TypeName
WaaS.Runtime.Labellabel

EndBlock()

View Source
Declaration
public void EndBlock()

JumpLabel(uint)

View Source
Declaration
public void JumpLabel(uint depth)
Parameters
TypeName
System.UInt32depth

Implements