Index: runtime/include/dart_api.h |
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h |
index bc8c474ddc275e2963a38b7eec41b81752fc5149..d019d4fcea5bfe401be5ade8377c45bafb5fc291 100755 |
--- a/runtime/include/dart_api.h |
+++ b/runtime/include/dart_api.h |
@@ -2960,7 +2960,6 @@ DART_EXPORT Dart_Handle Dart_Precompile( |
/** |
* Creates a precompiled snapshot. |
- * - The VM must not have been started from a snapshot. |
* - A root library must have been loaded. |
* - Dart_Precompile must have been called. |
* |
@@ -2972,6 +2971,11 @@ DART_EXPORT Dart_Handle Dart_Precompile( |
* The vm isolate snapshot, kInstructionsSnapshot and kDataSnapshot should be |
* passed as arguments to Dart_Initialize. The isolate snapshot should be |
* passed to Dart_CreateIsolate. |
+ * |
+ * The buffers are scope allocated and are only valid until the next call to |
+ * Dart_ExitScope. |
+ * |
+ * \return A valid handle if no error occurs during the operation. |
*/ |
DART_EXPORT Dart_Handle Dart_CreatePrecompiledSnapshotAssembly( |
uint8_t** vm_isolate_snapshot_buffer, |
@@ -3002,7 +3006,30 @@ DART_EXPORT Dart_Handle Dart_CreatePrecompiledSnapshotBlob( |
DART_EXPORT Dart_Handle Dart_PrecompileJIT(); |
-DART_EXPORT Dart_Handle Dart_CreatePrecompiledJITSnapshotBlob( |
+/** |
+ * Creates a snapshot that caches unoptimized code and type feedback for faster |
+ * startup and quicker warmup in a subsequent process. |
+ * |
+ * Outputs a snapshot in four pieces. The vm isolate snapshot, |
+ * instructions_blob and rodata_blob should be passed as arguments to |
+ * Dart_Initialize. The isolate snapshot should be passed to |
+ * Dart_CreateIsolate. The instructions piece must be loaded with execute |
+ * permissions; the other pieces may loaded as read-only. |
+ * |
+ * - Requires the VM to have been started with --load-deferred-eagerly. |
+ * - Requires the VM to have not been started with --precompilation. |
+ * - Not supported when targeting IA32. |
+ * - The VM writing the snapshot and the VM reading the snapshot must be the |
+ * same version, must be built in the same DEBUG/RELEASE/PRODUCT mode, must |
+ * be targeting the same architecture, and must both be in checked mode or |
+ * both in unchecked mode. |
+ * |
+ * The buffers are scope allocated and are only valid until the next call to |
+ * Dart_ExitScope. |
+ * |
+ * \return A valid handle if no error occurs during the operation. |
+ */ |
+DART_EXPORT Dart_Handle Dart_CreateAppJITSnapshot( |
uint8_t** vm_isolate_snapshot_buffer, |
intptr_t* vm_isolate_snapshot_size, |
uint8_t** isolate_snapshot_buffer, |