1 /* Copyright JS Foundation and other contributors, http://js.foundation
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 #include "ecma-alloc.h"
17 #include "ecma-builtins.h"
18 #include "ecma-conversion.h"
19 #include "ecma-exceptions.h"
20 #include "ecma-gc.h"
21 #include "ecma-globals.h"
22 #include "ecma-helpers.h"
23 #include "ecma-builtin-helpers.h"
24 #include "ecma-objects.h"
25 #include "ecma-try-catch-macro.h"
26 #include "jrt.h"
27
28 #if ENABLED (JERRY_BUILTIN_ERRORS)
29
30 #define ECMA_BUILTINS_INTERNAL
31 #include "ecma-builtins-internal.h"
32
33 #define BUILTIN_INC_HEADER_NAME "ecma-builtin-rangeerror.inc.h"
34 #define BUILTIN_UNDERSCORED_ID range_error
35 #include "ecma-builtin-internal-routines-template.inc.h"
36
37 /** \addtogroup ecma ECMA
38 * @{
39 *
40 * \addtogroup ecmabuiltins
41 * @{
42 *
43 * \addtogroup rangeerror ECMA RangeError object built-in
44 * @{
45 */
46
47 /**
48 * Handle calling [[Call]] of built-in RangeError object
49 *
50 * @return ecma value
51 */
52 ecma_value_t
ecma_builtin_range_error_dispatch_call(const ecma_value_t * arguments_list_p,ecma_length_t arguments_list_len)53 ecma_builtin_range_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
54 ecma_length_t arguments_list_len) /**< number of arguments */
55 {
56 return ecma_builtin_helper_error_dispatch_call (ECMA_ERROR_RANGE, arguments_list_p, arguments_list_len);
57 } /* ecma_builtin_range_error_dispatch_call */
58
59 /**
60 * Handle calling [[Construct]] of built-in RangeError object
61 *
62 * @return ecma value
63 */
64 ecma_value_t
ecma_builtin_range_error_dispatch_construct(const ecma_value_t * arguments_list_p,ecma_length_t arguments_list_len)65 ecma_builtin_range_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
66 ecma_length_t arguments_list_len) /**< number of arguments */
67 {
68 return ecma_builtin_range_error_dispatch_call (arguments_list_p, arguments_list_len);
69 } /* ecma_builtin_range_error_dispatch_construct */
70
71 /**
72 * @}
73 * @}
74 * @}
75 */
76
77 #endif /* ENABLED (JERRY_BUILTIN_ERRORS) */
78