asm: implement import and instruction parsing

This commit is contained in:
2024-12-14 20:26:04 +00:00
parent 724f40f19f
commit 462f67c6aa
11 changed files with 805 additions and 17 deletions

View File

@@ -54,7 +54,7 @@ enum ivy_assembler_scope_type {
IVY_ASM_SCOPE_IMPORT,
};
typedef unsigned int ivy_assembler_attrib_table[__IVY_ASM_ATTRIB_COUNT];
typedef unsigned long long ivy_assembler_attrib_table[__IVY_ASM_ATTRIB_COUNT];
IVY_API enum ivy_static ivy_assembler_create(FILE *out, struct ivy_assembler **as);
IVY_API enum ivy_status ivy_assembler_finish(struct ivy_assembler *as);

View File

@@ -112,5 +112,8 @@ struct ivy_bin_constpool {
struct ivy_bin_constpool_table_entry c_table[];
};
struct ivy_bin_import_table_entry {
b_i32 e_ident;
};
#endif

View File

@@ -30,6 +30,7 @@ enum ivy_asm_keyword {
IVY_ASM_KW_IMPORT,
IVY_ASM_KW_BLOCK,
IVY_ASM_KW_CONSTPOOL,
IVY_ASM_KW_PACKAGE,
IVY_ASM_KW_CLASS,
IVY_ASM_KW_END,
__IVY_ASM_KW_INDEX_LIMIT,