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

Unified Diff: runtime/vm/snapshot.h

Issue 1260033004: Fix for issue 23244 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: indent-code Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | 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
diff --git a/runtime/vm/snapshot.h b/runtime/vm/snapshot.h
index 1989c7b495f10b4832cd7edd3648ad9ec069e443..c383ea3f1f47e2f960557df93a7281f745452e97 100644
--- a/runtime/vm/snapshot.h
+++ b/runtime/vm/snapshot.h
@@ -97,6 +97,8 @@ enum SerializedHeaderType {
static const int8_t kHeaderTagBits = 2;
static const int8_t kObjectIdBits = (kBitsPerInt32 - (kHeaderTagBits + 1));
static const intptr_t kMaxObjectId = (kMaxUint32 >> (kHeaderTagBits + 1));
+static const bool kAsReference = true;
+static const bool kAsInlinedObject = false;
class SerializedHeaderTag : public BitField<enum SerializedHeaderType,
@@ -367,9 +369,20 @@ class SnapshotReader : public BaseReader {
RawClass* ReadClassId(intptr_t object_id);
RawObject* ReadStaticImplicitClosure(intptr_t object_id, intptr_t cls_header);
- RawObject* ReadObjectImpl();
- RawObject* ReadObjectImpl(intptr_t header);
- RawObject* ReadObjectRef();
+
+ // Implementation to read an object.
+ RawObject* ReadObjectImpl(bool as_reference);
+ RawObject* ReadObjectImpl(intptr_t header, bool as_reference);
+
+ // Read an object reference from the stream.
+ RawObject* ReadObjectRef(intptr_t object_id,
+ intptr_t class_header,
+ intptr_t tags);
+
+ // Read an inlined object from the stream.
+ RawObject* ReadInlinedObject(intptr_t object_id,
+ intptr_t class_header,
+ intptr_t tags);
// Read a VM isolate object that was serialized as an Id.
RawObject* ReadVMIsolateObject(intptr_t object_id);
@@ -378,9 +391,6 @@ class SnapshotReader : public BaseReader {
// or an object that was already serialized before).
RawObject* ReadIndexedObject(intptr_t object_id);
- // Read an inlined object from the stream.
- RawObject* ReadInlinedObject(intptr_t object_id);
-
// Decode class id from the header field.
intptr_t LookupInternalClass(intptr_t class_header);
@@ -703,12 +713,12 @@ class SnapshotWriter : public BaseWriter {
bool CheckAndWritePredefinedObject(RawObject* raw);
void HandleVMIsolateObject(RawObject* raw);
- void WriteObjectRef(RawObject* raw);
void WriteClassId(RawClass* cls);
void WriteStaticImplicitClosure(intptr_t object_id,
RawFunction* func,
intptr_t tags);
- void WriteObjectImpl(RawObject* raw);
+ void WriteObjectImpl(RawObject* raw, bool as_reference);
+ void WriteObjectRef(RawObject* raw);
void WriteInlinedObject(RawObject* raw);
void WriteForwardedObjects();
void ArrayWriteTo(intptr_t object_id,
« 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