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:
Péter Gál
2019-04-09 10:14:46 +02:00
committed by Robert Fancsik
parent 722d092528
commit 40f7b1c27f
213 changed files with 1902 additions and 1649 deletions
@@ -18,11 +18,11 @@
#include "ecma-iterator-object.h"
#include "ecma-typedarray-object.h"
#ifndef CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
#ifdef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if !ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
#error "Iterator builtin requires ES2015 symbol builtin"
#endif /* CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* !ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -84,14 +84,14 @@ ecma_builtin_array_iterator_prototype_object_next (ecma_value_t this_val) /**< t
uint32_t length;
/* 8 - 9. */
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
if (ecma_is_typedarray (ecma_make_object_value (array_object_p)))
{
length = ecma_typedarray_get_length (array_object_p);
}
else
{
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
ecma_value_t len_value = ecma_op_object_get (array_object_p,
ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH));
@@ -112,9 +112,9 @@ ecma_builtin_array_iterator_prototype_object_next (ecma_value_t this_val) /**< t
length = ecma_number_to_uint32 (length_number);
ecma_free_value (len_value);
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
}
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
uint32_t index = ext_obj_p->u.pseudo_array.u1.iterator_index;
@@ -205,4 +205,4 @@ ecma_builtin_array_iterator_prototype_object_next (ecma_value_t this_val) /**< t
* @}
*/
#endif /* !CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
LIT_MAGIC_STRING_ARRAY_ITERATOR_UL,
@@ -29,6 +29,6 @@ STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
ROUTINE (LIT_MAGIC_STRING_NEXT, ecma_builtin_array_iterator_prototype_object_next, 0, 0)
#endif /* !CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -30,7 +30,7 @@
#include "ecma-try-catch-macro.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_ARRAY_BUILTIN
#if ENABLED (JERRY_BUILTIN_ARRAY)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -229,17 +229,17 @@ ecma_builtin_array_prototype_object_concat (const ecma_value_t args[], /**< argu
ecma_object_t *obj_p) /**< array object */
{
/* 2. */
#ifndef CONFIG_DISABLE_ES2015_CLASS
#if ENABLED (JERRY_ES2015_CLASS)
ecma_value_t new_array = ecma_op_create_array_object_by_constructor (NULL, 0, false, obj_p);
if (ECMA_IS_VALUE_ERROR (new_array))
{
return new_array;
}
#else /* CONFIG_DISABLE_ES2015_CLASS */
#else /* !ENABLED (JERRY_ES2015_CLASS) */
ecma_value_t new_array = ecma_op_create_array_object (NULL, 0, false);
JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (new_array));
#endif /* !CONFIG_DISABLE_ES2015_CLASS */
#endif /* ENABLED (JERRY_ES2015_CLASS) */
ecma_object_t *new_array_p = ecma_get_object_from_value (new_array);
uint32_t new_length = 0;
@@ -739,17 +739,17 @@ ecma_builtin_array_prototype_object_slice (ecma_value_t arg1, /**< start */
JERRY_ASSERT (start <= len && end <= len);
#ifndef CONFIG_DISABLE_ES2015_CLASS
#if ENABLED (JERRY_ES2015_CLASS)
ecma_value_t new_array = ecma_op_create_array_object_by_constructor (NULL, 0, false, obj_p);
if (ECMA_IS_VALUE_ERROR (new_array))
{
return new_array;
}
#else /* CONFIG_DISABLE_ES2015_CLASS */
#else /* !ENABLED (JERRY_ES2015_CLASS) */
ecma_value_t new_array = ecma_op_create_array_object (NULL, 0, false);
JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (new_array));
#endif /* !CONFIG_DISABLE_ES2015_CLASS */
#endif /* ENABLED (JERRY_ES2015_CLASS) */
ecma_object_t *new_array_p = ecma_get_object_from_value (new_array);
@@ -1049,17 +1049,17 @@ ecma_builtin_array_prototype_object_splice (const ecma_value_t args[], /**< argu
ecma_object_t *obj_p, /**< array object */
uint32_t len) /**< array object's length */
{
#ifndef CONFIG_DISABLE_ES2015_CLASS
#if ENABLED (JERRY_ES2015_CLASS)
ecma_value_t new_array = ecma_op_create_array_object_by_constructor (NULL, 0, false, obj_p);
if (ECMA_IS_VALUE_ERROR (new_array))
{
return new_array;
}
#else /* CONFIG_DISABLE_ES2015_CLASS */
#else /* !ENABLED (JERRY_ES2015_CLASS) */
ecma_value_t new_array = ecma_op_create_array_object (NULL, 0, false);
JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (new_array));
#endif /* !CONFIG_DISABLE_ES2015_CLASS */
#endif /* ENABLED (JERRY_ES2015_CLASS) */
ecma_object_t *new_array_p = ecma_get_object_from_value (new_array);
@@ -1688,17 +1688,17 @@ ecma_builtin_array_prototype_object_map (ecma_value_t arg1, /**< callbackfn */
}
/* 6. */
#ifndef CONFIG_DISABLE_ES2015_CLASS
#if ENABLED (JERRY_ES2015_CLASS)
ecma_value_t new_array = ecma_op_create_array_object_by_constructor (NULL, 0, false, obj_p);
if (ECMA_IS_VALUE_ERROR (new_array))
{
return new_array;
}
#else /* CONFIG_DISABLE_ES2015_CLASS */
#else /* !ENABLED (JERRY_ES2015_CLASS) */
ecma_value_t new_array = ecma_op_create_array_object (NULL, 0, false);
JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (new_array));
#endif /* !CONFIG_DISABLE_ES2015_CLASS */
#endif /* ENABLED (JERRY_ES2015_CLASS) */
ecma_object_t *new_array_p = ecma_get_object_from_value (new_array);
@@ -1780,17 +1780,17 @@ ecma_builtin_array_prototype_object_filter (ecma_value_t arg1, /**< callbackfn *
}
/* 6. */
#ifndef CONFIG_DISABLE_ES2015_CLASS
#if ENABLED (JERRY_ES2015_CLASS)
ecma_value_t new_array = ecma_op_create_array_object_by_constructor (NULL, 0, false, obj_p);
if (ECMA_IS_VALUE_ERROR (new_array))
{
return new_array;
}
#else /* CONFIG_DISABLE_ES2015_CLASS */
#else /* !ENABLED (JERRY_ES2015_CLASS) */
ecma_value_t new_array = ecma_op_create_array_object (NULL, 0, false);
JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (new_array));
#endif /* !CONFIG_DISABLE_ES2015_CLASS */
#endif /* ENABLED (JERRY_ES2015_CLASS) */
ecma_object_t *new_array_p = ecma_get_object_from_value (new_array);
@@ -1992,7 +1992,7 @@ ecma_builtin_array_reduce_from (ecma_value_t callbackfn, /**< routine's 1st argu
return ret_value;
} /* ecma_builtin_array_reduce_from */
#ifndef CONFIG_DISABLE_ES2015_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN)
/**
* The Array.prototype object's 'find' routine
*
@@ -2061,9 +2061,9 @@ ecma_builtin_array_prototype_object_find (ecma_value_t predicate, /**< callback
return ret_value;
} /* ecma_builtin_array_prototype_object_find */
#endif /* !CONFIG_DISABLE_ES2015_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
#ifndef CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
/**
* Helper function for Array.prototype object's {'keys', 'values', 'entries', '@@iterator'}
* routines common parts.
@@ -2092,7 +2092,7 @@ ecma_builtin_array_iterators_helper (ecma_object_t *obj_p, /**< array object */
ECMA_PSEUDO_ARRAY_ITERATOR,
type);
} /* ecma_builtin_array_iterators_helper */
#endif /* !CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
/**
* Dispatcher of the built-in's routines
@@ -2137,7 +2137,7 @@ ecma_builtin_array_prototype_dispatch_routine (uint16_t builtin_routine_id, /**<
return ret_value;
}
#ifndef CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
if (JERRY_UNLIKELY (builtin_routine_id >= ECMA_ARRAY_PROTOTYPE_ENTRIES
&& builtin_routine_id <= ECMA_ARRAY_PROTOTYPE_SYMBOL_ITERATOR))
{
@@ -2162,7 +2162,7 @@ ecma_builtin_array_prototype_dispatch_routine (uint16_t builtin_routine_id, /**<
ecma_deref_object (obj_p);
return ret_value;
}
#endif /* !CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
ecma_value_t len_value = ecma_op_object_get_by_magic_id (obj_p, LIT_MAGIC_STRING_LENGTH);
@@ -2300,7 +2300,7 @@ ecma_builtin_array_prototype_dispatch_routine (uint16_t builtin_routine_id, /**<
length);
break;
}
#ifndef CONFIG_DISABLE_ES2015_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN)
case ECMA_ARRAY_PROTOTYPE_FIND:
{
ret_value = ecma_builtin_array_prototype_object_find (routine_arg_1,
@@ -2309,7 +2309,7 @@ ecma_builtin_array_prototype_dispatch_routine (uint16_t builtin_routine_id, /**<
length);
break;
}
#endif /* !CONFIG_DISABLE_ES2015_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
default:
{
JERRY_ASSERT (builtin_routine_id == ECMA_ARRAY_PROTOTYPE_FILTER);
@@ -2334,4 +2334,4 @@ ecma_builtin_array_prototype_dispatch_routine (uint16_t builtin_routine_id, /**<
* @}
*/
#endif /* !CONFIG_DISABLE_ARRAY_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_ARRAY) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ARRAY_BUILTIN
#if ENABLED (JERRY_BUILTIN_ARRAY)
/* Object properties:
* (property name, object pointer getter) */
@@ -62,16 +62,16 @@ ROUTINE (LIT_MAGIC_STRING_FILTER, ECMA_ARRAY_PROTOTYPE_FILTER, 2, 1)
/* Note these 2 routines must be in this order */
ROUTINE (LIT_MAGIC_STRING_REDUCE, ECMA_ARRAY_PROTOTYPE_REDUCE, NON_FIXED, 1)
ROUTINE (LIT_MAGIC_STRING_REDUCE_RIGHT_UL, ECMA_ARRAY_PROTOTYPE_REDUCE_RIGHT, NON_FIXED, 1)
#ifndef CONFIG_DISABLE_ES2015_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN)
ROUTINE (LIT_MAGIC_STRING_FIND, ECMA_ARRAY_PROTOTYPE_FIND, 2, 1)
#endif /* !CONFIG_DISABLE_ES2015_BUILTIN */
#ifndef CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
ROUTINE (LIT_MAGIC_STRING_ENTRIES, ECMA_ARRAY_PROTOTYPE_ENTRIES, 0, 0)
ROUTINE (LIT_MAGIC_STRING_VALUES, ECMA_ARRAY_PROTOTYPE_VALUES, 0, 0)
ROUTINE (LIT_MAGIC_STRING_KEYS, ECMA_ARRAY_PROTOTYPE_KEYS, 0, 0)
ROUTINE (LIT_GLOBAL_SYMBOL_ITERATOR, ECMA_ARRAY_PROTOTYPE_SYMBOL_ITERATOR, 0, 0)
#endif /* !CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
#endif /* !CONFIG_DISABLE_ARRAY_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_ARRAY) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -25,7 +25,7 @@
#include "ecma-try-catch-macro.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_ARRAY_BUILTIN
#if ENABLED (JERRY_BUILTIN_ARRAY)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -107,4 +107,4 @@ ecma_builtin_array_dispatch_construct (const ecma_value_t *arguments_list_p, /**
* @}
*/
#endif /* !CONFIG_DISABLE_ARRAY_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_ARRAY) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ARRAY_BUILTIN
#if ENABLED (JERRY_BUILTIN_ARRAY)
/* Object properties:
* (property name, object pointer getter) */
@@ -41,6 +41,6 @@ NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
ROUTINE (LIT_MAGIC_STRING_IS_ARRAY_UL, ecma_builtin_array_object_is_array, 1, 1)
#endif /* !CONFIG_DISABLE_ARRAY_BUILTIN */
#endif /* !(ENABLED (JERRY_BUILTIN_ARRAY)) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -24,7 +24,7 @@
#include "jrt.h"
#include "jrt-libc-includes.h"
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -143,4 +143,4 @@ ecma_builtin_arraybuffer_prototype_object_slice (ecma_value_t this_arg, /**< thi
* @}
*/
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
/* Object properties:
* (property name, object pointer getter) */
@@ -33,17 +33,17 @@ ACCESSOR_READ_ONLY (LIT_MAGIC_STRING_BYTE_LENGTH_UL,
ecma_builtin_arraybuffer_prototype_bytelength_getter,
ECMA_PROPERTY_FIXED)
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
/* ECMA-262 v6, 24.1.4.4 */
STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
LIT_MAGIC_STRING_ARRAY_BUFFER_UL,
ECMA_PROPERTY_FLAG_CONFIGURABLE)
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
/* Routine properties:
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
ROUTINE (LIT_MAGIC_STRING_SLICE, ecma_builtin_arraybuffer_prototype_object_slice, 2, 2)
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -22,7 +22,7 @@
#include "ecma-try-catch-macro.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -100,4 +100,4 @@ ecma_builtin_arraybuffer_dispatch_construct (const ecma_value_t *arguments_list_
* @}
*/
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
/* Number properties:
* (property name, number value, writable, enumerable, configurable) */
@@ -41,6 +41,6 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
/* ES2015 24.1.3.1 */
ROUTINE (LIT_MAGIC_STRING_IS_VIEW_UL, ecma_builtin_arraybuffer_object_is_view, 1, 1)
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -25,7 +25,7 @@
#include "ecma-try-catch-macro.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_BOOLEAN_BUILTIN
#if ENABLED (JERRY_BUILTIN_BOOLEAN)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -117,4 +117,4 @@ ecma_builtin_boolean_prototype_object_value_of (ecma_value_t this_arg) /**< this
* @}
*/
#endif /* !CONFIG_DISABLE_BOOLEAN_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_BOOLEAN_BUILTIN
#if ENABLED (JERRY_BUILTIN_BOOLEAN)
/* Object properties:
* (property name, object pointer getter) */
@@ -34,6 +34,6 @@ OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
ROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ecma_builtin_boolean_prototype_object_to_string, 0, 0)
ROUTINE (LIT_MAGIC_STRING_VALUE_OF_UL, ecma_builtin_boolean_prototype_object_value_of, 0, 0)
#endif /* !CONFIG_DISABLE_BOOLEAN_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -25,7 +25,7 @@
#include "ecma-try-catch-macro.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_BOOLEAN_BUILTIN
#if ENABLED (JERRY_BUILTIN_BOOLEAN)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -96,4 +96,4 @@ ecma_builtin_boolean_dispatch_construct (const ecma_value_t *arguments_list_p, /
* @}
*/
#endif /* !CONFIG_DISABLE_BOOLEAN_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_BOOLEAN_BUILTIN
#if ENABLED (JERRY_BUILTIN_BOOLEAN)
/* Object properties:
* (property name, object pointer getter) */
@@ -37,6 +37,6 @@ NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
1,
ECMA_PROPERTY_FIXED)
#endif /* !CONFIG_DISABLE_BOOLEAN_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -24,7 +24,7 @@
#include "ecma-objects.h"
#include "ecma-try-catch-macro.h"
#ifndef CONFIG_DISABLE_DATE_BUILTIN
#if ENABLED (JERRY_BUILTIN_DATE)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -49,10 +49,10 @@ enum
ECMA_DATE_PROTOTYPE_GET_FULL_YEAR, /* ECMA-262 v5 15.9.5.10 */
ECMA_DATE_PROTOTYPE_GET_UTC_FULL_YEAR, /* ECMA-262 v5 15.9.5.11 */
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
#if ENABLED (JERRY_BUILTIN_ANNEXB)
ECMA_DATE_PROTOTYPE_GET_YEAR, /* ECMA-262 v5, AnnexB.B.2.4 */
ECMA_DATE_PROTOTYPE_GET_UTC_YEAR, /* has no UTC variant */
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
ECMA_DATE_PROTOTYPE_GET_MONTH, /* ECMA-262 v5 15.9.5.12 */
ECMA_DATE_PROTOTYPE_GET_UTC_MONTH, /* ECMA-262 v5 15.9.5.13 */
ECMA_DATE_PROTOTYPE_GET_DATE, /* ECMA-262 v5 15.9.5.14 */
@@ -72,10 +72,10 @@ enum
ECMA_DATE_PROTOTYPE_SET_FULL_YEAR, /* ECMA-262 v5, 15.9.5.40 */
ECMA_DATE_PROTOTYPE_SET_UTC_FULL_YEAR, /* ECMA-262 v5, 15.9.5.41 */
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
#if ENABLED (JERRY_BUILTIN_ANNEXB)
ECMA_DATE_PROTOTYPE_SET_YEAR, /* ECMA-262 v5, ECMA-262 v5, AnnexB.B.2.5 */
ECMA_DATE_PROTOTYPE_SET_UTC_YEAR, /* has no UTC variant */
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
ECMA_DATE_PROTOTYPE_SET_MONTH, /* ECMA-262 v5, 15.9.5.38 */
ECMA_DATE_PROTOTYPE_SET_UTC_MONTH, /* ECMA-262 v5, 15.9.5.39 */
ECMA_DATE_PROTOTYPE_SET_DATE, /* ECMA-262 v5, 15.9.5.36 */
@@ -199,18 +199,18 @@ ecma_builtin_date_prototype_dispatch_get (uint16_t builtin_routine_id, /**< buil
{
case ECMA_DATE_PROTOTYPE_GET_FULL_YEAR:
case ECMA_DATE_PROTOTYPE_GET_UTC_FULL_YEAR:
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
#if ENABLED (JERRY_BUILTIN_ANNEXB)
case ECMA_DATE_PROTOTYPE_GET_YEAR:
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
{
date_num = ecma_date_year_from_time (date_num);
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
#if ENABLED (JERRY_BUILTIN_ANNEXB)
if (builtin_routine_id == ECMA_DATE_PROTOTYPE_GET_YEAR)
{
date_num -= 1900;
}
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
break;
}
@@ -268,7 +268,7 @@ ecma_builtin_date_prototype_dispatch_get (uint16_t builtin_routine_id, /**< buil
return ecma_make_number_value (date_num);
} /* ecma_builtin_date_prototype_dispatch_get */
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
#if ENABLED (JERRY_BUILTIN_ANNEXB)
/**
* Returns true, if the built-in id sets a year.
@@ -278,7 +278,7 @@ ecma_builtin_date_prototype_dispatch_get (uint16_t builtin_routine_id, /**< buil
|| (builtin_routine_id) == ECMA_DATE_PROTOTYPE_SET_UTC_FULL_YEAR \
|| (builtin_routine_id) == ECMA_DATE_PROTOTYPE_SET_YEAR)
#else /* CONFIG_DISABLE_ANNEXB_BUILTIN */
#else /* !ENABLED (JERRY_BUILTIN_ANNEXB) */
/**
* Returns true, if the built-in id sets a year.
@@ -287,7 +287,7 @@ ecma_builtin_date_prototype_dispatch_get (uint16_t builtin_routine_id, /**< buil
((builtin_routine_id) == ECMA_DATE_PROTOTYPE_SET_FULL_YEAR \
|| (builtin_routine_id) == ECMA_DATE_PROTOTYPE_SET_UTC_FULL_YEAR)
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
/**
* Dispatch set date functions
@@ -312,9 +312,9 @@ ecma_builtin_date_prototype_dispatch_set (uint16_t builtin_routine_id, /**< buil
switch (builtin_routine_id)
{
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
#if ENABLED (JERRY_BUILTIN_ANNEXB)
case ECMA_DATE_PROTOTYPE_SET_YEAR:
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
case ECMA_DATE_PROTOTYPE_SET_DATE:
case ECMA_DATE_PROTOTYPE_SET_UTC_DATE:
case ECMA_DATE_PROTOTYPE_SET_UTC_MILLISECONDS:
@@ -406,7 +406,7 @@ ecma_builtin_date_prototype_dispatch_set (uint16_t builtin_routine_id, /**< buil
}
break;
}
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
#if ENABLED (JERRY_BUILTIN_ANNEXB)
case ECMA_DATE_PROTOTYPE_SET_YEAR:
{
year = converted_number[0];
@@ -416,7 +416,7 @@ ecma_builtin_date_prototype_dispatch_set (uint16_t builtin_routine_id, /**< buil
}
break;
}
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
case ECMA_DATE_PROTOTYPE_SET_MONTH:
case ECMA_DATE_PROTOTYPE_SET_UTC_MONTH:
{
@@ -439,7 +439,7 @@ ecma_builtin_date_prototype_dispatch_set (uint16_t builtin_routine_id, /**< buil
day_part = ecma_date_make_day (year, month, day);
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
#if ENABLED (JERRY_BUILTIN_ANNEXB)
if (builtin_routine_id == ECMA_DATE_PROTOTYPE_SET_YEAR)
{
builtin_routine_id = ECMA_DATE_PROTOTYPE_SET_UTC_YEAR;
@@ -450,7 +450,7 @@ ecma_builtin_date_prototype_dispatch_set (uint16_t builtin_routine_id, /**< buil
time_part = converted_number[0];
}
}
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
}
else
{
@@ -656,4 +656,4 @@ ecma_builtin_date_prototype_dispatch_routine (uint16_t builtin_routine_id, /**<
* @}
*/
#endif /* !CONFIG_DISABLE_DATE_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_DATE) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_DATE_BUILTIN
#if ENABLED (JERRY_BUILTIN_DATE)
OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
ECMA_BUILTIN_ID_DATE,
@@ -69,14 +69,14 @@ ROUTINE (LIT_MAGIC_STRING_TO_UTC_STRING_UL, ECMA_DATE_PROTOTYPE_TO_UTC_STRING, 0
ROUTINE (LIT_MAGIC_STRING_TO_ISO_STRING_UL, ECMA_DATE_PROTOTYPE_TO_ISO_STRING, 0, 0)
ROUTINE (LIT_MAGIC_STRING_TO_JSON_UL, ECMA_DATE_PROTOTYPE_TO_JSON, 1, 1)
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
#if ENABLED (JERRY_BUILTIN_ANNEXB)
ROUTINE (LIT_MAGIC_STRING_GET_YEAR_UL, ECMA_DATE_PROTOTYPE_GET_YEAR, 0, 0)
ROUTINE (LIT_MAGIC_STRING_SET_YEAR_UL, ECMA_DATE_PROTOTYPE_SET_YEAR, 1, 1)
ROUTINE (LIT_MAGIC_STRING_TO_GMT_STRING_UL, ECMA_DATE_PROTOTYPE_TO_UTC_STRING, 0, 0)
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
#endif /* !CONFIG_DISABLE_DATE_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_DATE) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -25,7 +25,7 @@
#include "ecma-try-catch-macro.h"
#include "lit-char-helpers.h"
#ifndef CONFIG_DISABLE_DATE_BUILTIN
#if ENABLED (JERRY_BUILTIN_DATE)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -571,4 +571,4 @@ ecma_builtin_date_dispatch_construct (const ecma_value_t *arguments_list_p, /**<
* @}
*/
#endif /* !CONFIG_DISABLE_DATE_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_DATE) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_DATE_BUILTIN
#if ENABLED (JERRY_BUILTIN_DATE)
/* ECMA-262 v5, 15.9.4.1 */
OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
@@ -34,6 +34,6 @@ ROUTINE (LIT_MAGIC_STRING_PARSE, ecma_builtin_date_parse, 1, 1)
ROUTINE (LIT_MAGIC_STRING_UTC_U, ecma_builtin_date_utc, NON_FIXED, 7)
ROUTINE (LIT_MAGIC_STRING_NOW, ecma_builtin_date_now, 0, 0)
#endif /* !CONFIG_DISABLE_DATE_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_DATE) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -25,7 +25,7 @@
#include "ecma-try-catch-macro.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -34,4 +34,4 @@
#define BUILTIN_UNDERSCORED_ID eval_error_prototype
#include "ecma-builtin-internal-routines-template.inc.h"
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
/* Object properties:
* (property name, object pointer getter) */
@@ -39,6 +39,6 @@ STRING_VALUE (LIT_MAGIC_STRING_MESSAGE,
LIT_MAGIC_STRING__EMPTY,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -25,7 +25,7 @@
#include "ecma-try-catch-macro.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -74,4 +74,4 @@ ecma_builtin_eval_error_dispatch_construct (const ecma_value_t *arguments_list_p
* @}
*/
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
/* Number properties:
* (property name, number value, writable, enumerable, configurable) */
@@ -37,6 +37,6 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE,
ECMA_PROPERTY_FIXED)
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -1079,7 +1079,7 @@ ecma_builtin_global_object_encode_uri_component (ecma_value_t this_arg, /**< thi
return ecma_builtin_global_object_encode_uri_helper (uri_component, unescaped_uri_component_set);
} /* ecma_builtin_global_object_encode_uri_component */
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
#if ENABLED (JERRY_BUILTIN_ANNEXB)
/**
* Maximum value of a byte.
@@ -1327,7 +1327,7 @@ ecma_builtin_global_object_unescape (ecma_value_t this_arg, /**< this argument *
return ret_value;
} /* ecma_builtin_global_object_unescape */
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
/**
* @}
@@ -54,53 +54,53 @@ OBJECT_VALUE (LIT_MAGIC_STRING_FUNCTION_UL,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
/* ECMA-262 v5, 15.1.4.3 */
#ifndef CONFIG_DISABLE_ARRAY_BUILTIN
#if ENABLED (JERRY_BUILTIN_ARRAY)
OBJECT_VALUE (LIT_MAGIC_STRING_ARRAY_UL,
ECMA_BUILTIN_ID_ARRAY,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#endif /* !CONFIG_DISABLE_ARRAY_BUILTIN*/
#endif /* ENABLED (JERRY_BUILTIN_ARRAY) */
#ifndef CONFIG_DISABLE_STRING_BUILTIN
#if ENABLED (JERRY_BUILTIN_STRING)
/* ECMA-262 v5, 15.1.4.4 */
OBJECT_VALUE (LIT_MAGIC_STRING_STRING_UL,
ECMA_BUILTIN_ID_STRING,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#endif /* !CONFIG_DISABLE_STRING_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_STRING) */
#ifndef CONFIG_DISABLE_BOOLEAN_BUILTIN
#if ENABLED (JERRY_BUILTIN_BOOLEAN)
/* ECMA-262 v5, 15.1.4.5 */
OBJECT_VALUE (LIT_MAGIC_STRING_BOOLEAN_UL,
ECMA_BUILTIN_ID_BOOLEAN,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#endif /* !CONFIG_DISABLE_BOOLEAN_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */
#ifndef CONFIG_DISABLE_NUMBER_BUILTIN
#if ENABLED (JERRY_BUILTIN_NUMBER)
/* ECMA-262 v5, 15.1.4.6 */
OBJECT_VALUE (LIT_MAGIC_STRING_NUMBER_UL,
ECMA_BUILTIN_ID_NUMBER,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#endif /* !CONFIG_DISABLE_NUMBER_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */
#ifndef CONFIG_DISABLE_DATE_BUILTIN
#if ENABLED (JERRY_BUILTIN_DATE)
/* ECMA-262 v5, 15.1.4.7 */
OBJECT_VALUE (LIT_MAGIC_STRING_DATE_UL,
ECMA_BUILTIN_ID_DATE,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#endif /* !CONFIG_DISABLE_DATE_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_DATE) */
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
#if ENABLED (JERRY_BUILTIN_REGEXP)
/* ECMA-262 v5, 15.1.4.8 */
OBJECT_VALUE (LIT_MAGIC_STRING_REGEXP_UL,
ECMA_BUILTIN_ID_REGEXP,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
/* ECMA-262 v5, 15.1.4.9 */
OBJECT_VALUE (LIT_MAGIC_STRING_ERROR_UL,
ECMA_BUILTIN_ID_ERROR,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
/* ECMA-262 v5, 15.1.4.10 */
OBJECT_VALUE (LIT_MAGIC_STRING_EVAL_ERROR_UL,
@@ -131,23 +131,23 @@ OBJECT_VALUE (LIT_MAGIC_STRING_TYPE_ERROR_UL,
OBJECT_VALUE (LIT_MAGIC_STRING_URI_ERROR_UL,
ECMA_BUILTIN_ID_URI_ERROR,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
#ifndef CONFIG_DISABLE_MATH_BUILTIN
#if ENABLED (JERRY_BUILTIN_MATH)
/* ECMA-262 v5, 15.1.5.1 */
OBJECT_VALUE (LIT_MAGIC_STRING_MATH_UL,
ECMA_BUILTIN_ID_MATH,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#endif /* !CONFIG_DISABLE_MATH_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_MATH) */
#ifndef CONFIG_DISABLE_JSON_BUILTIN
#if ENABLED (JERRY_BUILTIN_JSON)
/* ECMA-262 v5, 15.1.5.2 */
OBJECT_VALUE (LIT_MAGIC_STRING_JSON_U,
ECMA_BUILTIN_ID_JSON,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#endif /* !CONFIG_DISABLE_JSON_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_JSON) */
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
OBJECT_VALUE (LIT_MAGIC_STRING_ARRAY_BUFFER_UL,
ECMA_BUILTIN_ID_ARRAYBUFFER,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
@@ -180,37 +180,37 @@ OBJECT_VALUE (LIT_MAGIC_STRING_FLOAT32_ARRAY_UL,
ECMA_BUILTIN_ID_FLOAT32ARRAY,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64
#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
OBJECT_VALUE (LIT_MAGIC_STRING_FLOAT64_ARRAY_UL,
ECMA_BUILTIN_ID_FLOAT64ARRAY,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64 */
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
OBJECT_VALUE (LIT_MAGIC_STRING_UINT8_CLAMPED_ARRAY_UL,
ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
#ifndef CONFIG_DISABLE_ES2015_PROMISE_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
OBJECT_VALUE (LIT_MAGIC_STRING_PROMISE_UL,
ECMA_BUILTIN_ID_PROMISE,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#endif /* !CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROMISE) */
#ifndef CONFIG_DISABLE_ES2015_MAP_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_MAP)
/* ECMA-262 v6, 23.1.1.1 */
OBJECT_VALUE (LIT_MAGIC_STRING_MAP_UL,
ECMA_BUILTIN_ID_MAP,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#endif /* !CONFIG_DISABLE_ES2015_MAP_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) */
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
/* ECMA-262 v6, 19.4.1.1 */
OBJECT_VALUE (LIT_MAGIC_STRING_SYMBOL_UL,
ECMA_BUILTIN_ID_SYMBOL,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
/* Routine properties:
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
@@ -225,9 +225,9 @@ ROUTINE (LIT_MAGIC_STRING_ENCODE_URI, ecma_builtin_global_object_encode_uri, 1,
ROUTINE (LIT_MAGIC_STRING_ENCODE_URI_COMPONENT, ecma_builtin_global_object_encode_uri_component, 1, 1)
ROUTINE (LIT_MAGIC_STRING_PARSE_INT, ecma_builtin_global_object_parse_int, 2, 2)
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
#if ENABLED (JERRY_BUILTIN_ANNEXB)
ROUTINE (LIT_MAGIC_STRING_ESCAPE, ecma_builtin_global_object_escape, 1, 1)
ROUTINE (LIT_MAGIC_STRING_UNESCAPE, ecma_builtin_global_object_unescape, 1, 1)
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -24,7 +24,7 @@
#include "ecma-try-catch-macro.h"
#include "lit-char-helpers.h"
#ifndef CONFIG_DISABLE_DATE_BUILTIN
#if ENABLED (JERRY_BUILTIN_DATE)
/** \addtogroup ecma ECMA
* @{
@@ -823,4 +823,4 @@ ecma_date_value_to_time_string (ecma_number_t datetime_number) /**<datetime */
* @}
*/
#endif /* !CONFIG_DISABLE_DATE_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_DATE) */
@@ -18,7 +18,7 @@
#include "ecma-builtin-helpers.h"
#include "lit-char-helpers.h"
#ifndef CONFIG_DISABLE_JSON_BUILTIN
#if ENABLED (JERRY_BUILTIN_JSON)
/** \addtogroup ecma ECMA
* @{
@@ -223,7 +223,7 @@ ecma_builtin_helper_json_create_non_formatted_json (lit_utf8_byte_t left_bracket
return ecma_make_string_value (result_str_p);
} /* ecma_builtin_helper_json_create_non_formatted_json */
#endif /* !CONFIG_DISABLE_JSON_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_JSON) */
/**
* @}
@@ -25,11 +25,11 @@
#define STRING_VALUE(name, magic_string_id, prop_attributes)
#endif /* !STRING_VALUE */
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
#ifndef SYMBOL_VALUE
#define SYMBOL_VALUE(name, desc_string_id)
#endif /* !SYMBOL_VALUE */
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
#ifndef OBJECT_VALUE
#define OBJECT_VALUE(name, obj_builtin_id, prop_attributes)
@@ -16,9 +16,9 @@
#undef SIMPLE_VALUE
#undef NUMBER_VALUE
#undef STRING_VALUE
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
#undef SYMBOL_VALUE
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
#undef OBJECT_VALUE
#undef ROUTINE
#undef ROUTINE_CONFIGURABLE_ONLY
@@ -35,7 +35,7 @@
* @{
*/
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
/**
* Helper function for Object.prototype.toString routine when
* the @@toStringTag property is present
@@ -96,7 +96,7 @@ ecma_builtin_helper_object_to_string_tag_helper (ecma_value_t tag_value) /**< st
return ecma_make_string_value (ret_string_p);
} /* ecma_builtin_helper_object_to_string_tag_helper */
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
/**
* Common implementation of the Object.prototype.toString routine
@@ -140,7 +140,7 @@ ecma_builtin_helper_object_to_string (const ecma_value_t this_arg) /**< this arg
type_string = ecma_object_get_class_name (obj_p);
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
ecma_value_t tag_value = ecma_op_object_get_by_symbol_id (obj_p, LIT_MAGIC_STRING_TO_STRING_TAG);
if (ECMA_IS_VALUE_ERROR (tag_value))
@@ -156,7 +156,7 @@ ecma_builtin_helper_object_to_string (const ecma_value_t this_arg) /**< this arg
}
ecma_free_value (tag_value);
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
ecma_deref_object (obj_p);
}
@@ -48,7 +48,7 @@ ecma_value_t
ecma_builtin_helper_def_prop (ecma_object_t *obj_p, ecma_string_t *index_p, ecma_value_t value,
uint32_t opts, bool is_throw);
#ifndef CONFIG_DISABLE_DATE_BUILTIN
#if ENABLED (JERRY_BUILTIN_DATE)
/**
* Time range defines for helper functions.
@@ -118,8 +118,9 @@ ecma_value_t ecma_date_value_to_iso_string (ecma_number_t datetime_number);
ecma_value_t ecma_date_value_to_date_string (ecma_number_t datetime_number);
ecma_value_t ecma_date_value_to_time_string (ecma_number_t datetime_number);
#endif /* !CONFIG_DISABLE_DATE_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_DATE) */
#if ENABLED (JERRY_BUILTIN_JSON)
/* ecma-builtin-helper-json.c */
/**
@@ -165,6 +166,7 @@ ecma_builtin_helper_json_create_formatted_json (lit_utf8_byte_t left_bracket, li
ecma_value_t
ecma_builtin_helper_json_create_non_formatted_json (lit_utf8_byte_t left_bracket, lit_utf8_byte_t right_bracket,
ecma_collection_header_t *partial_p);
#endif /* ENABLED (JERRY_BUILTIN_JSON) */
/* ecma-builtin-helper-error.c */
@@ -142,7 +142,7 @@ const ecma_builtin_property_descriptor_t PROPERTY_DESCRIPTOR_LIST_NAME[] =
prop_attributes, \
magic_string_id \
},
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
#define SYMBOL_VALUE(name, desc_string_id) \
{ \
name, \
@@ -150,7 +150,7 @@ const ecma_builtin_property_descriptor_t PROPERTY_DESCRIPTOR_LIST_NAME[] =
ECMA_PROPERTY_FIXED, \
desc_string_id \
},
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
#define ACCESSOR_READ_WRITE(name, c_getter_name, c_setter_name, prop_attributes) \
{ \
name, \
@@ -17,7 +17,7 @@
#include "ecma-builtins.h"
#include "ecma-iterator-object.h"
#ifndef CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -60,4 +60,4 @@ ecma_builtin_iterator_prototype_object_iterator (ecma_value_t this_val) /**< thi
* @}
*/
#endif /* !CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
@@ -19,12 +19,12 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
/* Routine properties:
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
ROUTINE (LIT_GLOBAL_SYMBOL_ITERATOR, ecma_builtin_iterator_prototype_object_iterator, 0, 0)
#endif /* !CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -31,7 +31,7 @@
#include "lit-char-helpers.h"
#include "lit-globals.h"
#ifndef CONFIG_DISABLE_JSON_BUILTIN
#if ENABLED (JERRY_BUILTIN_JSON)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -1818,4 +1818,4 @@ ecma_builtin_json_array (ecma_object_t *obj_p, /**< the array object*/
* @}
*/
#endif /* !CONFIG_DISABLE_JSON_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_JSON) */
@@ -19,20 +19,20 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_JSON_BUILTIN
#if ENABLED (JERRY_BUILTIN_JSON)
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
/* ECMA-262 v6, 24.3.3 */
STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
LIT_MAGIC_STRING_JSON_U,
ECMA_PROPERTY_FLAG_CONFIGURABLE)
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
/* Routine properties:
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
ROUTINE (LIT_MAGIC_STRING_PARSE, ecma_builtin_json_parse, 2, 2)
ROUTINE (LIT_MAGIC_STRING_STRINGIFY, ecma_builtin_json_stringify, 3, 3)
#endif /* !CONFIG_DISABLE_JSON_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_JSON) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -15,7 +15,7 @@
#include "ecma-map-object.h"
#ifndef CONFIG_DISABLE_ES2015_MAP_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_MAP)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -135,4 +135,4 @@ ecma_builtin_map_prototype_object_size_getter (ecma_value_t this_arg) /**< this
* @}
*/
#endif /* !CONFIG_DISABLE_ES2015_MAP_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ES2015_MAP_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_MAP)
/* Object properties:
* (property name, object pointer getter) */
@@ -29,12 +29,12 @@ OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
ECMA_BUILTIN_ID_MAP,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
/* ECMA-262 v6, 23.1.3.13 */
STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
LIT_MAGIC_STRING_MAP_UL,
ECMA_PROPERTY_FLAG_CONFIGURABLE)
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
/* Routine properties:
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
@@ -49,6 +49,6 @@ ACCESSOR_READ_ONLY (LIT_MAGIC_STRING_SIZE,
ecma_builtin_map_prototype_object_size_getter,
ECMA_PROPERTY_FIXED)
#endif /* !CONFIG_DISABLE_ES2015_MAP_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -17,7 +17,7 @@
#include "ecma-exceptions.h"
#include "ecma-map-object.h"
#ifndef CONFIG_DISABLE_ES2015_MAP_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_MAP)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -68,4 +68,4 @@ ecma_builtin_map_dispatch_construct (const ecma_value_t *arguments_list_p, /**<
* @}
*/
#endif /* !CONFIG_DISABLE_ES2015_MAP_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ES2015_MAP_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_MAP)
/* Number properties:
* (property name, number value, writable, enumerable, configurable) */
@@ -42,6 +42,6 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
ECMA_BUILTIN_ID_MAP_PROTOTYPE,
ECMA_PROPERTY_FIXED)
#endif /* !CONFIG_DISABLE_ES2015_MAP_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -29,7 +29,7 @@
#include "jrt.h"
#include "jrt-libc-includes.h"
#ifndef CONFIG_DISABLE_MATH_BUILTIN
#if ENABLED (JERRY_BUILTIN_MATH)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -371,4 +371,4 @@ ecma_builtin_math_dispatch_routine (uint16_t builtin_routine_id, /**< built-in w
* @}
*/
#endif /* !CONFIG_DISABLE_MATH_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_MATH) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_MATH_BUILTIN
#if ENABLED (JERRY_BUILTIN_MATH)
/* Number properties:
* (property name, number value, writable, enumerable, configurable) */
@@ -64,12 +64,12 @@ NUMBER_VALUE (LIT_MAGIC_STRING_SQRT2_U,
ECMA_BUILTIN_NUMBER_SQRT2,
ECMA_PROPERTY_FIXED)
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
/* ECMA-262 v6, 20.2.1.9 */
STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
LIT_MAGIC_STRING_MATH_UL,
ECMA_PROPERTY_FLAG_CONFIGURABLE)
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
/* Routine properties:
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
@@ -92,6 +92,6 @@ ROUTINE (LIT_MAGIC_STRING_SIN, ECMA_MATH_OBJECT_SIN, 1, 1)
ROUTINE (LIT_MAGIC_STRING_SQRT, ECMA_MATH_OBJECT_SQRT, 1, 1)
ROUTINE (LIT_MAGIC_STRING_TAN, ECMA_MATH_OBJECT_TAN, 1, 1)
#endif /* !CONFIG_DISABLE_MATH_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_MATH) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -28,7 +28,7 @@
#include "jrt.h"
#include "jrt-libc-includes.h"
#ifndef CONFIG_DISABLE_NUMBER_BUILTIN
#if ENABLED (JERRY_BUILTIN_NUMBER)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -997,4 +997,4 @@ ecma_builtin_number_prototype_object_to_precision (ecma_value_t this_arg, /**< t
* @}
*/
#endif /* !CONFIG_DISABLE_NUMBER_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_NUMBER_BUILTIN
#if ENABLED (JERRY_BUILTIN_NUMBER)
/* Object properties:
* (property name, object pointer getter) */
@@ -38,6 +38,6 @@ ROUTINE (LIT_MAGIC_STRING_TO_FIXED_UL, ecma_builtin_number_prototype_object_to_f
ROUTINE (LIT_MAGIC_STRING_TO_EXPONENTIAL_UL, ecma_builtin_number_prototype_object_to_exponential, 1, 1)
ROUTINE (LIT_MAGIC_STRING_TO_PRECISION_UL, ecma_builtin_number_prototype_object_to_precision, 1, 1)
#endif /* !CONFIG_DISABLE_NUMBER_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -25,7 +25,7 @@
#include "ecma-try-catch-macro.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_NUMBER_BUILTIN
#if ENABLED (JERRY_BUILTIN_NUMBER)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -97,4 +97,4 @@ ecma_builtin_number_dispatch_construct (const ecma_value_t *arguments_list_p, /*
* @}
*/
#endif /* !CONFIG_DISABLE_NUMBER_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_NUMBER_BUILTIN
#if ENABLED (JERRY_BUILTIN_NUMBER)
/* Number properties:
* (property name, number value, writable, enumerable, configurable) */
@@ -62,6 +62,6 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
ECMA_BUILTIN_ID_NUMBER_PROTOTYPE,
ECMA_PROPERTY_FIXED)
#endif /* !CONFIG_DISABLE_NUMBER_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -113,15 +113,15 @@ ecma_builtin_object_object_get_prototype_of (ecma_value_t this_arg, /**< 'this'
/* 1. */
if (!was_object)
{
#ifndef CONFIG_DISABLE_ES2015_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN)
arg = ecma_op_to_object (arg);
if (ECMA_IS_VALUE_ERROR (arg))
{
return arg;
}
#else /* CONFIG_DISABLE_ES2015_BUILTIN */
#else /* !ENABLED (JERRY_ES2015_BUILTIN) */
return ecma_raise_type_error (ECMA_ERR_MSG ("Argument is not an object."));
#endif /* !CONFIG_DISABLE_ES2015_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
}
/* 2. */
ecma_object_t *obj_p = ecma_get_object_from_value (arg);
@@ -137,17 +137,17 @@ ecma_builtin_object_object_get_prototype_of (ecma_value_t this_arg, /**< 'this'
ret_value = ECMA_VALUE_NULL;
}
#ifndef CONFIG_DISABLE_ES2015_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN)
if (!was_object)
{
ecma_free_value (arg);
}
#endif /* !CONFIG_DISABLE_ES2015_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
return ret_value;
} /* ecma_builtin_object_object_get_prototype_of */
#ifndef CONFIG_DISABLE_ES2015_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN)
/**
* [[SetPrototypeOf]]
*
@@ -269,7 +269,7 @@ ecma_builtin_object_object_set_prototype_of (ecma_value_t this_arg, /**< 'this'
return ret_value;
} /* ecma_builtin_object_object_set_prototype_of */
#endif /* !CONFIG_DISABLE_ES2015_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
/**
* The Object object's 'getOwnPropertyNames' routine
@@ -302,7 +302,7 @@ ecma_builtin_object_object_get_own_property_names (ecma_value_t this_arg, /**< '
return ret_value;
} /* ecma_builtin_object_object_get_own_property_names */
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
/**
* The Object object's 'getOwnPropertySymbols' routine
*
@@ -329,7 +329,7 @@ ecma_builtin_object_object_get_own_property_symbols (ecma_value_t this_arg, /**<
return ecma_builtin_helper_object_get_properties (obj_p, ECMA_LIST_SYMBOLS);
} /* ecma_builtin_object_object_get_own_property_symbols */
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
/**
* The Object object's 'seal' routine
@@ -949,7 +949,7 @@ ecma_builtin_object_object_define_property (ecma_value_t this_arg, /**< 'this' a
return ret_value;
} /* ecma_builtin_object_object_define_property */
#ifndef CONFIG_DISABLE_ES2015_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN)
/**
* The Object object's 'assign' routine
*
@@ -1067,7 +1067,7 @@ ecma_builtin_object_object_assign (ecma_value_t this_arg, /**< 'this' argument *
ecma_deref_object (to_obj_p);
return ret_value;
} /* ecma_builtin_object_object_assign */
#endif /* !CONFIG_DISABLE_ES2015_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
/**
* @}
@@ -39,9 +39,9 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
ROUTINE (LIT_MAGIC_STRING_GET_PROTOTYPE_OF_UL, ecma_builtin_object_object_get_prototype_of, 1, 1)
ROUTINE (LIT_MAGIC_STRING_GET_OWN_PROPERTY_NAMES_UL, ecma_builtin_object_object_get_own_property_names, 1, 1)
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
ROUTINE (LIT_MAGIC_STRING_GET_OWN_PROPERTY_SYMBOLS_UL, ecma_builtin_object_object_get_own_property_symbols, 1, 1)
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
ROUTINE (LIT_MAGIC_STRING_SEAL, ecma_builtin_object_object_seal, 1, 1)
ROUTINE (LIT_MAGIC_STRING_FREEZE, ecma_builtin_object_object_freeze, 1, 1)
ROUTINE (LIT_MAGIC_STRING_PREVENT_EXTENSIONS_UL, ecma_builtin_object_object_prevent_extensions, 1, 1)
@@ -54,9 +54,9 @@ ROUTINE (LIT_MAGIC_STRING_CREATE, ecma_builtin_object_object_create, 2, 2)
ROUTINE (LIT_MAGIC_STRING_DEFINE_PROPERTIES_UL, ecma_builtin_object_object_define_properties, 2, 2)
ROUTINE (LIT_MAGIC_STRING_DEFINE_PROPERTY_UL, ecma_builtin_object_object_define_property, 3, 3)
#ifndef CONFIG_DISABLE_ES2015_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN)
ROUTINE (LIT_MAGIC_STRING_SET_PROTOTYPE_OF_UL, ecma_builtin_object_object_set_prototype_of, 2, 2)
ROUTINE (LIT_MAGIC_STRING_ASSIGN, ecma_builtin_object_object_assign, NON_FIXED, 2)
#endif /* !CONFIG_DISABLE_ES2015_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -16,7 +16,7 @@
#include "ecma-globals.h"
#include "ecma-promise-object.h"
#ifndef CONFIG_DISABLE_ES2015_PROMISE_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -76,4 +76,4 @@ ecma_builtin_promise_prototype_catch (ecma_value_t this_arg, /**< this argument
* @}
*/
#endif /* !CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROMISE) */
@@ -15,7 +15,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ES2015_PROMISE_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
/* Object properties:
* (property name, object pointer getter) */
@@ -28,16 +28,16 @@ NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
1,
ECMA_PROPERTY_FLAG_WRITABLE)
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
/* ECMA-262 v6, 25.4.5.4 */
STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
LIT_MAGIC_STRING_PROMISE_UL,
ECMA_PROPERTY_FLAG_CONFIGURABLE)
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
ROUTINE (LIT_MAGIC_STRING_THEN, ecma_builtin_promise_prototype_then, 2, 2)
ROUTINE (LIT_MAGIC_STRING_CATCH, ecma_builtin_promise_prototype_catch, 1, 1)
#endif /* !CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROMISE) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -23,7 +23,7 @@
#include "ecma-promise-object.h"
#include "jcontext.h"
#ifndef CONFIG_DISABLE_ES2015_PROMISE_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -697,4 +697,4 @@ ecma_builtin_promise_dispatch_construct (const ecma_value_t *arguments_list_p, /
* @}
*/
#endif /* !CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROMISE) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ES2015_PROMISE_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
/* Number properties:
* (property name, number value, writable, enumerable, configurable) */
@@ -42,6 +42,6 @@ ROUTINE (LIT_MAGIC_STRING_RESOLVE, ecma_builtin_promise_resolve, 1, 1)
ROUTINE (LIT_MAGIC_STRING_RACE, ecma_builtin_promise_race, 1, 1)
ROUTINE (LIT_MAGIC_STRING_ALL, ecma_builtin_promise_all, 1, 1)
#endif /* !CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROMISE) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -25,7 +25,7 @@
#include "ecma-try-catch-macro.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -34,4 +34,4 @@
#define BUILTIN_UNDERSCORED_ID range_error_prototype
#include "ecma-builtin-internal-routines-template.inc.h"
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
/* Object properties:
* (property name, object pointer getter) */
@@ -39,6 +39,6 @@ STRING_VALUE (LIT_MAGIC_STRING_MESSAGE,
LIT_MAGIC_STRING__EMPTY,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -25,7 +25,7 @@
#include "ecma-try-catch-macro.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -74,4 +74,4 @@ ecma_builtin_range_error_dispatch_construct (const ecma_value_t *arguments_list_
* @}
*/
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
/* Number properties:
* (property name, number value, writable, enumerable, configurable) */
@@ -37,6 +37,6 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
ECMA_BUILTIN_ID_RANGE_ERROR_PROTOTYPE,
ECMA_PROPERTY_FIXED)
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -25,7 +25,7 @@
#include "ecma-try-catch-macro.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -34,4 +34,4 @@
#define BUILTIN_UNDERSCORED_ID reference_error_prototype
#include "ecma-builtin-internal-routines-template.inc.h"
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
/* Object properties:
* (property name, object pointer getter) */
@@ -39,6 +39,6 @@ STRING_VALUE (LIT_MAGIC_STRING_MESSAGE,
LIT_MAGIC_STRING__EMPTY,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -25,7 +25,7 @@
#include "ecma-try-catch-macro.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -74,4 +74,4 @@ ecma_builtin_reference_error_dispatch_construct (const ecma_value_t *arguments_l
* @}
*/
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
/* Number properties:
* (property name, number value, writable, enumerable, configurable) */
@@ -37,6 +37,6 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
ECMA_BUILTIN_ID_REFERENCE_ERROR_PROTOTYPE,
ECMA_PROPERTY_FIXED)
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -24,7 +24,7 @@
#include "ecma-try-catch-macro.h"
#include "lit-char-helpers.h"
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
#if ENABLED (JERRY_BUILTIN_REGEXP)
#include "ecma-regexp-object.h"
#include "re-compiler.h"
@@ -45,7 +45,7 @@
* @{
*/
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
#if ENABLED (JERRY_BUILTIN_ANNEXB)
/**
* The RegExp.prototype object's 'compile' routine
@@ -216,7 +216,7 @@ ecma_builtin_regexp_prototype_compile (ecma_value_t this_arg, /**< this argument
return ECMA_VALUE_UNDEFINED;
} /* ecma_builtin_regexp_prototype_compile */
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
/**
* The RegExp.prototype object's 'exec' routine
@@ -398,4 +398,4 @@ ecma_builtin_regexp_prototype_to_string (ecma_value_t this_arg) /**< this argume
* @}
*/
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
#if ENABLED (JERRY_BUILTIN_REGEXP)
/* ECMA-262 v5, 15.10.6.1 */
OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR,
@@ -51,13 +51,13 @@ NUMBER_VALUE (LIT_MAGIC_STRING_LASTINDEX_UL,
0,
ECMA_PROPERTY_FLAG_WRITABLE)
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
#if ENABLED (JERRY_BUILTIN_ANNEXB)
ROUTINE (LIT_MAGIC_STRING_COMPILE, ecma_builtin_regexp_prototype_compile, 2, 1)
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
ROUTINE (LIT_MAGIC_STRING_EXEC, ecma_builtin_regexp_prototype_exec, 1, 1)
ROUTINE (LIT_MAGIC_STRING_TEST, ecma_builtin_regexp_prototype_test, 1, 1)
ROUTINE (LIT_MAGIC_STRING_TO_STRING_UL, ecma_builtin_regexp_prototype_to_string, 0, 0)
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -22,7 +22,7 @@
#include "ecma-regexp-object.h"
#include "ecma-try-catch-macro.h"
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
#if ENABLED (JERRY_BUILTIN_REGEXP)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -132,4 +132,4 @@ ecma_builtin_regexp_dispatch_construct (const ecma_value_t *arguments_list_p, /*
* @}
*/
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
#if ENABLED (JERRY_BUILTIN_REGEXP)
/* ECMA-262 v5, 15.10.5 */
NUMBER_VALUE (LIT_MAGIC_STRING_LENGTH,
@@ -31,6 +31,6 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
ECMA_BUILTIN_ID_REGEXP_PROTOTYPE,
ECMA_PROPERTY_FIXED)
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -31,11 +31,11 @@
#include "jrt-libc-includes.h"
#include "lit-char-helpers.h"
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
#if ENABLED (JERRY_BUILTIN_REGEXP)
#include "ecma-regexp-object.h"
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
#ifndef CONFIG_DISABLE_STRING_BUILTIN
#if ENABLED (JERRY_BUILTIN_STRING)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -360,7 +360,7 @@ ecma_builtin_string_prototype_object_locale_compare (ecma_value_t this_arg, /**<
return ret_value;
} /* ecma_builtin_string_prototype_object_locale_compare */
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
#if ENABLED (JERRY_BUILTIN_REGEXP)
/**
* The common preparation code for 'search' and 'match' functions
@@ -1336,7 +1336,7 @@ ecma_builtin_string_prototype_object_search (ecma_value_t this_arg, /**< this ar
return ret_value;
} /* ecma_builtin_string_prototype_object_search */
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
/**
* The String.prototype object's 'slice' routine
@@ -1510,7 +1510,7 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this arg
if (separator_is_regexp)
{
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
#if ENABLED (JERRY_BUILTIN_REGEXP)
ecma_value_t regexp_value = ecma_copy_value_if_not_object (separator);
ecma_value_t match_result;
match_result = ecma_regexp_exec_helper (regexp_value,
@@ -1524,9 +1524,9 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this arg
}
ecma_free_value (match_result);
#else
#else /* !ENABLED (JERRY_BUILTIN_REGEXP) */
return ecma_raise_type_error (ECMA_ERR_MSG ("REGEXP separator is disabled in split method."));
#endif
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
}
else
{
@@ -1576,14 +1576,14 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_arg, /**< this arg
if (separator_is_regexp)
{
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
#if ENABLED (JERRY_BUILTIN_REGEXP)
ecma_value_t regexp_value = ecma_copy_value_if_not_object (separator);
ecma_string_t *substr_str_p = ecma_string_substr (this_to_string_p, curr_pos, string_length);
match_result = ecma_regexp_exec_helper (regexp_value, ecma_make_string_value (substr_str_p), true);
ecma_deref_ecma_string (substr_str_p);
#else
#else /* !ENABLED (JERRY_BUILTIN_REGEXP) */
return ecma_raise_type_error (ECMA_ERR_MSG ("REGEXP separator is disabled in split method."));
#endif
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
}
else
{
@@ -2094,7 +2094,7 @@ ecma_builtin_string_prototype_object_trim (ecma_value_t this_arg) /**< this argu
return ret_value;
} /* ecma_builtin_string_prototype_object_trim */
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
#if ENABLED (JERRY_BUILTIN_ANNEXB)
/**
* The String.prototype object's 'substr' routine
@@ -2162,7 +2162,7 @@ ecma_builtin_string_prototype_object_substr (ecma_value_t this_arg, /**< this ar
return ret_value;
} /* ecma_builtin_string_prototype_object_substr */
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
/**
* @}
@@ -2170,4 +2170,4 @@ ecma_builtin_string_prototype_object_substr (ecma_value_t this_arg, /**< this ar
* @}
*/
#endif /* !CONFIG_DISABLE_STRING_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_STRING) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_STRING_BUILTIN
#if ENABLED (JERRY_BUILTIN_STRING)
/* Object properties:
* (property name, object pointer getter) */
@@ -49,11 +49,11 @@ ROUTINE (LIT_MAGIC_STRING_CHAR_AT_UL, ecma_builtin_string_prototype_object_char_
ROUTINE (LIT_MAGIC_STRING_CHAR_CODE_AT_UL, ecma_builtin_string_prototype_object_char_code_at, 1, 1)
ROUTINE (LIT_MAGIC_STRING_LOCALE_COMPARE_UL, ecma_builtin_string_prototype_object_locale_compare, 1, 1)
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
#if ENABLED (JERRY_BUILTIN_REGEXP)
ROUTINE (LIT_MAGIC_STRING_MATCH, ecma_builtin_string_prototype_object_match, 1, 1)
ROUTINE (LIT_MAGIC_STRING_REPLACE, ecma_builtin_string_prototype_object_replace, 2, 2)
ROUTINE (LIT_MAGIC_STRING_SEARCH, ecma_builtin_string_prototype_object_search, 1, 1)
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
ROUTINE (LIT_MAGIC_STRING_SPLIT, ecma_builtin_string_prototype_object_split, 2, 2)
ROUTINE (LIT_MAGIC_STRING_SUBSTRING, ecma_builtin_string_prototype_object_substring, 2, 2)
@@ -63,10 +63,10 @@ ROUTINE (LIT_MAGIC_STRING_TO_UPPER_CASE_UL, ecma_builtin_string_prototype_object
ROUTINE (LIT_MAGIC_STRING_TO_LOCALE_UPPER_CASE_UL, ecma_builtin_string_prototype_object_to_locale_upper_case, 0, 0)
ROUTINE (LIT_MAGIC_STRING_TRIM, ecma_builtin_string_prototype_object_trim, 0, 0)
#ifndef CONFIG_DISABLE_ANNEXB_BUILTIN
#if ENABLED (JERRY_BUILTIN_ANNEXB)
ROUTINE (LIT_MAGIC_STRING_SUBSTR, ecma_builtin_string_prototype_object_substr, 2, 2)
#endif /* !CONFIG_DISABLE_ANNEXB_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_ANNEXB) */
#endif /* !CONFIG_DISABLE_STRING_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_STRING) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -22,13 +22,13 @@
#include "ecma-helpers.h"
#include "ecma-objects.h"
#include "ecma-string-object.h"
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
#include "ecma-symbol-object.h"
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
#include "ecma-try-catch-macro.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_STRING_BUILTIN
#if ENABLED (JERRY_BUILTIN_STRING)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -130,13 +130,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);
}
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
/* 2.a */
else if (ecma_is_value_symbol (arguments_list_p[0]))
{
ret_value = ecma_get_symbol_descriptive_string (arguments_list_p[0]);
}
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
/* 2.b */
else
{
@@ -166,4 +166,4 @@ ecma_builtin_string_dispatch_construct (const ecma_value_t *arguments_list_p, /*
* @}
*/
#endif /* !CONFIG_DISABLE_STRING_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_STRING) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_STRING_BUILTIN
#if ENABLED (JERRY_BUILTIN_STRING)
/* Number properties:
* (property name, number value, writable, enumerable, configurable) */
@@ -41,6 +41,6 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
* (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */
ROUTINE (LIT_MAGIC_STRING_FROM_CHAR_CODE_UL, ecma_builtin_string_object_from_char_code, NON_FIXED, 1)
#endif /* !CONFIG_DISABLE_STRING_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_STRING) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -25,7 +25,7 @@
#include "ecma-try-catch-macro.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -95,4 +95,4 @@ ecma_builtin_symbol_prototype_object_to_primitive (ecma_value_t this_arg) /**< t
* @}
*/
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
/* Object properties:
* (property name, object pointer getter) */
@@ -44,6 +44,6 @@ STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG,
LIT_MAGIC_STRING_SYMBOL_UL,
ECMA_PROPERTY_FLAG_CONFIGURABLE)
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -27,7 +27,7 @@
#include "jcontext.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -240,4 +240,4 @@ ecma_builtin_symbol_key_for (ecma_value_t this_arg, /**< this argument */
* @}
*/
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
/* Number properties:
* (property name, number value, writable, enumerable, configurable) */
@@ -86,6 +86,6 @@ SYMBOL_VALUE (LIT_MAGIC_STRING_UNSCOPABLES,
ROUTINE (LIT_MAGIC_STRING_FOR, ecma_builtin_symbol_for, 1, 1)
ROUTINE (LIT_MAGIC_STRING_KEY_FOR, ecma_builtin_symbol_key_for, 1, 1)
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -25,7 +25,7 @@
#include "ecma-try-catch-macro.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -34,4 +34,4 @@
#define BUILTIN_UNDERSCORED_ID syntax_error_prototype
#include "ecma-builtin-internal-routines-template.inc.h"
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
/* Object properties:
* (property name, object pointer getter) */
@@ -39,6 +39,6 @@ STRING_VALUE (LIT_MAGIC_STRING_MESSAGE,
LIT_MAGIC_STRING__EMPTY,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#endif /* CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -25,7 +25,7 @@
#include "ecma-try-catch-macro.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -74,4 +74,4 @@ ecma_builtin_syntax_error_dispatch_construct (const ecma_value_t *arguments_list
* @}
*/
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
/* Number properties:
* (property name, number value, writable, enumerable, configurable) */
@@ -37,6 +37,6 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
ECMA_BUILTIN_ID_SYNTAX_ERROR_PROTOTYPE,
ECMA_PROPERTY_FIXED)
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -25,7 +25,7 @@
#include "ecma-try-catch-macro.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -34,4 +34,4 @@
#define BUILTIN_UNDERSCORED_ID type_error_prototype
#include "ecma-builtin-internal-routines-template.inc.h"
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
/* Object properties:
* (property name, object pointer getter) */
@@ -39,6 +39,6 @@ STRING_VALUE (LIT_MAGIC_STRING_MESSAGE,
LIT_MAGIC_STRING__EMPTY,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -25,7 +25,7 @@
#include "ecma-try-catch-macro.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -74,4 +74,4 @@ ecma_builtin_type_error_dispatch_construct (const ecma_value_t *arguments_list_p
* @}
*/
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
/* Number properties:
* (property name, number value, writable, enumerable, configurable) */
@@ -37,6 +37,6 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE,
ECMA_PROPERTY_FIXED)
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -25,7 +25,7 @@
#include "ecma-try-catch-macro.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -34,4 +34,4 @@
#define BUILTIN_UNDERSCORED_ID uri_error_prototype
#include "ecma-builtin-internal-routines-template.inc.h"
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
/* Object properties:
* (property name, object pointer getter) */
@@ -39,6 +39,6 @@ STRING_VALUE (LIT_MAGIC_STRING_MESSAGE,
LIT_MAGIC_STRING__EMPTY,
ECMA_PROPERTY_CONFIGURABLE_WRITABLE)
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -25,7 +25,7 @@
#include "ecma-try-catch-macro.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -74,4 +74,4 @@ ecma_builtin_uri_error_dispatch_construct (const ecma_value_t *arguments_list_p,
* @}
*/
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
@@ -19,7 +19,7 @@
#include "ecma-builtin-helpers-macro-defines.inc.h"
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
/* Number properties:
* (property name, number value, writable, enumerable, configurable) */
@@ -37,6 +37,6 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE,
ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE,
ECMA_PROPERTY_FIXED)
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
#include "ecma-builtin-helpers-macro-undefs.inc.h"
@@ -31,9 +31,9 @@ typedef enum
ECMA_BUILTIN_PROPERTY_SIMPLE, /**< simple value property */
ECMA_BUILTIN_PROPERTY_NUMBER, /**< number value property */
ECMA_BUILTIN_PROPERTY_STRING, /**< string value property */
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
ECMA_BUILTIN_PROPERTY_SYMBOL, /**< symbol value property */
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
ECMA_BUILTIN_PROPERTY_OBJECT, /**< builtin object property */
ECMA_BUILTIN_PROPERTY_ROUTINE, /**< routine property */
ECMA_BUILTIN_PROPERTY_ACCESSOR_READ_WRITE, /**< full accessor property */
+18 -18
View File
@@ -421,7 +421,7 @@ ecma_instantiate_builtin (ecma_builtin_id_t obj_builtin_id) /**< built-in id */
/** Initializing [[PrimitiveValue]] properties of built-in prototype objects */
switch (obj_builtin_id)
{
#ifndef CONFIG_DISABLE_ARRAY_BUILTIN
#if ENABLED (JERRY_BUILTIN_ARRAY)
case ECMA_BUILTIN_ID_ARRAY_PROTOTYPE:
{
JERRY_ASSERT (obj_type == ECMA_OBJECT_TYPE_ARRAY);
@@ -431,9 +431,9 @@ ecma_instantiate_builtin (ecma_builtin_id_t obj_builtin_id) /**< built-in id */
ext_object_p->u.array.length_prop = ECMA_PROPERTY_FLAG_WRITABLE | ECMA_PROPERTY_TYPE_VIRTUAL;
break;
}
#endif /* !CONFIG_DISABLE_ARRAY_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_ARRAY) */
#ifndef CONFIG_DISABLE_STRING_BUILTIN
#if ENABLED (JERRY_BUILTIN_STRING)
case ECMA_BUILTIN_ID_STRING_PROTOTYPE:
{
JERRY_ASSERT (obj_type == ECMA_OBJECT_TYPE_CLASS);
@@ -443,9 +443,9 @@ ecma_instantiate_builtin (ecma_builtin_id_t obj_builtin_id) /**< built-in id */
ext_object_p->u.class_prop.u.value = ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY);
break;
}
#endif /* !CONFIG_DISABLE_STRING_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_STRING) */
#ifndef CONFIG_DISABLE_NUMBER_BUILTIN
#if ENABLED (JERRY_BUILTIN_NUMBER)
case ECMA_BUILTIN_ID_NUMBER_PROTOTYPE:
{
JERRY_ASSERT (obj_type == ECMA_OBJECT_TYPE_CLASS);
@@ -455,9 +455,9 @@ ecma_instantiate_builtin (ecma_builtin_id_t obj_builtin_id) /**< built-in id */
ext_object_p->u.class_prop.u.value = ecma_make_integer_value (0);
break;
}
#endif /* !CONFIG_DISABLE_NUMBER_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */
#ifndef CONFIG_DISABLE_BOOLEAN_BUILTIN
#if ENABLED (JERRY_BUILTIN_BOOLEAN)
case ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE:
{
JERRY_ASSERT (obj_type == ECMA_OBJECT_TYPE_CLASS);
@@ -467,9 +467,9 @@ ecma_instantiate_builtin (ecma_builtin_id_t obj_builtin_id) /**< built-in id */
ext_object_p->u.class_prop.u.value = ECMA_VALUE_FALSE;
break;
}
#endif /* !CONFIG_DISABLE_BOOLEAN_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */
#ifndef CONFIG_DISABLE_DATE_BUILTIN
#if ENABLED (JERRY_BUILTIN_DATE)
case ECMA_BUILTIN_ID_DATE_PROTOTYPE:
{
JERRY_ASSERT (obj_type == ECMA_OBJECT_TYPE_CLASS);
@@ -482,9 +482,9 @@ ecma_instantiate_builtin (ecma_builtin_id_t obj_builtin_id) /**< built-in id */
ECMA_SET_INTERNAL_VALUE_POINTER (ext_object_p->u.class_prop.u.value, prim_prop_num_value_p);
break;
}
#endif /* !CONFIG_DISABLE_DATE_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_DATE) */
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
#if ENABLED (JERRY_BUILTIN_REGEXP)
case ECMA_BUILTIN_ID_REGEXP_PROTOTYPE:
{
JERRY_ASSERT (obj_type == ECMA_OBJECT_TYPE_CLASS);
@@ -494,7 +494,7 @@ ecma_instantiate_builtin (ecma_builtin_id_t obj_builtin_id) /**< built-in id */
ext_object_p->u.class_prop.u.value = ECMA_NULL_POINTER;
break;
}
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
default:
{
JERRY_ASSERT (obj_type != ECMA_OBJECT_TYPE_CLASS);
@@ -653,7 +653,7 @@ ecma_builtin_try_to_instantiate_property (ecma_object_t *object_p, /**< object *
lit_magic_string_id_t magic_string_id = ecma_get_string_magic (string_p);
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
if (JERRY_UNLIKELY (ecma_prop_name_is_symbol (string_p)))
{
if (string_p->hash & ECMA_GLOBAL_SYMBOL_FLAG)
@@ -661,7 +661,7 @@ ecma_builtin_try_to_instantiate_property (ecma_object_t *object_p, /**< object *
magic_string_id = (string_p->hash >> ECMA_GLOBAL_SYMBOL_SHIFT);
}
}
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
if (magic_string_id == LIT_MAGIC_STRING__COUNT)
{
@@ -782,7 +782,7 @@ ecma_builtin_try_to_instantiate_property (ecma_object_t *object_p, /**< object *
value = ecma_make_magic_string_value ((lit_magic_string_id_t) curr_property_p->value);
break;
}
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
case ECMA_BUILTIN_PROPERTY_SYMBOL:
{
lit_magic_string_id_t symbol_desc_id = (lit_magic_string_id_t) curr_property_p->magic_string_id;
@@ -800,7 +800,7 @@ ecma_builtin_try_to_instantiate_property (ecma_object_t *object_p, /**< object *
value = ecma_make_symbol_value (symbol_p);
break;
}
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
case ECMA_BUILTIN_PROPERTY_OBJECT:
{
ecma_object_t *builtin_object_p = ecma_builtin_get ((ecma_builtin_id_t) curr_property_p->value);
@@ -943,14 +943,14 @@ ecma_builtin_list_lazy_property_names (ecma_object_t *object_p, /**< a built-in
index = 0;
}
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
/* Builtin symbol properties are internal magic strings which must not be listed */
if (curr_property_p->magic_string_id > LIT_NON_INTERNAL_MAGIC_STRING__COUNT)
{
curr_property_p++;
continue;
}
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
ecma_string_t *name_p = ecma_get_magic_string ((lit_magic_string_id_t) curr_property_p->magic_string_id);
@@ -30,7 +30,7 @@ BUILTIN_ROUTINE (ECMA_BUILTIN_ID_OBJECT,
true,
object)
#ifndef CONFIG_DISABLE_ARRAY_BUILTIN
#if ENABLED (JERRY_BUILTIN_ARRAY)
/* The Array.prototype object (15.4.4) */
BUILTIN (ECMA_BUILTIN_ID_ARRAY_PROTOTYPE,
ECMA_OBJECT_TYPE_ARRAY,
@@ -44,9 +44,9 @@ BUILTIN_ROUTINE (ECMA_BUILTIN_ID_ARRAY,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true,
array)
#endif /* !CONFIG_DISABLE_ARRAY_BUILTIN*/
#endif /* ENABLED (JERRY_BUILTIN_ARRAY) */
#ifndef CONFIG_DISABLE_STRING_BUILTIN
#if ENABLED (JERRY_BUILTIN_STRING)
/* The String.prototype object (15.5.4) */
BUILTIN (ECMA_BUILTIN_ID_STRING_PROTOTYPE,
ECMA_OBJECT_TYPE_CLASS,
@@ -60,9 +60,9 @@ BUILTIN_ROUTINE (ECMA_BUILTIN_ID_STRING,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true,
string)
#endif /* !CONFIG_DISABLE_STRING_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_STRING) */
#ifndef CONFIG_DISABLE_BOOLEAN_BUILTIN
#if ENABLED (JERRY_BUILTIN_BOOLEAN)
/* The Boolean.prototype object (15.6.4) */
BUILTIN (ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE,
ECMA_OBJECT_TYPE_CLASS,
@@ -76,9 +76,9 @@ BUILTIN_ROUTINE (ECMA_BUILTIN_ID_BOOLEAN,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true,
boolean)
#endif /* !CONFIG_DISABLE_BOOLEAN_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_BOOLEAN) */
#ifndef CONFIG_DISABLE_NUMBER_BUILTIN
#if ENABLED (JERRY_BUILTIN_NUMBER)
/* The Number.prototype object (15.7.4) */
BUILTIN (ECMA_BUILTIN_ID_NUMBER_PROTOTYPE,
ECMA_OBJECT_TYPE_CLASS,
@@ -92,7 +92,7 @@ BUILTIN_ROUTINE (ECMA_BUILTIN_ID_NUMBER,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true,
number)
#endif /* !CONFIG_DISABLE_NUMBER_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_NUMBER) */
/* The Function.prototype object (15.3.4) */
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
@@ -108,25 +108,25 @@ BUILTIN_ROUTINE (ECMA_BUILTIN_ID_FUNCTION,
true,
function)
#ifndef CONFIG_DISABLE_MATH_BUILTIN
#if ENABLED (JERRY_BUILTIN_MATH)
/* The Math object (15.8) */
BUILTIN (ECMA_BUILTIN_ID_MATH,
ECMA_OBJECT_TYPE_GENERAL,
ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
true,
math)
#endif /* !CONFIG_DISABLE_MATH_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_MATH) */
#ifndef CONFIG_DISABLE_JSON_BUILTIN
#if ENABLED (JERRY_BUILTIN_JSON)
/* The JSON object (15.12) */
BUILTIN (ECMA_BUILTIN_ID_JSON,
ECMA_OBJECT_TYPE_GENERAL,
ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
true,
json)
#endif /* !CONFIG_DISABLE_JSON_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_JSON) */
#ifndef CONFIG_DISABLE_DATE_BUILTIN
#if ENABLED (JERRY_BUILTIN_DATE)
/* The Date.prototype object (15.9.4) */
BUILTIN (ECMA_BUILTIN_ID_DATE_PROTOTYPE,
ECMA_OBJECT_TYPE_CLASS,
@@ -140,9 +140,9 @@ BUILTIN_ROUTINE (ECMA_BUILTIN_ID_DATE,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true,
date)
#endif /* !CONFIG_DISABLE_DATE_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_DATE) */
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
#if ENABLED (JERRY_BUILTIN_REGEXP)
/* The RegExp.prototype object (15.10.6) */
BUILTIN (ECMA_BUILTIN_ID_REGEXP_PROTOTYPE,
ECMA_OBJECT_TYPE_CLASS,
@@ -156,7 +156,7 @@ BUILTIN_ROUTINE (ECMA_BUILTIN_ID_REGEXP,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true,
regexp)
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
/* The Error object (15.11.1) */
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_ERROR,
@@ -172,7 +172,7 @@ BUILTIN (ECMA_BUILTIN_ID_ERROR_PROTOTYPE,
true,
error_prototype)
#ifndef CONFIG_DISABLE_ERROR_BUILTINS
#if ENABLED (JERRY_BUILTIN_ERRORS)
/* The EvalError.prototype object (15.11.6.1) */
BUILTIN (ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE,
ECMA_OBJECT_TYPE_GENERAL,
@@ -256,7 +256,7 @@ BUILTIN_ROUTINE (ECMA_BUILTIN_ID_URI_ERROR,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true,
uri_error)
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
#endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
/**< The [[ThrowTypeError]] object (13.2.3) */
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_TYPE_ERROR_THROWER,
@@ -265,7 +265,7 @@ BUILTIN_ROUTINE (ECMA_BUILTIN_ID_TYPE_ERROR_THROWER,
false,
type_error_thrower)
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
/* The ArrayBuffer.prototype object (ES2015 24.1.4) */
BUILTIN (ECMA_BUILTIN_ID_ARRAYBUFFER_PROTOTYPE,
@@ -379,7 +379,7 @@ BUILTIN_ROUTINE (ECMA_BUILTIN_ID_FLOAT32ARRAY,
true,
float32array)
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64
#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
BUILTIN (ECMA_BUILTIN_ID_FLOAT64ARRAY_PROTOTYPE,
ECMA_OBJECT_TYPE_GENERAL,
ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,
@@ -391,7 +391,7 @@ BUILTIN_ROUTINE (ECMA_BUILTIN_ID_FLOAT64ARRAY,
ECMA_BUILTIN_ID_TYPEDARRAY,
true,
float64array)
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64 */
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
BUILTIN (ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY_PROTOTYPE,
ECMA_OBJECT_TYPE_GENERAL,
@@ -405,9 +405,9 @@ BUILTIN_ROUTINE (ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY,
true,
uint8clampedarray)
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
#ifndef CONFIG_DISABLE_ES2015_PROMISE_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
BUILTIN (ECMA_BUILTIN_ID_PROMISE_PROTOTYPE,
ECMA_OBJECT_TYPE_GENERAL,
@@ -421,9 +421,9 @@ BUILTIN_ROUTINE (ECMA_BUILTIN_ID_PROMISE,
true,
promise)
#endif /* !CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROMISE) */
#ifndef CONFIG_DISABLE_ES2015_MAP_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_MAP)
/* The Map prototype object (23.1.3) */
BUILTIN (ECMA_BUILTIN_ID_MAP_PROTOTYPE,
@@ -439,9 +439,9 @@ BUILTIN_ROUTINE (ECMA_BUILTIN_ID_MAP,
true,
map)
#endif /* !CONFIG_DISABLE_ES2015_MAP_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) */
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
/* The Symbol prototype object (ECMA-262 v6, 19.4.2.7) */
BUILTIN (ECMA_BUILTIN_ID_SYMBOL_PROTOTYPE,
@@ -457,8 +457,8 @@ BUILTIN_ROUTINE (ECMA_BUILTIN_ID_SYMBOL,
true,
symbol)
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
#ifndef CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
/* The %IteratorPrototype% object (ECMA-262 v6, 25.1.2) */
BUILTIN (ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE,
ECMA_OBJECT_TYPE_GENERAL,
@@ -472,7 +472,7 @@ BUILTIN (ECMA_BUILTIN_ID_ARRAY_ITERATOR_PROTOTYPE,
ECMA_BUILTIN_ID_ITERATOR_PROTOTYPE,
true,
array_iterator_prototype)
#endif /* !CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
/* The Global object (15.1) */
BUILTIN (ECMA_BUILTIN_ID_GLOBAL,
@@ -15,7 +15,7 @@
#include "ecma-builtins.h"
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -40,4 +40,4 @@
* @}
*/
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
@@ -17,10 +17,10 @@
* Float32Array prototype description
*/
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
#define TYPEDARRAY_BYTES_PER_ELEMENT 4
#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_FLOAT32ARRAY
#include "ecma-builtin-typedarray-prototype-template.inc.h"
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
@@ -21,7 +21,7 @@
#include "ecma-typedarray-object.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -75,4 +75,4 @@ ecma_builtin_float32array_dispatch_construct (const ecma_value_t *arguments_list
* @}
*/
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
@@ -17,11 +17,11 @@
* Float32Array description
*/
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
#define TYPEDARRAY_BYTES_PER_ELEMENT 4
#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_FLOAT32_ARRAY_UL
#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_FLOAT32ARRAY_PROTOTYPE
#include "ecma-builtin-typedarray-template.inc.h"
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
@@ -15,8 +15,8 @@
#include "ecma-builtins.h"
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -41,5 +41,5 @@
* @}
*/
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64 */
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
@@ -17,12 +17,12 @@
* Float64Array prototype description
*/
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
#define TYPEDARRAY_BYTES_PER_ELEMENT 8
#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_FLOAT64ARRAY
#include "ecma-builtin-typedarray-prototype-template.inc.h"
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64 */
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
@@ -21,8 +21,8 @@
#include "ecma-typedarray-object.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -76,5 +76,5 @@ ecma_builtin_float64array_dispatch_construct (const ecma_value_t *arguments_list
* @}
*/
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64 */
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
@@ -17,13 +17,13 @@
* Float64Array description
*/
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
#define TYPEDARRAY_BYTES_PER_ELEMENT 8
#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_FLOAT64_ARRAY_UL
#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_FLOAT64ARRAY_PROTOTYPE
#include "ecma-builtin-typedarray-template.inc.h"
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64 */
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
@@ -15,7 +15,7 @@
#include "ecma-builtins.h"
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -40,4 +40,4 @@
* @}
*/
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
@@ -17,10 +17,10 @@
* Int16Array prototype description
*/
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
#define TYPEDARRAY_BYTES_PER_ELEMENT 2
#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_INT16ARRAY
#include "ecma-builtin-typedarray-prototype-template.inc.h"
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
@@ -21,7 +21,7 @@
#include "ecma-typedarray-object.h"
#include "jrt.h"
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -75,4 +75,4 @@ ecma_builtin_int16array_dispatch_construct (const ecma_value_t *arguments_list_p
* @}
*/
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
@@ -17,11 +17,11 @@
* Int16Array description
*/
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
#define TYPEDARRAY_BYTES_PER_ELEMENT 2
#define TYPEDARRAY_MAGIC_STRING_ID LIT_MAGIC_STRING_INT16_ARRAY_UL
#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_INT16ARRAY_PROTOTYPE
#include "ecma-builtin-typedarray-template.inc.h"
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
@@ -15,7 +15,7 @@
#include "ecma-builtins.h"
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
#define ECMA_BUILTINS_INTERNAL
#include "ecma-builtins-internal.h"
@@ -40,4 +40,4 @@
* @}
*/
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
@@ -17,10 +17,10 @@
* Int32Array prototype description
*/
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
#define TYPEDARRAY_BYTES_PER_ELEMENT 4
#define TYPEDARRAY_BUILTIN_ID ECMA_BUILTIN_ID_INT32ARRAY
#include "ecma-builtin-typedarray-prototype-template.inc.h"
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */

Some files were not shown because too many files have changed in this diff Show More