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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 int index = 0; | 151 int index = 0; |
152 buffer[index++] = function; | 152 buffer[index++] = function; |
153 for (int i = 0; i < param_count; i++) { | 153 for (int i = 0; i < param_count; i++) { |
154 buffer[index++] = args[i]; | 154 buffer[index++] = args[i]; |
155 } | 155 } |
156 buffer[index++] = graph()->start(); | 156 buffer[index++] = graph()->start(); |
157 buffer[index++] = graph()->start(); | 157 buffer[index++] = graph()->start(); |
158 Node* tail_call = | 158 Node* tail_call = |
159 graph()->NewNode(common()->TailCall(desc), input_count, buffer); | 159 graph()->NewNode(common()->TailCall(desc), input_count, buffer); |
160 schedule()->AddTailCall(CurrentBlock(), tail_call); | 160 schedule()->AddTailCall(CurrentBlock(), tail_call); |
| 161 current_block_ = nullptr; |
161 return tail_call; | 162 return tail_call; |
162 } | 163 } |
163 | 164 |
164 | 165 |
165 Node* RawMachineAssembler::CallFunctionStub0(Node* function, Node* receiver, | 166 Node* RawMachineAssembler::CallFunctionStub0(Node* function, Node* receiver, |
166 Node* context, Node* frame_state, | 167 Node* context, Node* frame_state, |
167 CallFunctionFlags flags) { | 168 CallFunctionFlags flags) { |
168 Callable callable = CodeFactory::CallFunction(isolate(), 0, flags); | 169 Callable callable = CodeFactory::CallFunction(isolate(), 0, flags); |
169 CallDescriptor* desc = Linkage::GetStubCallDescriptor( | 170 CallDescriptor* desc = Linkage::GetStubCallDescriptor( |
170 isolate(), zone(), callable.descriptor(), 1, | 171 isolate(), zone(), callable.descriptor(), 1, |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 DCHECK_NOT_NULL(schedule_); | 330 DCHECK_NOT_NULL(schedule_); |
330 DCHECK(current_block_ != nullptr); | 331 DCHECK(current_block_ != nullptr); |
331 Node* node = graph()->NewNode(op, input_count, inputs); | 332 Node* node = graph()->NewNode(op, input_count, inputs); |
332 schedule()->AddNode(CurrentBlock(), node); | 333 schedule()->AddNode(CurrentBlock(), node); |
333 return node; | 334 return node; |
334 } | 335 } |
335 | 336 |
336 } // namespace compiler | 337 } // namespace compiler |
337 } // namespace internal | 338 } // namespace internal |
338 } // namespace v8 | 339 } // namespace v8 |
OLD | NEW |