| 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 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 * ======== | 847 * ======== |
| 848 * Isolates | 848 * Isolates |
| 849 * ======== | 849 * ======== |
| 850 */ | 850 */ |
| 851 | 851 |
| 852 /** | 852 /** |
| 853 * Creates a new isolate. The new isolate becomes the current isolate. | 853 * Creates a new isolate. The new isolate becomes the current isolate. |
| 854 * | 854 * |
| 855 * A snapshot can be used to restore the VM quickly to a saved state | 855 * A snapshot can be used to restore the VM quickly to a saved state |
| 856 * and is useful for fast startup. If snapshot data is provided, the | 856 * and is useful for fast startup. If snapshot data is provided, the |
| 857 * isolate will be started using that snapshot data. | 857 * isolate will be started using that snapshot data. Requires a core snapshot or |
| 858 * an app snapshot created by Dart_CreateSnapshot or |
| 859 * Dart_CreatePrecompiledSnapshot* from a VM with the same version. |
| 858 * | 860 * |
| 859 * Requires there to be no current isolate. | 861 * Requires there to be no current isolate. |
| 860 * | 862 * |
| 861 * \param script_uri The name of the script this isolate will load. | 863 * \param script_uri The name of the script this isolate will load. |
| 862 * Provided only for advisory purposes to improve debugging messages. | 864 * Provided only for advisory purposes to improve debugging messages. |
| 863 * \param main The name of the main entry point this isolate will run. | 865 * \param main The name of the main entry point this isolate will run. |
| 864 * Provided only for advisory purposes to improve debugging messages. | 866 * Provided only for advisory purposes to improve debugging messages. |
| 865 * \param snapshot A buffer containing a snapshot of the isolate or | 867 * \param snapshot A buffer containing a snapshot of the isolate or |
| 866 * NULL if no snapshot is provided. | 868 * NULL if no snapshot is provided. |
| 867 * \param flags Pointer to VM specific flags or NULL for default flags. | 869 * \param flags Pointer to VM specific flags or NULL for default flags. |
| (...skipping 1920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2788 * | 2790 * |
| 2789 * \return A valid handle if no error occurs during the operation. | 2791 * \return A valid handle if no error occurs during the operation. |
| 2790 */ | 2792 */ |
| 2791 DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url, | 2793 DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url, |
| 2792 Dart_Handle resolved_url, | 2794 Dart_Handle resolved_url, |
| 2793 Dart_Handle source, | 2795 Dart_Handle source, |
| 2794 intptr_t line_offset, | 2796 intptr_t line_offset, |
| 2795 intptr_t col_offset); | 2797 intptr_t col_offset); |
| 2796 | 2798 |
| 2797 /** | 2799 /** |
| 2798 * Loads the root script for current isolate from a snapshot. | 2800 * Loads the root script for current isolate from a script snapshot. The |
| 2801 * snapshot must have been created by Dart_CreateScriptSnapshot from a VM with |
| 2802 * the same version. |
| 2799 * | 2803 * |
| 2800 * \param buffer A buffer which contains a snapshot of the script. | 2804 * \param buffer A buffer which contains a snapshot of the script. |
| 2801 * \param buffer_len Length of the passed in buffer. | 2805 * \param buffer_len Length of the passed in buffer. |
| 2802 * | 2806 * |
| 2803 * \return If no error occurs, the Library object corresponding to the root | 2807 * \return If no error occurs, the Library object corresponding to the root |
| 2804 * script is returned. Otherwise an error handle is returned. | 2808 * script is returned. Otherwise an error handle is returned. |
| 2805 */ | 2809 */ |
| 2806 DART_EXPORT Dart_Handle Dart_LoadScriptFromSnapshot(const uint8_t* buffer, | 2810 DART_EXPORT Dart_Handle Dart_LoadScriptFromSnapshot(const uint8_t* buffer, |
| 2807 intptr_t buffer_len); | 2811 intptr_t buffer_len); |
| 2808 | 2812 |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3199 | 3203 |
| 3200 | 3204 |
| 3201 /** | 3205 /** |
| 3202 * Returns whether the VM only supports running from precompiled snapshots and | 3206 * Returns whether the VM only supports running from precompiled snapshots and |
| 3203 * not from any other kind of snapshot or from source (that is, the VM was | 3207 * not from any other kind of snapshot or from source (that is, the VM was |
| 3204 * compiled with DART_PRECOMPILED_RUNTIME). | 3208 * compiled with DART_PRECOMPILED_RUNTIME). |
| 3205 */ | 3209 */ |
| 3206 DART_EXPORT bool Dart_IsPrecompiledRuntime(); | 3210 DART_EXPORT bool Dart_IsPrecompiledRuntime(); |
| 3207 | 3211 |
| 3208 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 3212 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
| OLD | NEW |