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-utils.h" |
5 #include "src/builtins/builtins.h" | 6 #include "src/builtins/builtins.h" |
6 #include "src/builtins/builtins-utils.h" | 7 #include "src/macro-assembler.h" |
7 | 8 |
8 namespace v8 { | 9 namespace v8 { |
9 namespace internal { | 10 namespace internal { |
10 | 11 |
11 Handle<Code> Builtins::CallFunction(ConvertReceiverMode mode, | 12 Handle<Code> Builtins::CallFunction(ConvertReceiverMode mode, |
12 TailCallMode tail_call_mode) { | 13 TailCallMode tail_call_mode) { |
13 switch (tail_call_mode) { | 14 switch (tail_call_mode) { |
14 case TailCallMode::kDisallow: | 15 case TailCallMode::kDisallow: |
15 switch (mode) { | 16 switch (mode) { |
16 case ConvertReceiverMode::kNullOrUndefined: | 17 case ConvertReceiverMode::kNullOrUndefined: |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 void Builtins::Generate_TailCall_ReceiverIsNotNullOrUndefined( | 141 void Builtins::Generate_TailCall_ReceiverIsNotNullOrUndefined( |
141 MacroAssembler* masm) { | 142 MacroAssembler* masm) { |
142 Generate_Call(masm, ConvertReceiverMode::kNotNullOrUndefined, | 143 Generate_Call(masm, ConvertReceiverMode::kNotNullOrUndefined, |
143 TailCallMode::kAllow); | 144 TailCallMode::kAllow); |
144 } | 145 } |
145 | 146 |
146 void Builtins::Generate_TailCall_ReceiverIsAny(MacroAssembler* masm) { | 147 void Builtins::Generate_TailCall_ReceiverIsAny(MacroAssembler* masm) { |
147 Generate_Call(masm, ConvertReceiverMode::kAny, TailCallMode::kAllow); | 148 Generate_Call(masm, ConvertReceiverMode::kAny, TailCallMode::kAllow); |
148 } | 149 } |
149 | 150 |
| 151 void Builtins::Generate_CallForwardVarargs(MacroAssembler* masm) { |
| 152 Generate_CallForwardVarargs(masm, masm->isolate()->builtins()->Call()); |
| 153 } |
| 154 |
| 155 void Builtins::Generate_CallFunctionForwardVarargs(MacroAssembler* masm) { |
| 156 Generate_CallForwardVarargs(masm, |
| 157 masm->isolate()->builtins()->CallFunction()); |
| 158 } |
| 159 |
150 } // namespace internal | 160 } // namespace internal |
151 } // namespace v8 | 161 } // namespace v8 |
OLD | NEW |