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

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 8383029: Implement external strings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address final review comments Created 9 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
« no previous file with comments | « runtime/vm/raw_object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object_snapshot.cc
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index 0b146685d1c614bf111981192584a1500ab0a780..fe41145484f1193a0f81f41cb3903fa384cfd92d 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -1113,6 +1113,75 @@ void RawFourByteString::WriteTo(SnapshotWriter* writer,
}
+RawExternalOneByteString* ExternalOneByteString::ReadFrom(
+ SnapshotReader* reader,
+ intptr_t object_id,
+ bool classes_serialized) {
+ UNREACHABLE();
+ return ExternalOneByteString::null();
+}
+
+
+RawExternalTwoByteString* ExternalTwoByteString::ReadFrom(
+ SnapshotReader* reader,
+ intptr_t object_id,
+ bool classes_serialized) {
+ UNREACHABLE();
+ return ExternalTwoByteString::null();
+}
+
+
+RawExternalFourByteString* ExternalFourByteString::ReadFrom(
+ SnapshotReader* reader,
+ intptr_t object_id,
+ bool classes_serialized) {
+ UNREACHABLE();
+ return ExternalFourByteString::null();
+}
+
+
+void RawExternalOneByteString::WriteTo(SnapshotWriter* writer,
+ intptr_t object_id,
+ bool serialize_classes) {
+ // Serialize as a non-external one byte string.
+ StringWriteTo(writer,
+ object_id,
+ ObjectStore::kOneByteStringClass,
+ serialize_classes,
+ ptr()->length_,
+ ptr()->hash_,
+ ptr()->external_data_->data_);
+}
+
+
+void RawExternalTwoByteString::WriteTo(SnapshotWriter* writer,
+ intptr_t object_id,
+ bool serialize_classes) {
+ // Serialize as a non-external two byte string.
+ StringWriteTo(writer,
+ object_id,
+ ObjectStore::kTwoByteStringClass,
+ serialize_classes,
+ ptr()->length_,
+ ptr()->hash_,
+ ptr()->external_data_->data_);
+}
+
+
+void RawExternalFourByteString::WriteTo(SnapshotWriter* writer,
+ intptr_t object_id,
+ bool serialize_classes) {
+ // Serialize as a non-external four byte string.
+ StringWriteTo(writer,
+ object_id,
+ ObjectStore::kFourByteStringClass,
+ serialize_classes,
+ ptr()->length_,
+ ptr()->hash_,
+ ptr()->external_data_->data_);
+}
+
+
RawBool* Bool::ReadFrom(SnapshotReader* reader,
intptr_t object_id,
bool classes_serialized) {
« no previous file with comments | « runtime/vm/raw_object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698