Index: runtime/vm/snapshot.cc |
=================================================================== |
--- runtime/vm/snapshot.cc (revision 11394) |
+++ runtime/vm/snapshot.cc (working copy) |
@@ -198,7 +198,7 @@ |
RawObject* SnapshotReader::ReadObjectImpl() { |
int64_t value = Read<int64_t>(); |
if ((value & kSmiTagMask) == 0) { |
- return Integer::New((value >> kSmiTagShift)); |
+ return Integer::New((value >> kSmiTagShift), HEAP_SPACE(kind_)); |
} |
return ReadObjectImpl(value); |
} |
@@ -221,7 +221,7 @@ |
RawObject* SnapshotReader::ReadObjectRef() { |
int64_t header_value = Read<int64_t>(); |
if ((header_value & kSmiTagMask) == 0) { |
- return Integer::New((header_value >> kSmiTagShift)); |
+ return Integer::New((header_value >> kSmiTagShift), HEAP_SPACE(kind_)); |
} |
ASSERT((header_value <= kIntptrMax) && (header_value >= kIntptrMin)); |
if (IsVMIsolateObject(header_value)) { |
@@ -250,7 +250,7 @@ |
if (kind_ == Snapshot::kFull) { |
result ^= AllocateUninitialized(cls_, instance_size); |
} else { |
- result ^= Object::Allocate(cls_.id(), instance_size, Heap::kNew); |
+ result ^= Object::Allocate(cls_.id(), instance_size, HEAP_SPACE(kind_)); |
} |
return result.raw(); |
} |
@@ -266,7 +266,8 @@ |
intptr_t len = ReadSmiValue(); |
Array& array = Array::ZoneHandle( |
isolate(), |
- (kind_ == Snapshot::kFull) ? NewArray(len) : Array::New(len)); |
+ ((kind_ == Snapshot::kFull) ? |
+ NewArray(len) : Array::New(len, HEAP_SPACE(kind_)))); |
AddBackRef(object_id, &array, kIsNotDeserialized); |
return array.raw(); |
@@ -277,7 +278,7 @@ |
ImmutableArray& array = ImmutableArray::ZoneHandle( |
isolate(), |
(kind_ == Snapshot::kFull) ? |
- NewImmutableArray(len) : ImmutableArray::New(len)); |
+ NewImmutableArray(len) : ImmutableArray::New(len, HEAP_SPACE(kind_))); |
AddBackRef(object_id, &array, kIsNotDeserialized); |
return array.raw(); |
@@ -661,7 +662,9 @@ |
if (kind_ == Snapshot::kFull) { |
*result ^= AllocateUninitialized(cls_, instance_size); |
} else { |
- *result ^= Object::Allocate(cls_.id(), instance_size, Heap::kNew); |
+ *result ^= Object::Allocate(cls_.id(), |
+ instance_size, |
+ HEAP_SPACE(kind_)); |
} |
} else { |
cls_ ^= ReadObjectImpl(); |