asm: improve alignment of on-disk structures
This commit is contained in:
@@ -26,30 +26,37 @@
|
|||||||
#define IVY_BIN_SELECTOR_OBJECT 0x00000001u
|
#define IVY_BIN_SELECTOR_OBJECT 0x00000001u
|
||||||
#define IVY_BIN_SELECTOR_CLASS 0x00000002u
|
#define IVY_BIN_SELECTOR_CLASS 0x00000002u
|
||||||
|
|
||||||
|
#define IVY_BIN_NULL_HANDLE ((ivy_bin_data_handle)0)
|
||||||
|
|
||||||
|
typedef uint32_t ivy_bin_data_handle;
|
||||||
|
|
||||||
struct ivy_bin_header {
|
struct ivy_bin_header {
|
||||||
uint32_t h_magic;
|
uint32_t h_magic;
|
||||||
uint16_t h_table_len;
|
uint16_t h_table_len;
|
||||||
|
uint8_t h_reserved[2];
|
||||||
uint64_t h_table_offset;
|
uint64_t h_table_offset;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ivy_bin_table_entry {
|
struct ivy_bin_table_entry {
|
||||||
uint32_t e_type;
|
uint32_t e_type;
|
||||||
uint64_t e_offset;
|
|
||||||
uint32_t e_size;
|
uint32_t e_size;
|
||||||
|
uint64_t e_offset;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ivy_bin_class_table_entry {
|
struct ivy_bin_class_table_entry {
|
||||||
uint32_t e_type;
|
uint32_t e_type;
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
uint32_t p_ident;
|
ivy_bin_data_handle p_ident;
|
||||||
uint32_t p_get;
|
ivy_bin_data_handle p_get;
|
||||||
uint32_t p_set;
|
ivy_bin_data_handle p_set;
|
||||||
|
uint32_t p_reserved;
|
||||||
} e_property;
|
} e_property;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
uint32_t m_index;
|
uint32_t m_index;
|
||||||
uint32_t m_ident;
|
ivy_bin_data_handle m_ident;
|
||||||
|
uint8_t m_reserved[16];
|
||||||
} e_mvar;
|
} e_mvar;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -60,18 +67,19 @@ struct ivy_bin_class {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct ivy_bin_lambda {
|
struct ivy_bin_lambda {
|
||||||
uint32_t l_ident;
|
ivy_bin_data_handle l_ident;
|
||||||
uint32_t l_instr[];
|
uint32_t l_instr[];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ivy_bin_msgh {
|
struct ivy_bin_msgh {
|
||||||
uint32_t msg_recipient;
|
ivy_bin_data_handle msg_recipient;
|
||||||
uint32_t msg_selector;
|
ivy_bin_data_handle msg_selector;
|
||||||
uint32_t msg_instr[];
|
uint32_t msg_instr[];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ivy_bin_constpool_header {
|
struct ivy_bin_constpool_header {
|
||||||
uint32_t c_nr_table_entries;
|
uint32_t c_nr_table_entries;
|
||||||
|
uint8_t c_reserved[4];
|
||||||
uint64_t c_table_offset;
|
uint64_t c_table_offset;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -84,25 +92,25 @@ struct ivy_bin_string {
|
|||||||
struct ivy_bin_selector {
|
struct ivy_bin_selector {
|
||||||
uint8_t sel_flags;
|
uint8_t sel_flags;
|
||||||
uint8_t sel_nr_args;
|
uint8_t sel_nr_args;
|
||||||
|
uint8_t sel_reserved[2];
|
||||||
uint32_t sel_hash;
|
uint32_t sel_hash;
|
||||||
uint32_t sel_name;
|
ivy_bin_data_handle sel_name;
|
||||||
uint32_t sel_args[];
|
ivy_bin_data_handle sel_args[];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ivy_bin_ident {
|
struct ivy_bin_ident {
|
||||||
uint32_t id_hash;
|
uint32_t id_hash;
|
||||||
uint8_t id_nr_parts;
|
uint8_t id_nr_parts;
|
||||||
uint32_t id_parts[];
|
uint8_t id_reserved[3];
|
||||||
|
ivy_bin_data_handle id_parts[];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ivy_bin_constpool_table_entry {
|
struct ivy_bin_constpool_table_entry {
|
||||||
uint32_t e_type;
|
uint32_t e_type;
|
||||||
|
uint32_t e_reserved;
|
||||||
|
|
||||||
union {
|
union {
|
||||||
uint32_t e_atom;
|
ivy_bin_data_handle e_handle;
|
||||||
uint32_t e_string;
|
|
||||||
uint32_t e_ident;
|
|
||||||
uint32_t e_sel;
|
|
||||||
int64_t e_sint;
|
int64_t e_sint;
|
||||||
uint64_t e_uint;
|
uint64_t e_uint;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user