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

Unified Diff: runtime/vm/snapshot_test.cc

Issue 387993007: 5% smaller snapshots by omitting object ids when possible (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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_ids.h ('k') | tests/standalone/issue14236_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot_test.cc
===================================================================
--- runtime/vm/snapshot_test.cc (revision 38170)
+++ runtime/vm/snapshot_test.cc (working copy)
@@ -2717,4 +2717,15 @@
Dart_ExitScope();
}
+
+TEST_CASE(OmittedObjectEncodingLength) {
+ StackZone zone(Isolate::Current());
+ uint8_t* buffer;
+ MessageWriter writer(&buffer, &zone_allocator);
+ writer.WriteInlinedObjectHeader(kOmittedObjectId);
+ // For performance, we'd like single-byte headers when ids are omitted.
+ // If this starts failing, consider renumbering the snapshot ids.
+ EXPECT_EQ(1, writer.BytesWritten());
+}
+
} // namespace dart
« no previous file with comments | « runtime/vm/snapshot_ids.h ('k') | tests/standalone/issue14236_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698