Remove unnecessary check from VM_OC_NOT (#2622)

This patch removes the ECMA_IS_VALUE_ERROR check from VM_OC_NOT, since the general toBoolean operation cannot throw an exception.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2018-11-30 07:45:48 +01:00
committed by László Langó
parent 24817b27f9
commit 6dfa4efbfb
3 changed files with 2 additions and 25 deletions
+2 -8
View File
@@ -2080,14 +2080,8 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
}
case VM_OC_NOT:
{
result = opfunc_logical_not (left_value);
if (ECMA_IS_VALUE_ERROR (result))
{
goto error;
}
*stack_top_p++ = result;
*stack_top_p++ = ecma_make_boolean_value (!ecma_op_to_boolean (left_value));
JERRY_ASSERT (ecma_is_value_boolean (stack_top_p[-1]));
goto free_left_value;
}
case VM_OC_BIT_NOT: