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 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 return Generate_InterpreterPushArgsAndCallImpl(masm, TailCallMode::kAllow, | 43 return Generate_InterpreterPushArgsAndCallImpl(masm, TailCallMode::kAllow, |
44 CallableType::kAny); | 44 CallableType::kAny); |
45 } | 45 } |
46 | 46 |
47 void Builtins::Generate_InterpreterPushArgsAndTailCallFunction( | 47 void Builtins::Generate_InterpreterPushArgsAndTailCallFunction( |
48 MacroAssembler* masm) { | 48 MacroAssembler* masm) { |
49 return Generate_InterpreterPushArgsAndCallImpl(masm, TailCallMode::kAllow, | 49 return Generate_InterpreterPushArgsAndCallImpl(masm, TailCallMode::kAllow, |
50 CallableType::kJSFunction); | 50 CallableType::kJSFunction); |
51 } | 51 } |
52 | 52 |
53 Handle<Code> Builtins::InterpreterPushArgsAndConstruct( | |
54 CallableType function_type) { | |
55 switch (function_type) { | |
56 case CallableType::kJSFunction: | |
57 return InterpreterPushArgsAndConstructFunction(); | |
58 case CallableType::kAny: | |
59 return InterpreterPushArgsAndConstruct(); | |
60 } | |
61 UNREACHABLE(); | |
62 return Handle<Code>::null(); | |
63 } | |
64 | |
65 void Builtins::Generate_InterpreterPushArgsAndConstruct(MacroAssembler* masm) { | |
66 return Generate_InterpreterPushArgsAndConstructImpl(masm, CallableType::kAny); | |
67 } | |
68 | |
69 void Builtins::Generate_InterpreterPushArgsAndConstructFunction( | |
70 MacroAssembler* masm) { | |
71 return Generate_InterpreterPushArgsAndConstructImpl( | |
72 masm, CallableType::kJSFunction); | |
73 } | |
74 | |
75 } // namespace internal | 53 } // namespace internal |
76 } // namespace v8 | 54 } // namespace v8 |
OLD | NEW |