OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/builtins/builtins.h" | 5 #include "src/builtins/builtins.h" |
6 #include "src/builtins/builtins-utils.h" | 6 #include "src/builtins/builtins-utils.h" |
7 | 7 |
8 #include "src/macro-assembler.h" | 8 #include "src/macro-assembler.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
11 namespace internal { | 11 namespace internal { |
12 | 12 |
13 BUILTIN(Illegal) { | 13 BUILTIN(Illegal) { |
14 UNREACHABLE(); | 14 UNREACHABLE(); |
15 return isolate->heap()->undefined_value(); // Make compiler happy. | 15 return isolate->heap()->undefined_value(); // Make compiler happy. |
16 } | 16 } |
17 | 17 |
18 BUILTIN(EmptyFunction) { return isolate->heap()->undefined_value(); } | 18 BUILTIN(EmptyFunction) { return isolate->heap()->undefined_value(); } |
19 | 19 |
| 20 BUILTIN(UnsupportedThrower) { |
| 21 HandleScope scope(isolate); |
| 22 THROW_NEW_ERROR_RETURN_FAILURE(isolate, |
| 23 NewError(MessageTemplate::kUnsupported)); |
| 24 } |
| 25 |
20 // ----------------------------------------------------------------------------- | 26 // ----------------------------------------------------------------------------- |
21 // Throwers for restricted function properties and strict arguments object | 27 // Throwers for restricted function properties and strict arguments object |
22 // properties | 28 // properties |
23 | 29 |
24 BUILTIN(RestrictedFunctionPropertiesThrower) { | 30 BUILTIN(RestrictedFunctionPropertiesThrower) { |
25 HandleScope scope(isolate); | 31 HandleScope scope(isolate); |
26 THROW_NEW_ERROR_RETURN_FAILURE( | 32 THROW_NEW_ERROR_RETURN_FAILURE( |
27 isolate, NewTypeError(MessageTemplate::kRestrictedFunctionProperties)); | 33 isolate, NewTypeError(MessageTemplate::kRestrictedFunctionProperties)); |
28 } | 34 } |
29 | 35 |
30 BUILTIN(RestrictedStrictArgumentsPropertiesThrower) { | 36 BUILTIN(RestrictedStrictArgumentsPropertiesThrower) { |
31 HandleScope scope(isolate); | 37 HandleScope scope(isolate); |
32 THROW_NEW_ERROR_RETURN_FAILURE( | 38 THROW_NEW_ERROR_RETURN_FAILURE( |
33 isolate, NewTypeError(MessageTemplate::kStrictPoisonPill)); | 39 isolate, NewTypeError(MessageTemplate::kStrictPoisonPill)); |
34 } | 40 } |
35 | 41 |
36 // ----------------------------------------------------------------------------- | 42 // ----------------------------------------------------------------------------- |
37 // Interrupt and stack checks. | 43 // Interrupt and stack checks. |
38 | 44 |
39 void Builtins::Generate_InterruptCheck(MacroAssembler* masm) { | 45 void Builtins::Generate_InterruptCheck(MacroAssembler* masm) { |
40 masm->TailCallRuntime(Runtime::kInterrupt); | 46 masm->TailCallRuntime(Runtime::kInterrupt); |
41 } | 47 } |
42 | 48 |
43 void Builtins::Generate_StackCheck(MacroAssembler* masm) { | 49 void Builtins::Generate_StackCheck(MacroAssembler* masm) { |
44 masm->TailCallRuntime(Runtime::kStackGuard); | 50 masm->TailCallRuntime(Runtime::kStackGuard); |
45 } | 51 } |
46 | 52 |
47 } // namespace internal | 53 } // namespace internal |
48 } // namespace v8 | 54 } // namespace v8 |
OLD | NEW |