Line data Source code
1 : // Copyright 2016 the V8 project authors. All rights reserved.
2 : // Use of this source code is governed by a BSD-style license that can be
3 : // found in the LICENSE file.
4 :
5 : #include "src/builtins/builtins-utils.h"
6 : #include "src/builtins/builtins.h"
7 : #include "src/counters.h"
8 : #include "src/interface-descriptors.h"
9 : #include "src/objects-inl.h"
10 :
11 : namespace v8 {
12 : namespace internal {
13 :
14 0 : BUILTIN(Illegal) {
15 0 : UNREACHABLE();
16 : return isolate->heap()->undefined_value(); // Make compiler happy.
17 : }
18 :
19 633 : BUILTIN(EmptyFunction) { return isolate->heap()->undefined_value(); }
20 :
21 180 : BUILTIN(UnsupportedThrower) {
22 : HandleScope scope(isolate);
23 180 : THROW_NEW_ERROR_RETURN_FAILURE(isolate,
24 : NewError(MessageTemplate::kUnsupported));
25 : }
26 :
27 : // -----------------------------------------------------------------------------
28 : // Throwers for restricted function properties and strict arguments object
29 : // properties
30 :
31 41937 : BUILTIN(RestrictedFunctionPropertiesThrower) {
32 : HandleScope scope(isolate);
33 41937 : THROW_NEW_ERROR_RETURN_FAILURE(
34 : isolate, NewTypeError(MessageTemplate::kRestrictedFunctionProperties));
35 : }
36 :
37 573 : BUILTIN(RestrictedStrictArgumentsPropertiesThrower) {
38 : HandleScope scope(isolate);
39 573 : THROW_NEW_ERROR_RETURN_FAILURE(
40 : isolate, NewTypeError(MessageTemplate::kStrictPoisonPill));
41 : }
42 :
43 : } // namespace internal
44 : } // namespace v8
|