OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/compiler/raw-machine-assembler.h" | 5 #include "src/compiler/raw-machine-assembler.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/compiler/pipeline.h" | 8 #include "src/compiler/pipeline.h" |
9 #include "src/compiler/scheduler.h" | 9 #include "src/compiler/scheduler.h" |
10 | 10 |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 const CallDescriptor* descriptor = | 225 const CallDescriptor* descriptor = |
226 Linkage::GetSimplifiedCDescriptor(zone(), builder.Build()); | 226 Linkage::GetSimplifiedCDescriptor(zone(), builder.Build()); |
227 | 227 |
228 Node* call = graph()->NewNode(common()->Call(descriptor), function, arg0, | 228 Node* call = graph()->NewNode(common()->Call(descriptor), function, arg0, |
229 arg1, arg2, arg3, arg4, arg5, arg6, arg7); | 229 arg1, arg2, arg3, arg4, arg5, arg6, arg7); |
230 schedule()->AddNode(CurrentBlock(), call); | 230 schedule()->AddNode(CurrentBlock(), call); |
231 return call; | 231 return call; |
232 } | 232 } |
233 | 233 |
234 | 234 |
| 235 Node* RawMachineAssembler::TailCallInterpreterDispatch( |
| 236 const CallDescriptor* call_descriptor, Node* target, Node* arg1, Node* arg2, |
| 237 Node* arg3, Node* arg4, Node* arg5) { |
| 238 Node* tail_call = |
| 239 graph()->NewNode(common()->TailCall(call_descriptor), target, arg1, arg2, |
| 240 arg3, arg4, arg5, graph()->start(), graph()->start()); |
| 241 schedule()->AddTailCall(CurrentBlock(), tail_call); |
| 242 return tail_call; |
| 243 } |
| 244 |
| 245 |
235 void RawMachineAssembler::Bind(Label* label) { | 246 void RawMachineAssembler::Bind(Label* label) { |
236 DCHECK(current_block_ == nullptr); | 247 DCHECK(current_block_ == nullptr); |
237 DCHECK(!label->bound_); | 248 DCHECK(!label->bound_); |
238 label->bound_ = true; | 249 label->bound_ = true; |
239 current_block_ = EnsureBlock(label); | 250 current_block_ = EnsureBlock(label); |
240 } | 251 } |
241 | 252 |
242 | 253 |
243 BasicBlock* RawMachineAssembler::Use(Label* label) { | 254 BasicBlock* RawMachineAssembler::Use(Label* label) { |
244 label->used_ = true; | 255 label->used_ = true; |
(...skipping 18 matching lines...) Expand all Loading... |
263 DCHECK_NOT_NULL(schedule_); | 274 DCHECK_NOT_NULL(schedule_); |
264 DCHECK(current_block_ != nullptr); | 275 DCHECK(current_block_ != nullptr); |
265 Node* node = graph()->NewNode(op, input_count, inputs); | 276 Node* node = graph()->NewNode(op, input_count, inputs); |
266 schedule()->AddNode(CurrentBlock(), node); | 277 schedule()->AddNode(CurrentBlock(), node); |
267 return node; | 278 return node; |
268 } | 279 } |
269 | 280 |
270 } // namespace compiler | 281 } // namespace compiler |
271 } // namespace internal | 282 } // namespace internal |
272 } // namespace v8 | 283 } // namespace v8 |
OLD | NEW |