| Index: src/arm/lithium-arm.cc
|
| diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc
|
| index f6029b51435fcadc41f5b86487855c3692e18463..81545d17c1cfc3c0a7b3ec7af6740798e2466289 100644
|
| --- a/src/arm/lithium-arm.cc
|
| +++ b/src/arm/lithium-arm.cc
|
| @@ -2420,7 +2420,12 @@ LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
|
| ASSERT(info()->IsStub());
|
| CodeStubInterfaceDescriptor* descriptor =
|
| info()->code_stub()->GetInterfaceDescriptor(info()->isolate());
|
| - Register reg = descriptor->register_params_[instr->index()];
|
| + Register reg;
|
| + if (static_cast<int>(instr->index()) == descriptor->register_param_count_) {
|
| + reg = *(descriptor->stack_parameter_count_);
|
| + } else {
|
| + reg = descriptor->register_params_[instr->index()];
|
| + }
|
| return DefineFixed(result, reg);
|
| }
|
| }
|
| @@ -2453,8 +2458,15 @@ LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) {
|
|
|
| LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) {
|
| LOperand* args = UseRegister(instr->arguments());
|
| - LOperand* length = UseTempRegister(instr->length());
|
| - LOperand* index = UseRegister(instr->index());
|
| + LOperand* length;
|
| + LOperand* index;
|
| + if (instr->length()->IsConstant() && instr->index()->IsConstant()) {
|
| + length = UseRegisterOrConstant(instr->length());
|
| + index = UseOrConstant(instr->index());
|
| + } else {
|
| + length = UseTempRegister(instr->length());
|
| + index = Use(instr->index());
|
| + }
|
| return DefineAsRegister(new(zone()) LAccessArgumentsAt(args, length, index));
|
| }
|
|
|
|
|