Index: src/ia32/lithium-ia32.cc |
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc |
index bd1863d1f4ce78eb625be1648bfe120f82a5f24c..3741456cb57ea55200564936dd085955845149cc 100644 |
--- a/src/ia32/lithium-ia32.cc |
+++ b/src/ia32/lithium-ia32.cc |
@@ -1124,19 +1124,25 @@ LInstruction* LChunkBuilder::DoCallJSFunction( |
LInstruction* LChunkBuilder::DoCallWithDescriptor( |
HCallWithDescriptor* instr) { |
- const CallInterfaceDescriptor* descriptor = instr->descriptor(); |
- |
- LOperand* target = UseRegisterOrConstantAtStart(instr->target()); |
+ bool is_stub = instr->is_stub(); |
ZoneList<LOperand*> ops(instr->OperandCount(), zone()); |
+ LOperand* target = UseRegisterOrConstantAtStart(instr->target()); |
ops.Add(target, zone()); |
- for (int i = 1; i < instr->OperandCount(); i++) { |
- LOperand* op = UseFixed(instr->OperandAt(i), |
- descriptor->GetParameterRegister(i - 1)); |
+ if (is_stub) { |
+ LOperand* context = UseFixed(instr->context(), esi); |
+ ops.Add(context, zone()); |
+ } |
+ int start_index = is_stub ? 2 : 1; |
+ for (int i = start_index; i < instr->OperandCount(); i++) { |
+ Register reg = instr->is_stub() |
+ ? instr->stub_descriptor()->GetParameterRegister(i - start_index) |
+ : instr->call_descriptor()->GetParameterRegister(i - start_index); |
+ LOperand* op = UseFixed(instr->OperandAt(i), reg); |
ops.Add(op, zone()); |
} |
LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( |
- descriptor, ops, zone()); |
+ ops, zone()); |
danno
2014/07/11 12:30:30
clang format the patch?
mvstanton
2014/07/21 09:41:17
This whole block is gone, I no longer need to chan
|
return MarkAsCall(DefineFixed(result, eax), instr, CANNOT_DEOPTIMIZE_EAGERLY); |
} |