Rework usages/naming of configuration macros [part 1] (#2793)
There are quite a few configuration macros in the project. As discussed in the #2520 issue there are a few awkward constructs. Main changes: * Renamed all CONFIG_DISABLE_<name>_BUILTIN macro to JERRY_BUILTIN_<name> format. * The special JERRY_BUILTINS macro specifies the basic config for all es5.1 builtins. * Renamed all CONFIG_DISABLE_ES2015_<name> to JERRY_ES2015_<name> format. * The special JERRY_ES2015 macro specifies the basic config for all es2015 builtins. * Renamed UNICODE_CASE_CONVERSION to JERRY_UNICODE_CASE_CONVERSION. * Renamed ENABLE_REGEXP_STRICT_MODE to JERRY_REGEXP_STRICT_MODE. * All options (in this change) can have a value of 0 or 1. * Renamed ENABLE_REGEXP_STRICT_MODE to JERRY_REGEXP_STRICT_MODE. JERRY_REGEXP_STRICT_MODE is set to 0 by default. * Reworked CONFIG_ECMA_NUMBER_TYPE macro to JERRY_NUMBER_TYPE_FLOAT64 name and now it uses the value 1 for 64 bit floating point numbers and 0 for 32 bit floating point number. By default the 64-bit floating point number mode is enabled. * All new JERRY_ defines can be used wit the `#if ENABLED (JERRY_...)` construct to test if the feature is enabled or not. * Added/replaced a few config.h includes to correctly propagate the macro values. * Added sanity checks for each macro to avoid incorrectly set values. * Updated profile documentation. * The CMake feature names are not updated at this point. JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
This commit is contained in:
committed by
Robert Fancsik
parent
722d092528
commit
40f7b1c27f
@@ -26,9 +26,9 @@
|
||||
#include "ecma-objects-general.h"
|
||||
#include "ecma-objects.h"
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
|
||||
#include "ecma-typedarray-object.h"
|
||||
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
|
||||
|
||||
/** \addtogroup ecma ECMA
|
||||
* @{
|
||||
@@ -135,18 +135,18 @@ ecma_op_object_get_own_property (ecma_object_t *object_p, /**< the object */
|
||||
}
|
||||
break;
|
||||
}
|
||||
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
|
||||
case ECMA_OBJECT_TYPE_PSEUDO_ARRAY:
|
||||
{
|
||||
/* ES2015 9.4.5.1 */
|
||||
if (ecma_is_typedarray (ecma_make_object_value (object_p)))
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
if (ecma_prop_name_is_symbol (property_name_p))
|
||||
{
|
||||
break;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
|
||||
uint32_t array_index = ecma_string_get_array_index (property_name_p);
|
||||
|
||||
@@ -186,7 +186,7 @@ ecma_op_object_get_own_property (ecma_object_t *object_p, /**< the object */
|
||||
|
||||
break;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
|
||||
default:
|
||||
{
|
||||
break;
|
||||
@@ -210,7 +210,7 @@ ecma_op_object_get_own_property (ecma_object_t *object_p, /**< the object */
|
||||
/* Get length virtual property. */
|
||||
const ecma_compiled_code_t *bytecode_data_p;
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_ARROW_FUNCTION
|
||||
#if ENABLED (JERRY_ES2015_ARROW_FUNCTION)
|
||||
if (type != ECMA_OBJECT_TYPE_ARROW_FUNCTION)
|
||||
{
|
||||
ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) object_p;
|
||||
@@ -221,10 +221,10 @@ ecma_op_object_get_own_property (ecma_object_t *object_p, /**< the object */
|
||||
ecma_arrow_function_t *arrow_func_p = (ecma_arrow_function_t *) object_p;
|
||||
bytecode_data_p = ecma_op_arrow_function_get_compiled_code (arrow_func_p);
|
||||
}
|
||||
#else /* CONFIG_DISABLE_ES2015_ARROW_FUNCTION */
|
||||
#else /* !ENABLED (JERRY_ES2015_ARROW_FUNCTION) */
|
||||
ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) object_p;
|
||||
bytecode_data_p = ecma_op_function_get_compiled_code (ext_func_p);
|
||||
#endif /* !CONFIG_DISABLE_ES2015_ARROW_FUNCTION */
|
||||
#endif /* ENABLED (JERRY_ES2015_ARROW_FUNCTION) */
|
||||
|
||||
uint32_t len;
|
||||
if (bytecode_data_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)
|
||||
@@ -479,16 +479,16 @@ ecma_op_object_find_own (ecma_value_t base_value, /**< base value */
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
|
||||
/* ES2015 9.4.5.4 */
|
||||
if (ecma_is_typedarray (ecma_make_object_value (object_p)))
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
if (ecma_prop_name_is_symbol (property_name_p))
|
||||
{
|
||||
break;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
|
||||
uint32_t array_index = ecma_string_get_array_index (property_name_p);
|
||||
|
||||
@@ -509,7 +509,7 @@ ecma_op_object_find_own (ecma_value_t base_value, /**< base value */
|
||||
|
||||
ecma_deref_ecma_string (num_to_str);
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -534,7 +534,7 @@ ecma_op_object_find_own (ecma_value_t base_value, /**< base value */
|
||||
/* Get length virtual property. */
|
||||
const ecma_compiled_code_t *bytecode_data_p;
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_ARROW_FUNCTION
|
||||
#if ENABLED (JERRY_ES2015_ARROW_FUNCTION)
|
||||
if (type != ECMA_OBJECT_TYPE_ARROW_FUNCTION)
|
||||
{
|
||||
ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) object_p;
|
||||
@@ -545,10 +545,10 @@ ecma_op_object_find_own (ecma_value_t base_value, /**< base value */
|
||||
ecma_arrow_function_t *arrow_func_p = (ecma_arrow_function_t *) object_p;
|
||||
bytecode_data_p = ecma_op_arrow_function_get_compiled_code (arrow_func_p);
|
||||
}
|
||||
#else /* CONFIG_DISABLE_ES2015_ARROW_FUNCTION */
|
||||
#else /* !ENABLED (JERRY_ES2015_ARROW_FUNCTION) */
|
||||
ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) object_p;
|
||||
bytecode_data_p = ecma_op_function_get_compiled_code (ext_func_p);
|
||||
#endif /* !CONFIG_DISABLE_ES2015_ARROW_FUNCTION */
|
||||
#endif /* ENABLED (JERRY_ES2015_ARROW_FUNCTION) */
|
||||
|
||||
uint32_t len;
|
||||
if (bytecode_data_p->status_flags & CBC_CODE_FLAGS_UINT16_ARGUMENTS)
|
||||
@@ -734,7 +734,7 @@ ecma_op_object_get_by_magic_id (ecma_object_t *object_p, /**< the object */
|
||||
return ecma_op_object_get (object_p, ecma_get_magic_string (property_id));
|
||||
} /* ecma_op_object_get_by_magic_id */
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
/**
|
||||
* [[Get]] operation of ecma object where the property is a well-known symbol
|
||||
*
|
||||
@@ -756,7 +756,7 @@ ecma_op_object_get_by_symbol_id (ecma_object_t *object_p, /**< the object */
|
||||
|
||||
return ret_value;
|
||||
} /* ecma_op_object_get_by_symbol_id */
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
|
||||
/**
|
||||
* [[Put]] ecma general object's operation
|
||||
@@ -834,16 +834,16 @@ ecma_op_object_put (ecma_object_t *object_p, /**< the object */
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
|
||||
/* ES2015 9.4.5.5 */
|
||||
if (ecma_is_typedarray (ecma_make_object_value (object_p)))
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
if (ecma_prop_name_is_symbol (property_name_p))
|
||||
{
|
||||
break;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
|
||||
uint32_t array_index = ecma_string_get_array_index (property_name_p);
|
||||
|
||||
@@ -871,7 +871,7 @@ ecma_op_object_put (ecma_object_t *object_p, /**< the object */
|
||||
|
||||
ecma_deref_ecma_string (num_to_str);
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -1152,9 +1152,9 @@ ecma_op_object_define_own_property (ecma_object_t *obj_p, /**< the object */
|
||||
case ECMA_OBJECT_TYPE_GENERAL:
|
||||
case ECMA_OBJECT_TYPE_CLASS:
|
||||
case ECMA_OBJECT_TYPE_FUNCTION:
|
||||
#ifndef CONFIG_DISABLE_ES2015_ARROW_FUNCTION
|
||||
#if ENABLED (JERRY_ES2015_ARROW_FUNCTION)
|
||||
case ECMA_OBJECT_TYPE_ARROW_FUNCTION:
|
||||
#endif /* !CONFIG_DISABLE_ES2015_ARROW_FUNCTION */
|
||||
#endif /* ENABLED (JERRY_ES2015_ARROW_FUNCTION) */
|
||||
case ECMA_OBJECT_TYPE_EXTERNAL_FUNCTION:
|
||||
case ECMA_OBJECT_TYPE_BOUND_FUNCTION:
|
||||
{
|
||||
@@ -1178,22 +1178,22 @@ ecma_op_object_define_own_property (ecma_object_t *obj_p, /**< the object */
|
||||
|
||||
ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
|
||||
if (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS)
|
||||
{
|
||||
#else /* CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
|
||||
#else /* !ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
|
||||
JERRY_ASSERT (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS);
|
||||
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
|
||||
return ecma_op_arguments_object_define_own_property (obj_p,
|
||||
property_name_p,
|
||||
property_desc_p,
|
||||
is_throw);
|
||||
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
|
||||
}
|
||||
/* ES2015 9.4.5.3 */
|
||||
if (ecma_is_typedarray (ecma_make_object_value (obj_p)))
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
if (ecma_prop_name_is_symbol (property_name_p))
|
||||
{
|
||||
return ecma_op_general_object_define_own_property (obj_p,
|
||||
@@ -1201,7 +1201,7 @@ ecma_op_object_define_own_property (ecma_object_t *obj_p, /**< the object */
|
||||
property_desc_p,
|
||||
is_throw);
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
uint32_t array_index = ecma_string_get_array_index (property_name_p);
|
||||
|
||||
if (array_index != ECMA_STRING_NOT_ARRAY_INDEX)
|
||||
@@ -1235,9 +1235,9 @@ ecma_op_object_define_own_property (ecma_object_t *obj_p, /**< the object */
|
||||
property_name_p,
|
||||
property_desc_p,
|
||||
is_throw);
|
||||
#else /* CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
|
||||
#else /* !ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
|
||||
break;
|
||||
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
|
||||
}
|
||||
}
|
||||
} /* ecma_op_object_define_own_property */
|
||||
@@ -1405,9 +1405,9 @@ ecma_op_object_get_property_names (ecma_object_t *obj_p, /**< object */
|
||||
const bool is_enumerable_only = (opts & ECMA_LIST_ENUMERABLE) != 0;
|
||||
const bool is_array_indices_only = (opts & ECMA_LIST_ARRAY_INDICES) != 0;
|
||||
const bool is_with_prototype_chain = (opts & ECMA_LIST_PROTOTYPE) != 0;
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
const bool is_symbols_only = (opts & ECMA_LIST_SYMBOLS) != 0;
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
|
||||
const size_t bitmap_row_size = sizeof (uint32_t) * JERRY_BITSINBYTE;
|
||||
const size_t names_hashes_bitmap_size = ECMA_OBJECT_HASH_BITMAP_SIZE / bitmap_row_size;
|
||||
@@ -1425,10 +1425,10 @@ ecma_op_object_get_property_names (ecma_object_t *obj_p, /**< object */
|
||||
|
||||
ecma_collection_header_t *prop_names_p = ecma_new_values_collection ();
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
if (JERRY_LIKELY (!is_symbols_only))
|
||||
{
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
|
||||
if (obj_is_builtin)
|
||||
{
|
||||
@@ -1443,18 +1443,18 @@ ecma_op_object_get_property_names (ecma_object_t *obj_p, /**< object */
|
||||
{
|
||||
case ECMA_OBJECT_TYPE_PSEUDO_ARRAY:
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
|
||||
if (ecma_is_typedarray (ecma_make_object_value (obj_p)))
|
||||
{
|
||||
ecma_op_typedarray_list_lazy_property_names (obj_p, prop_names_p);
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
|
||||
break;
|
||||
}
|
||||
case ECMA_OBJECT_TYPE_FUNCTION:
|
||||
#ifndef CONFIG_DISABLE_ES2015_ARROW_FUNCTION
|
||||
#if ENABLED (JERRY_ES2015_ARROW_FUNCTION)
|
||||
case ECMA_OBJECT_TYPE_ARROW_FUNCTION:
|
||||
#endif /* !CONFIG_DISABLE_ES2015_ARROW_FUNCTION */
|
||||
#endif /* ENABLED (JERRY_ES2015_ARROW_FUNCTION) */
|
||||
{
|
||||
ecma_op_function_list_lazy_property_names (obj_p,
|
||||
is_enumerable_only,
|
||||
@@ -1506,9 +1506,9 @@ ecma_op_object_get_property_names (ecma_object_t *obj_p, /**< object */
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
|
||||
ecma_value_t *ecma_value_p = ecma_collection_iterator_init (prop_names_p);
|
||||
|
||||
@@ -1520,10 +1520,10 @@ ecma_op_object_get_property_names (ecma_object_t *obj_p, /**< object */
|
||||
{
|
||||
ecma_string_t *name_p = ecma_get_string_from_value (*ecma_value_p);
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
/* Symbols are never lazy listed */
|
||||
JERRY_ASSERT (!ecma_prop_name_is_symbol (name_p));
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
|
||||
ecma_value_p = ecma_collection_iterator_next (ecma_value_p);
|
||||
|
||||
@@ -1571,7 +1571,7 @@ ecma_op_object_get_property_names (ecma_object_t *obj_p, /**< object */
|
||||
|
||||
if (!(is_enumerable_only && !ecma_is_property_enumerable (*property_p)))
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
/* If is_symbols_only is false and prop_name is symbol
|
||||
we should skip the current property e.g. for-in.
|
||||
|
||||
@@ -1582,7 +1582,7 @@ ecma_op_object_get_property_names (ecma_object_t *obj_p, /**< object */
|
||||
ecma_deref_ecma_string (name_p);
|
||||
continue;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
|
||||
uint8_t hash = (uint8_t) ecma_string_hash (name_p);
|
||||
uint32_t bitmap_row = (uint32_t) (hash / bitmap_row_size);
|
||||
@@ -1813,10 +1813,10 @@ ecma_object_check_class_name_is_object (ecma_object_t *obj_p) /**< object */
|
||||
{
|
||||
#ifndef JERRY_NDEBUG
|
||||
return (ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_GLOBAL)
|
||||
#ifndef CONFIG_DISABLE_ES2015_PROMISE_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
|
||||
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_PROMISE_PROTOTYPE)
|
||||
#endif /* !CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
|
||||
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROMISE) */
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
|
||||
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_ARRAYBUFFER_PROTOTYPE)
|
||||
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE)
|
||||
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_INT8ARRAY_PROTOTYPE)
|
||||
@@ -1827,20 +1827,20 @@ ecma_object_check_class_name_is_object (ecma_object_t *obj_p) /**< object */
|
||||
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_UINT32ARRAY_PROTOTYPE)
|
||||
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_FLOAT32ARRAY_PROTOTYPE)
|
||||
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY_PROTOTYPE)
|
||||
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64
|
||||
#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_FLOAT64ARRAY_PROTOTYPE)
|
||||
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64 */
|
||||
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
|
||||
#ifndef CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN
|
||||
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
|
||||
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_ARRAY_ITERATOR_PROTOTYPE)
|
||||
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE)
|
||||
#endif /* !CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN */
|
||||
#ifndef CONFIG_DISABLE_ES2015_MAP_BUILTIN
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_MAP)
|
||||
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_MAP_PROTOTYPE)
|
||||
#endif /* !CONFIG_DISABLE_ES2015_MAP_BUILTIN */
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) */
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_SYMBOL_PROTOTYPE)
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
|| ecma_builtin_is (obj_p, ECMA_BUILTIN_ID_OBJECT_PROTOTYPE));
|
||||
#else /* JERRY_NDEBUG */
|
||||
JERRY_UNUSED (obj_p);
|
||||
@@ -1875,19 +1875,19 @@ ecma_object_get_class_name (ecma_object_t *obj_p) /**< object */
|
||||
|
||||
switch (ext_obj_p->u.pseudo_array.type)
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
|
||||
case ECMA_PSEUDO_ARRAY_TYPEDARRAY:
|
||||
case ECMA_PSEUDO_ARRAY_TYPEDARRAY_WITH_INFO:
|
||||
{
|
||||
return (lit_magic_string_id_t) ext_obj_p->u.pseudo_array.u1.class_id;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
|
||||
#ifndef CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
|
||||
case ECMA_PSEUDO_ARRAY_ITERATOR:
|
||||
{
|
||||
return LIT_MAGIC_STRING_ARRAY_ITERATOR_UL;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
|
||||
default:
|
||||
{
|
||||
JERRY_ASSERT (ext_obj_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS);
|
||||
@@ -1899,9 +1899,9 @@ ecma_object_get_class_name (ecma_object_t *obj_p) /**< object */
|
||||
break;
|
||||
}
|
||||
case ECMA_OBJECT_TYPE_FUNCTION:
|
||||
#ifndef CONFIG_DISABLE_ES2015_ARROW_FUNCTION
|
||||
#if ENABLED (JERRY_ES2015_ARROW_FUNCTION)
|
||||
case ECMA_OBJECT_TYPE_ARROW_FUNCTION:
|
||||
#endif /* !CONFIG_DISABLE_ES2015_ARROW_FUNCTION */
|
||||
#endif /* ENABLED (JERRY_ES2015_ARROW_FUNCTION) */
|
||||
case ECMA_OBJECT_TYPE_EXTERNAL_FUNCTION:
|
||||
case ECMA_OBJECT_TYPE_BOUND_FUNCTION:
|
||||
{
|
||||
@@ -1917,26 +1917,26 @@ ecma_object_get_class_name (ecma_object_t *obj_p) /**< object */
|
||||
|
||||
switch (ext_obj_p->u.built_in.id)
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_MATH_BUILTIN
|
||||
#if ENABLED (JERRY_BUILTIN_MATH)
|
||||
case ECMA_BUILTIN_ID_MATH:
|
||||
{
|
||||
return LIT_MAGIC_STRING_MATH_UL;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_MATH_BUILTIN */
|
||||
#ifndef CONFIG_DISABLE_JSON_BUILTIN
|
||||
#endif /* ENABLED (JERRY_BUILTIN_MATH) */
|
||||
#if ENABLED (JERRY_BUILTIN_JSON)
|
||||
case ECMA_BUILTIN_ID_JSON:
|
||||
{
|
||||
return LIT_MAGIC_STRING_JSON_U;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_JSON_BUILTIN */
|
||||
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
|
||||
#endif /* ENABLED (JERRY_BUILTIN_JSON) */
|
||||
#if ENABLED (JERRY_BUILTIN_ERRORS)
|
||||
case ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE:
|
||||
case ECMA_BUILTIN_ID_RANGE_ERROR_PROTOTYPE:
|
||||
case ECMA_BUILTIN_ID_REFERENCE_ERROR_PROTOTYPE:
|
||||
case ECMA_BUILTIN_ID_SYNTAX_ERROR_PROTOTYPE:
|
||||
case ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE:
|
||||
case ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE:
|
||||
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
|
||||
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
|
||||
case ECMA_BUILTIN_ID_ERROR_PROTOTYPE:
|
||||
{
|
||||
return LIT_MAGIC_STRING_ERROR_UL;
|
||||
|
||||
Reference in New Issue
Block a user