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

Unified Diff: runtime/vm/snapshot.h

Issue 324433003: In SnapshotReader, changes BackRefNode to be a ValueObject. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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 | « no previous file | runtime/vm/snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot.h
===================================================================
--- runtime/vm/snapshot.h (revision 37080)
+++ runtime/vm/snapshot.h (working copy)
@@ -293,7 +293,7 @@
RawStacktrace* NewStacktrace();
private:
- class BackRefNode : public ZoneAllocated {
+ class BackRefNode : public ValueObject {
public:
BackRefNode(Object* reference, DeserializeState state)
: reference_(reference), state_(state) {}
@@ -301,11 +301,15 @@
bool is_deserialized() const { return state_ == kIsDeserialized; }
void set_state(DeserializeState state) { state_ = state; }
+ BackRefNode& operator=(const BackRefNode& other) {
+ reference_ = other.reference_;
+ state_ = other.state_;
+ return *this;
+ }
+
private:
Object* reference_;
DeserializeState state_;
-
- DISALLOW_COPY_AND_ASSIGN(BackRefNode);
};
// Allocate uninitialized objects, this is used when reading a full snapshot.
@@ -345,7 +349,7 @@
TokenStream& stream_; // Temporary token stream handle.
ExternalTypedData& data_; // Temporary stream data handle.
UnhandledException& error_; // Error handle.
- GrowableArray<BackRefNode*> backward_references_;
+ GrowableArray<BackRefNode> backward_references_;
friend class ApiError;
friend class Array;
« no previous file with comments | « no previous file | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698