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 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 * Provided only for advisory purposes to improve debugging messages. | 864 * Provided only for advisory purposes to improve debugging messages. |
865 * \param snapshot A buffer containing a snapshot of the isolate or | 865 * \param snapshot A buffer containing a snapshot of the isolate or |
866 * NULL if no snapshot is provided. | 866 * NULL if no snapshot is provided. |
867 * \param flags Pointer to VM specific flags or NULL for default flags. | 867 * \param flags Pointer to VM specific flags or NULL for default flags. |
868 * \param callback_data Embedder data. This data will be passed to | 868 * \param callback_data Embedder data. This data will be passed to |
869 * the Dart_IsolateCreateCallback when new isolates are spawned from | 869 * the Dart_IsolateCreateCallback when new isolates are spawned from |
870 * this parent isolate. | 870 * this parent isolate. |
871 * \param error DOCUMENT | 871 * \param error DOCUMENT |
872 * | 872 * |
873 * \return The new isolate is returned. May be NULL if an error | 873 * \return The new isolate is returned. May be NULL if an error |
874 * occurs duing isolate initialization. | 874 * occurs during isolate initialization. |
875 */ | 875 */ |
876 DART_EXPORT Dart_Isolate Dart_CreateIsolate(const char* script_uri, | 876 DART_EXPORT Dart_Isolate Dart_CreateIsolate(const char* script_uri, |
877 const char* main, | 877 const char* main, |
878 const uint8_t* snapshot, | 878 const uint8_t* snapshot, |
879 Dart_IsolateFlags* flags, | 879 Dart_IsolateFlags* flags, |
880 void* callback_data, | 880 void* callback_data, |
881 char** error); | 881 char** error); |
882 /* TODO(turnidge): Document behavior when there is already a current | 882 /* TODO(turnidge): Document behavior when there is already a current |
883 * isolate. */ | 883 * isolate. */ |
884 | 884 |
885 /** | 885 /** |
| 886 * Creates a new isolate from a Dart Kernel file. The new isolate |
| 887 * becomes the current isolate. |
| 888 * |
| 889 * Requires there to be no current isolate. |
| 890 * |
| 891 * \param script_uri The name of the script this isolate will load. |
| 892 * Provided only for advisory purposes to improve debugging messages. |
| 893 * \param main The name of the main entry point this isolate will run. |
| 894 * Provided only for advisory purposes to improve debugging messages. |
| 895 * \param kernel A buffer containing the Dart Kernel binary. |
| 896 * \param kernel_length The length of the Kernel buffer. |
| 897 * \param flags Pointer to VM specific flags or NULL for default flags. |
| 898 * \param callback_data Embedder data. This data will be passed to |
| 899 * the Dart_IsolateCreateCallback when new isolates are spawned from |
| 900 * this parent isolate. |
| 901 * \param error DOCUMENT |
| 902 * |
| 903 * \return The new isolate is returned. May be NULL if an error |
| 904 * occurs during isolate initialization. |
| 905 */ |
| 906 DART_EXPORT Dart_Isolate Dart_CreateIsolateFromKernel(const char* script_uri, |
| 907 const char* main, |
| 908 const uint8_t* kernel, |
| 909 intptr_t kernel_length, |
| 910 Dart_IsolateFlags* flags, |
| 911 void* callback_data, |
| 912 char** error); |
| 913 /** |
886 * Shuts down the current isolate. After this call, the current isolate | 914 * Shuts down the current isolate. After this call, the current isolate |
887 * is NULL. Invokes the shutdown callback and any callbacks of remaining | 915 * is NULL. Invokes the shutdown callback and any callbacks of remaining |
888 * weak persistent handles. | 916 * weak persistent handles. |
889 * | 917 * |
890 * Requires there to be a current isolate. | 918 * Requires there to be a current isolate. |
891 */ | 919 */ |
892 DART_EXPORT void Dart_ShutdownIsolate(); | 920 DART_EXPORT void Dart_ShutdownIsolate(); |
893 /* TODO(turnidge): Document behavior when there is no current isolate. */ | 921 /* TODO(turnidge): Document behavior when there is no current isolate. */ |
894 | 922 |
895 /** | 923 /** |
(...skipping 2290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3186 | 3214 |
3187 | 3215 |
3188 /** | 3216 /** |
3189 * Returns whether the VM only supports running from precompiled snapshots and | 3217 * Returns whether the VM only supports running from precompiled snapshots and |
3190 * not from any other kind of snapshot or from source (that is, the VM was | 3218 * not from any other kind of snapshot or from source (that is, the VM was |
3191 * compiled with DART_PRECOMPILED_RUNTIME). | 3219 * compiled with DART_PRECOMPILED_RUNTIME). |
3192 */ | 3220 */ |
3193 DART_EXPORT bool Dart_IsPrecompiledRuntime(); | 3221 DART_EXPORT bool Dart_IsPrecompiledRuntime(); |
3194 | 3222 |
3195 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 3223 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
OLD | NEW |