| 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());
|
| }
|
|
|
|
|