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