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

Unified 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: Base class for Descriptors. 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 side-by-side diff with in-line comments
Download patch
« src/hydrogen-instructions.h ('K') | « src/ia32/lithium-ia32.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/lithium-ia32.cc
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
index c408288363376ab956e27867cf0d8ddb2254d44c..cb2839ec84b5f62ce48d15b01b331cf988351a5b 100644
--- a/src/ia32/lithium-ia32.cc
+++ b/src/ia32/lithium-ia32.cc
@@ -1125,14 +1125,20 @@ LInstruction* LChunkBuilder::DoCallJSFunction(
LInstruction* LChunkBuilder::DoCallWithDescriptor(
HCallWithDescriptor* instr) {
- const CallInterfaceDescriptor* descriptor = instr->descriptor();
-
- LOperand* target = UseRegisterOrConstantAtStart(instr->target());
+ const InterfaceDescriptor* descriptor = instr->descriptor();
ZoneList<LOperand*> ops(instr->OperandCount(), zone());
+ LOperand* target = UseRegisterOrConstantAtStart(instr->target());
ops.Add(target, zone());
- for (int i = 1; i < instr->OperandCount(); i++) {
+
+ if (descriptor->needs_context_register()) {
+ LOperand* context = UseFixed(instr->context(), esi);
+ ops.Add(context, zone());
+ }
+
+ int first_descriptor_index = instr->FirstDescriptorOperandIndex();
+ for (int i = first_descriptor_index; i < instr->OperandCount(); i++) {
LOperand* op = UseFixed(instr->OperandAt(i),
- descriptor->GetParameterRegister(i - 1));
+ descriptor->GetParameterRegister(i - first_descriptor_index));
ops.Add(op, zone());
}
« src/hydrogen-instructions.h ('K') | « src/ia32/lithium-ia32.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698