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

Unified Diff: runtime/vm/snapshot.h

Issue 529823002: - Add AtomicOperations::CompareAndSwapWord (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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
Index: runtime/vm/snapshot.h
===================================================================
--- runtime/vm/snapshot.h (revision 39714)
+++ runtime/vm/snapshot.h (working copy)
@@ -428,7 +428,7 @@
};
-class BaseWriter {
+class BaseWriter : public StackResource {
public:
// Size of the snapshot.
intptr_t BytesWritten() const { return stream_.bytes_written(); }
@@ -496,7 +496,9 @@
protected:
BaseWriter(uint8_t** buffer,
ReAlloc alloc,
- intptr_t initial_size) : stream_(buffer, alloc, initial_size) {
+ intptr_t initial_size)
+ : StackResource(Isolate::Current()),
+ stream_(buffer, alloc, initial_size) {
ASSERT(buffer != NULL);
ASSERT(alloc != NULL);
}
@@ -522,10 +524,8 @@
class ForwardList {
public:
- explicit ForwardList(intptr_t first_object_id)
- : first_object_id_(first_object_id),
- nodes_(),
- first_unprocessed_object_id_(first_object_id) {}
+ explicit ForwardList(intptr_t first_object_id);
+ ~ForwardList();
class Node : public ZoneAllocated {
public:
@@ -631,10 +631,12 @@
intptr_t tags);
void WriteInstanceRef(RawObject* raw, RawClass* cls);
+ Isolate* isolate() const { return isolate_; }
ObjectStore* object_store() const { return object_store_; }
private:
Snapshot::Kind kind_;
+ Isolate* isolate_;
ObjectStore* object_store_; // Object store for common classes.
ClassTable* class_table_; // Class table for the class index to class lookup.
ForwardList forward_list_;

Powered by Google App Engine
This is Rietveld 408576698