| 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 INCLUDE_DART_API_H_ | 7 #ifndef INCLUDE_DART_API_H_ |
| 8 #define INCLUDE_DART_API_H_ | 8 #define INCLUDE_DART_API_H_ |
| 9 | 9 |
| 10 /** \mainpage Dart Embedding API Reference | 10 /** \mainpage Dart Embedding API Reference |
| (...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 * the snapshot. This buffer is scope allocated and is only valid | 1049 * the snapshot. This buffer is scope allocated and is only valid |
| 1050 * until the next call to Dart_ExitScope. | 1050 * until the next call to Dart_ExitScope. |
| 1051 * \param size Returns the size of the buffer. | 1051 * \param size Returns the size of the buffer. |
| 1052 * | 1052 * |
| 1053 * \return A valid handle if no error occurs during the operation. | 1053 * \return A valid handle if no error occurs during the operation. |
| 1054 */ | 1054 */ |
| 1055 DART_EXPORT Dart_Handle Dart_CreateScriptSnapshot(uint8_t** buffer, | 1055 DART_EXPORT Dart_Handle Dart_CreateScriptSnapshot(uint8_t** buffer, |
| 1056 intptr_t* size); | 1056 intptr_t* size); |
| 1057 | 1057 |
| 1058 /** | 1058 /** |
| 1059 * Creates a snapshot of the specified library loaded in the isolate. |
| 1060 * |
| 1061 * A library snapshot can be used for implementing fast startup of applications |
| 1062 * (skips tokenizing and parsing process). A Snapshot of the library |
| 1063 * can only be created before any dart code has executed. |
| 1064 * |
| 1065 * Requires there to be a current isolate which already has loaded the library. |
| 1066 * |
| 1067 * \param library A library for which the snapshot needs to be created. |
| 1068 * \param buffer Returns a pointer to a buffer containing |
| 1069 * the snapshot. This buffer is scope allocated and is only valid |
| 1070 * until the next call to Dart_ExitScope. |
| 1071 * \param size Returns the size of the buffer. |
| 1072 * |
| 1073 * \return A valid handle if no error occurs during the operation. |
| 1074 */ |
| 1075 DART_EXPORT Dart_Handle Dart_CreateLibrarySnapshot(Dart_Handle library, |
| 1076 uint8_t** buffer, |
| 1077 intptr_t* size); |
| 1078 |
| 1079 /** |
| 1059 * Schedules an interrupt for the specified isolate. | 1080 * Schedules an interrupt for the specified isolate. |
| 1060 * | 1081 * |
| 1061 * When the isolate is interrupted, the isolate interrupt callback | 1082 * When the isolate is interrupted, the isolate interrupt callback |
| 1062 * will be invoked with 'isolate' as the current isolate (see | 1083 * will be invoked with 'isolate' as the current isolate (see |
| 1063 * Dart_IsolateInterruptCallback). | 1084 * Dart_IsolateInterruptCallback). |
| 1064 * | 1085 * |
| 1065 * \param isolate The isolate to be interrupted. | 1086 * \param isolate The isolate to be interrupted. |
| 1066 */ | 1087 */ |
| 1067 DART_EXPORT void Dart_InterruptIsolate(Dart_Isolate isolate); | 1088 DART_EXPORT void Dart_InterruptIsolate(Dart_Isolate isolate); |
| 1068 | 1089 |
| (...skipping 1799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2868 * NOTE: If multiple callbacks with the same name are registered, only | 2889 * NOTE: If multiple callbacks with the same name are registered, only |
| 2869 * the last callback registered will be remembered. | 2890 * the last callback registered will be remembered. |
| 2870 */ | 2891 */ |
| 2871 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( | 2892 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( |
| 2872 const char* method, | 2893 const char* method, |
| 2873 Dart_ServiceRequestCallback callback, | 2894 Dart_ServiceRequestCallback callback, |
| 2874 void* user_data); | 2895 void* user_data); |
| 2875 | 2896 |
| 2876 | 2897 |
| 2877 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 2898 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
| OLD | NEW |