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 2859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2870 */ | 2870 */ |
2871 | 2871 |
2872 | 2872 |
2873 typedef struct { | 2873 typedef struct { |
2874 const char* library_uri; | 2874 const char* library_uri; |
2875 const char* class_name; | 2875 const char* class_name; |
2876 const char* function_name; | 2876 const char* function_name; |
2877 } Dart_QualifiedFunctionName; | 2877 } Dart_QualifiedFunctionName; |
2878 | 2878 |
2879 | 2879 |
| 2880 /** |
| 2881 * Compiles all functions reachable from the provided entry points and marks |
| 2882 * the isolate to disallow future compilation. |
| 2883 * |
| 2884 * \param entry_points A list of functions that may be invoked through the |
| 2885 * embedding API, e.g. Dart_Invoke/GetField/SetField/New/InvokeClosure. |
| 2886 * |
| 2887 * \param reset_fields Controls whether static fields are reset. Fields without |
| 2888 * an initializer will be set to null, and fields with an initializer will have |
| 2889 * their initializer run the next time they are accessed. |
| 2890 * |
| 2891 * reset_fields is true when we are about to create a precompilated snapshot. |
| 2892 * Some fields are already been initialized as part of the loading logic, and |
| 2893 * we want them to be reinitialized in the new process that will load the |
| 2894 * snapshot. reset_fields is false for --noopt, which will continue running in |
| 2895 * the same process. |
| 2896 * |
| 2897 * \return An error handle if a compilation error or runtime error running const |
| 2898 * constructors was encountered. |
| 2899 */ |
2880 DART_EXPORT Dart_Handle Dart_Precompile( | 2900 DART_EXPORT Dart_Handle Dart_Precompile( |
2881 Dart_QualifiedFunctionName entry_points[]); | 2901 Dart_QualifiedFunctionName entry_points[], |
| 2902 bool reset_fields); |
2882 | 2903 |
2883 | 2904 |
2884 DART_EXPORT Dart_Handle Dart_CreatePrecompiledSnapshot( | 2905 DART_EXPORT Dart_Handle Dart_CreatePrecompiledSnapshot( |
2885 uint8_t** vm_isolate_snapshot_buffer, | 2906 uint8_t** vm_isolate_snapshot_buffer, |
2886 intptr_t* vm_isolate_snapshot_size, | 2907 intptr_t* vm_isolate_snapshot_size, |
2887 uint8_t** isolate_snapshot_buffer, | 2908 uint8_t** isolate_snapshot_buffer, |
2888 intptr_t* isolate_snapshot_size, | 2909 intptr_t* isolate_snapshot_size, |
2889 uint8_t** instructions_snapshot_buffer, | 2910 uint8_t** instructions_snapshot_buffer, |
2890 intptr_t* instructions_snapshot_size); | 2911 intptr_t* instructions_snapshot_size); |
2891 | 2912 |
2892 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 2913 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
OLD | NEW |