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:
@@ -46,15 +46,15 @@ ecma_op_create_boolean_object (ecma_value_t arg) /**< argument passed to the Boo
|
||||
bool boolean_value = ecma_op_to_boolean (arg);
|
||||
ecma_builtin_id_t proto_id;
|
||||
|
||||
#if ENABLED (JERRY_BUILTIN_BOOLEAN)
|
||||
#if JERRY_BUILTIN_BOOLEAN
|
||||
proto_id = ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE;
|
||||
#else /* ENABLED (JERRY_BUILTIN_BOOLEAN) */
|
||||
#else /* JERRY_BUILTIN_BOOLEAN */
|
||||
proto_id = ECMA_BUILTIN_ID_OBJECT_PROTOTYPE;
|
||||
#endif /* !(ENABLED (JERRY_BUILTIN_BOOLEAN) */
|
||||
#endif /* !(JERRY_BUILTIN_BOOLEAN */
|
||||
|
||||
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)
|
||||
{
|
||||
@@ -65,7 +65,7 @@ ecma_op_create_boolean_object (ecma_value_t arg) /**< argument passed to the Boo
|
||||
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);
|
||||
@@ -74,12 +74,12 @@ ecma_op_create_boolean_object (ecma_value_t arg) /**< argument passed to the Boo
|
||||
ext_object_p->u.class_prop.class_id = LIT_MAGIC_STRING_BOOLEAN_UL;
|
||||
ext_object_p->u.class_prop.u.value = ecma_make_boolean_value (boolean_value);
|
||||
|
||||
#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_boolean_object */
|
||||
|
||||
Reference in New Issue
Block a user