| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 <sstream> | 5 #include <sstream> |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #include "src/arm64/lithium-codegen-arm64.h" | 9 #include "src/arm64/lithium-codegen-arm64.h" |
| 10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
| (...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 return MarkAsCall(DefineFixed(result, x0), instr); | 1043 return MarkAsCall(DefineFixed(result, x0), instr); |
| 1044 } | 1044 } |
| 1045 | 1045 |
| 1046 | 1046 |
| 1047 LInstruction* LChunkBuilder::DoCallWithDescriptor( | 1047 LInstruction* LChunkBuilder::DoCallWithDescriptor( |
| 1048 HCallWithDescriptor* instr) { | 1048 HCallWithDescriptor* instr) { |
| 1049 CallInterfaceDescriptor descriptor = instr->descriptor(); | 1049 CallInterfaceDescriptor descriptor = instr->descriptor(); |
| 1050 | 1050 |
| 1051 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); | 1051 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); |
| 1052 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); | 1052 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); |
| 1053 // Target |
| 1053 ops.Add(target, zone()); | 1054 ops.Add(target, zone()); |
| 1054 for (int i = 1; i < instr->OperandCount(); i++) { | 1055 // Context |
| 1055 LOperand* op = | 1056 LOperand* op = UseFixed(instr->OperandAt(1), cp); |
| 1056 UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1)); | 1057 ops.Add(op, zone()); |
| 1058 // Other register parameters |
| 1059 for (int i = LCallWithDescriptor::kImplicitRegisterParameterCount; |
| 1060 i < instr->OperandCount(); i++) { |
| 1061 op = |
| 1062 UseFixed(instr->OperandAt(i), |
| 1063 descriptor.GetRegisterParameter( |
| 1064 i - LCallWithDescriptor::kImplicitRegisterParameterCount)); |
| 1057 ops.Add(op, zone()); | 1065 ops.Add(op, zone()); |
| 1058 } | 1066 } |
| 1059 | 1067 |
| 1060 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor(descriptor, | 1068 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor(descriptor, |
| 1061 ops, | 1069 ops, |
| 1062 zone()); | 1070 zone()); |
| 1063 return MarkAsCall(DefineFixed(result, x0), instr); | 1071 return MarkAsCall(DefineFixed(result, x0), instr); |
| 1064 } | 1072 } |
| 1065 | 1073 |
| 1066 | 1074 |
| (...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2007 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { | 2015 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { |
| 2008 LParameter* result = new(zone()) LParameter; | 2016 LParameter* result = new(zone()) LParameter; |
| 2009 if (instr->kind() == HParameter::STACK_PARAMETER) { | 2017 if (instr->kind() == HParameter::STACK_PARAMETER) { |
| 2010 int spill_index = chunk_->GetParameterStackSlot(instr->index()); | 2018 int spill_index = chunk_->GetParameterStackSlot(instr->index()); |
| 2011 return DefineAsSpilled(result, spill_index); | 2019 return DefineAsSpilled(result, spill_index); |
| 2012 } else { | 2020 } else { |
| 2013 DCHECK(info()->IsStub()); | 2021 DCHECK(info()->IsStub()); |
| 2014 CallInterfaceDescriptor descriptor = | 2022 CallInterfaceDescriptor descriptor = |
| 2015 info()->code_stub()->GetCallInterfaceDescriptor(); | 2023 info()->code_stub()->GetCallInterfaceDescriptor(); |
| 2016 int index = static_cast<int>(instr->index()); | 2024 int index = static_cast<int>(instr->index()); |
| 2017 Register reg = descriptor.GetEnvironmentParameterRegister(index); | 2025 Register reg = descriptor.GetRegisterParameter(index); |
| 2018 return DefineFixed(result, reg); | 2026 return DefineFixed(result, reg); |
| 2019 } | 2027 } |
| 2020 } | 2028 } |
| 2021 | 2029 |
| 2022 | 2030 |
| 2023 LInstruction* LChunkBuilder::DoPower(HPower* instr) { | 2031 LInstruction* LChunkBuilder::DoPower(HPower* instr) { |
| 2024 DCHECK(instr->representation().IsDouble()); | 2032 DCHECK(instr->representation().IsDouble()); |
| 2025 // We call a C function for double power. It can't trigger a GC. | 2033 // We call a C function for double power. It can't trigger a GC. |
| 2026 // We need to use fixed result register for the call. | 2034 // We need to use fixed result register for the call. |
| 2027 Representation exponent_type = instr->right()->representation(); | 2035 Representation exponent_type = instr->right()->representation(); |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2775 LOperand* context = UseFixed(instr->context(), cp); | 2783 LOperand* context = UseFixed(instr->context(), cp); |
| 2776 LOperand* function = UseRegisterAtStart(instr->function()); | 2784 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2777 LAllocateBlockContext* result = | 2785 LAllocateBlockContext* result = |
| 2778 new(zone()) LAllocateBlockContext(context, function); | 2786 new(zone()) LAllocateBlockContext(context, function); |
| 2779 return MarkAsCall(DefineFixed(result, cp), instr); | 2787 return MarkAsCall(DefineFixed(result, cp), instr); |
| 2780 } | 2788 } |
| 2781 | 2789 |
| 2782 | 2790 |
| 2783 } // namespace internal | 2791 } // namespace internal |
| 2784 } // namespace v8 | 2792 } // namespace v8 |
| OLD | NEW |