Introducing 'opcode counter' type for 'meta' opcode; replacing 'jmp_down' opcodes that are used as pointers only with 'meta' opcodes of the introduced type.

This commit is contained in:
Ruben Ayrapetyan
2014-08-28 15:17:49 +04:00
parent 5d2b535cec
commit 9d45f68370
6 changed files with 81 additions and 31 deletions
+5 -1
View File
@@ -57,7 +57,8 @@ typedef enum
OPCODE_META_TYPE_VARG_PROP_DATA, /**< name (lit_idx) and value (var_idx) for a data property descriptor */
OPCODE_META_TYPE_VARG_PROP_GETTER, /**< name (lit_idx) and getter (var_idx) for an accessor property descriptor */
OPCODE_META_TYPE_VARG_PROP_SETTER, /**< name (lit_idx) and setter (var_idx) for an accessor property descriptor */
OPCODE_META_TYPE_END_WITH /**< end of with statement */
OPCODE_META_TYPE_END_WITH, /**< end of with statement */
OPCODE_META_TYPE_OPCODE_COUNTER /**< opcode counter */
} opcode_meta_type;
typedef struct
@@ -72,6 +73,9 @@ typedef struct
ecma_value_t *regs_p; /**< register variables */
} int_data_t;
opcode_counter_t calc_meta_opcode_counter_from_meta_data (const idx_t data_1, const idx_t data_2);
opcode_counter_t read_meta_opcode_counter (int_data_t *int_data);
#define OP_CALLS_AND_ARGS(p, a) \
p##_2 (a, call_0, lhs, name_lit_idx) \
p##_3 (a, call_1, lhs, name_lit_idx, arg1_lit_idx) \