Add literals - replacements of strings and numbers in parser.

This commit is contained in:
Ilmir Usmanov
2014-10-31 21:22:52 +04:00
parent 05cf2dbe04
commit 8c7dc08d93
26 changed files with 822 additions and 568 deletions
+3 -1
View File
@@ -17,13 +17,15 @@
#define COMMON_H
#include "jerry-libc.h"
#include "literal.h"
#define NAME_TO_ID(op) (__op__idx_##op)
#define __OPCODE_SIZE(name, arg1, arg2, arg3) \
sizeof (__op_##name) + 1,
#define LP(s) (lp_string) { .length = (uint8_t) __strlen(s), .str = (ecma_char_t *) s }
#define LP(s) create_literal_from_str_compute_len (s)
#define NUM(s) create_literal_from_num (s)
static uint8_t opcode_sizes[] = {
OP_LIST (OPCODE_SIZE)