| Index: src/mips64/full-codegen-mips64.cc
|
| diff --git a/src/mips64/full-codegen-mips64.cc b/src/mips64/full-codegen-mips64.cc
|
| index 5c26f163911cc726c8bb074a609f7d4e7a127174..8f8c376db4b884edfb4d4f0f12d460340e1474ef 100644
|
| --- a/src/mips64/full-codegen-mips64.cc
|
| +++ b/src/mips64/full-codegen-mips64.cc
|
| @@ -2261,23 +2261,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);
|
| __ ld(context_register(),
|
| MemOperand(fp, StandardFrameConstants::kContextOffset));
|
|
|
| __ bind(&allocated);
|
| - __ li(a1, Operand(map));
|
| + __ ld(a1, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX));
|
| + __ ld(a1, FieldMemOperand(a1, GlobalObject::kNativeContextOffset));
|
| + __ ld(a1, ContextOperand(a1, Context::ITERATOR_RESULT_MAP_INDEX));
|
| __ pop(a2);
|
| __ li(a3, Operand(isolate()->factory()->ToBoolean(done)));
|
| __ li(a4, Operand(isolate()->factory()->empty_fixed_array()));
|
| - DCHECK_EQ(map->instance_size(), 5 * kPointerSize);
|
| __ sd(a1, FieldMemOperand(v0, HeapObject::kMapOffset));
|
| __ sd(a4, FieldMemOperand(v0, JSObject::kPropertiesOffset));
|
| __ sd(a4, FieldMemOperand(v0, JSObject::kElementsOffset));
|
| @@ -2769,13 +2772,16 @@ void FullCodeGenerator::EmitCall(Call* expr, CallICState::CallType call_type) {
|
|
|
|
|
| void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) {
|
| - // a6: copy of the first argument or undefined if it doesn't exist.
|
| + // a7: copy of the first argument or undefined if it doesn't exist.
|
| if (arg_count > 0) {
|
| - __ ld(a6, MemOperand(sp, arg_count * kPointerSize));
|
| + __ ld(a7, MemOperand(sp, arg_count * kPointerSize));
|
| } else {
|
| - __ LoadRoot(a6, Heap::kUndefinedValueRootIndex);
|
| + __ LoadRoot(a7, Heap::kUndefinedValueRootIndex);
|
| }
|
|
|
| + // a6: the receiver of the enclosing function.
|
| + __ ld(a6, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
|
| +
|
| // a5: the receiver of the enclosing function.
|
| int receiver_offset = 2 + info_->scope()->num_parameters();
|
| __ ld(a5, 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(a7);
|
| __ Push(a6, a5, a4, a1);
|
| - __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5);
|
| + __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 6);
|
| }
|
|
|
|
|
|
|