| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #if V8_TARGET_ARCH_MIPS64 | 9 #if V8_TARGET_ARCH_MIPS64 |
| 10 | 10 |
| (...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1090 return MarkAsCall(DefineFixed(result, v0), instr); | 1090 return MarkAsCall(DefineFixed(result, v0), instr); |
| 1091 } | 1091 } |
| 1092 | 1092 |
| 1093 | 1093 |
| 1094 LInstruction* LChunkBuilder::DoCallWithDescriptor( | 1094 LInstruction* LChunkBuilder::DoCallWithDescriptor( |
| 1095 HCallWithDescriptor* instr) { | 1095 HCallWithDescriptor* instr) { |
| 1096 CallInterfaceDescriptor descriptor = instr->descriptor(); | 1096 CallInterfaceDescriptor descriptor = instr->descriptor(); |
| 1097 | 1097 |
| 1098 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); | 1098 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); |
| 1099 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); | 1099 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); |
| 1100 // Target |
| 1100 ops.Add(target, zone()); | 1101 ops.Add(target, zone()); |
| 1101 for (int i = 1; i < instr->OperandCount(); i++) { | 1102 // Context |
| 1102 LOperand* op = | 1103 LOperand* op = UseFixed(instr->OperandAt(1), cp); |
| 1103 UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1)); | 1104 ops.Add(op, zone()); |
| 1104 ops.Add(op, zone()); | 1105 // Other register parameters |
| 1106 for (int i = LCallWithDescriptor::kImplicitRegisterParameterCount; |
| 1107 i < instr->OperandCount(); i++) { |
| 1108 op = |
| 1109 UseFixed(instr->OperandAt(i), |
| 1110 descriptor.GetRegisterParameter( |
| 1111 i - LCallWithDescriptor::kImplicitRegisterParameterCount)); |
| 1112 ops.Add(op, zone()); |
| 1105 } | 1113 } |
| 1106 | 1114 |
| 1107 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( | 1115 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( |
| 1108 descriptor, ops, zone()); | 1116 descriptor, ops, zone()); |
| 1109 return MarkAsCall(DefineFixed(result, v0), instr); | 1117 return MarkAsCall(DefineFixed(result, v0), instr); |
| 1110 } | 1118 } |
| 1111 | 1119 |
| 1112 | 1120 |
| 1113 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { | 1121 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { |
| 1114 LOperand* context = UseFixed(instr->context(), cp); | 1122 LOperand* context = UseFixed(instr->context(), cp); |
| (...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2446 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { | 2454 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { |
| 2447 LParameter* result = new(zone()) LParameter; | 2455 LParameter* result = new(zone()) LParameter; |
| 2448 if (instr->kind() == HParameter::STACK_PARAMETER) { | 2456 if (instr->kind() == HParameter::STACK_PARAMETER) { |
| 2449 int spill_index = chunk()->GetParameterStackSlot(instr->index()); | 2457 int spill_index = chunk()->GetParameterStackSlot(instr->index()); |
| 2450 return DefineAsSpilled(result, spill_index); | 2458 return DefineAsSpilled(result, spill_index); |
| 2451 } else { | 2459 } else { |
| 2452 DCHECK(info()->IsStub()); | 2460 DCHECK(info()->IsStub()); |
| 2453 CallInterfaceDescriptor descriptor = | 2461 CallInterfaceDescriptor descriptor = |
| 2454 info()->code_stub()->GetCallInterfaceDescriptor(); | 2462 info()->code_stub()->GetCallInterfaceDescriptor(); |
| 2455 int index = static_cast<int>(instr->index()); | 2463 int index = static_cast<int>(instr->index()); |
| 2456 Register reg = descriptor.GetEnvironmentParameterRegister(index); | 2464 Register reg = descriptor.GetRegisterParameter(index); |
| 2457 return DefineFixed(result, reg); | 2465 return DefineFixed(result, reg); |
| 2458 } | 2466 } |
| 2459 } | 2467 } |
| 2460 | 2468 |
| 2461 | 2469 |
| 2462 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { | 2470 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { |
| 2463 // Use an index that corresponds to the location in the unoptimized frame, | 2471 // Use an index that corresponds to the location in the unoptimized frame, |
| 2464 // which the optimized frame will subsume. | 2472 // which the optimized frame will subsume. |
| 2465 int env_index = instr->index(); | 2473 int env_index = instr->index(); |
| 2466 int spill_index = 0; | 2474 int spill_index = 0; |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2637 LAllocateBlockContext* result = | 2645 LAllocateBlockContext* result = |
| 2638 new(zone()) LAllocateBlockContext(context, function); | 2646 new(zone()) LAllocateBlockContext(context, function); |
| 2639 return MarkAsCall(DefineFixed(result, cp), instr); | 2647 return MarkAsCall(DefineFixed(result, cp), instr); |
| 2640 } | 2648 } |
| 2641 | 2649 |
| 2642 | 2650 |
| 2643 } // namespace internal | 2651 } // namespace internal |
| 2644 } // namespace v8 | 2652 } // namespace v8 |
| 2645 | 2653 |
| 2646 #endif // V8_TARGET_ARCH_MIPS64 | 2654 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |