feat: implement objects moving and borrowing
This commit is contained in:
@@ -21,9 +21,10 @@ typedef enum
|
||||
FZL_OPCODE_CALL = 0xF30001, // Call function
|
||||
FZL_OPCODE_RET = 0xF30002, // Return from function
|
||||
|
||||
FZL_OPCODE_ALLOC_OBJECT = 0xFA0001, // Allocate N slots
|
||||
FZL_OPCODE_GET_FIELD = 0xFA0002, // Get field N of an object at dstack
|
||||
FZL_OPCODE_SET_FIELD = 0xFA0003, // Set field N of an object at dstack
|
||||
FZL_OPCODE_ALLOC_OBJECT = 0xFA0001, // Allocate N slots
|
||||
FZL_OPCODE_GET_FIELD = 0xFA0002, // Get field N of an object at dstack
|
||||
FZL_OPCODE_SET_FIELD = 0xFA0003, // Set field N of an object at dstack
|
||||
FZL_OPCODE_ESCAPE_OBJECT = 0xFA0004, // Make parent envtable as owner
|
||||
|
||||
FZL_OPCODE_ADD = 0xA00001, // Sum two numbers in dstack
|
||||
FZL_OPCODE_SUB = 0xA00002, // Subract two numbers in dstack
|
||||
@@ -40,6 +41,12 @@ typedef enum
|
||||
FZL_OPCODE_CMP_GT = 0xB00005, // Greater than
|
||||
FZL_OPCODE_CMP_GTEQ = 0xB00006, // Greater than or equal
|
||||
|
||||
FZL_OPCODE_CMP_EQ_STR = 0xB10001, // Strings equality
|
||||
FZL_OPCODE_CMP_NEQ_STR = 0xB10002, // Strings non-equality
|
||||
|
||||
FZL_OPCODE_CMP_EQ_OBJ = 0xB20001, // Objects equality (by pointer)
|
||||
FZL_OPCODE_CMP_NEQ_OBJ = 0xB20002, // Objects non-equality (by pointer)
|
||||
|
||||
FZL_OPCODE_AND = 0xC00001, // A && B
|
||||
FZL_OPCODE_OR = 0xC00002, // A || B
|
||||
|
||||
|
||||
Reference in New Issue
Block a user