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 3184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3195 * \param entry_points A list of functions that may be invoked through the | 3195 * \param entry_points A list of functions that may be invoked through the |
3196 * embedding API, e.g. Dart_Invoke/GetField/SetField/New/InvokeClosure. | 3196 * embedding API, e.g. Dart_Invoke/GetField/SetField/New/InvokeClosure. |
3197 * | 3197 * |
3198 * \param reset_fields Controls whether static fields are reset. Fields without | 3198 * \param reset_fields Controls whether static fields are reset. Fields without |
3199 * an initializer will be set to null, and fields with an initializer will have | 3199 * an initializer will be set to null, and fields with an initializer will have |
3200 * their initializer run the next time they are accessed. | 3200 * their initializer run the next time they are accessed. |
3201 * | 3201 * |
3202 * reset_fields is true when we are about to create a precompilated snapshot. | 3202 * reset_fields is true when we are about to create a precompilated snapshot. |
3203 * Some fields are already been initialized as part of the loading logic, and | 3203 * Some fields are already been initialized as part of the loading logic, and |
3204 * we want them to be reinitialized in the new process that will load the | 3204 * we want them to be reinitialized in the new process that will load the |
3205 * snapshot. reset_fields is false for --noopt, which will continue running in | 3205 * snapshot. |
3206 * the same process. | |
3207 * | 3206 * |
3208 * \return An error handle if a compilation error or runtime error running const | 3207 * \return An error handle if a compilation error or runtime error running const |
3209 * constructors was encountered. | 3208 * constructors was encountered. |
3210 */ | 3209 */ |
3211 DART_EXPORT Dart_Handle | 3210 DART_EXPORT Dart_Handle |
3212 Dart_Precompile(Dart_QualifiedFunctionName entry_points[], | 3211 Dart_Precompile(Dart_QualifiedFunctionName entry_points[], |
3213 bool reset_fields, | |
3214 uint8_t* jit_feedback, | 3212 uint8_t* jit_feedback, |
3215 intptr_t jit_feedback_length); | 3213 intptr_t jit_feedback_length); |
3216 | 3214 |
3217 | 3215 |
3218 /** | 3216 /** |
3219 * Creates a precompiled snapshot. | 3217 * Creates a precompiled snapshot. |
3220 * - A root library must have been loaded. | 3218 * - A root library must have been loaded. |
3221 * - Dart_Precompile must have been called. | 3219 * - Dart_Precompile must have been called. |
3222 * | 3220 * |
3223 * Outputs a vm isolate snapshot, an isolate snapshot, and an assembly file | 3221 * Outputs a vm isolate snapshot, an isolate snapshot, and an assembly file |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3298 */ | 3296 */ |
3299 DART_EXPORT bool Dart_IsPrecompiledRuntime(); | 3297 DART_EXPORT bool Dart_IsPrecompiledRuntime(); |
3300 | 3298 |
3301 | 3299 |
3302 /** | 3300 /** |
3303 * Print a native stack trace. Used for crash handling. | 3301 * Print a native stack trace. Used for crash handling. |
3304 */ | 3302 */ |
3305 DART_EXPORT void Dart_DumpNativeStackTrace(void* context); | 3303 DART_EXPORT void Dart_DumpNativeStackTrace(void* context); |
3306 | 3304 |
3307 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 3305 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
OLD | NEW |