Improve builtin instantiation (#2226)

* Resolve linker errors with -O0 in some compilers
 * Reduce the stack usage

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
László Langó
2018-03-02 14:37:03 +01:00
committed by GitHub
parent 55058cf151
commit 94760b1213
4 changed files with 267 additions and 246 deletions
@@ -69,11 +69,11 @@ typedef struct
uint16_t value; /**< value of the property */ uint16_t value; /**< value of the property */
} ecma_builtin_property_descriptor_t; } ecma_builtin_property_descriptor_t;
#define BUILTIN(builtin_id, \ #define BUILTIN_ROUTINE(builtin_id, \
object_type, \ object_type, \
object_prototype_builtin_id, \ object_prototype_builtin_id, \
is_extensible, \ is_extensible, \
lowercase_name) \ lowercase_name) \
extern const ecma_builtin_property_descriptor_t \ extern const ecma_builtin_property_descriptor_t \
ecma_builtin_ ## lowercase_name ## _property_descriptor_list[]; \ ecma_builtin_ ## lowercase_name ## _property_descriptor_list[]; \
ecma_value_t \ ecma_value_t \
@@ -83,10 +83,25 @@ ecma_value_t \
ecma_builtin_ ## lowercase_name ## _dispatch_construct (const ecma_value_t *, \ ecma_builtin_ ## lowercase_name ## _dispatch_construct (const ecma_value_t *, \
ecma_length_t); \ ecma_length_t); \
ecma_value_t \ ecma_value_t \
ecma_builtin_ ## lowercase_name ## _dispatch_routine (uint16_t builtin_routine_id, \
ecma_value_t this_arg_value, \
const ecma_value_t [], \
ecma_length_t);
#define BUILTIN(builtin_id, \
object_type, \
object_prototype_builtin_id, \
is_extensible, \
lowercase_name) \
extern const ecma_builtin_property_descriptor_t \
ecma_builtin_ ## lowercase_name ## _property_descriptor_list[]; \
ecma_value_t \
ecma_builtin_ ## lowercase_name ## _dispatch_routine (uint16_t builtin_routine_id, \ ecma_builtin_ ## lowercase_name ## _dispatch_routine (uint16_t builtin_routine_id, \
ecma_value_t this_arg_value, \ ecma_value_t this_arg_value, \
const ecma_value_t [], \ const ecma_value_t [], \
ecma_length_t); ecma_length_t);
#include "ecma-builtins.inc.h" #include "ecma-builtins.inc.h"
#undef BUILTIN_ROUTINE
#undef BUILTIN
#endif /* !ECMA_BUILTINS_INTERNAL_H */ #endif /* !ECMA_BUILTINS_INTERNAL_H */
+89 -96
View File
@@ -39,11 +39,81 @@ static void ecma_instantiate_builtin (ecma_builtin_id_t id);
*/ */
typedef const ecma_builtin_property_descriptor_t *ecma_builtin_property_list_reference_t; typedef const ecma_builtin_property_descriptor_t *ecma_builtin_property_list_reference_t;
typedef ecma_value_t (*ecma_builtin_dispatch_routine_t)(uint16_t builtin_routine_id,
ecma_value_t this_arg,
const ecma_value_t arguments_list[],
ecma_length_t arguments_number);
typedef ecma_value_t (*ecma_builtin_dispatch_call_t)(const ecma_value_t arguments_list[],
ecma_length_t arguments_number);
static const ecma_builtin_dispatch_routine_t ecma_builtin_routines[] =
{
#define BUILTIN(a, b, c, d, e)
#define BUILTIN_ROUTINE(builtin_id, \
object_type, \
object_prototype_builtin_id, \
is_extensible, \
lowercase_name) \
ecma_builtin_ ## lowercase_name ## _dispatch_routine,
#include "ecma-builtins.inc.h"
#undef BUILTIN
#undef BUILTIN_ROUTINE
#define BUILTIN_ROUTINE(a, b, c, d, e)
#define BUILTIN(builtin_id, \
object_type, \
object_prototype_builtin_id, \
is_extensible, \
lowercase_name) \
ecma_builtin_ ## lowercase_name ## _dispatch_routine,
#include "ecma-builtins.inc.h"
#undef BUILTIN
#undef BUILTIN_ROUTINE
};
static const ecma_builtin_dispatch_call_t ecma_builtin_call_functions[] =
{
#define BUILTIN(a, b, c, d, e)
#define BUILTIN_ROUTINE(builtin_id, \
object_type, \
object_prototype_builtin_id, \
is_extensible, \
lowercase_name) \
ecma_builtin_ ## lowercase_name ## _dispatch_call,
#include "ecma-builtins.inc.h"
#undef BUILTIN_ROUTINE
#undef BUILTIN
};
static const ecma_builtin_dispatch_call_t ecma_builtin_construct_functions[] =
{
#define BUILTIN(a, b, c, d, e)
#define BUILTIN_ROUTINE(builtin_id, \
object_type, \
object_prototype_builtin_id, \
is_extensible, \
lowercase_name) \
ecma_builtin_ ## lowercase_name ## _dispatch_construct,
#include "ecma-builtins.inc.h"
#undef BUILTIN_ROUTINE
#undef BUILTIN
};
/** /**
* Property descriptor lists for all built-ins. * Property descriptor lists for all built-ins.
*/ */
static const ecma_builtin_property_list_reference_t ecma_builtin_property_list_references[] = static const ecma_builtin_property_list_reference_t ecma_builtin_property_list_references[] =
{ {
#define BUILTIN(a, b, c, d, e)
#define BUILTIN_ROUTINE(builtin_id, \
object_type, \
object_prototype_builtin_id, \
is_extensible, \
lowercase_name) \
ecma_builtin_ ## lowercase_name ## _property_descriptor_list,
#include "ecma-builtins.inc.h"
#undef BUILTIN
#undef BUILTIN_ROUTINE
#define BUILTIN_ROUTINE(a, b, c, d, e)
#define BUILTIN(builtin_id, \ #define BUILTIN(builtin_id, \
object_type, \ object_type, \
object_prototype_builtin_id, \ object_prototype_builtin_id, \
@@ -51,6 +121,8 @@ static const ecma_builtin_property_list_reference_t ecma_builtin_property_list_r
lowercase_name) \ lowercase_name) \
ecma_builtin_ ## lowercase_name ## _property_descriptor_list, ecma_builtin_ ## lowercase_name ## _property_descriptor_list,
#include "ecma-builtins.inc.h" #include "ecma-builtins.inc.h"
#undef BUILTIN_ROUTINE
#undef BUILTIN
}; };
/** /**
@@ -161,7 +233,7 @@ ecma_builtin_init_object (ecma_builtin_id_t obj_builtin_id, /**< built-in ID */
ecma_object_t *obj_p = ecma_create_object (prototype_obj_p, ext_object_size, obj_type); ecma_object_t *obj_p = ecma_create_object (prototype_obj_p, ext_object_size, obj_type);
if (!is_extensible) if (unlikely (!is_extensible))
{ {
ecma_set_object_extensible (obj_p, false); ecma_set_object_extensible (obj_p, false);
} }
@@ -288,7 +360,6 @@ ecma_builtin_init_object (ecma_builtin_id_t obj_builtin_id, /**< built-in ID */
return obj_p; return obj_p;
} /* ecma_builtin_init_object */ } /* ecma_builtin_init_object */
/** /**
* Helper function for 'ecma_instantiate_builtin' * Helper function for 'ecma_instantiate_builtin'
*/ */
@@ -343,8 +414,10 @@ ecma_instantiate_builtin (ecma_builtin_id_t id) /**< built-in id */
is_extensible); \ is_extensible); \
break; \ break; \
} }
#define BUILTIN_ROUTINE(a, b, c, d, e) BUILTIN(a, b, c, d, e)
#include "ecma-builtins.inc.h" #include "ecma-builtins.inc.h"
#undef BUILTIN
#undef BUILTIN_ROUTINE
default: default:
{ {
JERRY_ASSERT (id < ECMA_BUILTIN_ID__COUNT); JERRY_ASSERT (id < ECMA_BUILTIN_ID__COUNT);
@@ -800,37 +873,14 @@ ecma_builtin_dispatch_routine (ecma_builtin_id_t builtin_object_id, /**< built-i
* of the built-in object's * of the built-in object's
* routine property */ * routine property */
ecma_value_t this_arg_value, /**< 'this' argument value */ ecma_value_t this_arg_value, /**< 'this' argument value */
const ecma_value_t arguments_list[], /**< list of arguments passed to routine */ const ecma_value_t *arguments_list_p, /**< list of arguments passed to routine */
ecma_length_t arguments_number) /**< length of arguments' list */ ecma_length_t arguments_list_len) /**< length of arguments' list */
{ {
switch (builtin_object_id) JERRY_ASSERT (builtin_object_id < ECMA_BUILTIN_ID__COUNT);
{ return ecma_builtin_routines[builtin_object_id] (builtin_routine_id,
#define BUILTIN(builtin_id, \ this_arg_value,
object_type, \ arguments_list_p,
object_prototype_builtin_id, \ arguments_list_len);
is_extensible, \
lowercase_name) \
case builtin_id: \
{ \
return ecma_builtin_ ## lowercase_name ## _dispatch_routine (builtin_routine_id, \
this_arg_value, \
arguments_list, \
arguments_number); \
}
#include "ecma-builtins.inc.h"
case ECMA_BUILTIN_ID__COUNT:
{
JERRY_UNREACHABLE ();
}
default:
{
JERRY_UNREACHABLE (); /* The built-in is not implemented. */
}
}
JERRY_UNREACHABLE ();
} /* ecma_builtin_dispatch_routine */ } /* ecma_builtin_dispatch_routine */
/** /**
@@ -860,34 +910,9 @@ ecma_builtin_dispatch_call (ecma_object_t *obj_p, /**< built-in object */
} }
else else
{ {
switch ((ecma_builtin_id_t) ext_obj_p->u.built_in.id) ecma_builtin_id_t builtin_object_id = ext_obj_p->u.built_in.id;
{ JERRY_ASSERT (builtin_object_id < sizeof (ecma_builtin_call_functions) / sizeof (ecma_builtin_dispatch_call_t));
#define BUILTIN(builtin_id, \ return ecma_builtin_call_functions[builtin_object_id] (arguments_list_p, arguments_list_len);
object_type, \
object_prototype_builtin_id, \
is_extensible, \
lowercase_name) \
case builtin_id: \
{ \
if (object_type == ECMA_OBJECT_TYPE_FUNCTION) \
{ \
ret_value = ecma_builtin_ ## lowercase_name ## _dispatch_call (arguments_list_p, \
arguments_list_len); \
} \
break; \
}
#include "ecma-builtins.inc.h"
case ECMA_BUILTIN_ID__COUNT:
{
JERRY_UNREACHABLE ();
}
default:
{
JERRY_UNREACHABLE (); /* The built-in is not implemented. */
}
}
} }
JERRY_ASSERT (!ecma_is_value_empty (ret_value)); JERRY_ASSERT (!ecma_is_value_empty (ret_value));
@@ -908,42 +933,10 @@ ecma_builtin_dispatch_construct (ecma_object_t *obj_p, /**< built-in object */
JERRY_ASSERT (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_FUNCTION); JERRY_ASSERT (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_FUNCTION);
JERRY_ASSERT (ecma_get_object_is_builtin (obj_p)); JERRY_ASSERT (ecma_get_object_is_builtin (obj_p));
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p; ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) obj_p;
ecma_builtin_id_t builtin_object_id = ext_obj_p->u.built_in.id;
switch (ext_obj_p->u.built_in.id) JERRY_ASSERT (builtin_object_id < sizeof (ecma_builtin_construct_functions) / sizeof (ecma_builtin_dispatch_call_t));
{ return ecma_builtin_construct_functions[builtin_object_id] (arguments_list_p, arguments_list_len);
#define BUILTIN(builtin_id, \
object_type, \
object_prototype_builtin_id, \
is_extensible, \
lowercase_name) \
case builtin_id: \
{ \
if (object_type == ECMA_OBJECT_TYPE_FUNCTION) \
{ \
ret_value = ecma_builtin_ ## lowercase_name ## _dispatch_construct (arguments_list_p, \
arguments_list_len); \
} \
break; \
}
#include "ecma-builtins.inc.h"
case ECMA_BUILTIN_ID__COUNT:
{
JERRY_UNREACHABLE ();
}
default:
{
JERRY_UNREACHABLE (); /* The built-in is not implemented. */
}
}
JERRY_ASSERT (!ecma_is_value_empty (ret_value));
return ret_value;
} /* ecma_builtin_dispatch_construct */ } /* ecma_builtin_dispatch_construct */
/** /**
@@ -23,6 +23,17 @@
*/ */
typedef enum typedef enum
{ {
#define BUILTIN(a, b, c, d, e)
#define BUILTIN_ROUTINE(builtin_id, \
object_type, \
object_prototype_builtin_id, \
is_extensible, \
lowercase_name) \
builtin_id,
#include "ecma-builtins.inc.h"
#undef BUILTIN
#undef BUILTIN_ROUTINE
#define BUILTIN_ROUTINE(a, b, c, d, e)
#define BUILTIN(builtin_id, \ #define BUILTIN(builtin_id, \
object_type, \ object_type, \
object_prototype_builtin_id, \ object_prototype_builtin_id, \
@@ -30,6 +41,8 @@ typedef enum
lowercase_name) \ lowercase_name) \
builtin_id, builtin_id,
#include "ecma-builtins.inc.h" #include "ecma-builtins.inc.h"
#undef BUILTIN
#undef BUILTIN_ROUTINE
ECMA_BUILTIN_ID__COUNT /**< number of built-in objects */ ECMA_BUILTIN_ID__COUNT /**< number of built-in objects */
} ecma_builtin_id_t; } ecma_builtin_id_t;
@@ -24,11 +24,11 @@ BUILTIN (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
object_prototype) object_prototype)
/* The Object object (15.2.1) */ /* The Object object (15.2.1) */
BUILTIN (ECMA_BUILTIN_ID_OBJECT, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_OBJECT,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true, true,
object) object)
#ifndef CONFIG_DISABLE_ARRAY_BUILTIN #ifndef CONFIG_DISABLE_ARRAY_BUILTIN
/* The Array.prototype object (15.4.4) */ /* The Array.prototype object (15.4.4) */
@@ -39,11 +39,11 @@ BUILTIN (ECMA_BUILTIN_ID_ARRAY_PROTOTYPE,
array_prototype) array_prototype)
/* The Array object (15.4.1) */ /* The Array object (15.4.1) */
BUILTIN (ECMA_BUILTIN_ID_ARRAY, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_ARRAY,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true, true,
array) array)
#endif /* !CONFIG_DISABLE_ARRAY_BUILTIN*/ #endif /* !CONFIG_DISABLE_ARRAY_BUILTIN*/
#ifndef CONFIG_DISABLE_STRING_BUILTIN #ifndef CONFIG_DISABLE_STRING_BUILTIN
@@ -55,11 +55,11 @@ BUILTIN (ECMA_BUILTIN_ID_STRING_PROTOTYPE,
string_prototype) string_prototype)
/* The String object (15.5.1) */ /* The String object (15.5.1) */
BUILTIN (ECMA_BUILTIN_ID_STRING, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_STRING,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true, true,
string) string)
#endif /* !CONFIG_DISABLE_STRING_BUILTIN */ #endif /* !CONFIG_DISABLE_STRING_BUILTIN */
#ifndef CONFIG_DISABLE_BOOLEAN_BUILTIN #ifndef CONFIG_DISABLE_BOOLEAN_BUILTIN
@@ -71,11 +71,11 @@ BUILTIN (ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE,
boolean_prototype) boolean_prototype)
/* The Boolean object (15.6.1) */ /* The Boolean object (15.6.1) */
BUILTIN (ECMA_BUILTIN_ID_BOOLEAN, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_BOOLEAN,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true, true,
boolean) boolean)
#endif /* !CONFIG_DISABLE_BOOLEAN_BUILTIN */ #endif /* !CONFIG_DISABLE_BOOLEAN_BUILTIN */
#ifndef CONFIG_DISABLE_NUMBER_BUILTIN #ifndef CONFIG_DISABLE_NUMBER_BUILTIN
@@ -87,26 +87,26 @@ BUILTIN (ECMA_BUILTIN_ID_NUMBER_PROTOTYPE,
number_prototype) number_prototype)
/* The Number object (15.7.1) */ /* The Number object (15.7.1) */
BUILTIN (ECMA_BUILTIN_ID_NUMBER, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_NUMBER,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true, true,
number) number)
#endif /* !CONFIG_DISABLE_NUMBER_BUILTIN */ #endif /* !CONFIG_DISABLE_NUMBER_BUILTIN */
/* The Function.prototype object (15.3.4) */ /* The Function.prototype object (15.3.4) */
BUILTIN (ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_OBJECT_PROTOTYPE, ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
true, true,
function_prototype) function_prototype)
/* The Function object (15.3.1) */ /* The Function object (15.3.1) */
BUILTIN (ECMA_BUILTIN_ID_FUNCTION, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_FUNCTION,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true, true,
function) function)
#ifndef CONFIG_DISABLE_MATH_BUILTIN #ifndef CONFIG_DISABLE_MATH_BUILTIN
/* The Math object (15.8) */ /* The Math object (15.8) */
@@ -135,11 +135,11 @@ BUILTIN (ECMA_BUILTIN_ID_DATE_PROTOTYPE,
date_prototype) date_prototype)
/* The Date object (15.9.3) */ /* The Date object (15.9.3) */
BUILTIN (ECMA_BUILTIN_ID_DATE, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_DATE,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true, true,
date) date)
#endif /* !CONFIG_DISABLE_DATE_BUILTIN */ #endif /* !CONFIG_DISABLE_DATE_BUILTIN */
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN #ifndef CONFIG_DISABLE_REGEXP_BUILTIN
@@ -151,19 +151,19 @@ BUILTIN (ECMA_BUILTIN_ID_REGEXP_PROTOTYPE,
regexp_prototype) regexp_prototype)
/* The RegExp object (15.10) */ /* The RegExp object (15.10) */
BUILTIN (ECMA_BUILTIN_ID_REGEXP, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_REGEXP,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true, true,
regexp) regexp)
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */ #endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
/* The Error object (15.11.1) */ /* The Error object (15.11.1) */
BUILTIN (ECMA_BUILTIN_ID_ERROR, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_ERROR,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true, true,
error) error)
/* The Error.prototype object (15.11.4) */ /* The Error.prototype object (15.11.4) */
BUILTIN (ECMA_BUILTIN_ID_ERROR_PROTOTYPE, BUILTIN (ECMA_BUILTIN_ID_ERROR_PROTOTYPE,
@@ -181,11 +181,11 @@ BUILTIN (ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE,
eval_error_prototype) eval_error_prototype)
/* The EvalError object (15.11.6.1) */ /* The EvalError object (15.11.6.1) */
BUILTIN (ECMA_BUILTIN_ID_EVAL_ERROR, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_EVAL_ERROR,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true, true,
eval_error) eval_error)
/* The RangeError.prototype object (15.11.6.2) */ /* The RangeError.prototype object (15.11.6.2) */
BUILTIN (ECMA_BUILTIN_ID_RANGE_ERROR_PROTOTYPE, BUILTIN (ECMA_BUILTIN_ID_RANGE_ERROR_PROTOTYPE,
@@ -195,11 +195,11 @@ BUILTIN (ECMA_BUILTIN_ID_RANGE_ERROR_PROTOTYPE,
range_error_prototype) range_error_prototype)
/* The RangeError object (15.11.6.2) */ /* The RangeError object (15.11.6.2) */
BUILTIN (ECMA_BUILTIN_ID_RANGE_ERROR, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_RANGE_ERROR,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true, true,
range_error) range_error)
/* The ReferenceError.prototype object (15.11.6.3) */ /* The ReferenceError.prototype object (15.11.6.3) */
BUILTIN (ECMA_BUILTIN_ID_REFERENCE_ERROR_PROTOTYPE, BUILTIN (ECMA_BUILTIN_ID_REFERENCE_ERROR_PROTOTYPE,
@@ -209,11 +209,11 @@ BUILTIN (ECMA_BUILTIN_ID_REFERENCE_ERROR_PROTOTYPE,
reference_error_prototype) reference_error_prototype)
/* The ReferenceError object (15.11.6.3) */ /* The ReferenceError object (15.11.6.3) */
BUILTIN (ECMA_BUILTIN_ID_REFERENCE_ERROR, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_REFERENCE_ERROR,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true, true,
reference_error) reference_error)
/* The SyntaxError.prototype object (15.11.6.4) */ /* The SyntaxError.prototype object (15.11.6.4) */
BUILTIN (ECMA_BUILTIN_ID_SYNTAX_ERROR_PROTOTYPE, BUILTIN (ECMA_BUILTIN_ID_SYNTAX_ERROR_PROTOTYPE,
@@ -223,11 +223,11 @@ BUILTIN (ECMA_BUILTIN_ID_SYNTAX_ERROR_PROTOTYPE,
syntax_error_prototype) syntax_error_prototype)
/* The SyntaxError object (15.11.6.4) */ /* The SyntaxError object (15.11.6.4) */
BUILTIN (ECMA_BUILTIN_ID_SYNTAX_ERROR, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_SYNTAX_ERROR,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true, true,
syntax_error) syntax_error)
/* The TypeError.prototype object (15.11.6.5) */ /* The TypeError.prototype object (15.11.6.5) */
BUILTIN (ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE, BUILTIN (ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE,
@@ -237,11 +237,11 @@ BUILTIN (ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE,
type_error_prototype) type_error_prototype)
/* The TypeError object (15.11.6.5) */ /* The TypeError object (15.11.6.5) */
BUILTIN (ECMA_BUILTIN_ID_TYPE_ERROR, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_TYPE_ERROR,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true, true,
type_error) type_error)
/* The URIError.prototype object (15.11.6.6) */ /* The URIError.prototype object (15.11.6.6) */
BUILTIN (ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE, BUILTIN (ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE,
@@ -251,19 +251,19 @@ BUILTIN (ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE,
uri_error_prototype) uri_error_prototype)
/* The URIError object (15.11.6.6) */ /* The URIError object (15.11.6.6) */
BUILTIN (ECMA_BUILTIN_ID_URI_ERROR, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_URI_ERROR,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true, true,
uri_error) uri_error)
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */ #endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
/**< The [[ThrowTypeError]] object (13.2.3) */ /**< The [[ThrowTypeError]] object (13.2.3) */
BUILTIN (ECMA_BUILTIN_ID_TYPE_ERROR_THROWER, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_TYPE_ERROR_THROWER,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
false, false,
type_error_thrower) type_error_thrower)
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN #ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
@@ -275,11 +275,11 @@ BUILTIN (ECMA_BUILTIN_ID_ARRAYBUFFER_PROTOTYPE,
arraybuffer_prototype) arraybuffer_prototype)
/* The ArrayBuffer object (ES2015 24.1.2) */ /* The ArrayBuffer object (ES2015 24.1.2) */
BUILTIN (ECMA_BUILTIN_ID_ARRAYBUFFER, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_ARRAYBUFFER,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true, true,
arraybuffer) arraybuffer)
/* The %TypedArrayPrototype% object (ES2015 24.2.3) */ /* The %TypedArrayPrototype% object (ES2015 24.2.3) */
BUILTIN (ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE, BUILTIN (ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,
@@ -289,11 +289,11 @@ BUILTIN (ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,
typedarray_prototype) typedarray_prototype)
/* The %TypedArray% intrinsic object (ES2015 22.2.1) */ /* The %TypedArray% intrinsic object (ES2015 22.2.1) */
BUILTIN (ECMA_BUILTIN_ID_TYPEDARRAY, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_TYPEDARRAY,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true, true,
typedarray) typedarray)
BUILTIN (ECMA_BUILTIN_ID_INT8ARRAY_PROTOTYPE, BUILTIN (ECMA_BUILTIN_ID_INT8ARRAY_PROTOTYPE,
ECMA_OBJECT_TYPE_GENERAL, ECMA_OBJECT_TYPE_GENERAL,
@@ -301,11 +301,11 @@ BUILTIN (ECMA_BUILTIN_ID_INT8ARRAY_PROTOTYPE,
true, true,
int8array_prototype) int8array_prototype)
BUILTIN (ECMA_BUILTIN_ID_INT8ARRAY, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_INT8ARRAY,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_TYPEDARRAY, ECMA_BUILTIN_ID_TYPEDARRAY,
true, true,
int8array) int8array)
BUILTIN (ECMA_BUILTIN_ID_UINT8ARRAY_PROTOTYPE, BUILTIN (ECMA_BUILTIN_ID_UINT8ARRAY_PROTOTYPE,
ECMA_OBJECT_TYPE_GENERAL, ECMA_OBJECT_TYPE_GENERAL,
@@ -313,11 +313,11 @@ BUILTIN (ECMA_BUILTIN_ID_UINT8ARRAY_PROTOTYPE,
true, true,
uint8array_prototype) uint8array_prototype)
BUILTIN (ECMA_BUILTIN_ID_UINT8ARRAY, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_UINT8ARRAY,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_TYPEDARRAY, ECMA_BUILTIN_ID_TYPEDARRAY,
true, true,
uint8array) uint8array)
BUILTIN (ECMA_BUILTIN_ID_INT16ARRAY_PROTOTYPE, BUILTIN (ECMA_BUILTIN_ID_INT16ARRAY_PROTOTYPE,
ECMA_OBJECT_TYPE_GENERAL, ECMA_OBJECT_TYPE_GENERAL,
@@ -325,11 +325,11 @@ BUILTIN (ECMA_BUILTIN_ID_INT16ARRAY_PROTOTYPE,
true, true,
int16array_prototype) int16array_prototype)
BUILTIN (ECMA_BUILTIN_ID_INT16ARRAY, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_INT16ARRAY,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_TYPEDARRAY, ECMA_BUILTIN_ID_TYPEDARRAY,
true, true,
int16array) int16array)
BUILTIN (ECMA_BUILTIN_ID_UINT16ARRAY_PROTOTYPE, BUILTIN (ECMA_BUILTIN_ID_UINT16ARRAY_PROTOTYPE,
ECMA_OBJECT_TYPE_GENERAL, ECMA_OBJECT_TYPE_GENERAL,
@@ -337,11 +337,11 @@ BUILTIN (ECMA_BUILTIN_ID_UINT16ARRAY_PROTOTYPE,
true, true,
uint16array_prototype) uint16array_prototype)
BUILTIN (ECMA_BUILTIN_ID_UINT16ARRAY, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_UINT16ARRAY,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_TYPEDARRAY, ECMA_BUILTIN_ID_TYPEDARRAY,
true, true,
uint16array) uint16array)
BUILTIN (ECMA_BUILTIN_ID_INT32ARRAY_PROTOTYPE, BUILTIN (ECMA_BUILTIN_ID_INT32ARRAY_PROTOTYPE,
ECMA_OBJECT_TYPE_GENERAL, ECMA_OBJECT_TYPE_GENERAL,
@@ -349,11 +349,11 @@ BUILTIN (ECMA_BUILTIN_ID_INT32ARRAY_PROTOTYPE,
true, true,
int32array_prototype) int32array_prototype)
BUILTIN (ECMA_BUILTIN_ID_INT32ARRAY, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_INT32ARRAY,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_TYPEDARRAY, ECMA_BUILTIN_ID_TYPEDARRAY,
true, true,
int32array) int32array)
BUILTIN (ECMA_BUILTIN_ID_UINT32ARRAY_PROTOTYPE, BUILTIN (ECMA_BUILTIN_ID_UINT32ARRAY_PROTOTYPE,
ECMA_OBJECT_TYPE_GENERAL, ECMA_OBJECT_TYPE_GENERAL,
@@ -361,11 +361,11 @@ BUILTIN (ECMA_BUILTIN_ID_UINT32ARRAY_PROTOTYPE,
true, true,
uint32array_prototype) uint32array_prototype)
BUILTIN (ECMA_BUILTIN_ID_UINT32ARRAY, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_UINT32ARRAY,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_TYPEDARRAY, ECMA_BUILTIN_ID_TYPEDARRAY,
true, true,
uint32array) uint32array)
BUILTIN (ECMA_BUILTIN_ID_FLOAT32ARRAY_PROTOTYPE, BUILTIN (ECMA_BUILTIN_ID_FLOAT32ARRAY_PROTOTYPE,
ECMA_OBJECT_TYPE_GENERAL, ECMA_OBJECT_TYPE_GENERAL,
@@ -373,11 +373,11 @@ BUILTIN (ECMA_BUILTIN_ID_FLOAT32ARRAY_PROTOTYPE,
true, true,
float32array_prototype) float32array_prototype)
BUILTIN (ECMA_BUILTIN_ID_FLOAT32ARRAY, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_FLOAT32ARRAY,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_TYPEDARRAY, ECMA_BUILTIN_ID_TYPEDARRAY,
true, true,
float32array) float32array)
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64 #if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64
BUILTIN (ECMA_BUILTIN_ID_FLOAT64ARRAY_PROTOTYPE, BUILTIN (ECMA_BUILTIN_ID_FLOAT64ARRAY_PROTOTYPE,
@@ -386,11 +386,11 @@ BUILTIN (ECMA_BUILTIN_ID_FLOAT64ARRAY_PROTOTYPE,
true, true,
float64array_prototype) float64array_prototype)
BUILTIN (ECMA_BUILTIN_ID_FLOAT64ARRAY, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_FLOAT64ARRAY,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_TYPEDARRAY, ECMA_BUILTIN_ID_TYPEDARRAY,
true, true,
float64array) float64array)
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64 */ #endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64 */
BUILTIN (ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY_PROTOTYPE, BUILTIN (ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY_PROTOTYPE,
@@ -399,11 +399,11 @@ BUILTIN (ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY_PROTOTYPE,
true, true,
uint8clampedarray_prototype) uint8clampedarray_prototype)
BUILTIN (ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_TYPEDARRAY, ECMA_BUILTIN_ID_TYPEDARRAY,
true, true,
uint8clampedarray) uint8clampedarray)
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */ #endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
@@ -415,11 +415,11 @@ BUILTIN (ECMA_BUILTIN_ID_PROMISE_PROTOTYPE,
true, true,
promise_prototype) promise_prototype)
BUILTIN (ECMA_BUILTIN_ID_PROMISE, BUILTIN_ROUTINE (ECMA_BUILTIN_ID_PROMISE,
ECMA_OBJECT_TYPE_FUNCTION, ECMA_OBJECT_TYPE_FUNCTION,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE, ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true, true,
promise) promise)
#endif /* !CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */ #endif /* !CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */