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:
Robert Fancsik
2021-02-04 23:47:05 +01:00
committed by GitHub
parent e01c2549d7
commit 0628ae1e7b
337 changed files with 5186 additions and 5191 deletions
@@ -23,12 +23,12 @@
#include "ecma-helpers.h"
#include "ecma-objects.h"
#include "ecma-string-object.h"
#if ENABLED (JERRY_ESNEXT)
#if JERRY_ESNEXT
#include "ecma-symbol-object.h"
#endif /* ENABLED (JERRY_ESNEXT) */
#endif /* JERRY_ESNEXT */
#include "jrt.h"
#if ENABLED (JERRY_BUILTIN_STRING)
#if JERRY_BUILTIN_STRING
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -108,7 +108,7 @@ ecma_builtin_string_object_from_char_code (ecma_value_t this_arg, /**< 'this' ar
return isError ? ECMA_VALUE_ERROR : ecma_make_string_value (ret_string_p);
} /* ecma_builtin_string_object_from_char_code */
#if ENABLED (JERRY_ESNEXT)
#if JERRY_ESNEXT
/**
* The String object's 'raw' routine
@@ -328,7 +328,7 @@ ecma_builtin_string_object_from_code_point (ecma_value_t this_arg, /**< 'this' a
return ecma_make_string_value (ret_str_p);
} /* ecma_builtin_string_object_from_code_point */
#endif /* ENABLED (JERRY_ESNEXT) */
#endif /* JERRY_ESNEXT */
/**
* Handle calling [[Call]] of built-in String object
@@ -351,13 +351,13 @@ ecma_builtin_string_dispatch_call (const ecma_value_t *arguments_list_p, /**< ar
{
ret_value = ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY);
}
#if ENABLED (JERRY_ESNEXT)
#if JERRY_ESNEXT
/* 2.a */
else if (ecma_is_value_symbol (arguments_list_p[0]))
{
ret_value = ecma_get_symbol_descriptive_string (arguments_list_p[0]);
}
#endif /* ENABLED (JERRY_ESNEXT) */
#endif /* JERRY_ESNEXT */
/* 2.b */
else
{
@@ -393,4 +393,4 @@ ecma_builtin_string_dispatch_construct (const ecma_value_t *arguments_list_p, /*
* @}
*/
#endif /* ENABLED (JERRY_BUILTIN_STRING) */
#endif /* JERRY_BUILTIN_STRING */