| 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/instruction-selector.h" | 5 #include "src/compiler/instruction-selector.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "src/base/adapters.h" | 9 #include "src/base/adapters.h" |
| 10 #include "src/compiler/instruction-selector-impl.h" | 10 #include "src/compiler/instruction-selector-impl.h" |
| (...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1199 DCHECK_NE(0, descriptor->flags() & CallDescriptor::kSupportsTailCalls); | 1199 DCHECK_NE(0, descriptor->flags() & CallDescriptor::kSupportsTailCalls); |
| 1200 DCHECK_EQ(0, descriptor->flags() & CallDescriptor::kPatchableCallSite); | 1200 DCHECK_EQ(0, descriptor->flags() & CallDescriptor::kPatchableCallSite); |
| 1201 DCHECK_EQ(0, descriptor->flags() & CallDescriptor::kNeedsNopAfterCall); | 1201 DCHECK_EQ(0, descriptor->flags() & CallDescriptor::kNeedsNopAfterCall); |
| 1202 | 1202 |
| 1203 // TODO(turbofan): Relax restriction for stack parameters. | 1203 // TODO(turbofan): Relax restriction for stack parameters. |
| 1204 | 1204 |
| 1205 if (linkage()->GetIncomingDescriptor()->CanTailCall(node)) { | 1205 if (linkage()->GetIncomingDescriptor()->CanTailCall(node)) { |
| 1206 CallBuffer buffer(zone(), descriptor, nullptr); | 1206 CallBuffer buffer(zone(), descriptor, nullptr); |
| 1207 | 1207 |
| 1208 // Compute InstructionOperands for inputs and outputs. | 1208 // Compute InstructionOperands for inputs and outputs. |
| 1209 InitializeCallBuffer(node, &buffer, true, true); | 1209 InitializeCallBuffer(node, &buffer, true, IsTailCallAddressImmediate()); |
| 1210 | 1210 |
| 1211 // Select the appropriate opcode based on the call type. | 1211 // Select the appropriate opcode based on the call type. |
| 1212 InstructionCode opcode; | 1212 InstructionCode opcode; |
| 1213 switch (descriptor->kind()) { | 1213 switch (descriptor->kind()) { |
| 1214 case CallDescriptor::kCallCodeObject: | 1214 case CallDescriptor::kCallCodeObject: |
| 1215 opcode = kArchTailCallCodeObject; | 1215 opcode = kArchTailCallCodeObject; |
| 1216 break; | 1216 break; |
| 1217 case CallDescriptor::kCallJSFunction: | 1217 case CallDescriptor::kCallJSFunction: |
| 1218 opcode = kArchTailCallJSFunction; | 1218 opcode = kArchTailCallJSFunction; |
| 1219 break; | 1219 break; |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1343 return new (instruction_zone()) FrameStateDescriptor( | 1343 return new (instruction_zone()) FrameStateDescriptor( |
| 1344 instruction_zone(), state_info.type(), state_info.bailout_id(), | 1344 instruction_zone(), state_info.type(), state_info.bailout_id(), |
| 1345 state_info.state_combine(), parameters, locals, stack, | 1345 state_info.state_combine(), parameters, locals, stack, |
| 1346 state_info.shared_info(), outer_state); | 1346 state_info.shared_info(), outer_state); |
| 1347 } | 1347 } |
| 1348 | 1348 |
| 1349 | 1349 |
| 1350 } // namespace compiler | 1350 } // namespace compiler |
| 1351 } // namespace internal | 1351 } // namespace internal |
| 1352 } // namespace v8 | 1352 } // namespace v8 |
| OLD | NEW |