CMake file

Update to C++ 11: std::shared_ptr, for each loops
Update to wxWidgets 3.0+
This commit is contained in:
Twan van Laarhoven
2020-04-08 00:18:14 +02:00
parent aa39a9bc71
commit 35a89676b4
53 changed files with 343 additions and 415 deletions
+20 -20
View File
@@ -22,32 +22,32 @@ DECLARE_POINTER_TYPE(Script);
*/
enum InstructionType
// Basic
{ I_NOP = 0 ///< arg = * : no operation, used as placeholder for extra data values
, I_PUSH_CONST = 1 ///< arg = const val : push a constant onto the stack
, I_JUMP = 2 ///< arg = address : move the instruction pointer to the given position
, I_JUMP_IF_NOT = 3 ///< arg = address : move the instruction pointer if the top of the stack is false
, I_JUMP_SC_AND = 19 ///< arg = address : (short-circuiting and) jump and don't pop if the top of the stack is false
, I_JUMP_SC_OR = 20 ///< arg = address : (short-circuiting or) jump and don't pop if the top of the stack is true
{ I_NOP = 0 ///< arg = * : no operation, used as placeholder for extra data values
, I_PUSH_CONST = 1 ///< arg = const val : push a constant onto the stack
, I_JUMP = 2 ///< arg = address : move the instruction pointer to the given position
, I_JUMP_IF_NOT = 3 ///< arg = address : move the instruction pointer if the top of the stack is false
, I_JUMP_SC_AND = 19 ///< arg = address : (short-circuiting and) jump and don't pop if the top of the stack is false
, I_JUMP_SC_OR = 20 ///< arg = address : (short-circuiting or) jump and don't pop if the top of the stack is true
// Variables
, I_GET_VAR = 4 ///< arg = var : find a variable, push its value onto the stack, it is an error if the variable is not found
, I_SET_VAR = 5 ///< arg = var : assign the top value from the stack to a variable (doesn't pop)
, I_GET_VAR = 4 ///< arg = var : find a variable, push its value onto the stack, it is an error if the variable is not found
, I_SET_VAR = 5 ///< arg = var : assign the top value from the stack to a variable (doesn't pop)
// Objects
, I_MEMBER_C = 6 ///< arg = const name : finds a member of the top of the stack replaces the top of the stack with the member
, I_LOOP = 7 ///< arg = address : loop over the elements of an iterator, which is the *second* element of the stack (this allows for combing the results of multiple iterations)
///< at the end performs a jump and pops the iterator. note: The second element of the stack must be an iterator!
, I_LOOP_WITH_KEY = 8 ///< arg = address : loop, but also pushing the key
, I_MEMBER_C = 6 ///< arg = const name : finds a member of the top of the stack replaces the top of the stack with the member
, I_LOOP = 7 ///< arg = address : loop over the elements of an iterator, which is the *second* element of the stack (this allows for combing the results of multiple iterations)
///< at the end performs a jump and pops the iterator. note: The second element of the stack must be an iterator!
, I_LOOP_WITH_KEY = 8 ///< arg = address : loop, but also pushing the key
, I_MAKE_OBJECT = 9 ///< arg = int : make a list/map with n elements, pops 2n values of the stack, n key/value pairs
// Functions
, I_CALL = 10 ///< arg = int, n*var : call the top item of the stack, with the given number of arguments (set with SET_VAR, but in the activation record of the call)
, I_CALL = 10 ///< arg = int, n*var : call the top item of the stack, with the given number of arguments (set with SET_VAR, but in the activation record of the call)
, I_CLOSURE = 11 ///< arg = int, n*var : construct a call closure object with the given arguments
, I_TAILCALL = 12 ///< arg = int, n*var : perform a tail call - like I_CALL, except faster
, I_TAILCALL = 12 ///< arg = int, n*var : perform a tail call - like I_CALL, except faster
// Simple instructions
, I_UNARY = 13 ///< arg = 1ary instr : pop 1 value, apply a function, push the result
, I_BINARY = 14 ///< arg = 2ary instr : pop 2 values, apply a function, push the result
, I_TERNARY = 15 ///< arg = 3ary instr : pop 3 values, apply a function, push the result
, I_QUATERNARY = 16 ///< arg = 4ary instr : pop 4 values, apply a function, push the result
, I_DUP = 17 ///< arg = int : duplicate the k-from-top element of the stack
, I_POP = 18 ///< arg = * : pop the top value off the stack.
, I_UNARY = 13 ///< arg = 1ary instr : pop 1 value, apply a function, push the result
, I_BINARY = 14 ///< arg = 2ary instr : pop 2 values, apply a function, push the result
, I_TERNARY = 15 ///< arg = 3ary instr : pop 3 values, apply a function, push the result
, I_QUATERNARY = 16 ///< arg = 4ary instr : pop 4 values, apply a function, push the result
, I_DUP = 17 ///< arg = int : duplicate the k-from-top element of the stack
, I_POP = 18 ///< arg = * : pop the top value off the stack.
};
/// Types of unary instructions (taking one argument from the stack)