| Index: runtime/include/dart_api.h
|
| diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
|
| index 7bd749c38e0def7732033b4d1ec13ea5e4e7ded1..14b2fdfc3ebf7f2c96ce1b364c32e771145505f4 100644
|
| --- a/runtime/include/dart_api.h
|
| +++ b/runtime/include/dart_api.h
|
| @@ -773,7 +773,7 @@ typedef Dart_Handle (*Dart_GetVMServiceAssetsArchive)();
|
| * The current version of the Dart_InitializeFlags. Should be incremented every
|
| * time Dart_InitializeFlags changes in a binary incompatible way.
|
| */
|
| -#define DART_INITIALIZE_PARAMS_CURRENT_VERSION (0x00000001)
|
| +#define DART_INITIALIZE_PARAMS_CURRENT_VERSION (0x00000002)
|
|
|
| /**
|
| * Describes how to initialize the VM. Used with Dart_Initialize.
|
| @@ -794,9 +794,8 @@ typedef Dart_Handle (*Dart_GetVMServiceAssetsArchive)();
|
| */
|
| typedef struct {
|
| int32_t version;
|
| - const uint8_t* vm_isolate_snapshot;
|
| - const uint8_t* instructions_snapshot;
|
| - const uint8_t* data_snapshot;
|
| + const uint8_t* vm_snapshot_data;
|
| + const uint8_t* vm_snapshot_instructions;
|
| Dart_IsolateCreateCallback create;
|
| Dart_IsolateShutdownCallback shutdown;
|
| Dart_ThreadExitCallback thread_exit;
|
| @@ -864,8 +863,9 @@ DART_EXPORT bool Dart_IsVMFlagSet(const char* flag_name);
|
| * 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 snapshot of the isolate or
|
| - * NULL if no snapshot is provided.
|
| + * \param isolate_snapshot_data
|
| + * \param isolate_snapshot_instructions Buffers containing a snapshot of the
|
| + * isolate or NULL if no snapshot is provided.
|
| * \param flags Pointer to VM specific flags or NULL for default flags.
|
| * \param callback_data Embedder data. This data will be passed to
|
| * the Dart_IsolateCreateCallback when new isolates are spawned from
|
| @@ -875,12 +875,14 @@ DART_EXPORT bool Dart_IsVMFlagSet(const char* flag_name);
|
| * \return The new isolate is returned. May be NULL if an error
|
| * occurs during isolate initialization.
|
| */
|
| -DART_EXPORT Dart_Isolate Dart_CreateIsolate(const char* script_uri,
|
| - const char* main,
|
| - const uint8_t* snapshot,
|
| - Dart_IsolateFlags* flags,
|
| - void* callback_data,
|
| - char** error);
|
| +DART_EXPORT Dart_Isolate
|
| +Dart_CreateIsolate(const char* script_uri,
|
| + const char* main,
|
| + const uint8_t* isolate_snapshot_data,
|
| + const uint8_t* isolate_snapshot_instructions,
|
| + Dart_IsolateFlags* flags,
|
| + void* callback_data,
|
| + char** error);
|
| /* TODO(turnidge): Document behavior when there is already a current
|
| * isolate. */
|
|
|
| @@ -1009,10 +1011,10 @@ DART_EXPORT void Dart_ExitIsolate();
|
| * \return A valid handle if no error occurs during the operation.
|
| */
|
| 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);
|
| +Dart_CreateSnapshot(uint8_t** vm_snapshot_data_buffer,
|
| + intptr_t* vm_snapshot_data_size,
|
| + uint8_t** isolate_snapshot_data_buffer,
|
| + intptr_t* isolate_snapshot_data_size);
|
|
|
| /**
|
| * Creates a snapshot of the application script loaded in the isolate.
|
| @@ -1030,8 +1032,9 @@ Dart_CreateSnapshot(uint8_t** vm_isolate_snapshot_buffer,
|
| *
|
| * \return A valid handle if no error occurs during the operation.
|
| */
|
| -DART_EXPORT Dart_Handle Dart_CreateScriptSnapshot(uint8_t** buffer,
|
| - intptr_t* size);
|
| +DART_EXPORT Dart_Handle
|
| +Dart_CreateScriptSnapshot(uint8_t** script_snapshot_buffer,
|
| + intptr_t* script_snapshot_size);
|
|
|
| /**
|
| * Schedules an interrupt for the specified isolate.
|
| @@ -2839,8 +2842,9 @@ DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url,
|
| * \return If no error occurs, the Library object corresponding to the root
|
| * script is returned. Otherwise an error handle is returned.
|
| */
|
| -DART_EXPORT Dart_Handle Dart_LoadScriptFromSnapshot(const uint8_t* buffer,
|
| - intptr_t buffer_len);
|
| +DART_EXPORT Dart_Handle
|
| +Dart_LoadScriptFromSnapshot(const uint8_t* script_snapshot_buffer,
|
| + intptr_t script_snapshot_size);
|
|
|
| /**
|
| * Loads a dart application via an in-memory kernel program.
|
| @@ -3244,14 +3248,14 @@ Dart_CreateAppAOTSnapshotAsAssembly(uint8_t** assembly_buffer,
|
| * other pieces may be loaded as read-only.
|
| */
|
| DART_EXPORT Dart_Handle
|
| -Dart_CreateAppAOTSnapshotAsBlobs(uint8_t** vm_isolate_snapshot_buffer,
|
| - intptr_t* vm_isolate_snapshot_size,
|
| - uint8_t** isolate_snapshot_buffer,
|
| - intptr_t* isolate_snapshot_size,
|
| - uint8_t** instructions_blob_buffer,
|
| - intptr_t* instructions_blob_size,
|
| - uint8_t** rodata_blob_buffer,
|
| - intptr_t* rodata_blob_size);
|
| +Dart_CreateAppAOTSnapshotAsBlobs(uint8_t** vm_snapshot_data_buffer,
|
| + intptr_t* vm_snapshot_data_size,
|
| + uint8_t** vm_snapshot_instructions_buffer,
|
| + intptr_t* vm_snapshot_instructions_size,
|
| + uint8_t** isolate_snapshot_data_buffer,
|
| + intptr_t* isolate_snapshot_data_size,
|
| + uint8_t** isolate_snapshot_instructions_buffer,
|
| + intptr_t* isolate_snapshot_instructions_size);
|
|
|
|
|
| /**
|
| @@ -3278,12 +3282,10 @@ Dart_CreateAppAOTSnapshotAsBlobs(uint8_t** vm_isolate_snapshot_buffer,
|
| * \return A valid handle if no error occurs during the operation.
|
| */
|
| DART_EXPORT Dart_Handle
|
| -Dart_CreateAppJITSnapshotAsBlobs(uint8_t** isolate_snapshot_buffer,
|
| - intptr_t* isolate_snapshot_size,
|
| - uint8_t** instructions_blob_buffer,
|
| - intptr_t* instructions_blob_size,
|
| - uint8_t** rodata_blob_buffer,
|
| - intptr_t* rodata_blob_size);
|
| +Dart_CreateAppJITSnapshotAsBlobs(uint8_t** isolate_snapshot_data_buffer,
|
| + intptr_t* isolate_snapshot_data_size,
|
| + uint8_t** isolate_snapshot_instructions_buffer,
|
| + intptr_t* isolate_snapshot_instructions_size);
|
|
|
|
|
| /**
|
|
|