Simplify serializer/deserializer. Reduce memory usage in lexer. Create HashTable data structure. Finish preparations for introducing new strings addressation.

This commit is contained in:
Ilmir Usmanov
2014-09-23 16:39:30 +04:00
parent f237a8d5e1
commit 8a5b956e38
27 changed files with 1152 additions and 1159 deletions
+12 -7
View File
@@ -19,11 +19,7 @@
#include "opcodes.h"
#include "stack.h"
#include "jerry-libc.h"
#ifndef OPCODE_T_STACK_DEFINED
DEFINE_STACK_TYPE (opcode_counter_t, opcode_t)
#define OPCODE_T_STACK_DEFINED
#endif
#include "lp-string.h"
/* bytecode_data contains identifiers, string and num literals.
Memory map if the following.
@@ -36,12 +32,21 @@ DEFINE_STACK_TYPE (opcode_counter_t, opcode_t)
U8 nums_count;
U32 nums[nums_count];
} */
extern uint8_t *bytecode_data;
struct
{
uint8_t strs_count;
uint8_t nums_count;
const lp_string *strings;
const ecma_number_t *nums;
}
__packed
bytecode_data;
enum
{
bytecode_opcodes_global_size
};
STACK (opcode_t, bytecode_opcodes)
STACK (bytecode_opcodes, opcode_counter_t, opcode_t)
#endif // BYTECODE_DATA_H