Fix handling of non-reference operands in prefix operations.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
Ruben Ayrapetyan
2015-10-28 18:52:39 +03:00
parent 906558b8e9
commit 4500965316
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -1225,7 +1225,7 @@ check_operand_in_prefix_operation (jsp_operand_t obj) /**< operand, which type s
const op_meta last = last_dumped_op_meta ();
if (last.op.op_idx != VM_OP_PROP_GETTER)
{
if (obj.is_empty_operand ())
if (obj.is_register_operand ())
{
/*
* FIXME:
+8
View File
@@ -43,3 +43,11 @@ assert (++o.p === 2);
assert (o.p === 2);
assert (--o.p === 1);
assert (o.p === 1);
try {
eval ('++ ++ a');
assert (false);
}
catch (e) {
assert (e instanceof ReferenceError);
}