| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef INCLUDE_DART_API_H_ | 5 #ifndef INCLUDE_DART_API_H_ |
| 6 #define INCLUDE_DART_API_H_ | 6 #define INCLUDE_DART_API_H_ |
| 7 | 7 |
| 8 /** \mainpage Dart Embedding API Reference | 8 /** \mainpage Dart Embedding API Reference |
| 9 * | 9 * |
| 10 * Dart is a class-based programming language for creating structured | 10 * Dart is a class-based programming language for creating structured |
| (...skipping 2360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2371 */ | 2371 */ |
| 2372 DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url, | 2372 DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url, |
| 2373 Dart_Handle source, | 2373 Dart_Handle source, |
| 2374 intptr_t line_offset, | 2374 intptr_t line_offset, |
| 2375 intptr_t col_offset); | 2375 intptr_t col_offset); |
| 2376 | 2376 |
| 2377 /** | 2377 /** |
| 2378 * Loads the root script for current isolate from a snapshot. | 2378 * Loads the root script for current isolate from a snapshot. |
| 2379 * | 2379 * |
| 2380 * \param buffer A buffer which contains a snapshot of the script. | 2380 * \param buffer A buffer which contains a snapshot of the script. |
| 2381 * \param length Length of the passed in buffer. |
| 2381 * | 2382 * |
| 2382 * \return If no error occurs, the Library object corresponding to the root | 2383 * \return If no error occurs, the Library object corresponding to the root |
| 2383 * script is returned. Otherwise an error handle is returned. | 2384 * script is returned. Otherwise an error handle is returned. |
| 2384 */ | 2385 */ |
| 2385 DART_EXPORT Dart_Handle Dart_LoadScriptFromSnapshot(const uint8_t* buffer); | 2386 DART_EXPORT Dart_Handle Dart_LoadScriptFromSnapshot(const uint8_t* buffer, |
| 2387 intptr_t buffer_len); |
| 2386 | 2388 |
| 2387 /** | 2389 /** |
| 2388 * Gets the library for the root script for the current isolate. | 2390 * Gets the library for the root script for the current isolate. |
| 2389 * | 2391 * |
| 2390 * If the root script has not yet been set for the current isolate, | 2392 * If the root script has not yet been set for the current isolate, |
| 2391 * this function returns Dart_Null(). This function never returns an | 2393 * this function returns Dart_Null(). This function never returns an |
| 2392 * error handle. | 2394 * error handle. |
| 2393 * | 2395 * |
| 2394 * \return Returns the root Library for the current isolate or Dart_Null(). | 2396 * \return Returns the root Library for the current isolate or Dart_Null(). |
| 2395 */ | 2397 */ |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2555 * | 2557 * |
| 2556 * \param object An object. | 2558 * \param object An object. |
| 2557 * \param peer A value to store in the peer field. | 2559 * \param peer A value to store in the peer field. |
| 2558 * | 2560 * |
| 2559 * \return Returns an error if 'object' is a subtype of Null, num, or | 2561 * \return Returns an error if 'object' is a subtype of Null, num, or |
| 2560 * bool. | 2562 * bool. |
| 2561 */ | 2563 */ |
| 2562 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); | 2564 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); |
| 2563 | 2565 |
| 2564 #endif // INCLUDE_DART_API_H_ | 2566 #endif // INCLUDE_DART_API_H_ |
| OLD | NEW |