This commit is contained in:
Ilmir Usmanov
2014-07-24 19:50:37 +04:00
parent c2f82eefc0
commit 1f3b5a4c29
14 changed files with 182 additions and 34 deletions
+20
View File
@@ -256,6 +256,26 @@ OP_CODE_DECL (in, T_IDX_IDX_IDX,
var_left,
var_right)
/** dst = var_right++. */
OP_CODE_DECL (post_incr, T_IDX_IDX,
dst,
var_right)
/** dst = var_right--. */
OP_CODE_DECL (post_decr, T_IDX_IDX,
dst,
var_right)
/** dst = ++var_right. */
OP_CODE_DECL (pre_incr, T_IDX_IDX,
dst,
var_right)
/** dst = --var_right. */
OP_CODE_DECL (pre_decr, T_IDX_IDX,
dst,
var_right)
// Assignment operators.
// Assign value to LEFT operand based on value of RIGHT operand.
+8
View File
@@ -409,6 +409,10 @@ do_number_arithmetic(struct __int_data *int_data, /**< interpreter context */
op(b_not) \
op(instanceof) \
op(in) \
op(post_incr) \
op(post_decr) \
op(pre_incr) \
op(pre_decr) \
static char __unused unimplemented_list_end
#define DEFINE_UNIMPLEMENTED_OP(op) \
@@ -950,6 +954,10 @@ GETOP_IMPL_1 (jmp, opcode_idx)
GETOP_IMPL_1 (jmp_up, opcode_count)
GETOP_IMPL_1 (jmp_down, opcode_count)
GETOP_IMPL_3 (addition, dst, var_left, var_right)
GETOP_IMPL_2 (post_incr, dst, var_right)
GETOP_IMPL_2 (post_decr, dst, var_right)
GETOP_IMPL_2 (pre_incr, dst, var_right)
GETOP_IMPL_2 (pre_decr, dst, var_right)
GETOP_IMPL_3 (substraction, dst, var_left, var_right)
GETOP_IMPL_3 (division, dst, var_left, var_right)
GETOP_IMPL_3 (multiplication, dst, var_left, var_right)
+4
View File
@@ -110,6 +110,10 @@ typedef ecma_completion_value_t (*opfunc)(OPCODE, struct __int_data *);
op(in)
#define OP_ARITHMETIC(op) \
op(post_incr) \
op(post_decr) \
op(pre_incr) \
op(pre_decr) \
op(addition) \
op(substraction) \
op(division) \