| 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/int64-lowering.h" | 5 #include "src/compiler/int64-lowering.h" |
| 6 #include "src/compiler/common-operator.h" | 6 #include "src/compiler/common-operator.h" |
| 7 #include "src/compiler/diamond.h" | 7 #include "src/compiler/diamond.h" |
| 8 #include "src/compiler/graph.h" | 8 #include "src/compiler/graph.h" |
| 9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
| 10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 DefaultLowering(node); | 218 DefaultLowering(node); |
| 219 int new_return_count = GetReturnCountAfterLowering(signature()); | 219 int new_return_count = GetReturnCountAfterLowering(signature()); |
| 220 if (signature()->return_count() != new_return_count) { | 220 if (signature()->return_count() != new_return_count) { |
| 221 NodeProperties::ChangeOp(node, common()->Return(new_return_count)); | 221 NodeProperties::ChangeOp(node, common()->Return(new_return_count)); |
| 222 } | 222 } |
| 223 break; | 223 break; |
| 224 } | 224 } |
| 225 case IrOpcode::kCall: { | 225 case IrOpcode::kCall: { |
| 226 // TODO(turbofan): Make WASM code const-correct wrt. CallDescriptor. | 226 // TODO(turbofan): Make WASM code const-correct wrt. CallDescriptor. |
| 227 CallDescriptor* descriptor = | 227 CallDescriptor* descriptor = |
| 228 const_cast<CallDescriptor*>(OpParameter<const CallDescriptor*>(node)); | 228 const_cast<CallDescriptor*>(CallDescriptorOf(node->op())); |
| 229 if (DefaultLowering(node) || | 229 if (DefaultLowering(node) || |
| 230 (descriptor->ReturnCount() == 1 && | 230 (descriptor->ReturnCount() == 1 && |
| 231 descriptor->GetReturnType(0) == MachineType::Int64())) { | 231 descriptor->GetReturnType(0) == MachineType::Int64())) { |
| 232 // We have to adjust the call descriptor. | 232 // We have to adjust the call descriptor. |
| 233 const Operator* op = common()->Call( | 233 const Operator* op = common()->Call( |
| 234 wasm::ModuleEnv::GetI32WasmCallDescriptor(zone(), descriptor)); | 234 wasm::ModuleEnv::GetI32WasmCallDescriptor(zone(), descriptor)); |
| 235 NodeProperties::ChangeOp(node, op); | 235 NodeProperties::ChangeOp(node, op); |
| 236 } | 236 } |
| 237 if (descriptor->ReturnCount() == 1 && | 237 if (descriptor->ReturnCount() == 1 && |
| 238 descriptor->GetReturnType(0) == MachineType::Int64()) { | 238 descriptor->GetReturnType(0) == MachineType::Int64()) { |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 common()->Phi(MachineRepresentation::kWord32, value_count), | 820 common()->Phi(MachineRepresentation::kWord32, value_count), |
| 821 value_count + 1, inputs_low, false), | 821 value_count + 1, inputs_low, false), |
| 822 graph()->NewNode( | 822 graph()->NewNode( |
| 823 common()->Phi(MachineRepresentation::kWord32, value_count), | 823 common()->Phi(MachineRepresentation::kWord32, value_count), |
| 824 value_count + 1, inputs_high, false)); | 824 value_count + 1, inputs_high, false)); |
| 825 } | 825 } |
| 826 } | 826 } |
| 827 } // namespace compiler | 827 } // namespace compiler |
| 828 } // namespace internal | 828 } // namespace internal |
| 829 } // namespace v8 | 829 } // namespace v8 |
| OLD | NEW |