|
|
@@ -24,6 +24,16 @@ public readonly record struct LuaFunctionExecutionContext
|
|
|
return stack[^ArgumentCount..];
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ public ReadOnlyMemory<LuaValue> ArgumentsAsMemory
|
|
|
+ {
|
|
|
+ get
|
|
|
+ {
|
|
|
+ var stack = State.Stack;
|
|
|
+ var memory = stack.GetBufferMemory();
|
|
|
+ return memory[(stack.Count-ArgumentCount)..stack.Count];
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
|
public bool HasArgument(int index)
|