diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-aggregateerror-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-aggregateerror-prototype.c index 3fe7ff1b67..95cc1ac935 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-aggregateerror-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-aggregateerror-prototype.c @@ -33,4 +33,27 @@ #define BUILTIN_UNDERSCORED_ID aggregate_error_prototype #include "ecma-builtin-internal-routines-template.inc.h" +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_aggregate_error_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide + * routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed + * to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_aggregate_error_prototype_dispatch_routine */ + #endif /* JERRY_ESNEXT */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-aggregateerror.c b/jerry-core/ecma/builtin-objects/ecma-builtin-aggregateerror.c index c2df08bf56..bea76164b3 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-aggregateerror.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-aggregateerror.c @@ -103,6 +103,27 @@ ecma_builtin_aggregate_error_dispatch_construct (const ecma_value_t *arguments_l return result; } /* ecma_builtin_aggregate_error_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_aggregate_error_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_aggregate_error_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-array-iterator-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-array-iterator-prototype.c index 203a826c67..7ff65a6695 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-array-iterator-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-array-iterator-prototype.c @@ -24,11 +24,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype-unscopables.c b/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype-unscopables.c index ff99558ff1..596c35d087 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype-unscopables.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype-unscopables.c @@ -25,4 +25,27 @@ #define BUILTIN_UNDERSCORED_ID array_prototype_unscopables #include "ecma-builtin-internal-routines-template.inc.h" +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_array_prototype_unscopables_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide + * routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed + * to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_array_prototype_unscopables_dispatch_routine */ + #endif /* JERRY_ESNEXT */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c index 52b84f890a..8540254499 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c @@ -34,11 +34,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-array.c b/jerry-core/ecma/builtin-objects/ecma-builtin-array.c index 399c88d039..1e9c104b7b 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-array.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-array.c @@ -33,11 +33,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer-prototype.c index 1ce2a1a633..f91e49c1b2 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer-prototype.c @@ -31,6 +31,16 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" +/** + * List of built-in routine identifiers. + */ +enum +{ + ECMA_ARRAYBUFFER_PROTOTYPE_ROUTINE_START = 0, + ECMA_ARRAYBUFFER_PROTOTYPE_SLICE, + ECMA_ARRAYBUFFER_PROTOTYPE_BYTELENGTH_GETTER, +}; + #define BUILTIN_INC_HEADER_NAME "ecma-builtin-arraybuffer-prototype.inc.h" #define BUILTIN_UNDERSCORED_ID arraybuffer_prototype #include "ecma-builtin-internal-routines-template.inc.h" @@ -106,6 +116,38 @@ ecma_builtin_arraybuffer_prototype_object_slice (ecma_value_t this_arg, /**< thi return ecma_builtin_arraybuffer_slice (this_arg, argument_list_p, arguments_number); } /* ecma_builtin_arraybuffer_prototype_object_slice */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_arraybuffer_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide + *routine + *identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + switch (builtin_routine_id) + { + case ECMA_ARRAYBUFFER_PROTOTYPE_SLICE: + { + return ecma_builtin_arraybuffer_prototype_object_slice (this_arg, arguments_list_p, arguments_number); + } + case ECMA_ARRAYBUFFER_PROTOTYPE_BYTELENGTH_GETTER: + { + return ecma_builtin_arraybuffer_prototype_bytelength_getter (this_arg); + } + default: + { + JERRY_UNREACHABLE (); + } + } +} /* ecma_builtin_arraybuffer_prototype_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer-prototype.inc.h b/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer-prototype.inc.h index 6d77ed25bf..43b50261e0 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer-prototype.inc.h +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer-prototype.inc.h @@ -30,7 +30,7 @@ OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR, /* Readonly accessor properties */ ACCESSOR_READ_ONLY (LIT_MAGIC_STRING_BYTE_LENGTH_UL, - ecma_builtin_arraybuffer_prototype_bytelength_getter, + ECMA_ARRAYBUFFER_PROTOTYPE_BYTELENGTH_GETTER, ECMA_PROPERTY_FLAG_CONFIGURABLE) /* ECMA-262 v6, 24.1.4.4 */ @@ -40,7 +40,7 @@ STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG, /* 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, NON_FIXED, 2) +ROUTINE (LIT_MAGIC_STRING_SLICE, ECMA_ARRAYBUFFER_PROTOTYPE_SLICE, NON_FIXED, 2) #endif /* JERRY_BUILTIN_TYPEDARRAY */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer.c b/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer.c index 0cc315f51c..64d047e5e5 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer.c @@ -28,6 +28,16 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" +/** + * List of built-in routine identifiers. + */ +enum +{ + ECMA_ARRAYBUFFER_ROUTINE_START = 0, + ECMA_ARRAYBUFFER_OBJECT_IS_VIEW, + ECMA_ARRAYBUFFER_SPECIES_GET, +}; + #define BUILTIN_INC_HEADER_NAME "ecma-builtin-arraybuffer.inc.h" #define BUILTIN_UNDERSCORED_ID arraybuffer #include "ecma-builtin-internal-routines-template.inc.h" @@ -93,16 +103,36 @@ ecma_builtin_arraybuffer_dispatch_construct (const ecma_value_t *arguments_list_ } /* ecma_builtin_arraybuffer_dispatch_construct */ /** - * 24.1.3.3 get ArrayBuffer [ @@species ] accessor + * Dispatcher of the built-in's routines * - * @return ecma_value - * returned value must be freed with ecma_free_value + * @return ecma value + * Returned value must be freed with ecma_free_value. */ ecma_value_t -ecma_builtin_arraybuffer_species_get (ecma_value_t this_value) /**< This Value */ +ecma_builtin_arraybuffer_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ { - return ecma_copy_value (this_value); -} /* ecma_builtin_arraybuffer_species_get */ + JERRY_UNUSED (arguments_number); + + switch (builtin_routine_id) + { + case ECMA_ARRAYBUFFER_OBJECT_IS_VIEW: + { + return ecma_builtin_arraybuffer_object_is_view (this_arg, arguments_list_p[0]); + } + case ECMA_ARRAYBUFFER_SPECIES_GET: + { + return ecma_copy_value (this_arg); + } + default: + { + JERRY_UNREACHABLE (); + } + } +} /* ecma_builtin_arraybuffer_dispatch_routine */ /** * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer.inc.h b/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer.inc.h index 0c05b869fb..fd14fb0bb7 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer.inc.h +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-arraybuffer.inc.h @@ -43,11 +43,11 @@ STRING_VALUE (LIT_MAGIC_STRING_NAME, * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */ /* ES2015 24.1.3.1 */ -ROUTINE (LIT_MAGIC_STRING_IS_VIEW_UL, ecma_builtin_arraybuffer_object_is_view, 1, 1) +ROUTINE (LIT_MAGIC_STRING_IS_VIEW_UL, ECMA_ARRAYBUFFER_OBJECT_IS_VIEW, 1, 1) /* ES2015 24.1.3.3 */ ACCESSOR_READ_ONLY (LIT_GLOBAL_SYMBOL_SPECIES, - ecma_builtin_arraybuffer_species_get, + ECMA_ARRAYBUFFER_SPECIES_GET, ECMA_PROPERTY_FLAG_CONFIGURABLE) #endif /* JERRY_BUILTIN_TYPEDARRAY */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-async-function-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-async-function-prototype.c index 68f2a01296..a9023be78b 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-async-function-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-async-function-prototype.c @@ -34,6 +34,28 @@ * @{ */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_async_function_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide + * routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_async_function_prototype_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-async-function.c b/jerry-core/ecma/builtin-objects/ecma-builtin-async-function.c index bb26e4e32a..eceef303de 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-async-function.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-async-function.c @@ -65,6 +65,27 @@ ecma_builtin_async_function_dispatch_construct (const ecma_value_t *arguments_li return ecma_builtin_async_function_dispatch_call (arguments_list_p, arguments_list_len); } /* ecma_builtin_async_function_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_async_function_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_async_function_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-async-generator-function.c b/jerry-core/ecma/builtin-objects/ecma-builtin-async-generator-function.c index 26091097e3..67a68487b4 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-async-generator-function.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-async-generator-function.c @@ -65,6 +65,28 @@ ecma_builtin_async_generator_function_dispatch_construct (const ecma_value_t *ar return ecma_builtin_async_generator_function_dispatch_call (arguments_list_p, arguments_list_len); } /* ecma_builtin_async_generator_function_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_async_generator_function_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide + * routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_async_generator_function_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-async-generator-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-async-generator-prototype.c index 72a4949137..c8aa4fa0ac 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-async-generator-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-async-generator-prototype.c @@ -30,11 +30,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-async-generator.c b/jerry-core/ecma/builtin-objects/ecma-builtin-async-generator.c index 51e095d59c..60c9ed6585 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-async-generator.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-async-generator.c @@ -34,6 +34,27 @@ * @{ */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_async_generator_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_async_generator_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-async-iterator-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-async-iterator-prototype.c index aaefa49223..209fb7725f 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-async-iterator-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-async-iterator-prototype.c @@ -22,11 +22,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-bigint-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-bigint-prototype.c index 7eee8cc632..475ba60801 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-bigint-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-bigint-prototype.c @@ -21,11 +21,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-bigint.c b/jerry-core/ecma/builtin-objects/ecma-builtin-bigint.c index 08f0dacbea..12ee3aadae 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-bigint.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-bigint.c @@ -71,6 +71,27 @@ ecma_builtin_bigint_dispatch_construct (const ecma_value_t *arguments_list_p, /* return ecma_raise_type_error (ECMA_ERR_MSG ("BigInt function is not a constructor")); } /* ecma_builtin_bigint_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_bigint_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_bigint_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-boolean-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-boolean-prototype.c index cefa45cd4c..61151efd8f 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-boolean-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-boolean-prototype.c @@ -29,11 +29,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-boolean.c b/jerry-core/ecma/builtin-objects/ecma-builtin-boolean.c index 3883317a08..41d61019e8 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-boolean.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-boolean.c @@ -89,6 +89,27 @@ ecma_builtin_boolean_dispatch_construct (const ecma_value_t *arguments_list_p, / } } /* ecma_builtin_boolean_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_boolean_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_boolean_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-dataview-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-dataview-prototype.c index b0edf012dd..495c4e9cc4 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-dataview-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-dataview-prototype.c @@ -27,11 +27,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-dataview.c b/jerry-core/ecma/builtin-objects/ecma-builtin-dataview.c index 94d7378405..34564387cd 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-dataview.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-dataview.c @@ -62,6 +62,27 @@ ecma_builtin_dataview_dispatch_construct (const ecma_value_t *arguments_list_p, return ecma_op_dataview_create (arguments_list_p, arguments_list_len); } /* ecma_builtin_dataview_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_dataview_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_dataview_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-date-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-date-prototype.c index 5d7f6d0712..4420b95df6 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-date-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-date-prototype.c @@ -30,11 +30,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * Checks whether the function uses UTC time zone. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-date.c b/jerry-core/ecma/builtin-objects/ecma-builtin-date.c index a16b6c1b69..41e9dffdfd 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-date.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-date.c @@ -31,11 +31,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-error-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-error-prototype.c index 5f4f5650b1..f54332d9a5 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-error-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-error-prototype.c @@ -29,11 +29,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-error.c b/jerry-core/ecma/builtin-objects/ecma-builtin-error.c index 17693f2e8c..87375edd50 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-error.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-error.c @@ -89,6 +89,27 @@ ecma_builtin_error_dispatch_construct (const ecma_value_t *arguments_list_p, /** #endif /* JERRY_ESNEXT */ } /* ecma_builtin_error_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_error_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_error_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-evalerror-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-evalerror-prototype.c index a755b1669f..a92267d06f 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-evalerror-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-evalerror-prototype.c @@ -33,4 +33,25 @@ #define BUILTIN_UNDERSCORED_ID eval_error_prototype #include "ecma-builtin-internal-routines-template.inc.h" +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_eval_error_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_eval_error_prototype_dispatch_routine */ + #endif /* JERRY_BUILTIN_ERRORS */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-evalerror.c b/jerry-core/ecma/builtin-objects/ecma-builtin-evalerror.c index 29e71ecb74..67ab19f08a 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-evalerror.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-evalerror.c @@ -91,6 +91,27 @@ ecma_builtin_eval_error_dispatch_construct (const ecma_value_t *arguments_list_p #endif /* JERRY_ESNEXT */ } /* ecma_builtin_eval_error_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_eval_error_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_eval_error_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c index d1d71ea255..0d3a12eb73 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-function-prototype.c @@ -31,11 +31,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-function.c b/jerry-core/ecma/builtin-objects/ecma-builtin-function.c index 562fab2f2c..c8a4773eaf 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-function.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-function.c @@ -69,6 +69,27 @@ ecma_builtin_function_dispatch_construct (const ecma_value_t *arguments_list_p, return ecma_op_create_dynamic_function (arguments_list_p, arguments_list_len, ECMA_PARSE_NO_OPTS); } /* ecma_builtin_function_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_function_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_function_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-generator-function.c b/jerry-core/ecma/builtin-objects/ecma-builtin-generator-function.c index 05ee6cc874..2da6046f06 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-generator-function.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-generator-function.c @@ -63,6 +63,27 @@ ecma_builtin_generator_function_dispatch_construct (const ecma_value_t *argument return ecma_builtin_generator_function_dispatch_call (arguments_list_p, arguments_list_len); } /* ecma_builtin_generator_function_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_generator_function_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_generator_function_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-generator-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-generator-prototype.c index 06098d84ff..99df03e4ae 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-generator-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-generator-prototype.c @@ -28,11 +28,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-generator.c b/jerry-core/ecma/builtin-objects/ecma-builtin-generator.c index 7cb11537b7..4d61ab2b47 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-generator.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-generator.c @@ -34,6 +34,27 @@ * @{ */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_generator_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_generator_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-global.c b/jerry-core/ecma/builtin-objects/ecma-builtin-global.c index 34570ecb0f..9cbcd87acf 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-global.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-global.c @@ -33,11 +33,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-internal-routines-template.inc.h b/jerry-core/ecma/builtin-objects/ecma-builtin-internal-routines-template.inc.h index 28bea6fc86..dd625908b0 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-internal-routines-template.inc.h +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-internal-routines-template.inc.h @@ -32,99 +32,11 @@ #define DISPATCH_ROUTINE_ROUTINE_NAME \ PASTE (PASTE (ecma_builtin_, BUILTIN_UNDERSCORED_ID), _dispatch_routine) -#ifndef BUILTIN_CUSTOM_DISPATCH - -#define ROUTINE_ARG(n) , ecma_value_t arg ## n -#define ROUTINE_ARG_LIST_0 ecma_value_t this_arg -#define ROUTINE_ARG_LIST_1 ROUTINE_ARG_LIST_0 ROUTINE_ARG(1) -#define ROUTINE_ARG_LIST_2 ROUTINE_ARG_LIST_1 ROUTINE_ARG(2) -#define ROUTINE_ARG_LIST_3 ROUTINE_ARG_LIST_2 ROUTINE_ARG(3) -#define ROUTINE_ARG_LIST_NON_FIXED ROUTINE_ARG_LIST_0, \ - const ecma_value_t *arguments_list_p, uint32_t arguments_list_len -#define ROUTINE(name, c_function_name, args_number, length_prop_value) \ - static ecma_value_t c_function_name (ROUTINE_ARG_LIST_ ## args_number); -#define ROUTINE_CONFIGURABLE_ONLY(name, c_function_name, args_number, length_prop_value) \ - static ecma_value_t c_function_name (ROUTINE_ARG_LIST_ ## args_number); -#define ROUTINE_WITH_FLAGS(name, c_function_name, args_number, length_prop_value, flags) \ - static ecma_value_t c_function_name (ROUTINE_ARG_LIST_ ## args_number); -#define ACCESSOR_READ_WRITE(name, c_getter_func_name, c_setter_func_name, prop_attributes) \ - static ecma_value_t c_getter_func_name (ROUTINE_ARG_LIST_0); \ - static ecma_value_t c_setter_func_name (ROUTINE_ARG_LIST_1); -#define ACCESSOR_READ_ONLY(name, c_getter_func_name, prop_attributes) \ - static ecma_value_t c_getter_func_name (ROUTINE_ARG_LIST_0); -#include BUILTIN_INC_HEADER_NAME -#undef ROUTINE_ARG_LIST_NON_FIXED -#undef ROUTINE_ARG_LIST_3 -#undef ROUTINE_ARG_LIST_2 -#undef ROUTINE_ARG_LIST_1 -#undef ROUTINE_ARG_LIST_0 -#undef ROUTINE_ARG - -/** - * List of built-in routine identifiers. - */ -enum -{ - PASTE (ECMA_ROUTINE_START_, BUILTIN_UNDERSCORED_ID) = 0, -#define ROUTINE(name, c_function_name, args_number, length_prop_value) \ - ECMA_ROUTINE_ ## name ## c_function_name, -#define ROUTINE_CONFIGURABLE_ONLY(name, c_function_name, args_number, length_prop_value) \ - ECMA_ROUTINE_ ## name ## c_function_name, -#define ROUTINE_WITH_FLAGS(name, c_function_name, args_number, length_prop_value, flags) \ - ECMA_ROUTINE_ ## name ## c_function_name, -#define ACCESSOR_READ_WRITE(name, c_getter_func_name, c_setter_func_name, prop_attributes) \ - ECMA_ACCESSOR_ ## name ## c_getter_func_name, \ - ECMA_ACCESSOR_ ## name ## c_setter_func_name, -#define ACCESSOR_READ_ONLY(name, c_getter_func_name, prop_attributes) \ - ECMA_ACCESSOR_ ## name ## c_getter_func_name, -#include BUILTIN_INC_HEADER_NAME -}; - -#endif /* !BUILTIN_CUSTOM_DISPATCH */ - /** * Built-in property list of the built-in object. */ const ecma_builtin_property_descriptor_t PROPERTY_DESCRIPTOR_LIST_NAME[] = { -#ifndef BUILTIN_CUSTOM_DISPATCH -#define ROUTINE(name, c_function_name, args_number, length_prop_value) \ - { \ - name, \ - ECMA_BUILTIN_PROPERTY_ROUTINE, \ - ECMA_PROPERTY_BUILT_IN_CONFIGURABLE_WRITABLE, \ - ECMA_ROUTINE_VALUE (ECMA_ROUTINE_ ## name ## c_function_name, length_prop_value) \ - }, -#define ROUTINE_CONFIGURABLE_ONLY(name, c_function_name, args_number, length_prop_value) \ - { \ - name, \ - ECMA_BUILTIN_PROPERTY_ROUTINE, \ - ECMA_PROPERTY_BUILT_IN_CONFIGURABLE, \ - ECMA_ROUTINE_VALUE (ECMA_ROUTINE_ ## name ## c_function_name, length_prop_value) \ - }, -#define ROUTINE_WITH_FLAGS(name, c_function_name, args_number, length_prop_value, prop_attributes) \ - { \ - name, \ - ECMA_BUILTIN_PROPERTY_ROUTINE, \ - (prop_attributes) | ECMA_PROPERTY_FLAG_BUILT_IN, \ - ECMA_ROUTINE_VALUE (ECMA_ROUTINE_ ## name ## c_function_name, length_prop_value) \ - }, -#define ACCESSOR_READ_ONLY(name, c_getter_func_name, prop_attributes) \ - { \ - name, \ - ECMA_BUILTIN_PROPERTY_ACCESSOR_READ_ONLY, \ - (prop_attributes) | ECMA_PROPERTY_FLAG_BUILT_IN, \ - ECMA_ACCESSOR_ ## name ## c_getter_func_name \ - }, -#define ACCESSOR_READ_WRITE(name, c_getter_func_name, c_setter_func_name, prop_attributes) \ - { \ - name, \ - ECMA_BUILTIN_PROPERTY_ACCESSOR_READ_WRITE, \ - (prop_attributes) | ECMA_PROPERTY_FLAG_BUILT_IN, \ - ECMA_ACCESSOR_READ_WRITE (ECMA_ACCESSOR_ ## name ## c_getter_func_name, \ - ECMA_ACCESSOR_ ## name ## c_setter_func_name) \ - }, -#else /* BUILTIN_CUSTOM_DISPATCH */ #define ROUTINE(name, c_function_name, args_number, length_prop_value) \ { \ name, \ @@ -160,7 +72,6 @@ const ecma_builtin_property_descriptor_t PROPERTY_DESCRIPTOR_LIST_NAME[] = (prop_attributes) | ECMA_PROPERTY_FLAG_BUILT_IN, \ ECMA_ACCESSOR_READ_WRITE (c_getter_func_name, c_setter_func_name) \ }, -#endif /* !BUILTIN_CUSTOM_DISPATCH */ #define OBJECT_VALUE(name, obj_builtin_id, prop_attributes) \ { \ name, \ @@ -221,85 +132,7 @@ const ecma_builtin_property_descriptor_t PROPERTY_DESCRIPTOR_LIST_NAME[] = } }; -#ifndef BUILTIN_CUSTOM_DISPATCH - -/** - * Dispatcher of the built-in's routines - * - * @return ecma value - * Returned value must be freed with ecma_free_value. - */ -ecma_value_t -DISPATCH_ROUTINE_ROUTINE_NAME (uint8_t builtin_routine_id, /**< built-in wide routine - identifier */ - ecma_value_t this_arg_value, /**< 'this' argument - value */ - const ecma_value_t arguments_list[], /**< list of arguments - passed to routine */ - uint32_t arguments_number) /**< length of - * arguments' list */ -{ - /* the arguments may be unused for some built-ins */ - JERRY_UNUSED (this_arg_value); - JERRY_UNUSED (arguments_list); - JERRY_UNUSED (arguments_number); - - switch (builtin_routine_id) - { -#define ROUTINE_ARG(n) (arguments_list[n - 1]) -#define ROUTINE_ARG_LIST_0 -#define ROUTINE_ARG_LIST_1 , ROUTINE_ARG(1) -#define ROUTINE_ARG_LIST_2 ROUTINE_ARG_LIST_1, ROUTINE_ARG(2) -#define ROUTINE_ARG_LIST_3 ROUTINE_ARG_LIST_2, ROUTINE_ARG(3) -#define ROUTINE_ARG_LIST_NON_FIXED , arguments_list, arguments_number -#define ROUTINE(name, c_function_name, args_number, length_prop_value) \ - case ECMA_ROUTINE_ ## name ## c_function_name: \ - { \ - return c_function_name (this_arg_value ROUTINE_ARG_LIST_ ## args_number); \ - } -#define ROUTINE_CONFIGURABLE_ONLY(name, c_function_name, args_number, length_prop_value) \ - case ECMA_ROUTINE_ ## name ## c_function_name: \ - { \ - return c_function_name (this_arg_value ROUTINE_ARG_LIST_ ## args_number); \ - } -#define ROUTINE_WITH_FLAGS(name, c_function_name, args_number, length_prop_value, flags) \ - case ECMA_ROUTINE_ ## name ## c_function_name: \ - { \ - return c_function_name (this_arg_value ROUTINE_ARG_LIST_ ## args_number); \ - } -#define ACCESSOR_READ_WRITE(name, c_getter_func_name, c_setter_func_name, prop_attributes) \ - case ECMA_ACCESSOR_ ## name ## c_getter_func_name: \ - { \ - return c_getter_func_name(this_arg_value); \ - } \ - case ECMA_ACCESSOR_ ## name ## c_setter_func_name: \ - { \ - return c_setter_func_name(this_arg_value ROUTINE_ARG_LIST_1); \ - } -#define ACCESSOR_READ_ONLY(name, c_getter_func_name, prop_attributes) \ - case ECMA_ACCESSOR_ ## name ## c_getter_func_name: \ - { \ - return c_getter_func_name(this_arg_value); \ - } -#include BUILTIN_INC_HEADER_NAME -#undef ROUTINE_ARG -#undef ROUTINE_ARG_LIST_0 -#undef ROUTINE_ARG_LIST_1 -#undef ROUTINE_ARG_LIST_2 -#undef ROUTINE_ARG_LIST_3 -#undef ROUTINE_ARG_LIST_NON_FIXED - - default: - { - JERRY_UNREACHABLE (); - } - } -} /* DISPATCH_ROUTINE_ROUTINE_NAME */ - -#endif /* !BUILTIN_CUSTOM_DISPATCH */ - #undef BUILTIN_INC_HEADER_NAME -#undef BUILTIN_CUSTOM_DISPATCH #undef BUILTIN_UNDERSCORED_ID #undef DISPATCH_ROUTINE_ROUTINE_NAME #undef ECMA_BUILTIN_PROPERTY_NAME_INDEX diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-intrinsic.c b/jerry-core/ecma/builtin-objects/ecma-builtin-intrinsic.c index 1dc65d6384..eb280117ec 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-intrinsic.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-intrinsic.c @@ -29,11 +29,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-iterator-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-iterator-prototype.c index 19ead3193b..49714006e4 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-iterator-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-iterator-prototype.c @@ -22,11 +22,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-json.c b/jerry-core/ecma/builtin-objects/ecma-builtin-json.c index 8b4e3b072c..5a7542bba3 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-json.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-json.c @@ -35,11 +35,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-map-iterator-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-map-iterator-prototype.c index 15f61a7720..b4198560ce 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-map-iterator-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-map-iterator-prototype.c @@ -22,11 +22,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-map-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-map-prototype.c index 45d9329df4..ed1ae7ef2c 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-map-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-map-prototype.c @@ -20,10 +20,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH #define BUILTIN_INC_HEADER_NAME "ecma-builtin-map-prototype.inc.h" #define BUILTIN_UNDERSCORED_ID map_prototype #include "ecma-builtin-internal-routines-template.inc.h" diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-map.c b/jerry-core/ecma/builtin-objects/ecma-builtin-map.c index 215e2cc46b..bbfc173d42 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-map.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-map.c @@ -22,6 +22,15 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" +/** + * List of built-in routine identifiers. + */ +enum +{ + ECMA_BUILTIN_MAP_ROUTINE_START = 0, + ECMA_BUILTIN_MAP_SPECES_GET, +}; + #define BUILTIN_INC_HEADER_NAME "ecma-builtin-map.inc.h" #define BUILTIN_UNDERSCORED_ID map #include "ecma-builtin-internal-routines-template.inc.h" @@ -66,16 +75,33 @@ ecma_builtin_map_dispatch_construct (const ecma_value_t *arguments_list_p, /**< } /* ecma_builtin_map_dispatch_construct */ /** - * 23.1.2.2 get Map [ @@species ] accessor + * Dispatcher of the built-in's routines * - * @return ecma_value - * returned value must be freed with ecma_free_value + * @return ecma value + * Returned value must be freed with ecma_free_value. */ ecma_value_t -ecma_builtin_map_species_get (ecma_value_t this_value) /**< This Value */ +ecma_builtin_map_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ { - return ecma_copy_value (this_value); -} /* ecma_builtin_map_species_get */ + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + + switch (builtin_routine_id) + { + case ECMA_BUILTIN_MAP_SPECES_GET: + { + return ecma_copy_value (this_arg); + } + default: + { + JERRY_UNREACHABLE (); + } + } +} /* ecma_builtin_map_dispatch_routine */ /** * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-map.inc.h b/jerry-core/ecma/builtin-objects/ecma-builtin-map.inc.h index 5cf091d4fa..3e5cf698e7 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-map.inc.h +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-map.inc.h @@ -44,7 +44,7 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE, /* ECMA-262 v6, 23.1.2.2 */ ACCESSOR_READ_ONLY (LIT_GLOBAL_SYMBOL_SPECIES, - ecma_builtin_map_species_get, + ECMA_BUILTIN_MAP_SPECES_GET, ECMA_PROPERTY_FLAG_CONFIGURABLE) #endif /* JERRY_BUILTIN_CONTAINER */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-math.c b/jerry-core/ecma/builtin-objects/ecma-builtin-math.c index be8656c98f..de298349cb 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-math.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-math.c @@ -37,11 +37,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-number-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-number-prototype.c index c27aecb3a5..ac984a823b 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-number-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-number-prototype.c @@ -33,11 +33,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-number.c b/jerry-core/ecma/builtin-objects/ecma-builtin-number.c index c36fbd94c8..4f32f9114b 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-number.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-number.c @@ -33,10 +33,6 @@ #include "ecma-builtins-internal.h" #if JERRY_ESNEXT -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH /** * List of built-in routine identifiers. @@ -238,8 +234,30 @@ ecma_builtin_number_dispatch_routine (uint8_t builtin_routine_id, /**< built-in } } /* ecma_builtin_number_dispatch_routine */ -#endif /* JERRY_ESNEXT */ +#else /* !JERRY_ESNEXT */ + +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_number_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_number_dispatch_routine */ +#endif /* JERRY_ESNEXT */ /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.c index 664857fad4..87000443c7 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-object-prototype.c @@ -31,11 +31,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-object.c b/jerry-core/ecma/builtin-objects/ecma-builtin-object.c index 52275fe24c..be4e29a8f0 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-object.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-object.c @@ -36,11 +36,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-promise-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-promise-prototype.c index 7021b9bb31..c49c53199c 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-promise-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-promise-prototype.c @@ -21,11 +21,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c b/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c index 831aef3d13..332d94e5f6 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-promise.c @@ -31,11 +31,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-proxy.c b/jerry-core/ecma/builtin-objects/ecma-builtin-proxy.c index 5844a87211..d369037dca 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-proxy.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-proxy.c @@ -26,11 +26,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-rangeerror-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-rangeerror-prototype.c index 21565971d4..abddbf2dc5 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-rangeerror-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-rangeerror-prototype.c @@ -33,4 +33,26 @@ #define BUILTIN_UNDERSCORED_ID range_error_prototype #include "ecma-builtin-internal-routines-template.inc.h" +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_range_error_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide + * routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_range_error_prototype_dispatch_routine */ + #endif /* JERRY_BUILTIN_ERRORS */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-rangeerror.c b/jerry-core/ecma/builtin-objects/ecma-builtin-rangeerror.c index cadbfc3423..accc4cedbe 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-rangeerror.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-rangeerror.c @@ -91,6 +91,27 @@ ecma_builtin_range_error_dispatch_construct (const ecma_value_t *arguments_list_ #endif /* JERRY_ESNEXT */ } /* ecma_builtin_range_error_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_range_error_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_range_error_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-referenceerror-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-referenceerror-prototype.c index f1d4c593fe..4b347ee981 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-referenceerror-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-referenceerror-prototype.c @@ -33,4 +33,26 @@ #define BUILTIN_UNDERSCORED_ID reference_error_prototype #include "ecma-builtin-internal-routines-template.inc.h" +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_reference_error_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide + * routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_reference_error_prototype_dispatch_routine */ + #endif /* JERRY_BUILTIN_ERRORS */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-referenceerror.c b/jerry-core/ecma/builtin-objects/ecma-builtin-referenceerror.c index a3b6fbaa53..bc8c9e44b4 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-referenceerror.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-referenceerror.c @@ -91,6 +91,27 @@ ecma_builtin_reference_error_dispatch_construct (const ecma_value_t *arguments_l #endif /* JERRY_ESNEXT */ } /* ecma_builtin_reference_error_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_reference_error_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_reference_error_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-reflect.c b/jerry-core/ecma/builtin-objects/ecma-builtin-reflect.c index 5e7485bfe3..cc37f971c7 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-reflect.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-reflect.c @@ -30,11 +30,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.c index 41ad961d58..a37e1a4fe2 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-prototype.c @@ -34,11 +34,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ - #define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-string-iterator-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-string-iterator-prototype.c index 9d3ab15ff2..5302fe9f03 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-string-iterator-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-string-iterator-prototype.c @@ -25,6 +25,16 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" +/** + * List of built-in routine identifiers. + */ +enum +{ + ECMA_REGEXP_STRING_ITERATOR_PROTOTYPE_ROUTINE_START = 0, + ECMA_REGEXP_STRING_ITERATOR_PROTOTYPE_OBJECT_NEXT, + ECMA_ARRAYBUFFER_SPECIES_GET, +}; + #define BUILTIN_INC_HEADER_NAME "ecma-builtin-regexp-string-iterator-prototype.inc.h" #define BUILTIN_UNDERSCORED_ID regexp_string_iterator_prototype #include "ecma-builtin-internal-routines-template.inc.h" @@ -180,6 +190,39 @@ ecma_builtin_regexp_string_iterator_prototype_object_next (ecma_value_t this_val return result; } /* ecma_builtin_regexp_string_iterator_prototype_object_next */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_regexp_string_iterator_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide + *routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of + * arguments + * passed to + * routine */ + uint32_t arguments_number) /**< length of + * arguments' list */ +{ + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + + switch (builtin_routine_id) + { + case ECMA_REGEXP_STRING_ITERATOR_PROTOTYPE_OBJECT_NEXT: + { + return ecma_builtin_regexp_string_iterator_prototype_object_next (this_arg); + } + default: + { + JERRY_UNREACHABLE (); + } + } +} /* ecma_builtin_regexp_string_iterator_prototype_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-string-iterator-prototype.inc.h b/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-string-iterator-prototype.inc.h index d2eebddb7b..83631d82ed 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-string-iterator-prototype.inc.h +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-regexp-string-iterator-prototype.inc.h @@ -27,7 +27,7 @@ STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG, /* Routine properties: * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */ -ROUTINE (LIT_MAGIC_STRING_NEXT, ecma_builtin_regexp_string_iterator_prototype_object_next, 0, 0) +ROUTINE (LIT_MAGIC_STRING_NEXT, ECMA_REGEXP_STRING_ITERATOR_PROTOTYPE_OBJECT_NEXT, 0, 0) #endif /* JERRY_ESNEXT */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.c b/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.c index e2274301d3..75d84241e7 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.c @@ -28,6 +28,15 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" +/** + * List of built-in routine identifiers. + */ +enum +{ + ECMA_BUILTIN_REGEXP_ROUTINE_START = 0, + ECMA_BUILTIN_REGEXP_SPECES_GET, +}; + #define BUILTIN_INC_HEADER_NAME "ecma-builtin-regexp.inc.h" #define BUILTIN_UNDERSCORED_ID regexp #include "ecma-builtin-internal-routines-template.inc.h" @@ -217,19 +226,34 @@ ecma_builtin_regexp_dispatch_construct (const ecma_value_t *arguments_list_p, /* arguments_list_len); } /* ecma_builtin_regexp_dispatch_construct */ -#if JERRY_ESNEXT /** - * 21.2.4.2 get RegExp [ @@species ] accessor + * Dispatcher of the built-in's routines * - * @return ecma_value - * returned value must be freed with ecma_free_value + * @return ecma value + * Returned value must be freed with ecma_free_value. */ ecma_value_t -ecma_builtin_regexp_species_get (ecma_value_t this_value) /**< This Value */ +ecma_builtin_regexp_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ { - return ecma_copy_value (this_value); -} /* ecma_builtin_regexp_species_get */ -#endif /* JERRY_ESNEXT */ + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + + switch (builtin_routine_id) + { + case ECMA_BUILTIN_REGEXP_SPECES_GET: + { + return ecma_copy_value (this_arg); + } + default: + { + JERRY_UNREACHABLE (); + } + } +} /* ecma_builtin_regexp_dispatch_routine */ /** * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.inc.h b/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.inc.h index f64cea941e..0c6d277ce4 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.inc.h +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-regexp.inc.h @@ -37,7 +37,7 @@ STRING_VALUE (LIT_MAGIC_STRING_NAME, /* ECMA-262 v6, 21.2.4.2 */ ACCESSOR_READ_ONLY (LIT_GLOBAL_SYMBOL_SPECIES, - ecma_builtin_regexp_species_get, + ECMA_BUILTIN_REGEXP_SPECES_GET, ECMA_PROPERTY_FLAG_CONFIGURABLE) #endif /* JERRY_ESNEXT */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-set-iterator-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-set-iterator-prototype.c index 38bf75b2e9..a9aff3d9f5 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-set-iterator-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-set-iterator-prototype.c @@ -22,11 +22,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-set-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-set-prototype.c index 3f596bda31..d9e9804261 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-set-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-set-prototype.c @@ -20,10 +20,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH #define BUILTIN_INC_HEADER_NAME "ecma-builtin-set-prototype.inc.h" #define BUILTIN_UNDERSCORED_ID set_prototype #include "ecma-builtin-internal-routines-template.inc.h" diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-set.c b/jerry-core/ecma/builtin-objects/ecma-builtin-set.c index 5bc8fcc0e7..0abb40382c 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-set.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-set.c @@ -22,6 +22,15 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" +/** + * List of built-in routine identifiers. + */ +enum +{ + ECMA_BUILTIN_SET_ROUTINE_START = 0, + ECMA_BUILTIN_SET_SPECIES_GET, +}; + #define BUILTIN_INC_HEADER_NAME "ecma-builtin-set.inc.h" #define BUILTIN_UNDERSCORED_ID set #include "ecma-builtin-internal-routines-template.inc.h" @@ -66,16 +75,33 @@ ecma_builtin_set_dispatch_construct (const ecma_value_t *arguments_list_p, /**< } /* ecma_builtin_set_dispatch_construct */ /** - * 23.2.2.2 get Set [ @@species ] accessor + * Dispatcher of the built-in's routines * - * @return ecma_value - * returned value must be freed with ecma_free_value + * @return ecma value + * Returned value must be freed with ecma_free_value. */ ecma_value_t -ecma_builtin_set_species_get (ecma_value_t this_value) /**< This Value */ +ecma_builtin_set_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ { - return ecma_copy_value (this_value); -} /* ecma_builtin_set_species_get */ + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + + switch (builtin_routine_id) + { + case ECMA_BUILTIN_SET_SPECIES_GET: + { + return ecma_copy_value (this_arg); + } + default: + { + JERRY_UNREACHABLE (); + } + } +} /* ecma_builtin_set_dispatch_routine */ /** * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-set.inc.h b/jerry-core/ecma/builtin-objects/ecma-builtin-set.inc.h index 0d2a7d718c..b247657ff8 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-set.inc.h +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-set.inc.h @@ -44,7 +44,7 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE, /* ECMA-262 v6, 23.2.2.2 */ ACCESSOR_READ_ONLY (LIT_GLOBAL_SYMBOL_SPECIES, - ecma_builtin_set_species_get, + ECMA_BUILTIN_SET_SPECIES_GET, ECMA_PROPERTY_FLAG_CONFIGURABLE) #endif /* JERRY_BUILTIN_CONTAINER */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-shared-arraybuffer-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-shared-arraybuffer-prototype.c index aea79461b1..0ee0071dbb 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-shared-arraybuffer-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-shared-arraybuffer-prototype.c @@ -32,6 +32,16 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" +/** + * List of built-in routine identifiers. + */ +enum +{ + ECMA_BUILTIN_SHARED_ARRYBUFFER_PROTOTYPE_ROUTINE_START = 0, + ECMA_BUILTIN_SHARED_ARRYBUFFER_PROTOTYPE_BYTELENGTH_GETTER, + ECMA_BUILTIN_SHARED_ARRYBUFFER_PROTOTYPE_OBJECT_SLICE, +}; + #define BUILTIN_INC_HEADER_NAME "ecma-builtin-shared-arraybuffer-prototype.inc.h" #define BUILTIN_UNDERSCORED_ID shared_arraybuffer_prototype #include "ecma-builtin-internal-routines-template.inc.h" @@ -103,6 +113,42 @@ ecma_builtin_shared_arraybuffer_prototype_object_slice (ecma_value_t this_arg, / return ecma_builtin_arraybuffer_slice (this_arg, argument_list_p, arguments_number); } /* ecma_builtin_shared_arraybuffer_prototype_object_slice */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_shared_arraybuffer_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide + *routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of + * arguments + * passed to + * routine */ + uint32_t arguments_number) /**< length of + * arguments' list */ +{ + JERRY_UNUSED (arguments_number); + + switch (builtin_routine_id) + { + case ECMA_BUILTIN_SHARED_ARRYBUFFER_PROTOTYPE_BYTELENGTH_GETTER: + { + return ecma_builtin_shared_arraybuffer_prototype_bytelength_getter (this_arg); + } + case ECMA_BUILTIN_SHARED_ARRYBUFFER_PROTOTYPE_OBJECT_SLICE: + { + return ecma_builtin_shared_arraybuffer_prototype_object_slice (this_arg, arguments_list_p, arguments_number); + } + default: + { + JERRY_UNREACHABLE (); + } + } +} /* ecma_builtin_shared_arraybuffer_prototype_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-shared-arraybuffer-prototype.inc.h b/jerry-core/ecma/builtin-objects/ecma-builtin-shared-arraybuffer-prototype.inc.h index 4008dee7be..493e50be63 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-shared-arraybuffer-prototype.inc.h +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-shared-arraybuffer-prototype.inc.h @@ -30,7 +30,7 @@ OBJECT_VALUE (LIT_MAGIC_STRING_CONSTRUCTOR, /* Readonly accessor properties */ ACCESSOR_READ_ONLY (LIT_MAGIC_STRING_BYTE_LENGTH_UL, - ecma_builtin_shared_arraybuffer_prototype_bytelength_getter, + ECMA_BUILTIN_SHARED_ARRYBUFFER_PROTOTYPE_BYTELENGTH_GETTER, ECMA_PROPERTY_FLAG_CONFIGURABLE) /* ECMA-262 v11, 24.2.4.4 */ @@ -40,7 +40,7 @@ STRING_VALUE (LIT_GLOBAL_SYMBOL_TO_STRING_TAG, /* 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_shared_arraybuffer_prototype_object_slice, NON_FIXED, 2) +ROUTINE (LIT_MAGIC_STRING_SLICE, ECMA_BUILTIN_SHARED_ARRYBUFFER_PROTOTYPE_OBJECT_SLICE, NON_FIXED, 2) #endif /* JERRY_BUILTIN_SHAREDARRAYBUFFER */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-shared-arraybuffer.c b/jerry-core/ecma/builtin-objects/ecma-builtin-shared-arraybuffer.c index e5b7ba0079..b61c88070d 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-shared-arraybuffer.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-shared-arraybuffer.c @@ -28,6 +28,15 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" +/** + * List of built-in routine identifiers. + */ +enum +{ + ECMA_BUILTIN_SHARED_ARRYBUFFER_ROUTINE_START = 0, + ECMA_BUILTIN_SHARED_ARRYBUFFER_SPECIES_GET, +}; + #define BUILTIN_INC_HEADER_NAME "ecma-builtin-shared-arraybuffer.inc.h" #define BUILTIN_UNDERSCORED_ID shared_arraybuffer #include "ecma-builtin-internal-routines-template.inc.h" @@ -75,16 +84,33 @@ ecma_builtin_shared_arraybuffer_dispatch_construct (const ecma_value_t *argument } /* ecma_builtin_shared_arraybuffer_dispatch_construct */ /** - * 24.2.3.2 get SharedArrayBuffer [ @@species ] accessor + * Dispatcher of the built-in's routines * - * @return ecma_value - * returned value must be freed with ecma_free_value + * @return ecma value + * Returned value must be freed with ecma_free_value. */ ecma_value_t -ecma_builtin_shared_arraybuffer_species_get (ecma_value_t this_value) /**< This Value */ +ecma_builtin_shared_arraybuffer_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ { - return ecma_copy_value (this_value); -} /* ecma_builtin_shared_arraybuffer_species_get */ + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + + switch (builtin_routine_id) + { + case ECMA_BUILTIN_SHARED_ARRYBUFFER_SPECIES_GET: + { + return ecma_copy_value (this_arg); + } + default: + { + JERRY_UNREACHABLE (); + } + } +} /* ecma_builtin_shared_arraybuffer_dispatch_routine */ /** * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-shared-arraybuffer.inc.h b/jerry-core/ecma/builtin-objects/ecma-builtin-shared-arraybuffer.inc.h index 35eafcf2ca..64869cf78f 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-shared-arraybuffer.inc.h +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-shared-arraybuffer.inc.h @@ -44,7 +44,7 @@ STRING_VALUE (LIT_MAGIC_STRING_NAME, /* ES11 24.1.3.3 */ ACCESSOR_READ_ONLY (LIT_GLOBAL_SYMBOL_SPECIES, - ecma_builtin_shared_arraybuffer_species_get, + ECMA_BUILTIN_SHARED_ARRYBUFFER_SPECIES_GET, ECMA_PROPERTY_FLAG_CONFIGURABLE) #endif /* JERRY_BUILTIN_SHAREDARRAYBUFFER */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-string-iterator-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-string-iterator-prototype.c index 639fecae3b..7d6f650efd 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-string-iterator-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-string-iterator-prototype.c @@ -22,11 +22,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c index 377bc0fe0e..2b1fa4854a 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-string-prototype.c @@ -42,11 +42,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-string.c b/jerry-core/ecma/builtin-objects/ecma-builtin-string.c index db4ca8a60b..afabb83f1a 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-string.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-string.c @@ -33,11 +33,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-symbol-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-symbol-prototype.c index 9bd30dce58..a389b4b173 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-symbol-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-symbol-prototype.c @@ -29,11 +29,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-symbol.c b/jerry-core/ecma/builtin-objects/ecma-builtin-symbol.c index 5cec6a0533..ce294681a8 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-symbol.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-symbol.c @@ -31,6 +31,16 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" +/** + * List of built-in routine identifiers. + */ +enum +{ + ECMA_BUILTIN_SYMBOL_ROUTINE_START = 0, + ECMA_BUILTIN_SYMBOL_FOR, + ECMA_BUILTIN_SYMBOL_KEY_FOR, +}; + #define BUILTIN_INC_HEADER_NAME "ecma-builtin-symbol.inc.h" #define BUILTIN_UNDERSCORED_ID symbol #include "ecma-builtin-internal-routines-template.inc.h" @@ -249,6 +259,39 @@ ecma_builtin_symbol_key_for (ecma_value_t this_arg, /**< this argument */ return ecma_builtin_symbol_for_helper (symbol); } /* ecma_builtin_symbol_key_for */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_symbol_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + + switch (builtin_routine_id) + { + case ECMA_BUILTIN_SYMBOL_KEY_FOR: + { + return ecma_builtin_symbol_key_for (this_arg, arguments_list_p[0]); + } + case ECMA_BUILTIN_SYMBOL_FOR: + { + return ecma_builtin_symbol_for (this_arg, arguments_list_p[0]); + } + default: + { + JERRY_UNREACHABLE (); + } + } +} /* ecma_builtin_symbol_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-symbol.inc.h b/jerry-core/ecma/builtin-objects/ecma-builtin-symbol.inc.h index a2037c82a4..f0b3172eb4 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-symbol.inc.h +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-symbol.inc.h @@ -95,8 +95,8 @@ SYMBOL_VALUE (LIT_MAGIC_STRING_MATCH_ALL, /* Routine properties: * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */ -ROUTINE (LIT_MAGIC_STRING_FOR, ecma_builtin_symbol_for, 1, 1) -ROUTINE (LIT_MAGIC_STRING_KEY_FOR, ecma_builtin_symbol_key_for, 1, 1) +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 /* JERRY_ESNEXT */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-syntaxerror-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-syntaxerror-prototype.c index 915c586f4a..e987ae7007 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-syntaxerror-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-syntaxerror-prototype.c @@ -33,4 +33,26 @@ #define BUILTIN_UNDERSCORED_ID syntax_error_prototype #include "ecma-builtin-internal-routines-template.inc.h" +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_syntax_error_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide + * routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_syntax_error_prototype_dispatch_routine */ + #endif /* JERRY_BUILTIN_ERRORS */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-syntaxerror.c b/jerry-core/ecma/builtin-objects/ecma-builtin-syntaxerror.c index 29d2ce6c95..5bcc3a88d8 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-syntaxerror.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-syntaxerror.c @@ -91,6 +91,27 @@ ecma_builtin_syntax_error_dispatch_construct (const ecma_value_t *arguments_list #endif /* JERRY_ESNEXT */ } /* ecma_builtin_syntax_error_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_syntax_error_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_syntax_error_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-type-error-thrower.c b/jerry-core/ecma/builtin-objects/ecma-builtin-type-error-thrower.c index 98a68f034b..d2ed7297f8 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-type-error-thrower.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-type-error-thrower.c @@ -75,6 +75,27 @@ ecma_builtin_type_error_thrower_dispatch_construct (const ecma_value_t *argument return ecma_builtin_type_error_thrower_dispatch_call (arguments_list_p, arguments_list_len); } /* ecma_builtin_type_error_thrower_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_type_error_thrower_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_type_error_thrower_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-typeerror-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-typeerror-prototype.c index 45ad82101c..5db23672b2 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-typeerror-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-typeerror-prototype.c @@ -33,4 +33,25 @@ #define BUILTIN_UNDERSCORED_ID type_error_prototype #include "ecma-builtin-internal-routines-template.inc.h" +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_type_error_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_type_error_prototype_dispatch_routine */ + #endif /* JERRY_BUILTIN_ERRORS */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-typeerror.c b/jerry-core/ecma/builtin-objects/ecma-builtin-typeerror.c index 608f241fe3..e4d97ccc88 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-typeerror.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-typeerror.c @@ -91,6 +91,27 @@ ecma_builtin_type_error_dispatch_construct (const ecma_value_t *arguments_list_p #endif /* JERRY_ESNEXT */ } /* ecma_builtin_type_error_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_type_error_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_type_error_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-urierror-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-urierror-prototype.c index 068ec26a07..26c74da668 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-urierror-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-urierror-prototype.c @@ -33,4 +33,25 @@ #define BUILTIN_UNDERSCORED_ID uri_error_prototype #include "ecma-builtin-internal-routines-template.inc.h" +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_uri_error_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_uri_error_prototype_dispatch_routine */ + #endif /* JERRY_BUILTIN_ERRORS */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-urierror.c b/jerry-core/ecma/builtin-objects/ecma-builtin-urierror.c index fed1838e4f..1a1db3a86e 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-urierror.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-urierror.c @@ -91,6 +91,27 @@ ecma_builtin_uri_error_dispatch_construct (const ecma_value_t *arguments_list_p, #endif /* JERRY_ESNEXT */ } /* ecma_builtin_uri_error_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_uri_error_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_uri_error_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-weakmap-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-weakmap-prototype.c index d522e9daf2..e08d59270b 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-weakmap-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-weakmap-prototype.c @@ -20,10 +20,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH #define BUILTIN_INC_HEADER_NAME "ecma-builtin-weakmap-prototype.inc.h" #define BUILTIN_UNDERSCORED_ID weakmap_prototype #include "ecma-builtin-internal-routines-template.inc.h" diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-weakmap.c b/jerry-core/ecma/builtin-objects/ecma-builtin-weakmap.c index 7496e3350f..6b083cff6a 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-weakmap.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-weakmap.c @@ -65,6 +65,27 @@ ecma_builtin_weakmap_dispatch_construct (const ecma_value_t *arguments_list_p, / ECMA_BUILTIN_ID_WEAKMAP_PROTOTYPE); } /* ecma_builtin_weakmap_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_weakmap_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_weakmap_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-weakref-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-weakref-prototype.c index b5a93fea30..b779cec085 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-weakref-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-weakref-prototype.c @@ -21,11 +21,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ @@ -35,9 +30,6 @@ enum ECMA_BUILTIN_WEAKREF_PROTOTYPE_OBJECT_DEREF }; -/** - * This object has a custom dispatch function. - */ #define BUILTIN_INC_HEADER_NAME "ecma-builtin-weakref-prototype.inc.h" #define BUILTIN_UNDERSCORED_ID weakref_prototype #include "ecma-builtin-internal-routines-template.inc.h" diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-weakref.c b/jerry-core/ecma/builtin-objects/ecma-builtin-weakref.c index 381888f470..4c9e564bd5 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-weakref.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-weakref.c @@ -88,6 +88,27 @@ ecma_builtin_weakref_dispatch_construct (const ecma_value_t *arguments_list_p, / return ecma_make_object_value (object_p); } /* ecma_builtin_weakref_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_weakref_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_weakref_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-weakset-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-weakset-prototype.c index c1232d421b..051d9b9055 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-weakset-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-weakset-prototype.c @@ -20,10 +20,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH #define BUILTIN_INC_HEADER_NAME "ecma-builtin-weakset-prototype.inc.h" #define BUILTIN_UNDERSCORED_ID weakset_prototype #include "ecma-builtin-internal-routines-template.inc.h" diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-weakset.c b/jerry-core/ecma/builtin-objects/ecma-builtin-weakset.c index d96790dd36..aea8008605 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-weakset.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-weakset.c @@ -65,6 +65,26 @@ ecma_builtin_weakset_dispatch_construct (const ecma_value_t *arguments_list_p, / ECMA_BUILTIN_ID_WEAKSET_PROTOTYPE); } /* ecma_builtin_weakset_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_weakset_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_weakset_dispatch_routine */ /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-bigint64array-prototype.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-bigint64array-prototype.c index 373b058035..11a6dd401b 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-bigint64array-prototype.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-bigint64array-prototype.c @@ -35,6 +35,29 @@ * @{ */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_bigint64array_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide + * routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed + * to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_bigint64array_prototype_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-bigint64array.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-bigint64array.c index da4f3c8d58..478b0ae20d 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-bigint64array.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-bigint64array.c @@ -70,6 +70,27 @@ ecma_builtin_bigint64array_dispatch_construct (const ecma_value_t *arguments_lis ECMA_BIGINT64_ARRAY); } /* ecma_builtin_bigint64array_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_bigint64array_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_bigint64array_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-biguint64array-prototype.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-biguint64array-prototype.c index 3cc4006d91..c070aa11ed 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-biguint64array-prototype.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-biguint64array-prototype.c @@ -35,6 +35,29 @@ * @{ */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_biguint64array_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide + * routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed + * to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_biguint64array_prototype_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-biguint64array.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-biguint64array.c index 6037d081e7..24ab537cd1 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-biguint64array.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-biguint64array.c @@ -70,6 +70,27 @@ ecma_builtin_biguint64array_dispatch_construct (const ecma_value_t *arguments_li ECMA_BIGUINT64_ARRAY); } /* ecma_builtin_biguint64array_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_biguint64array_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_biguint64array_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float32array-prototype.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float32array-prototype.c index 3179f97c37..ef3305ca50 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float32array-prototype.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float32array-prototype.c @@ -34,6 +34,29 @@ * @{ */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_float32array_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide + * routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed + * to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_float32array_prototype_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float32array.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float32array.c index 1998e18940..0bb1e94938 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float32array.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float32array.c @@ -69,6 +69,27 @@ ecma_builtin_float32array_dispatch_construct (const ecma_value_t *arguments_list ECMA_FLOAT32_ARRAY); } /* ecma_builtin_float32array_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_float32array_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_float32array_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float64array-prototype.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float64array-prototype.c index 4f6f8a2d6e..a0afe83746 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float64array-prototype.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float64array-prototype.c @@ -35,6 +35,29 @@ * @{ */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_float64array_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide + * routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed + * to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_float64array_prototype_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float64array.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float64array.c index ed857e0a2b..420b3e44ad 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float64array.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-float64array.c @@ -70,6 +70,27 @@ ecma_builtin_float64array_dispatch_construct (const ecma_value_t *arguments_list ECMA_FLOAT64_ARRAY); } /* ecma_builtin_float64array_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_float64array_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_float64array_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int16array-prototype.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int16array-prototype.c index 0d4e1675fc..fde7cbca9b 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int16array-prototype.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int16array-prototype.c @@ -34,6 +34,29 @@ * @{ */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_int16array_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide + * routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed + * to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_int16array_prototype_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int16array.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int16array.c index 99fd2a8c5c..2ada44abbb 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int16array.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int16array.c @@ -69,6 +69,27 @@ ecma_builtin_int16array_dispatch_construct (const ecma_value_t *arguments_list_p ECMA_INT16_ARRAY); } /* ecma_builtin_int16array_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_int16array_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_int16array_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int32array-prototype.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int32array-prototype.c index 0253bc0ae3..ccc5e646b6 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int32array-prototype.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int32array-prototype.c @@ -34,6 +34,29 @@ * @{ */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_int32array_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide + * routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed + * to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_int32array_prototype_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int32array.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int32array.c index 06170fbe72..dd2b3082d9 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int32array.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int32array.c @@ -69,6 +69,27 @@ ecma_builtin_int32array_dispatch_construct (const ecma_value_t *arguments_list_p ECMA_INT32_ARRAY); } /* ecma_builtin_int32array_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_int32array_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_int32array_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int8array-prototype.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int8array-prototype.c index a7b0b15657..35cdfec8ed 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int8array-prototype.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int8array-prototype.c @@ -34,6 +34,29 @@ * @{ */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_int8array_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide + * routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed + * to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_int8array_prototype_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int8array.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int8array.c index 03522f0b7b..498c0b6714 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int8array.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-int8array.c @@ -69,6 +69,27 @@ ecma_builtin_int8array_dispatch_construct (const ecma_value_t *arguments_list_p, ECMA_INT8_ARRAY); } /* ecma_builtin_int8array_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_int8array_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_int8array_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c index 8b017ffc11..2af2c72671 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-prototype.c @@ -42,11 +42,6 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" -/** - * This object has a custom dispatch function. - */ -#define BUILTIN_CUSTOM_DISPATCH - /** * List of built-in routine identifiers. */ diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray.c index c961618e93..6ea8bb0965 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray.c @@ -28,6 +28,17 @@ #define ECMA_BUILTINS_INTERNAL #include "ecma-builtins-internal.h" +/** + * List of built-in routine identifiers. + */ +enum +{ + ECMA_BUILTIN_TYPEDARRAY_ROUTINE_START = 0, + ECMA_BUILTIN_TYPEDARRAY_OF, + ECMA_BUILTIN_TYPEDARRAY_FROM, + ECMA_BUILTIN_TYPEDARRAY_SPECIES_GET, +}; + #define BUILTIN_INC_HEADER_NAME "ecma-builtin-typedarray.inc.h" #define BUILTIN_UNDERSCORED_ID typedarray #include "ecma-builtin-internal-routines-template.inc.h" @@ -184,16 +195,39 @@ ecma_builtin_typedarray_dispatch_construct (const ecma_value_t *arguments_list_p } /* ecma_builtin_typedarray_dispatch_construct */ /** - * 22.2.2.4 get %TypedArray% [ @@species ] accessor + * Dispatcher of the built-in's routines * - * @return ecma_value - * returned value must be freed with ecma_free_value + * @return ecma value + * Returned value must be freed with ecma_free_value. */ ecma_value_t -ecma_builtin_typedarray_species_get (ecma_value_t this_value) /**< This Value */ +ecma_builtin_typedarray_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ { - return ecma_copy_value (this_value); -} /* ecma_builtin_typedarray_species_get */ + + switch (builtin_routine_id) + { + case ECMA_BUILTIN_TYPEDARRAY_FROM: + { + return ecma_builtin_typedarray_from (this_arg, arguments_list_p, arguments_number); + } + case ECMA_BUILTIN_TYPEDARRAY_OF: + { + return ecma_builtin_typedarray_of (this_arg, arguments_list_p, arguments_number); + } + case ECMA_BUILTIN_TYPEDARRAY_SPECIES_GET: + { + return ecma_copy_value (this_arg); + } + default: + { + JERRY_UNREACHABLE (); + } + } +} /* ecma_builtin_typedarray_dispatch_routine */ /** * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray.inc.h b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray.inc.h index d362f817d7..069a2ab9d4 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray.inc.h +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray.inc.h @@ -41,14 +41,14 @@ OBJECT_VALUE (LIT_MAGIC_STRING_PROTOTYPE, * (property name, C routine name, arguments number or NON_FIXED, value of the routine's length property) */ /* ES2015 22.2.2.1 */ -ROUTINE (LIT_MAGIC_STRING_FROM, ecma_builtin_typedarray_from, NON_FIXED, 1) +ROUTINE (LIT_MAGIC_STRING_FROM, ECMA_BUILTIN_TYPEDARRAY_FROM, NON_FIXED, 1) /* ES2015 22.2.2.2 */ -ROUTINE (LIT_MAGIC_STRING_OF, ecma_builtin_typedarray_of, NON_FIXED, 0) +ROUTINE (LIT_MAGIC_STRING_OF, ECMA_BUILTIN_TYPEDARRAY_OF, NON_FIXED, 0) /* ES2015 22.2.2.4 */ ACCESSOR_READ_ONLY (LIT_GLOBAL_SYMBOL_SPECIES, - ecma_builtin_typedarray_species_get, + ECMA_BUILTIN_TYPEDARRAY_SPECIES_GET, ECMA_PROPERTY_FLAG_CONFIGURABLE) #endif /* JERRY_BUILTIN_TYPEDARRAY */ diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint16array-prototype.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint16array-prototype.c index 5e980625ac..f9d74de7f1 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint16array-prototype.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint16array-prototype.c @@ -34,6 +34,29 @@ * @{ */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_uint16array_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide + * routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed + * to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_uint16array_prototype_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint16array.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint16array.c index 5b3d33adb5..a40c6d470e 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint16array.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint16array.c @@ -69,6 +69,27 @@ ecma_builtin_uint16array_dispatch_construct (const ecma_value_t *arguments_list_ ECMA_UINT16_ARRAY); } /* ecma_builtin_uint16array_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_uint16array_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_uint16array_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint32array-prototype.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint32array-prototype.c index ff721dcd96..cb31e18093 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint32array-prototype.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint32array-prototype.c @@ -34,6 +34,29 @@ * @{ */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_uint32array_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide + * routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed + * to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_uint32array_prototype_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint32array.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint32array.c index 17b6d390c6..716b535dd2 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint32array.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint32array.c @@ -71,6 +71,27 @@ ecma_builtin_uint32array_dispatch_construct (const ecma_value_t *arguments_list_ ECMA_UINT32_ARRAY); } /* ecma_builtin_uint32array_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_uint32array_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_uint32array_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8array-prototype.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8array-prototype.c index 67347067ea..7940057ec0 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8array-prototype.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8array-prototype.c @@ -34,6 +34,29 @@ * @{ */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_uint8array_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide + * routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed + * to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_uint8array_prototype_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8array.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8array.c index c451327c4d..e3ebc61e14 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8array.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8array.c @@ -69,6 +69,27 @@ ecma_builtin_uint8array_dispatch_construct (const ecma_value_t *arguments_list_p ECMA_UINT8_ARRAY); } /* ecma_builtin_uint8array_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_uint8array_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_uint8array_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8clampedarray-prototype.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8clampedarray-prototype.c index b7526a92dd..26b302df64 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8clampedarray-prototype.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8clampedarray-prototype.c @@ -34,6 +34,29 @@ * @{ */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_uint8clampedarray_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide + * routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed + * to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_uint8clampedarray_prototype_dispatch_routine */ + /** * @} * @} diff --git a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8clampedarray.c b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8clampedarray.c index 0d6fe21200..ac6ad5123f 100644 --- a/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8clampedarray.c +++ b/jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-uint8clampedarray.c @@ -71,6 +71,27 @@ ecma_builtin_uint8clampedarray_dispatch_construct (const ecma_value_t *arguments ECMA_UINT8_CLAMPED_ARRAY); } /* ecma_builtin_uint8clampedarray_dispatch_construct */ +/** + * Dispatcher of the built-in's routines + * + * @return ecma value + * Returned value must be freed with ecma_free_value. + */ +ecma_value_t +ecma_builtin_uint8clampedarray_dispatch_routine (uint8_t builtin_routine_id, /**< built-in wide routine identifier */ + ecma_value_t this_arg, /**< 'this' argument value */ + const ecma_value_t arguments_list_p[], /**< list of arguments + * passed to routine */ + uint32_t arguments_number) /**< length of arguments' list */ +{ + JERRY_UNUSED (this_arg); + JERRY_UNUSED (arguments_number); + JERRY_UNUSED (arguments_list_p); + JERRY_UNUSED (builtin_routine_id); + + JERRY_UNREACHABLE (); +} /* ecma_builtin_uint8clampedarray_dispatch_routine */ + /** * @} * @}