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

Side by Side Diff: runtime/vm/snapshot_test.cc

Issue 2161853002: Remove dead full snapshot support from the recursive descent serializer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: . Created 4 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
« no previous file with comments | « runtime/vm/snapshot.cc ('k') | no next file » | 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_tools_api.h" 7 #include "include/dart_tools_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/clustered_snapshot.h" 10 #include "vm/clustered_snapshot.h"
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 class TestSnapshotWriter : public SnapshotWriter { 826 class TestSnapshotWriter : public SnapshotWriter {
827 public: 827 public:
828 static const intptr_t kInitialSize = 64 * KB; 828 static const intptr_t kInitialSize = 64 * KB;
829 TestSnapshotWriter(uint8_t** buffer, ReAlloc alloc) 829 TestSnapshotWriter(uint8_t** buffer, ReAlloc alloc)
830 : SnapshotWriter(Thread::Current(), 830 : SnapshotWriter(Thread::Current(),
831 Snapshot::kScript, 831 Snapshot::kScript,
832 buffer, 832 buffer,
833 alloc, 833 alloc,
834 kInitialSize, 834 kInitialSize,
835 &forward_list_, 835 &forward_list_,
836 NULL, /* test_writer */
837 true /* can_send_any_object */), 836 true /* can_send_any_object */),
838 forward_list_(thread(), kMaxPredefinedObjectIds) { 837 forward_list_(thread(), kMaxPredefinedObjectIds) {
839 ASSERT(buffer != NULL); 838 ASSERT(buffer != NULL);
840 ASSERT(alloc != NULL); 839 ASSERT(alloc != NULL);
841 } 840 }
842 ~TestSnapshotWriter() { } 841 ~TestSnapshotWriter() { }
843 842
844 // Writes just a script object 843 // Writes just a script object
845 void WriteScript(const Script& script) { 844 void WriteScript(const Script& script) {
846 WriteObject(script.raw()); 845 WriteObject(script.raw());
(...skipping 2165 matching lines...) Expand 10 before | Expand all | Expand 10 after
3012 StackZone zone(Thread::Current()); 3011 StackZone zone(Thread::Current());
3013 uint8_t* buffer; 3012 uint8_t* buffer;
3014 MessageWriter writer(&buffer, &zone_allocator, true); 3013 MessageWriter writer(&buffer, &zone_allocator, true);
3015 writer.WriteInlinedObjectHeader(kOmittedObjectId); 3014 writer.WriteInlinedObjectHeader(kOmittedObjectId);
3016 // For performance, we'd like single-byte headers when ids are omitted. 3015 // For performance, we'd like single-byte headers when ids are omitted.
3017 // If this starts failing, consider renumbering the snapshot ids. 3016 // If this starts failing, consider renumbering the snapshot ids.
3018 EXPECT_EQ(1, writer.BytesWritten()); 3017 EXPECT_EQ(1, writer.BytesWritten());
3019 } 3018 }
3020 3019
3021 } // namespace dart 3020 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/snapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698