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

Unified Diff: runtime/vm/snapshot.cc

Issue 11367044: Merged String subclasses into String. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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
Index: runtime/vm/snapshot.cc
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index 77204f33ba6e0ad7813ab918dee4fca8242e2a04..f6f81e25a20c81053033833d2073840a3aa3b312 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -30,7 +30,8 @@ static bool IsSingletonClassId(intptr_t class_id) {
static bool IsObjectStoreClassId(intptr_t class_id) {
// Check if this is a class which is stored in the object store.
return (class_id == kObjectCid ||
- (class_id >= kInstanceCid && class_id <= kWeakPropertyCid));
+ (class_id >= kInstanceCid && class_id <= kWeakPropertyCid) ||
+ RawObject::IsStringClassId(class_id));
}
@@ -292,6 +293,7 @@ RawObject* SnapshotReader::ReadObjectRef() {
break; \
}
CLASS_LIST_NO_OBJECT(SNAPSHOT_READ)
+ CLASS_LIST_STRING_SUBTYPES(SNAPSHOT_READ)
#undef SNAPSHOT_READ
default: UNREACHABLE(); break;
}
@@ -431,7 +433,8 @@ RawClass* SnapshotReader::NewClass(intptr_t class_id) {
ASSERT(kind_ == Snapshot::kFull);
ASSERT(isolate()->no_gc_scope_depth() != 0);
if (class_id < kNumPredefinedCids) {
- ASSERT((class_id >= kInstanceCid) && (class_id <= kDartFunctionCid));
+ ASSERT(((class_id >= kInstanceCid) && (class_id <= kDartFunctionCid)) ||
+ RawObject::IsStringClassId(class_id));
return isolate()->class_table()->At(class_id);
}
cls_ = Object::class_class();
@@ -711,6 +714,7 @@ RawObject* SnapshotReader::ReadInlinedObject(intptr_t object_id) {
break; \
}
CLASS_LIST_NO_OBJECT(SNAPSHOT_READ)
+ CLASS_LIST_STRING_SUBTYPES(SNAPSHOT_READ)
#undef SNAPSHOT_READ
default: UNREACHABLE(); break;
}
@@ -870,6 +874,7 @@ void SnapshotWriter::WriteObjectRef(RawObject* raw) {
} \
CLASS_LIST_NO_OBJECT(SNAPSHOT_WRITE)
+ CLASS_LIST_STRING_SUBTYPES(SNAPSHOT_WRITE)
#undef SNAPSHOT_WRITE
default: break;
}
@@ -1067,6 +1072,7 @@ void SnapshotWriter::WriteInlinedObject(RawObject* raw) {
} \
CLASS_LIST_NO_OBJECT(SNAPSHOT_WRITE)
+ CLASS_LIST_STRING_SUBTYPES(SNAPSHOT_WRITE)
#undef SNAPSHOT_WRITE
default: break;
}

Powered by Google App Engine
This is Rietveld 408576698