OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2017 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-utils.h" | 5 #include "src/builtins/builtins-utils-gen.h" |
6 #include "src/builtins/builtins.h" | 6 #include "src/builtins/builtins.h" |
7 #include "src/code-stub-assembler.h" | 7 #include "src/code-stub-assembler.h" |
8 #include "src/counters.h" | |
9 #include "src/interface-descriptors.h" | |
10 #include "src/macro-assembler.h" | 8 #include "src/macro-assembler.h" |
11 #include "src/objects-inl.h" | 9 #include "src/runtime/runtime.h" |
12 | 10 |
13 namespace v8 { | 11 namespace v8 { |
14 namespace internal { | 12 namespace internal { |
15 | 13 |
16 BUILTIN(Illegal) { | |
17 UNREACHABLE(); | |
18 return isolate->heap()->undefined_value(); // Make compiler happy. | |
19 } | |
20 | |
21 BUILTIN(EmptyFunction) { return isolate->heap()->undefined_value(); } | |
22 | |
23 BUILTIN(UnsupportedThrower) { | |
24 HandleScope scope(isolate); | |
25 THROW_NEW_ERROR_RETURN_FAILURE(isolate, | |
26 NewError(MessageTemplate::kUnsupported)); | |
27 } | |
28 | |
29 // ----------------------------------------------------------------------------- | |
30 // Throwers for restricted function properties and strict arguments object | |
31 // properties | |
32 | |
33 BUILTIN(RestrictedFunctionPropertiesThrower) { | |
34 HandleScope scope(isolate); | |
35 THROW_NEW_ERROR_RETURN_FAILURE( | |
36 isolate, NewTypeError(MessageTemplate::kRestrictedFunctionProperties)); | |
37 } | |
38 | |
39 BUILTIN(RestrictedStrictArgumentsPropertiesThrower) { | |
40 HandleScope scope(isolate); | |
41 THROW_NEW_ERROR_RETURN_FAILURE( | |
42 isolate, NewTypeError(MessageTemplate::kStrictPoisonPill)); | |
43 } | |
44 | |
45 // ----------------------------------------------------------------------------- | 14 // ----------------------------------------------------------------------------- |
46 // Interrupt and stack checks. | 15 // Interrupt and stack checks. |
47 | 16 |
48 void Builtins::Generate_InterruptCheck(MacroAssembler* masm) { | 17 void Builtins::Generate_InterruptCheck(MacroAssembler* masm) { |
49 masm->TailCallRuntime(Runtime::kInterrupt); | 18 masm->TailCallRuntime(Runtime::kInterrupt); |
50 } | 19 } |
51 | 20 |
52 void Builtins::Generate_StackCheck(MacroAssembler* masm) { | 21 void Builtins::Generate_StackCheck(MacroAssembler* masm) { |
53 masm->TailCallRuntime(Runtime::kStackGuard); | 22 masm->TailCallRuntime(Runtime::kStackGuard); |
54 } | 23 } |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 // Allocate in old space (or large object space). | 165 // Allocate in old space (or large object space). |
197 TailCallRuntime(Runtime::kNewArgumentsElements, NoContextConstant(), | 166 TailCallRuntime(Runtime::kNewArgumentsElements, NoContextConstant(), |
198 BitcastWordToTagged(frame), SmiFromWord(length)); | 167 BitcastWordToTagged(frame), SmiFromWord(length)); |
199 } | 168 } |
200 } | 169 } |
201 | 170 |
202 TF_BUILTIN(ReturnReceiver, CodeStubAssembler) { Return(Parameter(0)); } | 171 TF_BUILTIN(ReturnReceiver, CodeStubAssembler) { Return(Parameter(0)); } |
203 | 172 |
204 } // namespace internal | 173 } // namespace internal |
205 } // namespace v8 | 174 } // namespace v8 |
OLD | NEW |