Fix invalid assertion condition in jump opcode handlers.

Related issue: #120

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
Ruben Ayrapetyan 2015-06-20 19:52:52 +03:00
parent 0db82a56d2
commit 89a7449913

View File

@ -40,7 +40,7 @@ opfunc_is_true_jmp_down (opcode_t opdata, /**< operation data */
if (ecma_is_completion_value_normal_true (to_bool_completion))
{
JERRY_ASSERT (offset != 0 && ((uint32_t) int_data->pos + offset < MAX_OPCODES));
JERRY_ASSERT ((uint32_t) int_data->pos + offset < MAX_OPCODES);
int_data->pos = (opcode_counter_t) (int_data->pos + offset);
}
else
@ -73,7 +73,7 @@ opfunc_is_true_jmp_up (opcode_t opdata, /**< operation data */
if (ecma_is_completion_value_normal_true (to_bool_completion))
{
JERRY_ASSERT (offset != 0 && (uint32_t) int_data->pos >= offset);
JERRY_ASSERT ((uint32_t) int_data->pos >= offset);
int_data->pos = (opcode_counter_t) (int_data->pos - offset);
}
else
@ -112,7 +112,7 @@ opfunc_is_false_jmp_down (opcode_t opdata, /**< operation data */
if (!ecma_is_completion_value_normal_true (to_bool_completion))
{
JERRY_ASSERT (offset != 0 && ((uint32_t) int_data->pos + offset < MAX_OPCODES));
JERRY_ASSERT ((uint32_t) int_data->pos + offset < MAX_OPCODES);
int_data->pos = (opcode_counter_t) (int_data->pos + offset);
}
else
@ -145,7 +145,7 @@ opfunc_is_false_jmp_up (opcode_t opdata, /**< operation data */
if (!ecma_is_completion_value_normal_true (to_bool_completion))
{
JERRY_ASSERT (offset != 0 && (uint32_t) int_data->pos >= offset);
JERRY_ASSERT ((uint32_t) int_data->pos >= offset);
int_data->pos = (opcode_counter_t) (int_data->pos - offset);
}
else
@ -173,7 +173,7 @@ opfunc_jmp_down (opcode_t opdata, /**< operation data */
const opcode_counter_t offset = calc_opcode_counter_from_idx_idx (opdata.data.jmp_down.opcode_1,
opdata.data.jmp_down.opcode_2);
JERRY_ASSERT (offset != 0 && ((uint32_t) int_data->pos + offset < MAX_OPCODES));
JERRY_ASSERT (((uint32_t) int_data->pos + offset < MAX_OPCODES));
int_data->pos = (opcode_counter_t) (int_data->pos + offset);
@ -192,7 +192,7 @@ opfunc_jmp_up (opcode_t opdata, /**< operation data */
{
const opcode_counter_t offset = calc_opcode_counter_from_idx_idx (opdata.data.jmp_up.opcode_1,
opdata.data.jmp_up.opcode_2);
JERRY_ASSERT (offset != 0 && (uint32_t) int_data->pos >= offset);
JERRY_ASSERT ((uint32_t) int_data->pos >= offset);
int_data->pos = (opcode_counter_t) (int_data->pos - offset);