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

Unified Diff: runtime/vm/dart_api_message.h

Issue 1123813002: Move symbol table from per isolate snapshot to vm isolate snapshot, this reduces the per isolate in… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 7 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/dart_api_impl_test.cc ('k') | runtime/vm/dart_api_message.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_message.h
===================================================================
--- runtime/vm/dart_api_message.h (revision 45789)
+++ runtime/vm/dart_api_message.h (working copy)
@@ -46,7 +46,10 @@
// memory allocated as there is no way to run through the resulting C
// structure and free the individual pieces. Using a zone based allocator is
// recommended.
- ApiMessageReader(const uint8_t* buffer, intptr_t length, ReAlloc alloc);
+ ApiMessageReader(const uint8_t* buffer,
+ intptr_t length,
+ ReAlloc alloc,
+ bool use_vm_isolate_snapshot = true);
~ApiMessageReader() { }
Dart_CObject* ReadMessage();
@@ -94,6 +97,8 @@
Dart_TypedData_Type type, intptr_t length);
// Allocates a C array of Dart_CObject objects.
Dart_CObject* AllocateDartCObjectArray(intptr_t length);
+ // Allocate a C Dart_CObject object for a VM isolate object.
+ Dart_CObject* AllocateDartCObjectVmIsolateObj(intptr_t id);
// Allocates a Dart_CObject_Internal object with the specified type.
Dart_CObject_Internal* AllocateDartCObjectInternal(
Dart_CObject_Internal::Type type);
@@ -127,6 +132,12 @@
return reinterpret_cast<Dart_CObject_Internal*>(object);
}
+ RawObject* VmIsolateSnapshotObject(intptr_t index) const {
+ return Object::vm_isolate_snapshot_object_table().At(index);
+ }
+
+ Dart_CObject* CreateDartCObjectString(RawObject* raw);
+
// Allocation of the structures for the decoded message happens
// either in the supplied zone or using the supplied allocation
// function.
@@ -133,6 +144,7 @@
ReAlloc alloc_;
ApiGrowableArray<BackRefNode*> backward_references_;
Dart_CObject** vm_symbol_references_;
+ intptr_t max_vm_isolate_object_id_;
Dart_CObject type_arguments_marker;
Dart_CObject dynamic_type_marker;
@@ -187,6 +199,7 @@
Dart_CObject** forward_list_;
intptr_t forward_list_length_;
intptr_t forward_id_;
+ intptr_t max_vm_isolate_object_id_;
DISALLOW_COPY_AND_ASSIGN(ApiMessageWriter);
};
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/dart_api_message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698