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:
@@ -69,11 +69,11 @@ typedef struct
|
||||
uint16_t value; /**< value of the property */
|
||||
} ecma_builtin_property_descriptor_t;
|
||||
|
||||
#define BUILTIN(builtin_id, \
|
||||
object_type, \
|
||||
object_prototype_builtin_id, \
|
||||
is_extensible, \
|
||||
lowercase_name) \
|
||||
#define BUILTIN_ROUTINE(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 \
|
||||
@@ -83,10 +83,25 @@ ecma_value_t \
|
||||
ecma_builtin_ ## lowercase_name ## _dispatch_construct (const ecma_value_t *, \
|
||||
ecma_length_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_value_t this_arg_value, \
|
||||
const ecma_value_t [], \
|
||||
ecma_length_t);
|
||||
#include "ecma-builtins.inc.h"
|
||||
|
||||
#undef BUILTIN_ROUTINE
|
||||
#undef BUILTIN
|
||||
|
||||
#endif /* !ECMA_BUILTINS_INTERNAL_H */
|
||||
|
||||
@@ -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 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.
|
||||
*/
|
||||
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, \
|
||||
object_type, \
|
||||
object_prototype_builtin_id, \
|
||||
@@ -51,6 +121,8 @@ static const ecma_builtin_property_list_reference_t ecma_builtin_property_list_r
|
||||
lowercase_name) \
|
||||
ecma_builtin_ ## lowercase_name ## _property_descriptor_list,
|
||||
#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);
|
||||
|
||||
if (!is_extensible)
|
||||
if (unlikely (!is_extensible))
|
||||
{
|
||||
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;
|
||||
} /* ecma_builtin_init_object */
|
||||
|
||||
|
||||
/**
|
||||
* Helper function for 'ecma_instantiate_builtin'
|
||||
*/
|
||||
@@ -343,8 +414,10 @@ ecma_instantiate_builtin (ecma_builtin_id_t id) /**< built-in id */
|
||||
is_extensible); \
|
||||
break; \
|
||||
}
|
||||
#define BUILTIN_ROUTINE(a, b, c, d, e) BUILTIN(a, b, c, d, e)
|
||||
#include "ecma-builtins.inc.h"
|
||||
|
||||
#undef BUILTIN
|
||||
#undef BUILTIN_ROUTINE
|
||||
default:
|
||||
{
|
||||
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
|
||||
* routine property */
|
||||
ecma_value_t this_arg_value, /**< 'this' argument value */
|
||||
const ecma_value_t arguments_list[], /**< list of arguments passed to routine */
|
||||
ecma_length_t arguments_number) /**< length of arguments' list */
|
||||
const ecma_value_t *arguments_list_p, /**< list of arguments passed to routine */
|
||||
ecma_length_t arguments_list_len) /**< length of arguments' list */
|
||||
{
|
||||
switch (builtin_object_id)
|
||||
{
|
||||
#define BUILTIN(builtin_id, \
|
||||
object_type, \
|
||||
object_prototype_builtin_id, \
|
||||
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 ();
|
||||
JERRY_ASSERT (builtin_object_id < ECMA_BUILTIN_ID__COUNT);
|
||||
return ecma_builtin_routines[builtin_object_id] (builtin_routine_id,
|
||||
this_arg_value,
|
||||
arguments_list_p,
|
||||
arguments_list_len);
|
||||
} /* ecma_builtin_dispatch_routine */
|
||||
|
||||
/**
|
||||
@@ -860,34 +910,9 @@ ecma_builtin_dispatch_call (ecma_object_t *obj_p, /**< built-in object */
|
||||
}
|
||||
else
|
||||
{
|
||||
switch ((ecma_builtin_id_t) ext_obj_p->u.built_in.id)
|
||||
{
|
||||
#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_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. */
|
||||
}
|
||||
}
|
||||
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));
|
||||
return ecma_builtin_call_functions[builtin_object_id] (arguments_list_p, arguments_list_len);
|
||||
}
|
||||
|
||||
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_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;
|
||||
|
||||
switch (ext_obj_p->u.built_in.id)
|
||||
{
|
||||
#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_id_t builtin_object_id = 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);
|
||||
} /* ecma_builtin_dispatch_construct */
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,6 +23,17 @@
|
||||
*/
|
||||
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, \
|
||||
object_type, \
|
||||
object_prototype_builtin_id, \
|
||||
@@ -30,6 +41,8 @@ typedef enum
|
||||
lowercase_name) \
|
||||
builtin_id,
|
||||
#include "ecma-builtins.inc.h"
|
||||
#undef BUILTIN
|
||||
#undef BUILTIN_ROUTINE
|
||||
ECMA_BUILTIN_ID__COUNT /**< number of built-in objects */
|
||||
} ecma_builtin_id_t;
|
||||
|
||||
|
||||
@@ -24,11 +24,11 @@ BUILTIN (ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
|
||||
object_prototype)
|
||||
|
||||
/* The Object object (15.2.1) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_OBJECT,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
object)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_OBJECT,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
object)
|
||||
|
||||
#ifndef CONFIG_DISABLE_ARRAY_BUILTIN
|
||||
/* The Array.prototype object (15.4.4) */
|
||||
@@ -39,11 +39,11 @@ BUILTIN (ECMA_BUILTIN_ID_ARRAY_PROTOTYPE,
|
||||
array_prototype)
|
||||
|
||||
/* The Array object (15.4.1) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_ARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
array)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_ARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
array)
|
||||
#endif /* !CONFIG_DISABLE_ARRAY_BUILTIN*/
|
||||
|
||||
#ifndef CONFIG_DISABLE_STRING_BUILTIN
|
||||
@@ -55,11 +55,11 @@ BUILTIN (ECMA_BUILTIN_ID_STRING_PROTOTYPE,
|
||||
string_prototype)
|
||||
|
||||
/* The String object (15.5.1) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_STRING,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
string)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_STRING,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
string)
|
||||
#endif /* !CONFIG_DISABLE_STRING_BUILTIN */
|
||||
|
||||
#ifndef CONFIG_DISABLE_BOOLEAN_BUILTIN
|
||||
@@ -71,11 +71,11 @@ BUILTIN (ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE,
|
||||
boolean_prototype)
|
||||
|
||||
/* The Boolean object (15.6.1) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_BOOLEAN,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
boolean)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_BOOLEAN,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
boolean)
|
||||
#endif /* !CONFIG_DISABLE_BOOLEAN_BUILTIN */
|
||||
|
||||
#ifndef CONFIG_DISABLE_NUMBER_BUILTIN
|
||||
@@ -87,26 +87,26 @@ BUILTIN (ECMA_BUILTIN_ID_NUMBER_PROTOTYPE,
|
||||
number_prototype)
|
||||
|
||||
/* The Number object (15.7.1) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_NUMBER,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
number)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_NUMBER,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
number)
|
||||
#endif /* !CONFIG_DISABLE_NUMBER_BUILTIN */
|
||||
|
||||
/* The Function.prototype object (15.3.4) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
|
||||
true,
|
||||
function_prototype)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
|
||||
true,
|
||||
function_prototype)
|
||||
|
||||
/* The Function object (15.3.1) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_FUNCTION,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
function)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_FUNCTION,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
function)
|
||||
|
||||
#ifndef CONFIG_DISABLE_MATH_BUILTIN
|
||||
/* The Math object (15.8) */
|
||||
@@ -135,11 +135,11 @@ BUILTIN (ECMA_BUILTIN_ID_DATE_PROTOTYPE,
|
||||
date_prototype)
|
||||
|
||||
/* The Date object (15.9.3) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_DATE,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
date)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_DATE,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
date)
|
||||
#endif /* !CONFIG_DISABLE_DATE_BUILTIN */
|
||||
|
||||
#ifndef CONFIG_DISABLE_REGEXP_BUILTIN
|
||||
@@ -151,19 +151,19 @@ BUILTIN (ECMA_BUILTIN_ID_REGEXP_PROTOTYPE,
|
||||
regexp_prototype)
|
||||
|
||||
/* The RegExp object (15.10) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_REGEXP,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
regexp)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_REGEXP,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
regexp)
|
||||
#endif /* !CONFIG_DISABLE_REGEXP_BUILTIN */
|
||||
|
||||
/* The Error object (15.11.1) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_ERROR,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
error)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_ERROR,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
error)
|
||||
|
||||
/* The Error.prototype object (15.11.4) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_ERROR_PROTOTYPE,
|
||||
@@ -181,11 +181,11 @@ BUILTIN (ECMA_BUILTIN_ID_EVAL_ERROR_PROTOTYPE,
|
||||
eval_error_prototype)
|
||||
|
||||
/* The EvalError object (15.11.6.1) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_EVAL_ERROR,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
eval_error)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_EVAL_ERROR,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
eval_error)
|
||||
|
||||
/* The RangeError.prototype object (15.11.6.2) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_RANGE_ERROR_PROTOTYPE,
|
||||
@@ -195,11 +195,11 @@ BUILTIN (ECMA_BUILTIN_ID_RANGE_ERROR_PROTOTYPE,
|
||||
range_error_prototype)
|
||||
|
||||
/* The RangeError object (15.11.6.2) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_RANGE_ERROR,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
range_error)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_RANGE_ERROR,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
range_error)
|
||||
|
||||
/* The ReferenceError.prototype object (15.11.6.3) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_REFERENCE_ERROR_PROTOTYPE,
|
||||
@@ -209,11 +209,11 @@ BUILTIN (ECMA_BUILTIN_ID_REFERENCE_ERROR_PROTOTYPE,
|
||||
reference_error_prototype)
|
||||
|
||||
/* The ReferenceError object (15.11.6.3) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_REFERENCE_ERROR,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
reference_error)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_REFERENCE_ERROR,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
reference_error)
|
||||
|
||||
/* The SyntaxError.prototype object (15.11.6.4) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_SYNTAX_ERROR_PROTOTYPE,
|
||||
@@ -223,11 +223,11 @@ BUILTIN (ECMA_BUILTIN_ID_SYNTAX_ERROR_PROTOTYPE,
|
||||
syntax_error_prototype)
|
||||
|
||||
/* The SyntaxError object (15.11.6.4) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_SYNTAX_ERROR,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
syntax_error)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_SYNTAX_ERROR,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
syntax_error)
|
||||
|
||||
/* The TypeError.prototype object (15.11.6.5) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE,
|
||||
@@ -237,11 +237,11 @@ BUILTIN (ECMA_BUILTIN_ID_TYPE_ERROR_PROTOTYPE,
|
||||
type_error_prototype)
|
||||
|
||||
/* The TypeError object (15.11.6.5) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_TYPE_ERROR,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
type_error)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_TYPE_ERROR,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
type_error)
|
||||
|
||||
/* The URIError.prototype object (15.11.6.6) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE,
|
||||
@@ -251,19 +251,19 @@ BUILTIN (ECMA_BUILTIN_ID_URI_ERROR_PROTOTYPE,
|
||||
uri_error_prototype)
|
||||
|
||||
/* The URIError object (15.11.6.6) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_URI_ERROR,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
uri_error)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_URI_ERROR,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
uri_error)
|
||||
#endif /* !CONFIG_DISABLE_ERROR_BUILTINS */
|
||||
|
||||
/**< The [[ThrowTypeError]] object (13.2.3) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_TYPE_ERROR_THROWER,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
false,
|
||||
type_error_thrower)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_TYPE_ERROR_THROWER,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
false,
|
||||
type_error_thrower)
|
||||
|
||||
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
|
||||
|
||||
@@ -275,11 +275,11 @@ BUILTIN (ECMA_BUILTIN_ID_ARRAYBUFFER_PROTOTYPE,
|
||||
arraybuffer_prototype)
|
||||
|
||||
/* The ArrayBuffer object (ES2015 24.1.2) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_ARRAYBUFFER,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
arraybuffer)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_ARRAYBUFFER,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
arraybuffer)
|
||||
|
||||
/* The %TypedArrayPrototype% object (ES2015 24.2.3) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,
|
||||
@@ -289,11 +289,11 @@ BUILTIN (ECMA_BUILTIN_ID_TYPEDARRAY_PROTOTYPE,
|
||||
typedarray_prototype)
|
||||
|
||||
/* The %TypedArray% intrinsic object (ES2015 22.2.1) */
|
||||
BUILTIN (ECMA_BUILTIN_ID_TYPEDARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
typedarray)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_TYPEDARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
typedarray)
|
||||
|
||||
BUILTIN (ECMA_BUILTIN_ID_INT8ARRAY_PROTOTYPE,
|
||||
ECMA_OBJECT_TYPE_GENERAL,
|
||||
@@ -301,11 +301,11 @@ BUILTIN (ECMA_BUILTIN_ID_INT8ARRAY_PROTOTYPE,
|
||||
true,
|
||||
int8array_prototype)
|
||||
|
||||
BUILTIN (ECMA_BUILTIN_ID_INT8ARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_TYPEDARRAY,
|
||||
true,
|
||||
int8array)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_INT8ARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_TYPEDARRAY,
|
||||
true,
|
||||
int8array)
|
||||
|
||||
BUILTIN (ECMA_BUILTIN_ID_UINT8ARRAY_PROTOTYPE,
|
||||
ECMA_OBJECT_TYPE_GENERAL,
|
||||
@@ -313,11 +313,11 @@ BUILTIN (ECMA_BUILTIN_ID_UINT8ARRAY_PROTOTYPE,
|
||||
true,
|
||||
uint8array_prototype)
|
||||
|
||||
BUILTIN (ECMA_BUILTIN_ID_UINT8ARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_TYPEDARRAY,
|
||||
true,
|
||||
uint8array)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_UINT8ARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_TYPEDARRAY,
|
||||
true,
|
||||
uint8array)
|
||||
|
||||
BUILTIN (ECMA_BUILTIN_ID_INT16ARRAY_PROTOTYPE,
|
||||
ECMA_OBJECT_TYPE_GENERAL,
|
||||
@@ -325,11 +325,11 @@ BUILTIN (ECMA_BUILTIN_ID_INT16ARRAY_PROTOTYPE,
|
||||
true,
|
||||
int16array_prototype)
|
||||
|
||||
BUILTIN (ECMA_BUILTIN_ID_INT16ARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_TYPEDARRAY,
|
||||
true,
|
||||
int16array)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_INT16ARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_TYPEDARRAY,
|
||||
true,
|
||||
int16array)
|
||||
|
||||
BUILTIN (ECMA_BUILTIN_ID_UINT16ARRAY_PROTOTYPE,
|
||||
ECMA_OBJECT_TYPE_GENERAL,
|
||||
@@ -337,11 +337,11 @@ BUILTIN (ECMA_BUILTIN_ID_UINT16ARRAY_PROTOTYPE,
|
||||
true,
|
||||
uint16array_prototype)
|
||||
|
||||
BUILTIN (ECMA_BUILTIN_ID_UINT16ARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_TYPEDARRAY,
|
||||
true,
|
||||
uint16array)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_UINT16ARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_TYPEDARRAY,
|
||||
true,
|
||||
uint16array)
|
||||
|
||||
BUILTIN (ECMA_BUILTIN_ID_INT32ARRAY_PROTOTYPE,
|
||||
ECMA_OBJECT_TYPE_GENERAL,
|
||||
@@ -349,11 +349,11 @@ BUILTIN (ECMA_BUILTIN_ID_INT32ARRAY_PROTOTYPE,
|
||||
true,
|
||||
int32array_prototype)
|
||||
|
||||
BUILTIN (ECMA_BUILTIN_ID_INT32ARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_TYPEDARRAY,
|
||||
true,
|
||||
int32array)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_INT32ARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_TYPEDARRAY,
|
||||
true,
|
||||
int32array)
|
||||
|
||||
BUILTIN (ECMA_BUILTIN_ID_UINT32ARRAY_PROTOTYPE,
|
||||
ECMA_OBJECT_TYPE_GENERAL,
|
||||
@@ -361,11 +361,11 @@ BUILTIN (ECMA_BUILTIN_ID_UINT32ARRAY_PROTOTYPE,
|
||||
true,
|
||||
uint32array_prototype)
|
||||
|
||||
BUILTIN (ECMA_BUILTIN_ID_UINT32ARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_TYPEDARRAY,
|
||||
true,
|
||||
uint32array)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_UINT32ARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_TYPEDARRAY,
|
||||
true,
|
||||
uint32array)
|
||||
|
||||
BUILTIN (ECMA_BUILTIN_ID_FLOAT32ARRAY_PROTOTYPE,
|
||||
ECMA_OBJECT_TYPE_GENERAL,
|
||||
@@ -373,11 +373,11 @@ BUILTIN (ECMA_BUILTIN_ID_FLOAT32ARRAY_PROTOTYPE,
|
||||
true,
|
||||
float32array_prototype)
|
||||
|
||||
BUILTIN (ECMA_BUILTIN_ID_FLOAT32ARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_TYPEDARRAY,
|
||||
true,
|
||||
float32array)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_FLOAT32ARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_TYPEDARRAY,
|
||||
true,
|
||||
float32array)
|
||||
|
||||
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64
|
||||
BUILTIN (ECMA_BUILTIN_ID_FLOAT64ARRAY_PROTOTYPE,
|
||||
@@ -386,11 +386,11 @@ BUILTIN (ECMA_BUILTIN_ID_FLOAT64ARRAY_PROTOTYPE,
|
||||
true,
|
||||
float64array_prototype)
|
||||
|
||||
BUILTIN (ECMA_BUILTIN_ID_FLOAT64ARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_TYPEDARRAY,
|
||||
true,
|
||||
float64array)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_FLOAT64ARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_TYPEDARRAY,
|
||||
true,
|
||||
float64array)
|
||||
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64 */
|
||||
|
||||
BUILTIN (ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY_PROTOTYPE,
|
||||
@@ -399,11 +399,11 @@ BUILTIN (ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY_PROTOTYPE,
|
||||
true,
|
||||
uint8clampedarray_prototype)
|
||||
|
||||
BUILTIN (ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_TYPEDARRAY,
|
||||
true,
|
||||
uint8clampedarray)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_UINT8CLAMPEDARRAY,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_TYPEDARRAY,
|
||||
true,
|
||||
uint8clampedarray)
|
||||
|
||||
#endif /* !CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN */
|
||||
|
||||
@@ -415,11 +415,11 @@ BUILTIN (ECMA_BUILTIN_ID_PROMISE_PROTOTYPE,
|
||||
true,
|
||||
promise_prototype)
|
||||
|
||||
BUILTIN (ECMA_BUILTIN_ID_PROMISE,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
promise)
|
||||
BUILTIN_ROUTINE (ECMA_BUILTIN_ID_PROMISE,
|
||||
ECMA_OBJECT_TYPE_FUNCTION,
|
||||
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
|
||||
true,
|
||||
promise)
|
||||
|
||||
#endif /* !CONFIG_DISABLE_ES2015_PROMISE_BUILTIN */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user