asm: implement parsing of classes, dot-mnemonics
This commit is contained in:
@@ -25,6 +25,7 @@ enum ivy_assembler_attrib {
|
||||
IVY_ASM_ATTRIB_GET,
|
||||
IVY_ASM_ATTRIB_SET,
|
||||
IVY_ASM_ATTRIB_PACKAGE,
|
||||
IVY_ASM_ATTRIB_BLOCK,
|
||||
__IVY_ASM_ATTRIB_COUNT,
|
||||
};
|
||||
|
||||
@@ -42,14 +43,14 @@ enum ivy_assembler_xval_type {
|
||||
IVY_ASM_XVAL_NONE = 0,
|
||||
IVY_ASM_XVAL_PROPERTY,
|
||||
IVY_ASM_XVAL_MEMBER_VAR,
|
||||
IVY_ASM_XVAL_MESSAGE_HANDLER,
|
||||
IVY_ASM_XVAL_PACKAGE_REF,
|
||||
};
|
||||
|
||||
enum ivy_assembler_scope_type {
|
||||
IVY_ASM_SCOPE_NONE = 0,
|
||||
IVY_ASM_SCOPE_CLASS,
|
||||
IVY_ASM_SCOPE_LAMBDA,
|
||||
IVY_ASM_SCOPE_MSGH,
|
||||
IVY_ASM_SCOPE_BLOCK,
|
||||
IVY_ASM_SCOPE_CONSTPOOL,
|
||||
IVY_ASM_SCOPE_IMPORT,
|
||||
};
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
|
||||
#define IVY_TABLE_IMPORT 0x58494D50u
|
||||
#define IVY_TABLE_CLASS 0x58434C53u
|
||||
#define IVY_TABLE_LAMBDA 0x4C424441u
|
||||
#define IVY_TABLE_MSGH 0x4D534748u
|
||||
#define IVY_TABLE_POOL 0x504F4F4Cu
|
||||
#define IVY_TABLE_BLOCK 0x54455854u
|
||||
#define IVY_TABLE_XDAT 0x58444154u
|
||||
|
||||
#define IVY_CLASS_TABLE_MVAR 0x4D564152u
|
||||
#define IVY_CLASS_TABLE_PROP 0x50524F50u
|
||||
#define IVY_CLASS_TABLE_MSGH 0x4D534748
|
||||
|
||||
#define IVY_CONSTPOOL_TABLE_NULL 0x00000000u
|
||||
#define IVY_CONSTPOOL_TABLE_STRING 0x58535452u
|
||||
@@ -49,14 +49,19 @@ struct ivy_bin_class_table_entry {
|
||||
b_i32 p_ident;
|
||||
b_i32 p_get;
|
||||
b_i32 p_set;
|
||||
b_i32 p_reserved;
|
||||
} e_property;
|
||||
|
||||
struct {
|
||||
b_i32 m_index;
|
||||
b_i32 m_ident;
|
||||
uint8_t m_reserved[8];
|
||||
uint8_t m_reserved[4];
|
||||
} e_mvar;
|
||||
|
||||
struct {
|
||||
b_i32 msg_selector;
|
||||
b_i32 msg_block;
|
||||
uint8_t m_reserved[4];
|
||||
} e_msgh;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -112,6 +117,10 @@ struct ivy_bin_constpool {
|
||||
struct ivy_bin_constpool_table_entry c_table[];
|
||||
};
|
||||
|
||||
struct ivy_bin_block {
|
||||
b_i32 b_index;
|
||||
};
|
||||
|
||||
struct ivy_bin_import_table_entry {
|
||||
b_i32 e_ident;
|
||||
};
|
||||
|
||||
@@ -32,6 +32,9 @@ enum ivy_asm_keyword {
|
||||
IVY_ASM_KW_CONSTPOOL,
|
||||
IVY_ASM_KW_PACKAGE,
|
||||
IVY_ASM_KW_CLASS,
|
||||
IVY_ASM_KW_PROPERTY,
|
||||
IVY_ASM_KW_VAR,
|
||||
IVY_ASM_KW_MSGH,
|
||||
IVY_ASM_KW_END,
|
||||
__IVY_ASM_KW_INDEX_LIMIT,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user