mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Fix the vm stop checking bug (#2795)
when the vm executes VM_OC_LESS operation, the lookahead optimization will cause the by-passing of vm stop checking. Thus we need to disable the optimization here if JERRY_VM_EXEC_STOP is defined. JerryScript-DCO-1.0-Signed-off-by: Wang Zhikang wzk0406@mail.ustc.edu.cn
This commit is contained in:
parent
7d48e011c9
commit
f3c8eeecb5
@ -2553,7 +2553,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
|
||||
if (ecma_are_values_integer_numbers (left_value, right_value))
|
||||
{
|
||||
bool is_less = (ecma_integer_value_t) left_value < (ecma_integer_value_t) right_value;
|
||||
|
||||
#ifndef JERRY_VM_EXEC_STOP
|
||||
/* This is a lookahead to the next opcode to improve performance.
|
||||
* If it is CBC_BRANCH_IF_TRUE_BACKWARD, execute it. */
|
||||
if (*byte_code_p <= CBC_BRANCH_IF_TRUE_BACKWARD_3 && *byte_code_p >= CBC_BRANCH_IF_TRUE_BACKWARD)
|
||||
@ -2587,7 +2587,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
#endif /* !JERRY_VM_EXEC_STOP */
|
||||
*stack_top_p++ = ecma_make_boolean_value (is_less);
|
||||
continue;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user