OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
3 * for details. All rights reserved. Use of this source code is governed by a | 3 * for details. All rights reserved. Use of this source code is governed by a |
4 * BSD-style license that can be found in the LICENSE file. | 4 * BSD-style license that can be found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #ifndef RUNTIME_INCLUDE_DART_API_H_ | 7 #ifndef RUNTIME_INCLUDE_DART_API_H_ |
8 #define RUNTIME_INCLUDE_DART_API_H_ | 8 #define RUNTIME_INCLUDE_DART_API_H_ |
9 | 9 |
10 /** \mainpage Dart Embedding API Reference | 10 /** \mainpage Dart Embedding API Reference |
(...skipping 3275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3286 DART_EXPORT Dart_Handle | 3286 DART_EXPORT Dart_Handle |
3287 Dart_CreateAppAOTSnapshotAsBlobs(uint8_t** vm_snapshot_data_buffer, | 3287 Dart_CreateAppAOTSnapshotAsBlobs(uint8_t** vm_snapshot_data_buffer, |
3288 intptr_t* vm_snapshot_data_size, | 3288 intptr_t* vm_snapshot_data_size, |
3289 uint8_t** vm_snapshot_instructions_buffer, | 3289 uint8_t** vm_snapshot_instructions_buffer, |
3290 intptr_t* vm_snapshot_instructions_size, | 3290 intptr_t* vm_snapshot_instructions_size, |
3291 uint8_t** isolate_snapshot_data_buffer, | 3291 uint8_t** isolate_snapshot_data_buffer, |
3292 intptr_t* isolate_snapshot_data_size, | 3292 intptr_t* isolate_snapshot_data_size, |
3293 uint8_t** isolate_snapshot_instructions_buffer, | 3293 uint8_t** isolate_snapshot_instructions_buffer, |
3294 intptr_t* isolate_snapshot_instructions_size); | 3294 intptr_t* isolate_snapshot_instructions_size); |
3295 | 3295 |
3296 | |
3297 /** | 3296 /** |
3298 * Sorts the class-ids in depth first traversal order of the inheritance | 3297 * Sorts the class-ids in depth first traversal order of the inheritance |
3299 * tree. This is a costly operation, but it can make method dispatch | 3298 * tree. This is a costly operation, but it can make method dispatch |
3300 * more efficient and is done before writing snapshots. | 3299 * more efficient and is done before writing snapshots. |
| 3300 * |
| 3301 * \return A valid handle if no error occurs during the operation. |
3301 */ | 3302 */ |
3302 DART_EXPORT void Dart_SortClasses(); | 3303 DART_EXPORT Dart_Handle Dart_SortClasses(); |
3303 | 3304 |
3304 | 3305 |
3305 /** | 3306 /** |
3306 * Creates a snapshot that caches compiled code and type feedback for faster | 3307 * Creates a snapshot that caches compiled code and type feedback for faster |
3307 * startup and quicker warmup in a subsequent process. | 3308 * startup and quicker warmup in a subsequent process. |
3308 * | 3309 * |
3309 * Outputs a snapshot in two pieces. The pieces should be passed to | 3310 * Outputs a snapshot in two pieces. The pieces should be passed to |
3310 * Dart_CreateIsolate in a VM using the same VM snapshot pieces used in the | 3311 * Dart_CreateIsolate in a VM using the same VM snapshot pieces used in the |
3311 * current VM. The instructions piece must be loaded with read and execute | 3312 * current VM. The instructions piece must be loaded with read and execute |
3312 * permissions; the data piece may be loaded as read-only. | 3313 * permissions; the data piece may be loaded as read-only. |
(...skipping 12 matching lines...) Expand all Loading... |
3325 * \return A valid handle if no error occurs during the operation. | 3326 * \return A valid handle if no error occurs during the operation. |
3326 */ | 3327 */ |
3327 DART_EXPORT Dart_Handle | 3328 DART_EXPORT Dart_Handle |
3328 Dart_CreateAppJITSnapshotAsBlobs(uint8_t** isolate_snapshot_data_buffer, | 3329 Dart_CreateAppJITSnapshotAsBlobs(uint8_t** isolate_snapshot_data_buffer, |
3329 intptr_t* isolate_snapshot_data_size, | 3330 intptr_t* isolate_snapshot_data_size, |
3330 uint8_t** isolate_snapshot_instructions_buffer, | 3331 uint8_t** isolate_snapshot_instructions_buffer, |
3331 intptr_t* isolate_snapshot_instructions_size); | 3332 intptr_t* isolate_snapshot_instructions_size); |
3332 | 3333 |
3333 | 3334 |
3334 /** | 3335 /** |
| 3336 * Like Dart_CreateAppJITSnapshotAsBlobs, but also creates a new VM snapshot. |
| 3337 */ |
| 3338 DART_EXPORT Dart_Handle Dart_CreateCoreJITSnapshotAsBlobs( |
| 3339 uint8_t** vm_snapshot_data_buffer, |
| 3340 intptr_t* vm_snapshot_data_size, |
| 3341 uint8_t** vm_snapshot_instructions_buffer, |
| 3342 intptr_t* vm_snapshot_instructions_size, |
| 3343 uint8_t** isolate_snapshot_data_buffer, |
| 3344 intptr_t* isolate_snapshot_data_size, |
| 3345 uint8_t** isolate_snapshot_instructions_buffer, |
| 3346 intptr_t* isolate_snapshot_instructions_size); |
| 3347 |
| 3348 |
| 3349 /** |
3335 * Returns whether the VM only supports running from precompiled snapshots and | 3350 * Returns whether the VM only supports running from precompiled snapshots and |
3336 * not from any other kind of snapshot or from source (that is, the VM was | 3351 * not from any other kind of snapshot or from source (that is, the VM was |
3337 * compiled with DART_PRECOMPILED_RUNTIME). | 3352 * compiled with DART_PRECOMPILED_RUNTIME). |
3338 */ | 3353 */ |
3339 DART_EXPORT bool Dart_IsPrecompiledRuntime(); | 3354 DART_EXPORT bool Dart_IsPrecompiledRuntime(); |
3340 | 3355 |
3341 | 3356 |
3342 /** | 3357 /** |
3343 * Print a native stack trace. Used for crash handling. | 3358 * Print a native stack trace. Used for crash handling. |
3344 */ | 3359 */ |
3345 DART_EXPORT void Dart_DumpNativeStackTrace(void* context); | 3360 DART_EXPORT void Dart_DumpNativeStackTrace(void* context); |
3346 | 3361 |
3347 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 3362 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
OLD | NEW |