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
@@ -30,15 +30,15 @@
|
||||
#include "vm-defines.h"
|
||||
#include "vm-stack.h"
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
|
||||
#include "ecma-typedarray-object.h"
|
||||
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
|
||||
#ifndef CONFIG_DISABLE_ES2015_PROMISE_BUILTIN
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
|
||||
#include "ecma-promise-object.h"
|
||||
#endif /* !CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
|
||||
#ifndef CONFIG_DISABLE_ES2015_MAP_BUILTIN
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROMISE) */
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_MAP)
|
||||
#include "ecma-map-object.h"
|
||||
#endif /* !CONFIG_DISABLE_ES2015_MAP_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) */
|
||||
|
||||
/* TODO: Extract GC to a separate component */
|
||||
|
||||
@@ -209,7 +209,7 @@ ecma_gc_mark_property (ecma_property_pair_t *property_pair_p, /**< property pair
|
||||
}
|
||||
} /* ecma_gc_mark_property */
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_PROMISE_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
|
||||
|
||||
/**
|
||||
* Mark objects referenced by Promise built-in.
|
||||
@@ -244,9 +244,9 @@ ecma_gc_mark_promise_object (ecma_extended_object_t *ext_object_p) /**< extended
|
||||
}
|
||||
} /* ecma_gc_mark_promise_object */
|
||||
|
||||
#endif /* !CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROMISE) */
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_MAP_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_MAP)
|
||||
|
||||
/**
|
||||
* Mark objects referenced by Map built-in.
|
||||
@@ -288,7 +288,7 @@ ecma_gc_mark_map_object (ecma_extended_object_t *ext_object_p) /**< extended obj
|
||||
}
|
||||
} /* ecma_gc_mark_map_object */
|
||||
|
||||
#endif /* !CONFIG_DISABLE_ES2015_MAP_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) */
|
||||
|
||||
/**
|
||||
* Mark objects as visited starting from specified object as root
|
||||
@@ -333,20 +333,20 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
|
||||
switch (ext_object_p->u.class_prop.class_id)
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_ES2015_PROMISE_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
|
||||
case LIT_MAGIC_STRING_PROMISE_UL:
|
||||
{
|
||||
ecma_gc_mark_promise_object (ext_object_p);
|
||||
break;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
|
||||
#ifndef CONFIG_DISABLE_ES2015_MAP_BUILTIN
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROMISE) */
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_MAP)
|
||||
case LIT_MAGIC_STRING_MAP_UL:
|
||||
{
|
||||
ecma_gc_mark_map_object (ext_object_p);
|
||||
break;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_MAP_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) */
|
||||
default:
|
||||
{
|
||||
break;
|
||||
@@ -361,15 +361,15 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
|
||||
switch (ext_object_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:
|
||||
{
|
||||
ecma_gc_set_object_visited (ecma_typedarray_get_arraybuffer (object_p));
|
||||
break;
|
||||
}
|
||||
#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:
|
||||
{
|
||||
ecma_object_t *iterated_obj_p = ECMA_GET_POINTER (ecma_object_t,
|
||||
@@ -381,7 +381,7 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
|
||||
default:
|
||||
{
|
||||
JERRY_ASSERT (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS);
|
||||
@@ -442,7 +442,7 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
}
|
||||
break;
|
||||
}
|
||||
#ifndef CONFIG_DISABLE_ES2015_ARROW_FUNCTION
|
||||
#if ENABLED (JERRY_ES2015_ARROW_FUNCTION)
|
||||
case ECMA_OBJECT_TYPE_ARROW_FUNCTION:
|
||||
{
|
||||
ecma_arrow_function_t *arrow_func_p = (ecma_arrow_function_t *) object_p;
|
||||
@@ -456,7 +456,7 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_ARROW_FUNCTION */
|
||||
#endif /* ENABLED (JERRY_ES2015_ARROW_FUNCTION) */
|
||||
default:
|
||||
{
|
||||
break;
|
||||
@@ -605,9 +605,9 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
|
||||
switch (ext_object_p->u.class_prop.class_id)
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
case LIT_MAGIC_STRING_SYMBOL_UL:
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
case LIT_MAGIC_STRING_STRING_UL:
|
||||
case LIT_MAGIC_STRING_NUMBER_UL:
|
||||
{
|
||||
@@ -635,7 +635,7 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
}
|
||||
break;
|
||||
}
|
||||
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
|
||||
case LIT_MAGIC_STRING_ARRAY_BUFFER_UL:
|
||||
{
|
||||
ecma_length_t arraybuffer_length = ext_object_p->u.class_prop.u.length;
|
||||
@@ -662,8 +662,8 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
ecma_dealloc_extended_object (object_p, size);
|
||||
return;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
|
||||
#ifndef CONFIG_DISABLE_ES2015_PROMISE_BUILTIN
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
|
||||
case LIT_MAGIC_STRING_PROMISE_UL:
|
||||
{
|
||||
ecma_free_value_if_not_object (ext_object_p->u.class_prop.u.value);
|
||||
@@ -674,15 +674,15 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
ecma_dealloc_extended_object (object_p, sizeof (ecma_promise_object_t));
|
||||
return;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
|
||||
#ifndef CONFIG_DISABLE_ES2015_MAP_BUILTIN
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROMISE) */
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_MAP)
|
||||
case LIT_MAGIC_STRING_MAP_UL:
|
||||
{
|
||||
ecma_op_map_clear_map ((ecma_map_object_t *) object_p);
|
||||
ecma_dealloc_extended_object (object_p, sizeof (ecma_map_object_t));
|
||||
return;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_MAP_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) */
|
||||
default:
|
||||
{
|
||||
/* The undefined id represents an uninitialized class. */
|
||||
@@ -730,7 +730,7 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_ARROW_FUNCTION
|
||||
#if ENABLED (JERRY_ES2015_ARROW_FUNCTION)
|
||||
if (object_type == ECMA_OBJECT_TYPE_ARROW_FUNCTION)
|
||||
{
|
||||
ecma_arrow_function_t *arrow_func_p = (ecma_arrow_function_t *) object_p;
|
||||
@@ -755,7 +755,7 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
#endif /* JERRY_ENABLE_SNAPSHOT_EXEC */
|
||||
return;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_ARROW_FUNCTION */
|
||||
#endif /* ENABLED (JERRY_ES2015_ARROW_FUNCTION) */
|
||||
|
||||
if (object_type == ECMA_OBJECT_TYPE_PSEUDO_ARRAY)
|
||||
{
|
||||
@@ -763,7 +763,7 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
|
||||
switch (ext_object_p->u.pseudo_array.type)
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
|
||||
case ECMA_PSEUDO_ARRAY_TYPEDARRAY:
|
||||
{
|
||||
ecma_dealloc_extended_object (object_p, sizeof (ecma_extended_object_t));
|
||||
@@ -774,14 +774,14 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
|
||||
ecma_dealloc_extended_object (object_p, sizeof (ecma_extended_typedarray_object_t));
|
||||
return;
|
||||
}
|
||||
#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:
|
||||
{
|
||||
ecma_dealloc_extended_object (object_p, sizeof (ecma_extended_object_t));
|
||||
return;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
|
||||
default:
|
||||
{
|
||||
JERRY_ASSERT (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS);
|
||||
@@ -983,10 +983,10 @@ ecma_gc_run (jmem_free_unused_memory_severity_t severity) /**< gc severity */
|
||||
|
||||
JERRY_CONTEXT (ecma_gc_objects_p) = black_objects_p;
|
||||
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
#if ENABLED (JERRY_BUILTIN_REGEXP)
|
||||
/* Free RegExp bytecodes stored in cache */
|
||||
re_cache_gc_run ();
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
|
||||
} /* ecma_gc_run */
|
||||
|
||||
/**
|
||||
|
||||
@@ -190,7 +190,7 @@ enum
|
||||
ECMA_VALUE_IMPLICIT_CONSTRUCTOR = ECMA_MAKE_VALUE (9), /**< special value for bound class constructors */
|
||||
};
|
||||
|
||||
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
|
||||
#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
/**
|
||||
* Maximum integer number for an ecma value
|
||||
*/
|
||||
@@ -199,7 +199,7 @@ enum
|
||||
* Maximum integer number for an ecma value (shifted left with ECMA_DIRECT_SHIFT)
|
||||
*/
|
||||
#define ECMA_INTEGER_NUMBER_MAX_SHIFTED 0x7fffff0
|
||||
#else /* CONFIG_ECMA_NUMBER_TYPE != CONFIG_ECMA_NUMBER_FLOAT32 */
|
||||
#else /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
/**
|
||||
* Maximum integer number for an ecma value
|
||||
*/
|
||||
@@ -208,9 +208,9 @@ enum
|
||||
* Maximum integer number for an ecma value (shifted left with ECMA_DIRECT_SHIFT)
|
||||
*/
|
||||
#define ECMA_INTEGER_NUMBER_MAX_SHIFTED 0x7ffffff0
|
||||
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32 */
|
||||
#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
|
||||
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
|
||||
#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
/**
|
||||
* Minimum integer number for an ecma value
|
||||
*/
|
||||
@@ -219,7 +219,7 @@ enum
|
||||
* Minimum integer number for an ecma value (shifted left with ECMA_DIRECT_SHIFT)
|
||||
*/
|
||||
#define ECMA_INTEGER_NUMBER_MIN_SHIFTED -0x7fffff0
|
||||
#else /* CONFIG_ECMA_NUMBER_TYPE != CONFIG_ECMA_NUMBER_FLOAT32 */
|
||||
#else /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
/**
|
||||
* Minimum integer number for an ecma value
|
||||
*/
|
||||
@@ -228,7 +228,7 @@ enum
|
||||
* Minimum integer number for an ecma value (shifted left with ECMA_DIRECT_SHIFT)
|
||||
*/
|
||||
#define ECMA_INTEGER_NUMBER_MIN_SHIFTED (-0x7fffffff - 1) /* -0x80000000 */
|
||||
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32 */
|
||||
#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
|
||||
#if ECMA_DIRECT_SHIFT != 4
|
||||
#error "Please update ECMA_INTEGER_NUMBER_MIN/MAX_SHIFTED according to the new value of ECMA_DIRECT_SHIFT."
|
||||
@@ -243,11 +243,11 @@ enum
|
||||
/**
|
||||
* Maximum integer number, which if squared, still fits in ecma_integer_value_t
|
||||
*/
|
||||
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
|
||||
#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
#define ECMA_INTEGER_MULTIPLY_MAX 0xb50
|
||||
#else /* CONFIG_ECMA_NUMBER_TYPE != CONFIG_ECMA_NUMBER_FLOAT32 */
|
||||
#else /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
#define ECMA_INTEGER_MULTIPLY_MAX 0x2d41
|
||||
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32 */
|
||||
#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
|
||||
/**
|
||||
* Checks whether the error flag is set.
|
||||
@@ -363,9 +363,9 @@ typedef enum
|
||||
* that are not indices */
|
||||
ECMA_LIST_ENUMERABLE = (1 << 1), /**< exclude non-enumerable properties */
|
||||
ECMA_LIST_PROTOTYPE = (1 << 2), /**< list properties from prototype chain */
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
ECMA_LIST_SYMBOLS = (1 << 3), /**< list symbol properties only */
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
} ecma_list_properties_options_t;
|
||||
|
||||
/**
|
||||
@@ -647,9 +647,9 @@ typedef enum
|
||||
ECMA_OBJECT_TYPE_ARRAY = 4, /**< Array object (15.4) */
|
||||
ECMA_OBJECT_TYPE_BOUND_FUNCTION = 5, /**< Function objects (15.3), created through 15.3.4.5 routine */
|
||||
ECMA_OBJECT_TYPE_PSEUDO_ARRAY = 6, /**< Array-like object, such as Arguments object (10.6) */
|
||||
#ifndef CONFIG_DISABLE_ES2015_ARROW_FUNCTION
|
||||
#if ENABLED (JERRY_ES2015_ARROW_FUNCTION)
|
||||
ECMA_OBJECT_TYPE_ARROW_FUNCTION = 7, /**< arrow function objects */
|
||||
#endif /* !CONFIG_DISABLE_ES2015_ARROW_FUNCTION */
|
||||
#endif /* ENABLED (JERRY_ES2015_ARROW_FUNCTION) */
|
||||
|
||||
/* Types between 13-15 cannot have a built-in flag. See ecma_lexical_environment_type_t. */
|
||||
|
||||
@@ -687,7 +687,7 @@ typedef enum
|
||||
ECMA_LEXICAL_ENVIRONMENT_TYPE__MAX = ECMA_LEXICAL_ENVIRONMENT_SUPER_OBJECT_BOUND /**< maximum value */
|
||||
} ecma_lexical_environment_type_t;
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_ITERATOR)
|
||||
/**
|
||||
* Types of array iterators.
|
||||
*/
|
||||
@@ -697,7 +697,7 @@ typedef enum
|
||||
ECMA_ARRAY_ITERATOR_VALUES, /**< List only key values */
|
||||
ECMA_ARRAY_ITERATOR_KEYS_VALUES, /**< List key indices and values */
|
||||
} ecma_array_iterator_type_t;
|
||||
#endif /* !CONFIG_DISABLE_ES2015_ITERATOR_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_ITERATOR) */
|
||||
|
||||
/**
|
||||
* Offset for JERRY_CONTEXT (status_flags) top 8 bits.
|
||||
@@ -926,7 +926,7 @@ typedef struct
|
||||
|
||||
#endif /* JERRY_ENABLE_SNAPSHOT_EXEC */
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_ARROW_FUNCTION
|
||||
#if ENABLED (JERRY_ES2015_ARROW_FUNCTION)
|
||||
|
||||
/**
|
||||
* Description of arrow function objects.
|
||||
@@ -952,9 +952,9 @@ typedef struct
|
||||
|
||||
#endif /* JERRY_ENABLE_SNAPSHOT_EXEC */
|
||||
|
||||
#endif /* !CONFIG_DISABLE_ES2015_ARROW_FUNCTION */
|
||||
#endif /* ENABLED (JERRY_ES2015_ARROW_FUNCTION) */
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_MAP_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_MAP)
|
||||
|
||||
/**
|
||||
* Map item count of chunks
|
||||
@@ -980,7 +980,7 @@ typedef struct
|
||||
* the rest can be ECMA_VALUE_ARRAY_HOLE or any valid value. */
|
||||
} ecma_map_object_chunk_t;
|
||||
|
||||
#endif /* !CONFIG_DISABLE_ES2015_MAP_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_MAP) */
|
||||
|
||||
/**
|
||||
* Description of ECMA property descriptor
|
||||
@@ -1030,7 +1030,7 @@ typedef struct
|
||||
ecma_object_t *set_p;
|
||||
} ecma_property_descriptor_t;
|
||||
|
||||
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
|
||||
#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
/**
|
||||
* Description of an ecma-number
|
||||
*/
|
||||
@@ -1066,7 +1066,7 @@ typedef float ecma_number_t;
|
||||
* IEEE-754 2008, 3.6, Table 3.5
|
||||
*/
|
||||
#define ECMA_NUMBER_FRACTION_WIDTH (23)
|
||||
#elif CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64
|
||||
#elif ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
/**
|
||||
* Description of an ecma-number
|
||||
*/
|
||||
@@ -1102,7 +1102,7 @@ typedef double ecma_number_t;
|
||||
* IEEE-754 2008, 3.6, Table 3.5
|
||||
*/
|
||||
#define ECMA_NUMBER_FRACTION_WIDTH (52)
|
||||
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32 */
|
||||
#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
|
||||
/**
|
||||
* Value '0' of ecma_number_t
|
||||
@@ -1129,7 +1129,7 @@ typedef double ecma_number_t;
|
||||
*/
|
||||
#define ECMA_NUMBER_MINUS_ONE ((ecma_number_t) -1)
|
||||
|
||||
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
|
||||
#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
/**
|
||||
* Number.MIN_VALUE (i.e., the smallest positive value of ecma-number)
|
||||
*
|
||||
@@ -1142,7 +1142,7 @@ typedef double ecma_number_t;
|
||||
* See also: ECMA_262 v5, 15.7.3.2
|
||||
*/
|
||||
# define ECMA_NUMBER_MAX_VALUE (FLT_MAX)
|
||||
#elif CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64
|
||||
#elif ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
/**
|
||||
* Number.MAX_VALUE (i.e., the maximum value of ecma-number)
|
||||
*
|
||||
@@ -1155,7 +1155,7 @@ typedef double ecma_number_t;
|
||||
* See also: ECMA_262 v5, 15.7.3.3
|
||||
*/
|
||||
# define ECMA_NUMBER_MIN_VALUE ((ecma_number_t) 5e-324)
|
||||
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32 */
|
||||
#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
|
||||
/**
|
||||
* Euler number
|
||||
@@ -1521,7 +1521,7 @@ typedef struct
|
||||
|
||||
#endif /* !CONFIG_ECMA_LCACHE_DISABLE */
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY)
|
||||
|
||||
/**
|
||||
* Extra information for ArrayBuffers.
|
||||
@@ -1562,7 +1562,7 @@ typedef struct
|
||||
ecma_length_t array_length; /**< the array length */
|
||||
} ecma_extended_typedarray_object_t;
|
||||
|
||||
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_TYPEDARRAY) */
|
||||
|
||||
/**
|
||||
* Flag for indicating whether the symbol is a well known symbol
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64
|
||||
#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
|
||||
/**
|
||||
* \addtogroup ecmahelpersbigintegers Helpers for operations intermediate 128-bit integers
|
||||
@@ -249,7 +249,7 @@ static const uint8_t ecma_uint4_clz[] = { 4, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0,
|
||||
*/
|
||||
#define NUMBER_MIN_DECIMAL_EXPONENT -324
|
||||
|
||||
#elif CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
|
||||
#elif !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
|
||||
/**
|
||||
* Number.MAX_VALUE exponent part when using 32 bit float representation.
|
||||
@@ -260,7 +260,7 @@ static const uint8_t ecma_uint4_clz[] = { 4, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0,
|
||||
*/
|
||||
#define NUMBER_MIN_DECIMAL_EXPONENT -45
|
||||
|
||||
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64 */
|
||||
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
|
||||
/**
|
||||
* Value of epsilon
|
||||
@@ -568,7 +568,7 @@ ecma_utf8_string_to_number (const lit_utf8_byte_t *str_p, /**< utf-8 string */
|
||||
return sign ? -ECMA_NUMBER_ZERO : ECMA_NUMBER_ZERO;
|
||||
}
|
||||
|
||||
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64
|
||||
#if ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
/*
|
||||
* 128-bit mantissa storage
|
||||
*
|
||||
@@ -653,7 +653,7 @@ ecma_utf8_string_to_number (const lit_utf8_byte_t *str_p, /**< utf-8 string */
|
||||
fraction_uint64 = ECMA_UINT128_ROUND_HIGH_TO_UINT64 (fraction_uint128);
|
||||
|
||||
return ecma_number_make_from_sign_mantissa_and_exponent (sign, fraction_uint64, binary_exponent);
|
||||
#elif CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
|
||||
#elif !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
/* Less precise conversion */
|
||||
ecma_number_t num = (ecma_number_t) (uint32_t) fraction_uint64;
|
||||
|
||||
@@ -671,7 +671,7 @@ ecma_utf8_string_to_number (const lit_utf8_byte_t *str_p, /**< utf-8 string */
|
||||
}
|
||||
|
||||
return num;
|
||||
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64 */
|
||||
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
} /* ecma_utf8_string_to_number */
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,7 +37,7 @@ JERRY_STATIC_ASSERT (((1 << (ECMA_DIRECT_SHIFT - 1)) | ECMA_TYPE_DIRECT) == ECMA
|
||||
#define ECMA_NUMBER_SIGN_POS (ECMA_NUMBER_FRACTION_WIDTH + \
|
||||
ECMA_NUMBER_BIASED_EXP_WIDTH)
|
||||
|
||||
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
|
||||
#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_number_t) == sizeof (uint32_t),
|
||||
size_of_ecma_number_t_must_be_equal_to_4_bytes);
|
||||
|
||||
@@ -112,7 +112,7 @@ ecma_number_unpack (ecma_number_t num, /**< ecma-number */
|
||||
*/
|
||||
const int32_t ecma_number_exponent_bias = 127;
|
||||
|
||||
#elif CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64
|
||||
#elif ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
JERRY_STATIC_ASSERT (sizeof (ecma_number_t) == sizeof (uint64_t),
|
||||
size_of_ecma_number_t_must_be_equal_to_8_bytes);
|
||||
|
||||
@@ -186,7 +186,7 @@ ecma_number_unpack (ecma_number_t num, /**< ecma-number */
|
||||
*/
|
||||
const int32_t ecma_number_exponent_bias = 1023;
|
||||
|
||||
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32 */
|
||||
#endif /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
|
||||
/**
|
||||
* Get fraction of number
|
||||
|
||||
@@ -200,7 +200,7 @@ ecma_new_ecma_string_from_magic_string_ex_id (lit_magic_string_ex_id_t id) /**<
|
||||
return string_desc_p;
|
||||
} /* ecma_new_ecma_string_from_magic_string_ex_id */
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
/**
|
||||
* Allocate new ecma-string and fill it with reference to the symbol descriptor
|
||||
*
|
||||
@@ -234,7 +234,7 @@ ecma_prop_name_is_symbol (ecma_string_t *string_p) /**< ecma-string */
|
||||
return (!ECMA_IS_DIRECT_STRING (string_p)
|
||||
&& ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_SYMBOL);
|
||||
} /* ecma_prop_name_is_symbol */
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
|
||||
/**
|
||||
* Allocate new ecma-string and fill it with characters from the utf8 string
|
||||
@@ -977,13 +977,13 @@ ecma_deref_ecma_string (ecma_string_t *string_p) /**< ecma-string */
|
||||
ecma_free_value (string_p->u.lit_number);
|
||||
break;
|
||||
}
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
case ECMA_STRING_CONTAINER_SYMBOL:
|
||||
{
|
||||
ecma_free_value (string_p->u.symbol_descriptor);
|
||||
break;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
default:
|
||||
{
|
||||
JERRY_ASSERT (ECMA_STRING_GET_CONTAINER (string_p) == ECMA_STRING_CONTAINER_UINT32_IN_DESC
|
||||
@@ -1819,12 +1819,12 @@ ecma_compare_ecma_strings (const ecma_string_t *string1_p, /**< ecma-string */
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
if (string1_container == ECMA_STRING_CONTAINER_SYMBOL)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
|
||||
if (string1_container >= ECMA_STRING_CONTAINER_UINT32_IN_DESC)
|
||||
{
|
||||
|
||||
@@ -311,7 +311,7 @@ ecma_is_value_string (ecma_value_t value) /**< ecma value */
|
||||
return ((value & (ECMA_VALUE_TYPE_MASK - 0x4)) == ECMA_TYPE_STRING);
|
||||
} /* ecma_is_value_string */
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
/**
|
||||
* Check if the value is symbol.
|
||||
*
|
||||
@@ -323,7 +323,7 @@ ecma_is_value_symbol (ecma_value_t value) /**< ecma value */
|
||||
{
|
||||
return (ecma_get_value_type_field (value) == ECMA_TYPE_SYMBOL);
|
||||
} /* ecma_is_value_symbol */
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
|
||||
/**
|
||||
* Check if the value can be property name.
|
||||
@@ -334,11 +334,11 @@ ecma_is_value_symbol (ecma_value_t value) /**< ecma value */
|
||||
inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_is_value_prop_name (ecma_value_t value) /**< ecma value */
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
return ecma_is_value_string (value) || ecma_is_value_symbol (value);
|
||||
#else /* CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#else /* !ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
return ecma_is_value_string (value);
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
} /* ecma_is_value_prop_name */
|
||||
|
||||
/**
|
||||
@@ -478,7 +478,7 @@ ecma_make_nan_value (void)
|
||||
static inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_is_number_equal_to_positive_zero (ecma_number_t ecma_number) /**< number */
|
||||
{
|
||||
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
|
||||
#if !ENABLED (JERRY_NUMBER_TYPE_FLOAT64)
|
||||
union
|
||||
{
|
||||
uint32_t u32_value;
|
||||
@@ -488,7 +488,7 @@ ecma_is_number_equal_to_positive_zero (ecma_number_t ecma_number) /**< number */
|
||||
u.float_value = ecma_number;
|
||||
|
||||
return u.u32_value == 0;
|
||||
#else /* CONFIG_ECMA_NUMBER_TYPE != CONFIG_ECMA_NUMBER_FLOAT32 */
|
||||
#else /* ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
union
|
||||
{
|
||||
uint64_t u64_value;
|
||||
@@ -498,7 +498,7 @@ ecma_is_number_equal_to_positive_zero (ecma_number_t ecma_number) /**< number */
|
||||
u.float_value = ecma_number;
|
||||
|
||||
return u.u64_value == 0;
|
||||
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32 */
|
||||
#endif /* !ENABLED (JERRY_NUMBER_TYPE_FLOAT64) */
|
||||
} /* ecma_is_number_equal_to_positive_zero */
|
||||
|
||||
/**
|
||||
@@ -562,9 +562,9 @@ inline ecma_value_t JERRY_ATTR_PURE JERRY_ATTR_ALWAYS_INLINE
|
||||
ecma_make_string_value (const ecma_string_t *ecma_string_p) /**< string to reference in value */
|
||||
{
|
||||
JERRY_ASSERT (ecma_string_p != NULL);
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
JERRY_ASSERT (!ecma_prop_name_is_symbol ((ecma_string_t *) ecma_string_p));
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
|
||||
if ((((uintptr_t) ecma_string_p) & ECMA_VALUE_TYPE_MASK) != 0)
|
||||
{
|
||||
@@ -574,7 +574,7 @@ ecma_make_string_value (const ecma_string_t *ecma_string_p) /**< string to refer
|
||||
return ecma_pointer_to_ecma_value (ecma_string_p) | ECMA_TYPE_STRING;
|
||||
} /* ecma_make_string_value */
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
/**
|
||||
* Symbol value constructor
|
||||
*
|
||||
@@ -588,7 +588,7 @@ ecma_make_symbol_value (const ecma_string_t *ecma_symbol_p) /**< symbol to refer
|
||||
|
||||
return ecma_pointer_to_ecma_value (ecma_symbol_p) | ECMA_TYPE_SYMBOL;
|
||||
} /* ecma_make_symbol_value */
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
|
||||
/**
|
||||
* Property-name value constructor
|
||||
@@ -600,12 +600,12 @@ ecma_make_prop_name_value (const ecma_string_t *ecma_prop_name_p) /**< property
|
||||
{
|
||||
JERRY_ASSERT (ecma_prop_name_p != NULL);
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
if (ecma_prop_name_is_symbol ((ecma_string_t *) ecma_prop_name_p))
|
||||
{
|
||||
return ecma_make_symbol_value (ecma_prop_name_p);
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
|
||||
return ecma_make_string_value (ecma_prop_name_p);
|
||||
} /* ecma_make_prop_name_value */
|
||||
@@ -730,7 +730,7 @@ ecma_get_string_from_value (ecma_value_t value) /**< ecma value */
|
||||
return (ecma_string_t *) ecma_get_pointer_from_ecma_value (value);
|
||||
} /* ecma_get_string_from_value */
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
/**
|
||||
* Get pointer to ecma-string from ecma value
|
||||
*
|
||||
@@ -743,7 +743,7 @@ ecma_get_symbol_from_value (ecma_value_t value) /**< ecma value */
|
||||
|
||||
return (ecma_string_t *) ecma_get_pointer_from_ecma_value (value);
|
||||
} /* ecma_get_symbol_from_value */
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
|
||||
/**
|
||||
* Get pointer to a property name from ecma value
|
||||
@@ -840,13 +840,13 @@ ecma_copy_value (ecma_value_t value) /**< value description */
|
||||
ecma_ref_ecma_string (ecma_get_string_from_value (value));
|
||||
return value;
|
||||
}
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
case ECMA_TYPE_SYMBOL:
|
||||
{
|
||||
ecma_ref_ecma_string (ecma_get_symbol_from_value (value));
|
||||
return value;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
case ECMA_TYPE_OBJECT:
|
||||
{
|
||||
ecma_ref_object (ecma_get_object_from_value (value));
|
||||
@@ -1037,13 +1037,13 @@ ecma_free_value (ecma_value_t value) /**< value description */
|
||||
ecma_deref_ecma_string (string_p);
|
||||
break;
|
||||
}
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
case ECMA_TYPE_SYMBOL:
|
||||
{
|
||||
ecma_deref_ecma_string (ecma_get_symbol_from_value (value));
|
||||
break;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
case ECMA_TYPE_OBJECT:
|
||||
{
|
||||
ecma_deref_object (ecma_get_object_from_value (value));
|
||||
@@ -1143,12 +1143,12 @@ ecma_get_typeof_lit_id (ecma_value_t value) /**< input ecma value */
|
||||
{
|
||||
ret_value = LIT_MAGIC_STRING_STRING;
|
||||
}
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
else if (ecma_is_value_symbol (value))
|
||||
{
|
||||
ret_value = LIT_MAGIC_STRING_SYMBOL;
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
else
|
||||
{
|
||||
JERRY_ASSERT (ecma_is_value_object (value));
|
||||
|
||||
@@ -140,12 +140,12 @@ ecma_create_object_lex_env (ecma_object_t *outer_lexical_environment_p, /**< out
|
||||
ecma_object_t *binding_obj_p, /**< binding object */
|
||||
ecma_lexical_environment_type_t type) /**< type of the new lexical environment */
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_ES2015_CLASS
|
||||
#if ENABLED (JERRY_ES2015_CLASS)
|
||||
JERRY_ASSERT (type == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND
|
||||
|| type == ECMA_LEXICAL_ENVIRONMENT_SUPER_OBJECT_BOUND);
|
||||
#else /* CONFIG_DISABLE_ES2015_CLASS */
|
||||
#else /* !ENABLED (JERRY_ES2015_CLASS) */
|
||||
JERRY_ASSERT (type == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND);
|
||||
#endif /* !CONFIG_DISABLE_ES2015_CLASS */
|
||||
#endif /* ENABLED (JERRY_ES2015_CLASS) */
|
||||
|
||||
JERRY_ASSERT (binding_obj_p != NULL
|
||||
&& !ecma_is_lexical_environment (binding_obj_p));
|
||||
@@ -361,12 +361,12 @@ ecma_get_lex_env_binding_object (const ecma_object_t *object_p) /**< object-boun
|
||||
{
|
||||
JERRY_ASSERT (object_p != NULL);
|
||||
JERRY_ASSERT (ecma_is_lexical_environment (object_p));
|
||||
#ifndef CONFIG_DISABLE_ES2015
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
JERRY_ASSERT (ecma_get_lex_env_type (object_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND
|
||||
|| ecma_get_lex_env_type (object_p) == ECMA_LEXICAL_ENVIRONMENT_SUPER_OBJECT_BOUND);
|
||||
#else /* CONFIG_DISABLE_ES2015 */
|
||||
#else /* defined (JERRY_ES2015) || (JERRY_ES2015 == 0) */
|
||||
JERRY_ASSERT (ecma_get_lex_env_type (object_p) == ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND);
|
||||
#endif /* !CONFIG_DISABLE_ES2015 */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
return ECMA_GET_NON_NULL_POINTER (ecma_object_t,
|
||||
object_p->property_list_or_bound_object_cp);
|
||||
@@ -1588,11 +1588,11 @@ ecma_bytecode_deref (ecma_compiled_code_t *bytecode_p) /**< byte code pointer */
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
#if ENABLED (JERRY_BUILTIN_REGEXP)
|
||||
re_compiled_code_t *re_bytecode_p = (re_compiled_code_t *) bytecode_p;
|
||||
|
||||
ecma_deref_ecma_string (ecma_get_string_from_value (re_bytecode_p->pattern));
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_BUILTIN_REGEXP) */
|
||||
}
|
||||
|
||||
jmem_heap_free_block (bytecode_p,
|
||||
|
||||
@@ -137,17 +137,17 @@ typedef enum
|
||||
*/
|
||||
#define ECMA_BOOL_TO_BITFIELD(x) ((x) ? 1 : 0)
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
/**
|
||||
* JERRY_ASSERT compatible macro for checking whether the given ecma-value is symbol
|
||||
*/
|
||||
#define ECMA_ASSERT_VALUE_IS_SYMBOL(value) (ecma_is_value_symbol ((value)))
|
||||
#else /* CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#else /* !ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
/**
|
||||
* JERRY_ASSERT compatible macro for checking whether the given ecma-value is symbol
|
||||
*/
|
||||
#define ECMA_ASSERT_VALUE_IS_SYMBOL(value) (false)
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
|
||||
/* ecma-helpers-value.c */
|
||||
bool JERRY_ATTR_CONST ecma_is_value_direct (ecma_value_t value);
|
||||
@@ -166,9 +166,9 @@ bool JERRY_ATTR_CONST ecma_are_values_integer_numbers (ecma_value_t first_value,
|
||||
bool JERRY_ATTR_CONST ecma_is_value_float_number (ecma_value_t value);
|
||||
bool JERRY_ATTR_CONST ecma_is_value_number (ecma_value_t value);
|
||||
bool JERRY_ATTR_CONST ecma_is_value_string (ecma_value_t value);
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
bool JERRY_ATTR_CONST ecma_is_value_symbol (ecma_value_t value);
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
bool JERRY_ATTR_CONST ecma_is_value_prop_name (ecma_value_t value);
|
||||
bool JERRY_ATTR_CONST ecma_is_value_direct_string (ecma_value_t value);
|
||||
bool JERRY_ATTR_CONST ecma_is_value_non_direct_string (ecma_value_t value);
|
||||
@@ -185,9 +185,9 @@ ecma_value_t ecma_make_number_value (ecma_number_t ecma_number);
|
||||
ecma_value_t ecma_make_int32_value (int32_t int32_number);
|
||||
ecma_value_t ecma_make_uint32_value (uint32_t uint32_number);
|
||||
ecma_value_t JERRY_ATTR_PURE ecma_make_string_value (const ecma_string_t *ecma_string_p);
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
ecma_value_t JERRY_ATTR_PURE ecma_make_symbol_value (const ecma_string_t *ecma_symbol_p);
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
ecma_value_t JERRY_ATTR_PURE ecma_make_prop_name_value (const ecma_string_t *ecma_prop_name_p);
|
||||
ecma_value_t JERRY_ATTR_PURE ecma_make_magic_string_value (lit_magic_string_id_t id);
|
||||
ecma_value_t JERRY_ATTR_PURE ecma_make_object_value (const ecma_object_t *object_p);
|
||||
@@ -197,9 +197,9 @@ ecma_integer_value_t JERRY_ATTR_CONST ecma_get_integer_from_value (ecma_value_t
|
||||
ecma_number_t JERRY_ATTR_PURE ecma_get_float_from_value (ecma_value_t value);
|
||||
ecma_number_t JERRY_ATTR_PURE ecma_get_number_from_value (ecma_value_t value);
|
||||
ecma_string_t JERRY_ATTR_PURE *ecma_get_string_from_value (ecma_value_t value);
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
ecma_string_t JERRY_ATTR_PURE *ecma_get_symbol_from_value (ecma_value_t value);
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
ecma_string_t JERRY_ATTR_PURE *ecma_get_prop_name_from_value (ecma_value_t value);
|
||||
ecma_object_t JERRY_ATTR_PURE *ecma_get_object_from_value (ecma_value_t value);
|
||||
ecma_error_reference_t JERRY_ATTR_PURE *ecma_get_error_reference_from_value (ecma_value_t value);
|
||||
@@ -218,10 +218,10 @@ void ecma_free_number (ecma_value_t value);
|
||||
lit_magic_string_id_t ecma_get_typeof_lit_id (ecma_value_t value);
|
||||
|
||||
/* ecma-helpers-string.c */
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
ecma_string_t *ecma_new_symbol_from_descriptor_string (ecma_value_t string_desc);
|
||||
bool ecma_prop_name_is_symbol (ecma_string_t *string_p);
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
ecma_string_t *ecma_new_ecma_string_from_utf8 (const lit_utf8_byte_t *string_p, lit_utf8_size_t string_size);
|
||||
ecma_string_t *ecma_new_ecma_string_from_utf8_converted_to_cesu8 (const lit_utf8_byte_t *string_p,
|
||||
lit_utf8_size_t string_size);
|
||||
|
||||
@@ -48,9 +48,9 @@ ecma_init (void)
|
||||
JERRY_CONTEXT (vm_recursion_counter) = VM_RECURSION_LIMIT;
|
||||
#endif /* VM_RECURSION_LIMIT */
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_PROMISE_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_PROMISE)
|
||||
ecma_job_queue_init ();
|
||||
#endif /* CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROMISE) */
|
||||
} /* ecma_init */
|
||||
|
||||
/**
|
||||
@@ -61,9 +61,9 @@ ecma_finalize (void)
|
||||
{
|
||||
jmem_unregister_free_unused_memory_callback (ecma_free_unused_memory);
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_MODULE_SYSTEM
|
||||
#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
|
||||
ecma_module_finalize_lex_envs ();
|
||||
#endif /* !CONFIG_DISABLE_ES2015_MODULE_SYSTEM */
|
||||
#endif /* ENABLED (JERRY_ES2015_MODULE_SYSTEM) */
|
||||
|
||||
ecma_finalize_global_lex_env ();
|
||||
ecma_finalize_builtins ();
|
||||
|
||||
@@ -57,9 +57,9 @@ ecma_free_string_list (ecma_lit_storage_item_t *string_list_p) /**< string list
|
||||
void
|
||||
ecma_finalize_lit_storage (void)
|
||||
{
|
||||
#ifndef CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
ecma_free_string_list (JERRY_CONTEXT (symbol_list_first_p));
|
||||
#endif /* !CONFIG_DISABLE_ES2015_SYMBOL_BUILTIN */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
ecma_free_string_list (JERRY_CONTEXT (string_list_first_p));
|
||||
ecma_free_string_list (JERRY_CONTEXT (number_list_first_p));
|
||||
} /* ecma_finalize_lit_storage */
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "ecma-module.h"
|
||||
#include "vm.h"
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_MODULE_SYSTEM
|
||||
#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
|
||||
|
||||
/**
|
||||
* Check if property is exported from the script.
|
||||
@@ -255,4 +255,4 @@ ecma_module_load_modules (parser_context_t *context_p) /**< parser context */
|
||||
}
|
||||
} /* ecma_module_load_modules */
|
||||
|
||||
#endif /* !CONFIG_DISABLE_ES2015_MODULE_SYSTEM */
|
||||
#endif /* ENABLED (JERRY_ES2015_MODULE_SYSTEM) */
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
|
||||
#include "js-parser-internal.h"
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_MODULE_SYSTEM
|
||||
#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
|
||||
|
||||
void ecma_module_load_modules (parser_context_t *context_p);
|
||||
|
||||
#endif /* !CONFIG_DISABLE_ES2015_MODULE_SYSTEM */
|
||||
#endif /* ENABLED (JERRY_ES2015_MODULE_SYSTEM) */
|
||||
|
||||
#endif /* !ECMA_MODULE_H */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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) */
|
||||
|
||||
+2
-2
@@ -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) */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user