| Index: src/mips/lithium-mips.cc
|
| diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc
|
| index d4f450e5c4ce60be2cdaaeb3a6e961223055ac57..ad39c618eaf7a504c35b53176717b0f7aa30d8db 100644
|
| --- a/src/mips/lithium-mips.cc
|
| +++ b/src/mips/lithium-mips.cc
|
| @@ -933,7 +933,7 @@ LEnvironment* LChunkBuilder::CreateEnvironment(
|
| BailoutId ast_id = hydrogen_env->ast_id();
|
| ASSERT(!ast_id.IsNone() ||
|
| hydrogen_env->frame_type() != JS_FUNCTION);
|
| - int value_count = hydrogen_env->length() - hydrogen_env->specials_count();
|
| + int value_count = hydrogen_env->length();
|
| LEnvironment* result = new(zone()) LEnvironment(
|
| hydrogen_env->closure(),
|
| hydrogen_env->frame_type(),
|
| @@ -944,15 +944,13 @@ LEnvironment* LChunkBuilder::CreateEnvironment(
|
| outer,
|
| hydrogen_env->entry(),
|
| zone());
|
| - bool needs_arguments_object_materialization = false;
|
| int argument_index = *argument_index_accumulator;
|
| - for (int i = 0; i < hydrogen_env->length(); ++i) {
|
| + for (int i = 0; i < value_count; ++i) {
|
| if (hydrogen_env->is_special_index(i)) continue;
|
|
|
| HValue* value = hydrogen_env->values()->at(i);
|
| LOperand* op = NULL;
|
| if (value->IsArgumentsObject()) {
|
| - needs_arguments_object_materialization = true;
|
| op = NULL;
|
| } else if (value->IsPushArgument()) {
|
| op = new(zone()) LArgument(argument_index++);
|
| @@ -964,21 +962,6 @@ LEnvironment* LChunkBuilder::CreateEnvironment(
|
| value->CheckFlag(HInstruction::kUint32));
|
| }
|
|
|
| - if (needs_arguments_object_materialization) {
|
| - HArgumentsObject* arguments = hydrogen_env->entry() == NULL
|
| - ? graph()->GetArgumentsObject()
|
| - : hydrogen_env->entry()->arguments_object();
|
| - ASSERT(arguments->IsLinked());
|
| - for (int i = 1; i < arguments->arguments_count(); ++i) {
|
| - HValue* value = arguments->arguments_values()->at(i);
|
| - ASSERT(!value->IsArgumentsObject() && !value->IsPushArgument());
|
| - LOperand* op = UseAny(value);
|
| - result->AddValue(op,
|
| - value->representation(),
|
| - value->CheckFlag(HInstruction::kUint32));
|
| - }
|
| - }
|
| -
|
| if (hydrogen_env->frame_type() == JS_FUNCTION) {
|
| *argument_index_accumulator = argument_index;
|
| }
|
| @@ -1359,10 +1342,15 @@ LInstruction* LChunkBuilder::DoDiv(HDiv* instr) {
|
| if (instr->representation().IsDouble()) {
|
| return DoArithmeticD(Token::DIV, instr);
|
| } else if (instr->representation().IsInteger32()) {
|
| - LOperand* dividend = UseRegister(instr->left());
|
| - LOperand* divisor = UseRegister(instr->right());
|
| - LDivI* div = new(zone()) LDivI(dividend, divisor);
|
| - return AssignEnvironment(DefineAsRegister(div));
|
| + // TODO(1042) The fixed register allocation
|
| + // is needed because we call TypeRecordingBinaryOpStub from
|
| + // the generated code, which requires registers a0
|
| + // and a1 to be used. We should remove that
|
| + // when we provide a native implementation.
|
| + LOperand* dividend = UseFixed(instr->left(), a0);
|
| + LOperand* divisor = UseFixed(instr->right(), a1);
|
| + return AssignEnvironment(AssignPointerMap(
|
| + DefineFixed(new(zone()) LDivI(dividend, divisor), v0)));
|
| } else {
|
| return DoArithmeticT(Token::DIV, instr);
|
| }
|
|
|