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" |
| 9 |
8 namespace v8 { | 10 namespace v8 { |
9 namespace internal { | 11 namespace internal { |
10 | 12 |
11 BUILTIN(Illegal) { | 13 BUILTIN(Illegal) { |
12 UNREACHABLE(); | 14 UNREACHABLE(); |
13 return isolate->heap()->undefined_value(); // Make compiler happy. | 15 return isolate->heap()->undefined_value(); // Make compiler happy. |
14 } | 16 } |
15 | 17 |
16 BUILTIN(EmptyFunction) { return isolate->heap()->undefined_value(); } | 18 BUILTIN(EmptyFunction) { return isolate->heap()->undefined_value(); } |
17 | 19 |
18 // ----------------------------------------------------------------------------- | 20 // ----------------------------------------------------------------------------- |
19 // Throwers for restricted function properties and strict arguments object | 21 // Throwers for restricted function properties and strict arguments object |
20 // properties | 22 // properties |
21 | 23 |
22 BUILTIN(RestrictedFunctionPropertiesThrower) { | 24 BUILTIN(RestrictedFunctionPropertiesThrower) { |
23 HandleScope scope(isolate); | 25 HandleScope scope(isolate); |
24 THROW_NEW_ERROR_RETURN_FAILURE( | 26 THROW_NEW_ERROR_RETURN_FAILURE( |
25 isolate, NewTypeError(MessageTemplate::kRestrictedFunctionProperties)); | 27 isolate, NewTypeError(MessageTemplate::kRestrictedFunctionProperties)); |
26 } | 28 } |
27 | 29 |
28 BUILTIN(RestrictedStrictArgumentsPropertiesThrower) { | 30 BUILTIN(RestrictedStrictArgumentsPropertiesThrower) { |
29 HandleScope scope(isolate); | 31 HandleScope scope(isolate); |
30 THROW_NEW_ERROR_RETURN_FAILURE( | 32 THROW_NEW_ERROR_RETURN_FAILURE( |
31 isolate, NewTypeError(MessageTemplate::kStrictPoisonPill)); | 33 isolate, NewTypeError(MessageTemplate::kStrictPoisonPill)); |
32 } | 34 } |
33 | 35 |
| 36 // ----------------------------------------------------------------------------- |
| 37 // Interrupt and stack checks. |
| 38 |
| 39 void Builtins::Generate_InterruptCheck(MacroAssembler* masm) { |
| 40 masm->TailCallRuntime(Runtime::kInterrupt); |
| 41 } |
| 42 |
| 43 void Builtins::Generate_StackCheck(MacroAssembler* masm) { |
| 44 masm->TailCallRuntime(Runtime::kStackGuard); |
| 45 } |
| 46 |
34 } // namespace internal | 47 } // namespace internal |
35 } // namespace v8 | 48 } // namespace v8 |
OLD | NEW |