Index: src/arm64/full-codegen-arm64.cc |
diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc |
index a318b61bd91d46cc9cf8986794d4686faa2ceecd..96c15adfa53ba1caedbd554c92be767185620443 100644 |
--- a/src/arm64/full-codegen-arm64.cc |
+++ b/src/arm64/full-codegen-arm64.cc |
@@ -5043,16 +5043,18 @@ 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 and populate an object with this form: { value: VAL, done: DONE } |
Register result = x0; |
- __ Allocate(map->instance_size(), result, x10, x11, &gc_required, TAG_OBJECT); |
+ __ Allocate(instance_size, result, x10, x11, &gc_required, TAG_OBJECT); |
__ B(&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)); |
@@ -5063,11 +5065,13 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) { |
Register boolean_done = x3; |
Register empty_fixed_array = x4; |
Register untagged_result = x5; |
- __ Mov(map_reg, Operand(map)); |
+ __ Ldr(map_reg, GlobalObjectMemOperand()); |
+ __ Ldr(map_reg, FieldMemOperand(map_reg, GlobalObject::kNativeContextOffset)); |
+ __ Ldr(map_reg, |
+ ContextMemOperand(map_reg, Context::ITERATOR_RESULT_MAP_INDEX)); |
__ Pop(result_value); |
__ Mov(boolean_done, Operand(isolate()->factory()->ToBoolean(done))); |
__ Mov(empty_fixed_array, Operand(isolate()->factory()->empty_fixed_array())); |
- DCHECK_EQ(map->instance_size(), 5 * kPointerSize); |
STATIC_ASSERT(JSObject::kPropertiesOffset + kPointerSize == |
JSObject::kElementsOffset); |
STATIC_ASSERT(JSGeneratorObject::kResultValuePropertyOffset + kPointerSize == |