mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Script cleanup for standards-compliance (not going out of bounds on vectors).
I_POP is no longer considered a binary instruction because all other binary instructions expect the stack to have at least two elements - adding a manual check is kludgy Added I_TAILCALL to accomodate indended optimizations git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1417 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -43,6 +43,8 @@ enum InstructionType
|
||||
, I_TERNARY = 14 ///< arg = 3ary instr : pop 3 values, apply a function, push the result
|
||||
, I_QUATERNARY = 15 ///< arg = 4ary instr : pop 4 values, apply a function, push the result
|
||||
, I_DUP = 16 ///< arg = int : duplicate the k-from-top element of the stack
|
||||
, I_POP = 17 ///< arg = * : pop the top value off the stack.
|
||||
, I_TAILCALL = 18 ///< arg = int, n*var : perform a tail call - like I_CALL, except faster
|
||||
};
|
||||
|
||||
/// Types of unary instructions (taking one argument from the stack)
|
||||
@@ -54,8 +56,7 @@ enum UnaryInstructionType
|
||||
|
||||
/// Types of binary instructions (taking two arguments from the stack)
|
||||
enum BinaryInstructionType
|
||||
{ I_POP ///< Pop the top value of the stack
|
||||
, I_ITERATOR_R ///< Make an iterator for a range (two integers)
|
||||
{ I_ITERATOR_R ///< Make an iterator for a range (two integers)
|
||||
, I_MEMBER ///< Member of an object
|
||||
// Arithmatic
|
||||
, I_ADD ///< add
|
||||
|
||||
Reference in New Issue
Block a user