| Index: src/mips/full-codegen-mips.cc
|
| diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
|
| index 568b8bd3c4909320b992ba257d65a9924caebd49..1dbfe095b0696804791f9ae4730b910849f295d7 100644
|
| --- a/src/mips/full-codegen-mips.cc
|
| +++ b/src/mips/full-codegen-mips.cc
|
| @@ -2264,23 +2264,26 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
|
| Label gc_required;
|
| Label allocated;
|
|
|
| - Handle<Map> map(isolate()->native_context()->iterator_result_map());
|
| + const int instance_size = 5 * kPointerSize;
|
| + DCHECK_EQ(isolate()->native_context()->iterator_result_map()->instance_size(),
|
| + instance_size);
|
|
|
| - __ Allocate(map->instance_size(), v0, a2, a3, &gc_required, TAG_OBJECT);
|
| + __ Allocate(instance_size, v0, a2, a3, &gc_required, TAG_OBJECT);
|
| __ jmp(&allocated);
|
|
|
| __ bind(&gc_required);
|
| - __ Push(Smi::FromInt(map->instance_size()));
|
| + __ Push(Smi::FromInt(instance_size));
|
| __ CallRuntime(Runtime::kAllocateInNewSpace, 1);
|
| __ lw(context_register(),
|
| MemOperand(fp, StandardFrameConstants::kContextOffset));
|
|
|
| __ bind(&allocated);
|
| - __ li(a1, Operand(map));
|
| + __ lw(a1, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX));
|
| + __ lw(a1, FieldMemOperand(a1, GlobalObject::kNativeContextOffset));
|
| + __ lw(a1, ContextOperand(a1, Context::ITERATOR_RESULT_MAP_INDEX));
|
| __ pop(a2);
|
| __ li(a3, Operand(isolate()->factory()->ToBoolean(done)));
|
| __ li(t0, Operand(isolate()->factory()->empty_fixed_array()));
|
| - DCHECK_EQ(map->instance_size(), 5 * kPointerSize);
|
| __ sw(a1, FieldMemOperand(v0, HeapObject::kMapOffset));
|
| __ sw(t0, FieldMemOperand(v0, JSObject::kPropertiesOffset));
|
| __ sw(t0, FieldMemOperand(v0, JSObject::kElementsOffset));
|
| @@ -2769,13 +2772,16 @@ void FullCodeGenerator::EmitCall(Call* expr, CallICState::CallType call_type) {
|
|
|
|
|
| void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) {
|
| - // t2: copy of the first argument or undefined if it doesn't exist.
|
| + // t3: copy of the first argument or undefined if it doesn't exist.
|
| if (arg_count > 0) {
|
| - __ lw(t2, MemOperand(sp, arg_count * kPointerSize));
|
| + __ lw(t3, MemOperand(sp, arg_count * kPointerSize));
|
| } else {
|
| - __ LoadRoot(t2, Heap::kUndefinedValueRootIndex);
|
| + __ LoadRoot(t3, Heap::kUndefinedValueRootIndex);
|
| }
|
|
|
| + // t2: the receiver of the enclosing function.
|
| + __ lw(t2, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
|
| +
|
| // t1: the receiver of the enclosing function.
|
| int receiver_offset = 2 + info_->scope()->num_parameters();
|
| __ lw(t1, MemOperand(fp, receiver_offset * kPointerSize));
|
| @@ -2787,8 +2793,9 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) {
|
| __ li(a1, Operand(Smi::FromInt(scope()->start_position())));
|
|
|
| // Do the runtime call.
|
| + __ Push(t3);
|
| __ Push(t2, t1, t0, a1);
|
| - __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5);
|
| + __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 6);
|
| }
|
|
|
|
|
|
|