Stack operations
Moving values on the VM stack, and counting them.
These functions do not read or write values. Pushing a C value and reading one back are on Creating objects and Manipulating objects. This page covers the shape of the stack itself.
See The stack for the index convention. Every function here follows it.
Pushes in the stack the value at the index idx.
Pops n elements from the stack.
Pops 1 object from the stack.
Removes an element from an arbitrary position in the stack.
Returns the index of the top of the stack, which is also the number of values on it.
Forces the stack to a given size, padding with nulls when it grows.
Ensure that the stack space left is at least of a specified size.If the stack is smaller it will automatically grow. If there's a metamethod currently running the function will fail and the stack will not be resized, this situation has to be considered a "stack overflow".
Compares the two values on top of the stack. The right operand is pushed first.
Compares the two values on top of the stack without consulting a _cmp metamethod.
Pushes the object at the position 'idx' of the source VM stack in the destination VM stack.