feat: implement objects and classes
This commit is contained in:
@@ -21,6 +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_ADD = 0xA00001, // Sum two numbers in dstack
|
||||
FZL_OPCODE_SUB = 0xA00002, // Subract two numbers in dstack
|
||||
FZL_OPCODE_MUL = 0xA00003, // Multiply two numbers in dstack
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
typedef enum
|
||||
{
|
||||
FZL_TYPE_NULL,
|
||||
FZL_TYPE_OBJECT,
|
||||
|
||||
FZL_TYPE_STRING,
|
||||
FZL_TYPE_CHAR,
|
||||
|
||||
@@ -13,6 +13,8 @@ typedef struct
|
||||
|
||||
union
|
||||
{
|
||||
void *obj;
|
||||
|
||||
struct
|
||||
{
|
||||
const char *value;
|
||||
|
||||
Reference in New Issue
Block a user