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

Unified Diff: runtime/include/dart_api.h

Issue 1023753006: First step towards splitting a full snapshot into a vm isolate snapshot and a (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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/bin/snapshot_in.cc ('k') | runtime/tools/create_snapshot_bin.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
===================================================================
--- runtime/include/dart_api.h (revision 44745)
+++ runtime/include/dart_api.h (working copy)
@@ -825,6 +825,8 @@
/**
* Initializes the VM.
*
+ * \param vm_isolate_snapshot A buffer containing a snapshot of the VM isolate
+ * or NULL if no snapshot is provided.
* \param create A function to be called during isolate creation.
* See Dart_IsolateCreateCallback.
* \param interrupt A function to be called when an isolate is interrupted.
@@ -837,6 +839,7 @@
* \return True if initialization is successful.
*/
DART_EXPORT bool Dart_Initialize(
+ const uint8_t* vm_isolate_snapshot,
Dart_IsolateCreateCallback create,
Dart_IsolateInterruptCallback interrupt,
Dart_IsolateUnhandledExceptionCallback unhandled_exception,
@@ -889,8 +892,8 @@
* Provided only for advisory purposes to improve debugging messages.
* \param main The name of the main entry point this isolate will run.
* Provided only for advisory purposes to improve debugging messages.
- * \param snapshot A buffer containing a VM snapshot or NULL if no
- * snapshot is provided.
+ * \param snapshot A buffer containing a snapshot of the isolate or
+ * NULL if no snapshot is provided.
* \param callback_data Embedder data. This data will be passed to
* the Dart_IsolateCreateCallback when new isolates are spawned from
* this parent isolate.
@@ -992,9 +995,10 @@
/**
* Creates a full snapshot of the current isolate heap.
*
- * A full snapshot is a compact representation of the dart heap state and
- * can be used for fast initialization of an isolate. A Snapshot of the heap
- * can only be created before any dart code has executed.
+ * A full snapshot is a compact representation of the dart vm isolate heap
+ * and dart isolate heap states. These snapshots are used to initialize
+ * the vm isolate on startup and fast initialization of an isolate.
+ * A Snapshot of the heap is created before any dart code has executed.
*
* Requires there to be a current isolate.
*
@@ -1005,8 +1009,11 @@
*
* \return A valid handle if no error occurs during the operation.
*/
-DART_EXPORT Dart_Handle Dart_CreateSnapshot(uint8_t** buffer,
- intptr_t* size);
+DART_EXPORT Dart_Handle Dart_CreateSnapshot(
+ uint8_t** vm_isolate_snapshot_buffer,
+ intptr_t* vm_isolate_snapshot_size,
+ uint8_t** isolate_snapshot_buffer,
+ intptr_t* isolate_snapshot_size);
/**
* Creates a snapshot of the application script loaded in the isolate.
« no previous file with comments | « runtime/bin/snapshot_in.cc ('k') | runtime/tools/create_snapshot_bin.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698