Fix alignment

This commit is contained in:
Ilmir Usmanov 2014-10-13 21:42:25 +04:00
parent 38b47eaba7
commit 85ad5f8350
8 changed files with 16 additions and 17 deletions

View File

@ -34,17 +34,16 @@ typedef struct \
KEY_TYPE key; \
VALUE_TYPE value; \
} \
__packed \
NAME##_backet;
TODO (/*Rewrite to NAME##_backet **backets when neccesary*/)
#define DEFINE_HASH_TYPE(NAME, KEY_TYPE, VALUE_TYPE) \
typedef struct \
{ \
NAME##_backet *backets; \
uint8_t *lens; \
uint8_t size; \
uint8_t max_lens; \
uint8_t *lens; \
NAME##_backet *backets; \
} \
__packed \
NAME##_hash_table;

View File

@ -22,11 +22,11 @@
typedef struct linked_list_header
{
struct linked_list_header *next;
struct linked_list_header *prev;
uint8_t magic;
uint8_t block_size;
uint8_t used_size;
struct linked_list_header *next;
struct linked_list_header *prev;
}
__packed
linked_list_header;

View File

@ -21,8 +21,8 @@
/* Length-prefixed or "pascal" string. */
typedef struct
{
ecma_length_t length;
ecma_char_t *str;
ecma_length_t length;
}
__packed
lp_string;

View File

@ -73,10 +73,10 @@ typedef TYPE NAME##_stack_value_type; \
typedef DATA_TYPE NAME##_stack_data_type; \
typedef struct \
{ \
linked_list blocks; \
DATA_TYPE length; \
DATA_TYPE current; \
DATA_TYPE block_len; \
linked_list blocks; \
} \
__packed \
NAME##_stack;

View File

@ -22,10 +22,11 @@
typedef struct tree_header
{
uint8_t magic;
uint8_t children_num;
struct tree_header *parent;
linked_list children;
uint8_t magic;
uint8_t children_num;
uint16_t reserved;
}
__packed
tree_header;

View File

@ -139,9 +139,9 @@ typedef size_t locus;
/* Represents the contents of a token. */
typedef struct
{
locus loc;
token_type type;
uint8_t uid;
locus loc;
}
__packed
token;

View File

@ -22,10 +22,10 @@
typedef struct
{
tree_header t;
unsigned strict_mode:1;
opcode_counter_t opcodes_num;
linked_list opcodes;
tree_header t;
opcode_counter_t opcodes_num;
unsigned strict_mode:1;
}
__packed
scopes_tree_int;

View File

@ -35,13 +35,12 @@
} */
struct
{
uint8_t strs_count;
uint8_t nums_count;
opcode_counter_t opcodes_count;
const lp_string *strings;
const ecma_number_t *nums;
const opcode_t *opcodes;
uint8_t strs_count;
uint8_t nums_count;
opcode_counter_t opcodes_count;
}
__packed
bytecode_data;