Cleanup toNumber and toNumeric abstract operations (#4034)
JerryScript-DCO-1.0-Signed-off-by: Virag Orkenyi orkvi@inf.u-szeged.hu
This commit is contained in:
@@ -41,13 +41,15 @@
|
||||
ecma_value_t
|
||||
ecma_op_create_number_object (ecma_value_t arg) /**< argument passed to the Number constructor */
|
||||
{
|
||||
ecma_value_t conv_to_num_completion = ecma_op_to_number (arg, ECMA_TO_NUMERIC_NO_OPTS);
|
||||
ecma_number_t num;
|
||||
ecma_value_t conv_to_num_completion = ecma_op_to_number (arg, &num);
|
||||
|
||||
if (ECMA_IS_VALUE_ERROR (conv_to_num_completion))
|
||||
{
|
||||
return conv_to_num_completion;
|
||||
}
|
||||
|
||||
conv_to_num_completion = ecma_make_number_value (num);
|
||||
#if ENABLED (JERRY_BUILTIN_NUMBER)
|
||||
ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_NUMBER_PROTOTYPE);
|
||||
#else /* ENABLED (JERRY_BUILTIN_NUMBER) */
|
||||
|
||||
Reference in New Issue
Block a user