Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/mips/lithium-mips.cc

Issue 1211333003: Make context register implicit for CallInterfaceDescriptors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Platform ports Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
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());
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));
1104 ops.Add(op, zone()); 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) {
(...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after
2441 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { 2449 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
2442 LParameter* result = new(zone()) LParameter; 2450 LParameter* result = new(zone()) LParameter;
2443 if (instr->kind() == HParameter::STACK_PARAMETER) { 2451 if (instr->kind() == HParameter::STACK_PARAMETER) {
2444 int spill_index = chunk()->GetParameterStackSlot(instr->index()); 2452 int spill_index = chunk()->GetParameterStackSlot(instr->index());
2445 return DefineAsSpilled(result, spill_index); 2453 return DefineAsSpilled(result, spill_index);
2446 } else { 2454 } else {
2447 DCHECK(info()->IsStub()); 2455 DCHECK(info()->IsStub());
2448 CallInterfaceDescriptor descriptor = 2456 CallInterfaceDescriptor descriptor =
2449 info()->code_stub()->GetCallInterfaceDescriptor(); 2457 info()->code_stub()->GetCallInterfaceDescriptor();
2450 int index = static_cast<int>(instr->index()); 2458 int index = static_cast<int>(instr->index());
2451 Register reg = descriptor.GetEnvironmentParameterRegister(index); 2459 Register reg = descriptor.GetRegisterParameter(index);
2452 return DefineFixed(result, reg); 2460 return DefineFixed(result, reg);
2453 } 2461 }
2454 } 2462 }
2455 2463
2456 2464
2457 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { 2465 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
2458 // Use an index that corresponds to the location in the unoptimized frame, 2466 // Use an index that corresponds to the location in the unoptimized frame,
2459 // which the optimized frame will subsume. 2467 // which the optimized frame will subsume.
2460 int env_index = instr->index(); 2468 int env_index = instr->index();
2461 int spill_index = 0; 2469 int spill_index = 0;
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
2632 LOperand* function = UseRegisterAtStart(instr->function()); 2640 LOperand* function = UseRegisterAtStart(instr->function());
2633 LAllocateBlockContext* result = 2641 LAllocateBlockContext* result =
2634 new(zone()) LAllocateBlockContext(context, function); 2642 new(zone()) LAllocateBlockContext(context, function);
2635 return MarkAsCall(DefineFixed(result, cp), instr); 2643 return MarkAsCall(DefineFixed(result, cp), instr);
2636 } 2644 }
2637 2645
2638 } // namespace internal 2646 } // namespace internal
2639 } // namespace v8 2647 } // namespace v8
2640 2648
2641 #endif // V8_TARGET_ARCH_MIPS 2649 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« src/code-stubs.h ('K') | « src/mips/lithium-mips.h ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698