Merged conditions of if statements where possible. (#2380)

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
László Langó
2018-06-06 08:08:17 +02:00
committed by yichoi
parent b61d0ed856
commit b4b0b7d572
11 changed files with 138 additions and 173 deletions
+5 -7
View File
@@ -1777,14 +1777,12 @@ lexer_construct_number_object (parser_context_t *context_p, /**< context */
{
int32_t int_num = (int32_t) num;
if (int_num == num)
if (int_num == num
&& int_num <= CBC_PUSH_NUMBER_BYTE_RANGE_END
&& (int_num != 0 || !is_negative_number))
{
if (int_num <= CBC_PUSH_NUMBER_BYTE_RANGE_END
&& (int_num != 0 || !is_negative_number))
{
context_p->lit_object.index = (uint16_t) int_num;
return true;
}
context_p->lit_object.index = (uint16_t) int_num;
return true;
}
}