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
Type | Name |
---|---|
System.UInt16 | version |
Dispose(ushort)
View Source
Declaration
public void Dispose(ushort version)
Parameters
Type | Name |
---|---|
System.UInt16 | version |
MoveNext(ushort, Waker)
View Source
Declaration
public StackFrameState MoveNext(ushort version, Waker waker)
Returns
Parameters
Type | Name |
---|---|
System.UInt16 | version |
WaaS.Runtime.Waker | waker |
TakeResults(ushort, Span<StackValueItem>)
View Source
Declaration
public void TakeResults(ushort version, Span<StackValueItem> dest)
Parameters
Type | Name |
---|---|
System.UInt16 | version |
System.Span<WaaS.Runtime.StackValueItem> | dest |
DoesTakeResults(ushort)
View Source
Declaration
public bool DoesTakeResults(ushort version)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.UInt16 | version |
PushResults(ushort, Span<StackValueItem>)
View Source
Declaration
public void PushResults(ushort version, Span<StackValueItem> source)
Parameters
Type | Name |
---|---|
System.UInt16 | version |
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
Parameters
Type | Name |
---|---|
WaaS.Runtime.ExecutionContext | context |
WaaS.Runtime.InstanceFunction | function |
System.ReadOnlySpan<WaaS.Runtime.StackValueItem> | inputValues |
GetLocal(int)
View Source
Declaration
public ref StackValueItem GetLocal(int index)
Returns
Parameters
Type | Name |
---|---|
System.Int32 | index |
End()
View Source
Declaration
public void End()
PushFrame(IInvocableFunction, Span<StackValueItem>)
View Source
Declaration
public void PushFrame(IInvocableFunction function, Span<StackValueItem> parameters)
Parameters
Type | Name |
---|---|
WaaS.Runtime.IInvocableFunction | function |
System.Span<WaaS.Runtime.StackValueItem> | parameters |
Push(uint)
View Source
Declaration
public void Push(uint value)
Parameters
Type | Name |
---|---|
System.UInt32 | value |
Push(ulong)
View Source
Declaration
public void Push(ulong value)
Parameters
Type | Name |
---|---|
System.UInt64 | value |
Push(float)
View Source
Declaration
public void Push(float value)
Parameters
Type | Name |
---|---|
System.Single | value |
Push(double)
View Source
Declaration
public void Push(double value)
Parameters
Type | Name |
---|---|
System.Double | value |
Push(StackValueItem)
View Source
Declaration
public void Push(StackValueItem value)
Parameters
Type | Name |
---|---|
WaaS.Runtime.StackValueItem | value |
Pop()
View Source
Declaration
public StackValueItem Pop()
Returns
Jump(uint)
View Source
Declaration
public void Jump(uint index)
Parameters
Type | Name |
---|---|
System.UInt32 | index |
EnterBlock(Label)
View Source
Declaration
public void EnterBlock(Label label)
Parameters
Type | Name |
---|---|
WaaS.Runtime.Label | label |
EndBlock()
View Source
Declaration
public void EndBlock()
JumpLabel(uint)
View Source
Declaration
public void JumpLabel(uint depth)
Parameters
Type | Name |
---|---|
System.UInt32 | depth |