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

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

Issue 384403002: StubCallInterfaceDescriptor takes a context register. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Code comments and ports. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/hydrogen-osr.h" 9 #include "src/hydrogen-osr.h"
10 #include "src/ia32/lithium-codegen-ia32.h" 10 #include "src/ia32/lithium-codegen-ia32.h"
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 LOperand* function = UseFixed(instr->function(), edi); 1118 LOperand* function = UseFixed(instr->function(), edi);
1119 1119
1120 LCallJSFunction* result = new(zone()) LCallJSFunction(function); 1120 LCallJSFunction* result = new(zone()) LCallJSFunction(function);
1121 1121
1122 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); 1122 return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY);
1123 } 1123 }
1124 1124
1125 1125
1126 LInstruction* LChunkBuilder::DoCallWithDescriptor( 1126 LInstruction* LChunkBuilder::DoCallWithDescriptor(
1127 HCallWithDescriptor* instr) { 1127 HCallWithDescriptor* instr) {
1128 const CallInterfaceDescriptor* descriptor = instr->descriptor(); 1128 const InterfaceDescriptor* descriptor = instr->descriptor();
1129
1130 LOperand* target = UseRegisterOrConstantAtStart(instr->target()); 1129 LOperand* target = UseRegisterOrConstantAtStart(instr->target());
1131 ZoneList<LOperand*> ops(instr->OperandCount(), zone()); 1130 ZoneList<LOperand*> ops(instr->OperandCount(), zone());
1132 ops.Add(target, zone()); 1131 ops.Add(target, zone());
1133 for (int i = 1; i < instr->OperandCount(); i++) { 1132 for (int i = 1; i < instr->OperandCount(); i++) {
1134 LOperand* op = UseFixed(instr->OperandAt(i), 1133 LOperand* op = UseFixed(instr->OperandAt(i),
1135 descriptor->GetParameterRegister(i - 1)); 1134 descriptor->GetParameterRegister(i - 1));
1136 ops.Add(op, zone()); 1135 ops.Add(op, zone());
1137 } 1136 }
1138 1137
1139 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( 1138 LCallWithDescriptor* result = new(zone()) LCallWithDescriptor(
(...skipping 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after
2466 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { 2465 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
2467 LParameter* result = new(zone()) LParameter; 2466 LParameter* result = new(zone()) LParameter;
2468 if (instr->kind() == HParameter::STACK_PARAMETER) { 2467 if (instr->kind() == HParameter::STACK_PARAMETER) {
2469 int spill_index = chunk()->GetParameterStackSlot(instr->index()); 2468 int spill_index = chunk()->GetParameterStackSlot(instr->index());
2470 return DefineAsSpilled(result, spill_index); 2469 return DefineAsSpilled(result, spill_index);
2471 } else { 2470 } else {
2472 ASSERT(info()->IsStub()); 2471 ASSERT(info()->IsStub());
2473 CodeStubInterfaceDescriptor* descriptor = 2472 CodeStubInterfaceDescriptor* descriptor =
2474 info()->code_stub()->GetInterfaceDescriptor(); 2473 info()->code_stub()->GetInterfaceDescriptor();
2475 int index = static_cast<int>(instr->index()); 2474 int index = static_cast<int>(instr->index());
2476 Register reg = descriptor->GetParameterRegister(index); 2475 Register reg = descriptor->GetEnvironmentParameterRegister(index);
2477 return DefineFixed(result, reg); 2476 return DefineFixed(result, reg);
2478 } 2477 }
2479 } 2478 }
2480 2479
2481 2480
2482 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) { 2481 LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
2483 // Use an index that corresponds to the location in the unoptimized frame, 2482 // Use an index that corresponds to the location in the unoptimized frame,
2484 // which the optimized frame will subsume. 2483 // which the optimized frame will subsume.
2485 int env_index = instr->index(); 2484 int env_index = instr->index();
2486 int spill_index = 0; 2485 int spill_index = 0;
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
2669 LOperand* function = UseRegisterAtStart(instr->function()); 2668 LOperand* function = UseRegisterAtStart(instr->function());
2670 LAllocateBlockContext* result = 2669 LAllocateBlockContext* result =
2671 new(zone()) LAllocateBlockContext(context, function); 2670 new(zone()) LAllocateBlockContext(context, function);
2672 return MarkAsCall(DefineFixed(result, esi), instr); 2671 return MarkAsCall(DefineFixed(result, esi), instr);
2673 } 2672 }
2674 2673
2675 2674
2676 } } // namespace v8::internal 2675 } } // namespace v8::internal
2677 2676
2678 #endif // V8_TARGET_ARCH_IA32 2677 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698