Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index 76e6738c5b0f3d4d5cebe429300e4068fdeb142c..463478956f5e585cea79c26469ad6ecdb730e227 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -2330,23 +2330,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(), r0, r2, r3, &gc_required, TAG_OBJECT); |
+ __ Allocate(instance_size, r0, r2, r3, &gc_required, TAG_OBJECT); |
__ jmp(&allocated); |
__ bind(&gc_required); |
- __ Push(Smi::FromInt(map->instance_size())); |
+ __ Push(Smi::FromInt(instance_size)); |
__ CallRuntime(Runtime::kAllocateInNewSpace, 1); |
__ ldr(context_register(), |
MemOperand(fp, StandardFrameConstants::kContextOffset)); |
__ bind(&allocated); |
- __ mov(r1, Operand(map)); |
+ __ ldr(r1, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX)); |
+ __ ldr(r1, FieldMemOperand(r1, GlobalObject::kNativeContextOffset)); |
+ __ ldr(r1, ContextOperand(r1, Context::ITERATOR_RESULT_MAP_INDEX)); |
__ pop(r2); |
__ mov(r3, Operand(isolate()->factory()->ToBoolean(done))); |
__ mov(r4, Operand(isolate()->factory()->empty_fixed_array())); |
- DCHECK_EQ(map->instance_size(), 5 * kPointerSize); |
__ str(r1, FieldMemOperand(r0, HeapObject::kMapOffset)); |
__ str(r4, FieldMemOperand(r0, JSObject::kPropertiesOffset)); |
__ str(r4, FieldMemOperand(r0, JSObject::kElementsOffset)); |