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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/snapshot_ids.h ('k') | tests/standalone/issue14236_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/globals.h" 5 #include "platform/globals.h"
6 6
7 #include "include/dart_debugger_api.h" 7 #include "include/dart_debugger_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/bigint_operations.h" 9 #include "vm/bigint_operations.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 2699 matching lines...) Expand 10 before | Expand all | Expand 10 after
2710 2710
2711 result = Dart_RunLoop(); 2711 result = Dart_RunLoop();
2712 EXPECT(Dart_IsError(result)); 2712 EXPECT(Dart_IsError(result));
2713 EXPECT(Dart_ErrorHasException(result)); 2713 EXPECT(Dart_ErrorHasException(result));
2714 EXPECT_SUBSTRING("Exception: nulltruefalse123456æøå3.14[]100123456789\n", 2714 EXPECT_SUBSTRING("Exception: nulltruefalse123456æøå3.14[]100123456789\n",
2715 Dart_GetError(result)); 2715 Dart_GetError(result));
2716 2716
2717 Dart_ExitScope(); 2717 Dart_ExitScope();
2718 } 2718 }
2719 2719
2720
2721 TEST_CASE(OmittedObjectEncodingLength) {
2722 StackZone zone(Isolate::Current());
2723 uint8_t* buffer;
2724 MessageWriter writer(&buffer, &zone_allocator);
2725 writer.WriteInlinedObjectHeader(kOmittedObjectId);
2726 // For performance, we'd like single-byte headers when ids are omitted.
2727 // If this starts failing, consider renumbering the snapshot ids.
2728 EXPECT_EQ(1, writer.BytesWritten());
2729 }
2730
2720 } // namespace dart 2731 } // namespace dart
OLDNEW
« 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