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

Unified Diff: runtime/vm/snapshot.h

Issue 9325022: Decode the Dart message into a Dart_CMessage structure before calling the native port callback (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments from asiva@ Created 8 years, 10 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/native_message_handler.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 29de83f0eab8421ada5d276cb8379256e2b85e9e..a9464d67ae84585777d2862b1f6543394ecf3a60 100644
--- a/runtime/vm/snapshot.h
+++ b/runtime/vm/snapshot.h
@@ -404,68 +404,6 @@ class SnapshotReader : public BaseReader {
};
-// Use this C structure for reading internal objects in the serialized
-// data. These are objects that we need to process in order to
-// generate the Dart_CObject graph but that we don't want to expose in
-// that graph.
-// TODO(sjesse): Remove this when message serialization format is
-// updated.
-struct Dart_CObject_Internal : public Dart_CObject {
- enum Type {
- kTypeArguments = Dart_CObject::kNumberOfTypes,
- kDynamicType,
- };
-};
-
-
-// Reads a message snapshot into C structure.
-class CMessageReader : public BaseReader {
- public:
- CMessageReader(const uint8_t* buffer, intptr_t length, ReAlloc alloc);
- ~CMessageReader() { }
-
- Dart_CObject* ReadMessage();
-
- private:
- // Allocates a Dart_CObject object on the C heap.
- Dart_CObject* AllocateDartCObject();
- // Allocates a Dart_CObject object with the specified type on the C heap.
- Dart_CObject* AllocateDartCObject(Dart_CObject::Type type);
- // Allocates a Dart_CObject object for the null object on the C heap.
- Dart_CObject* AllocateDartCObjectNull();
- // Allocates a Dart_CObject object for a boolean object on the C heap.
- Dart_CObject* AllocateDartCObjectBool(bool value);
- // Allocates a Dart_CObject object for for a 32-bit integer on the C heap.
- Dart_CObject* AllocateDartCObjectInt32(int32_t value);
- // Allocates a Dart_CObject object for a double on the C heap.
- Dart_CObject* AllocateDartCObjectDouble(double value);
- // Allocates a Dart_CObject object for string data on the C heap.
- Dart_CObject* AllocateDartCObjectString(intptr_t length);
- // Allocates a C array of Dart_CObject objects on the C heap.
- Dart_CObject* AllocateDartCObjectArray(intptr_t length);
-
- intptr_t LookupInternalClass(intptr_t class_header);
- Dart_CObject* ReadInlinedObject(intptr_t object_id);
- Dart_CObject* ReadObjectImpl(intptr_t header);
- Dart_CObject* ReadIndexedObject(intptr_t object_id);
- Dart_CObject* ReadObject();
-
- // Add object to backward references.
- void AddBackwardReference(intptr_t id, Dart_CObject* obj);
-
- Dart_CObject_Internal* AsInternal(Dart_CObject* object) {
- ASSERT(object->type >= Dart_CObject::kNumberOfTypes);
- return reinterpret_cast<Dart_CObject_Internal*>(object);
- }
-
- ReAlloc alloc_;
- GrowableArray<Dart_CObject*> backward_references_;
-
- Dart_CObject type_arguments_marker;
- Dart_CObject dynamic_type_marker;
-};
-
-
class BaseWriter {
public:
// Size of the snapshot.
« no previous file with comments | « runtime/vm/native_message_handler.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698