Remove the ENABLED/DISABLED macros (#4515)
The removal of these macros enabled cppcheck to reveal new errors. These errors are also fixed by the patch. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
@@ -53,13 +53,13 @@ ecma_op_create_number_object (ecma_value_t arg) /**< argument passed to the Numb
|
||||
|
||||
conv_to_num_completion = ecma_make_number_value (num);
|
||||
ecma_builtin_id_t proto_id;
|
||||
#if ENABLED (JERRY_BUILTIN_NUMBER)
|
||||
#if JERRY_BUILTIN_NUMBER
|
||||
proto_id = ECMA_BUILTIN_ID_NUMBER_PROTOTYPE;
|
||||
#else /* ENABLED (JERRY_BUILTIN_NUMBER) */
|
||||
#else /* JERRY_BUILTIN_NUMBER */
|
||||
proto_id = ECMA_BUILTIN_ID_OBJECT_PROTOTYPE;
|
||||
#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */
|
||||
#endif /* JERRY_BUILTIN_NUMBER */
|
||||
ecma_object_t *prototype_obj_p = ecma_builtin_get (proto_id);
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
ecma_object_t *new_target = JERRY_CONTEXT (current_new_target_p);
|
||||
if (new_target)
|
||||
{
|
||||
@@ -69,7 +69,7 @@ ecma_op_create_number_object (ecma_value_t arg) /**< argument passed to the Numb
|
||||
return ECMA_VALUE_ERROR;
|
||||
}
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
ecma_object_t *object_p = ecma_create_object (prototype_obj_p,
|
||||
sizeof (ecma_extended_object_t),
|
||||
ECMA_OBJECT_TYPE_CLASS);
|
||||
@@ -79,12 +79,12 @@ ecma_op_create_number_object (ecma_value_t arg) /**< argument passed to the Numb
|
||||
|
||||
/* Pass reference (no need to free conv_to_num_completion). */
|
||||
ext_object_p->u.class_prop.u.value = conv_to_num_completion;
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
#if JERRY_ESNEXT
|
||||
if (new_target)
|
||||
{
|
||||
ecma_deref_object (prototype_obj_p);
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
return ecma_make_object_value (object_p);
|
||||
} /* ecma_op_create_number_object */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user