Index: vm/object.cc |
=================================================================== |
--- vm/object.cc (revision 5548) |
+++ vm/object.cc (working copy) |
@@ -8326,20 +8326,21 @@ |
if (leftover_size >= Array::InstanceSize(0)) { |
// As we have enough space to use an array object, update the leftover |
// space as an Array object. |
- new_array.raw_ = reinterpret_cast<RawArray*>(RawObject::FromAddr(addr)); |
- new_array.raw_ptr()->class_ = isolate->object_store()->array_class(); |
+ RawArray* raw = reinterpret_cast<RawArray*>(RawObject::FromAddr(addr)); |
+ raw->ptr()->class_ = isolate->object_store()->array_class(); |
tags = RawObject::SizeTag::update(leftover_size, tags); |
- new_array.raw_ptr()->tags_ = tags; |
+ raw->ptr()->tags_ = tags; |
intptr_t leftover_len = |
((leftover_size - Array::InstanceSize(0)) / kWordSize); |
- new_array.SetLength(leftover_len); |
+ raw->ptr()->tags_ = tags; |
+ raw->ptr()->length_ = Smi::New(leftover_len); |
} else { |
// Update the leftover space as a basic object. |
ASSERT(leftover_size == Object::InstanceSize()); |
- Object& new_object = Object::Handle(isolate, RawObject::FromAddr(addr)); |
- new_object.raw()->ptr()->class_ = isolate->object_store()->object_class(); |
+ RawObject* raw = reinterpret_cast<RawObject*>(RawObject::FromAddr(addr)); |
+ raw->ptr()->class_ = isolate->object_store()->object_class(); |
tags = RawObject::SizeTag::update(leftover_size, tags); |
- new_object.raw()->ptr()->tags_ = tags; |
+ raw->ptr()->tags_ = tags; |
} |
} |
return array.raw(); |