Refactor code to use ToInteger (#3224)

Fixes #3325
Fixes #3237

JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
This commit is contained in:
Daniella Barsony
2019-12-09 12:07:26 +01:00
committed by Robert Fancsik
parent 5ceffd209e
commit 89db9253c8
15 changed files with 399 additions and 409 deletions
@@ -174,7 +174,8 @@ ecma_builtin_number_object_is_integer (ecma_value_t this_arg, /**< this argument
return ECMA_VALUE_FALSE;
}
ecma_number_t int_num = ecma_number_trunc (num);
ecma_number_t int_num;
ecma_op_to_integer (arg, &int_num);
if (int_num != num)
{