| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 Node** buffer = zone()->NewArray<Node*>(input_count); | 146 Node** buffer = zone()->NewArray<Node*>(input_count); |
| 147 int index = 0; | 147 int index = 0; |
| 148 buffer[index++] = function; | 148 buffer[index++] = function; |
| 149 for (int i = 0; i < param_count; i++) { | 149 for (int i = 0; i < param_count; i++) { |
| 150 buffer[index++] = args[i]; | 150 buffer[index++] = args[i]; |
| 151 } | 151 } |
| 152 buffer[index++] = graph()->start(); | 152 buffer[index++] = graph()->start(); |
| 153 buffer[index++] = graph()->start(); | 153 buffer[index++] = graph()->start(); |
| 154 Node* tail_call = MakeNode(common()->TailCall(desc), input_count, buffer); | 154 Node* tail_call = MakeNode(common()->TailCall(desc), input_count, buffer); |
| 155 schedule()->AddTailCall(CurrentBlock(), tail_call); | 155 schedule()->AddTailCall(CurrentBlock(), tail_call); |
| 156 current_block_ = nullptr; |
| 156 return tail_call; | 157 return tail_call; |
| 157 } | 158 } |
| 158 | 159 |
| 159 | 160 |
| 160 Node* RawMachineAssembler::CallFunctionStub0(Node* function, Node* receiver, | 161 Node* RawMachineAssembler::CallFunctionStub0(Node* function, Node* receiver, |
| 161 Node* context, Node* frame_state, | 162 Node* context, Node* frame_state, |
| 162 CallFunctionFlags flags) { | 163 CallFunctionFlags flags) { |
| 163 Callable callable = CodeFactory::CallFunction(isolate(), 0, flags); | 164 Callable callable = CodeFactory::CallFunction(isolate(), 0, flags); |
| 164 CallDescriptor* desc = Linkage::GetStubCallDescriptor( | 165 CallDescriptor* desc = Linkage::GetStubCallDescriptor( |
| 165 isolate(), zone(), callable.descriptor(), 1, | 166 isolate(), zone(), callable.descriptor(), 1, |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 Node* RawMachineAssembler::MakeNode(const Operator* op, int input_count, | 315 Node* RawMachineAssembler::MakeNode(const Operator* op, int input_count, |
| 315 Node** inputs) { | 316 Node** inputs) { |
| 316 // The raw machine assembler nodes do not have effect and control inputs, | 317 // The raw machine assembler nodes do not have effect and control inputs, |
| 317 // so we disable checking input counts here. | 318 // so we disable checking input counts here. |
| 318 return graph()->NewNodeUnchecked(op, input_count, inputs); | 319 return graph()->NewNodeUnchecked(op, input_count, inputs); |
| 319 } | 320 } |
| 320 | 321 |
| 321 } // namespace compiler | 322 } // namespace compiler |
| 322 } // namespace internal | 323 } // namespace internal |
| 323 } // namespace v8 | 324 } // namespace v8 |
| OLD | NEW |