Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Unified Diff: runtime/vm/snapshot.cc

Issue 10867046: Use Heap::kOld when allocating objects for script snapshots. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/snapshot.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « runtime/vm/snapshot.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698