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 3176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3187 | 3187 |
3188 /** | 3188 /** |
3189 * Returns the port that script load requests should be sent on. | 3189 * Returns the port that script load requests should be sent on. |
3190 * | 3190 * |
3191 * \return Returns the port for load requests or ILLEGAL_PORT if the service | 3191 * \return Returns the port for load requests or ILLEGAL_PORT if the service |
3192 * isolate failed to startup or does not support load requests. | 3192 * isolate failed to startup or does not support load requests. |
3193 */ | 3193 */ |
3194 DART_EXPORT Dart_Port Dart_ServiceWaitForLoadPort(); | 3194 DART_EXPORT Dart_Port Dart_ServiceWaitForLoadPort(); |
3195 | 3195 |
3196 | 3196 |
| 3197 /** |
| 3198 * Record all functions which have been compiled in the current isolate. |
| 3199 * |
| 3200 * \param buffer Returns a pointer to a buffer containing the trace. |
| 3201 * This buffer is scope allocated and is only valid until the next call to |
| 3202 * Dart_ExitScope. |
| 3203 * \param size Returns the size of the buffer. |
| 3204 * \return Returns an valid handle upon success. |
| 3205 */ |
| 3206 DART_EXPORT Dart_Handle Dart_SaveCompilationTrace(uint8_t** buffer, |
| 3207 intptr_t* buffer_length); |
| 3208 |
| 3209 |
| 3210 /** |
| 3211 * Compile all functions from data from Dart_SaveCompilationTrace. Unlike JIT |
| 3212 * feedback, this data is fuzzy: loading does not need to happen in the exact |
| 3213 * program that was saved, the saver and loader do not need to agree on checked |
| 3214 * mode versus production mode or debug/release/product. |
| 3215 * |
| 3216 * \return Returns an error handle if a compilation error was encountered. |
| 3217 */ |
| 3218 DART_EXPORT Dart_Handle Dart_LoadCompilationTrace(uint8_t* buffer, |
| 3219 intptr_t buffer_length); |
| 3220 |
| 3221 |
3197 /* | 3222 /* |
3198 * ============== | 3223 * ============== |
3199 * Precompilation | 3224 * Precompilation |
3200 * ============== | 3225 * ============== |
3201 */ | 3226 */ |
3202 | 3227 |
3203 /** | 3228 /** |
3204 * Saves a serialized version of the information collected for use by the | 3229 * Saves a serialized version of the information collected for use by the |
3205 * optimizing compiler, such as type feedback and usage counters. When this | 3230 * optimizing compiler, such as type feedback and usage counters. When this |
3206 * information is passed to Dart_Precompile, the AOT compiler may use it to | 3231 * information is passed to Dart_Precompile, the AOT compiler may use it to |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3353 */ | 3378 */ |
3354 DART_EXPORT bool Dart_IsPrecompiledRuntime(); | 3379 DART_EXPORT bool Dart_IsPrecompiledRuntime(); |
3355 | 3380 |
3356 | 3381 |
3357 /** | 3382 /** |
3358 * Print a native stack trace. Used for crash handling. | 3383 * Print a native stack trace. Used for crash handling. |
3359 */ | 3384 */ |
3360 DART_EXPORT void Dart_DumpNativeStackTrace(void* context); | 3385 DART_EXPORT void Dart_DumpNativeStackTrace(void* context); |
3361 | 3386 |
3362 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 3387 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
OLD | NEW |