| 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 2780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2791 DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url, | 2791 DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url, |
| 2792 Dart_Handle resolved_url, | 2792 Dart_Handle resolved_url, |
| 2793 Dart_Handle source, | 2793 Dart_Handle source, |
| 2794 intptr_t line_offset, | 2794 intptr_t line_offset, |
| 2795 intptr_t col_offset); | 2795 intptr_t col_offset); |
| 2796 | 2796 |
| 2797 /** | 2797 /** |
| 2798 * Loads the root script for current isolate from a snapshot. | 2798 * Loads the root script for current isolate from a snapshot. |
| 2799 * | 2799 * |
| 2800 * \param buffer A buffer which contains a snapshot of the script. | 2800 * \param buffer A buffer which contains a snapshot of the script. |
| 2801 * \param length Length of the passed in buffer. | 2801 * \param buffer_len Length of the passed in buffer. |
| 2802 * | 2802 * |
| 2803 * \return If no error occurs, the Library object corresponding to the root | 2803 * \return If no error occurs, the Library object corresponding to the root |
| 2804 * script is returned. Otherwise an error handle is returned. | 2804 * script is returned. Otherwise an error handle is returned. |
| 2805 */ | 2805 */ |
| 2806 DART_EXPORT Dart_Handle Dart_LoadScriptFromSnapshot(const uint8_t* buffer, | 2806 DART_EXPORT Dart_Handle Dart_LoadScriptFromSnapshot(const uint8_t* buffer, |
| 2807 intptr_t buffer_len); | 2807 intptr_t buffer_len); |
| 2808 | 2808 |
| 2809 /** | 2809 /** |
| 2810 * Loads a dart application which was compiled to a Kernel binary. |
| 2811 * |
| 2812 * \param buffer A buffer which contains a Kernel binary. |
| 2813 * \param buffer_len Length of the passed in buffer. |
| 2814 * |
| 2815 * \return If no error occurs, the Library object corresponding to the root |
| 2816 * script is returned. Otherwise an error handle is returned. |
| 2817 */ |
| 2818 DART_EXPORT Dart_Handle Dart_LoadKernel(const uint8_t* buffer, |
| 2819 intptr_t buffer_len); |
| 2820 |
| 2821 /** |
| 2810 * Gets the library for the root script for the current isolate. | 2822 * Gets the library for the root script for the current isolate. |
| 2811 * | 2823 * |
| 2812 * If the root script has not yet been set for the current isolate, | 2824 * If the root script has not yet been set for the current isolate, |
| 2813 * this function returns Dart_Null(). This function never returns an | 2825 * this function returns Dart_Null(). This function never returns an |
| 2814 * error handle. | 2826 * error handle. |
| 2815 * | 2827 * |
| 2816 * \return Returns the root Library for the current isolate or Dart_Null(). | 2828 * \return Returns the root Library for the current isolate or Dart_Null(). |
| 2817 */ | 2829 */ |
| 2818 DART_EXPORT Dart_Handle Dart_RootLibrary(); | 2830 DART_EXPORT Dart_Handle Dart_RootLibrary(); |
| 2819 | 2831 |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3188 /** | 3200 /** |
| 3189 * Returns whether the VM was initialized with a precompiled snapshot. Only | 3201 * Returns whether the VM was initialized with a precompiled snapshot. Only |
| 3190 * valid after Dart_Initialize. | 3202 * valid after Dart_Initialize. |
| 3191 * DEPRECATED. This is currently used to disable Platform.executable and | 3203 * DEPRECATED. This is currently used to disable Platform.executable and |
| 3192 * Platform.resolvedExecutable under precompilation to prevent process | 3204 * Platform.resolvedExecutable under precompilation to prevent process |
| 3193 * spawning tests from becoming fork-bombs. | 3205 * spawning tests from becoming fork-bombs. |
| 3194 */ | 3206 */ |
| 3195 DART_EXPORT bool Dart_IsRunningPrecompiledCode(); | 3207 DART_EXPORT bool Dart_IsRunningPrecompiledCode(); |
| 3196 | 3208 |
| 3197 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 3209 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
| OLD | NEW |