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

Side by Side Diff: runtime/vm/snapshot.h

Issue 10867046: Use Heap::kOld when allocating objects for script snapshots. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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/raw_object_snapshot.cc ('k') | runtime/vm/snapshot.cc » ('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 #ifndef VM_SNAPSHOT_H_ 5 #ifndef VM_SNAPSHOT_H_
6 #define VM_SNAPSHOT_H_ 6 #define VM_SNAPSHOT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/bitfield.h" 10 #include "vm/bitfield.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 kIsNotDeserialized = 1, 93 kIsNotDeserialized = 1,
94 }; 94 };
95 95
96 96
97 enum SerializeState { 97 enum SerializeState {
98 kIsSerialized = 0, 98 kIsSerialized = 0,
99 kIsNotSerialized = 1, 99 kIsNotSerialized = 1,
100 }; 100 };
101 101
102 102
103 #define HEAP_SPACE(kind) (kind == Snapshot::kMessage) ? Heap::kNew : Heap::kOld
104
105
103 // Structure capturing the raw snapshot. 106 // Structure capturing the raw snapshot.
104 class Snapshot { 107 class Snapshot {
105 public: 108 public:
106 enum Kind { 109 enum Kind {
107 kFull = 0, // Full snapshot of the current dart heap. 110 kFull = 0, // Full snapshot of the current dart heap.
108 kScript, // A partial snapshot of only the application script. 111 kScript, // A partial snapshot of only the application script.
109 kMessage, // A partial snapshot used only for isolate messaging. 112 kMessage, // A partial snapshot used only for isolate messaging.
110 }; 113 };
111 114
112 static const int kHeaderSize = 2 * sizeof(int32_t); 115 static const int kHeaderSize = 2 * sizeof(int32_t);
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 private: 516 private:
514 SnapshotWriter* writer_; 517 SnapshotWriter* writer_;
515 bool as_references_; 518 bool as_references_;
516 519
517 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); 520 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor);
518 }; 521 };
519 522
520 } // namespace dart 523 } // namespace dart
521 524
522 #endif // VM_SNAPSHOT_H_ 525 #endif // VM_SNAPSHOT_H_
OLDNEW
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698