| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 DART_EXPORT Dart_Handle Dart_NewPersistentHandle(Dart_Handle object); | 197 DART_EXPORT Dart_Handle Dart_NewPersistentHandle(Dart_Handle object); |
| 198 | 198 |
| 199 /** | 199 /** |
| 200 * Deallocates a persistent handle. | 200 * Deallocates a persistent handle. |
| 201 * | 201 * |
| 202 * Requires there to be a current isolate. | 202 * Requires there to be a current isolate. |
| 203 */ | 203 */ |
| 204 DART_EXPORT void Dart_DeletePersistentHandle(Dart_Handle object); | 204 DART_EXPORT void Dart_DeletePersistentHandle(Dart_Handle object); |
| 205 | 205 |
| 206 /** | 206 /** |
| 207 * Takes a persistent handle and makes it weak. | 207 * Allocates a weak persistent handle for an object. |
| 208 * | 208 * |
| 209 * UNIMPLEMENTED. | 209 * This handle has the lifetime of the current isolate unless it is |
| 210 * explicitly deallocated by calling Dart_DeletePersistentHandle. |
| 210 * | 211 * |
| 211 * Requires there to be a current isolate. | 212 * Requires there to be a current isolate. |
| 212 */ | 213 */ |
| 213 DART_EXPORT Dart_Handle Dart_MakeWeakPersistentHandle(Dart_Handle object); | 214 DART_EXPORT Dart_Handle Dart_NewWeakPersistentHandle(Dart_Handle object); |
| 214 // TODO(turnidge): Needs a "near death" callback here. | |
| 215 // TODO(turnidge): Add IsWeak, Clear, etc. | |
| 216 | 215 |
| 217 /** | 216 /** |
| 218 * Takes a weak persistent handle and makes it non-weak. | 217 * Is this object a weak persistent handle? |
| 219 * | |
| 220 * UNIMPLEMENTED. | |
| 221 * | 218 * |
| 222 * Requires there to be a current isolate. | 219 * Requires there to be a current isolate. |
| 223 */ | 220 */ |
| 224 DART_EXPORT Dart_Handle Dart_MakePersistentHandle(Dart_Handle object); | 221 DART_EXPORT bool Dart_IsWeakPersistentHandle(Dart_Handle object); |
| 225 | 222 |
| 226 // --- Initialization and Globals --- | 223 // --- Initialization and Globals --- |
| 227 | 224 |
| 228 /** | 225 /** |
| 229 * An isolate creation and initialization callback function. | 226 * An isolate creation and initialization callback function. |
| 230 * | 227 * |
| 231 * This callback, provided by the embedder, is called when an isolate needs | 228 * This callback, provided by the embedder, is called when an isolate needs |
| 232 * to be created. The callback should create an isolate and load the | 229 * to be created. The callback should create an isolate and load the |
| 233 * required scripts for execution. | 230 * required scripts for execution. |
| 234 * | 231 * |
| (...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1385 | 1382 |
| 1386 // --- Profiling support ---- | 1383 // --- Profiling support ---- |
| 1387 | 1384 |
| 1388 // External pprof support for gathering and dumping symbolic | 1385 // External pprof support for gathering and dumping symbolic |
| 1389 // information that can be used for better profile reports for | 1386 // information that can be used for better profile reports for |
| 1390 // dynamically generated code. | 1387 // dynamically generated code. |
| 1391 DART_EXPORT void Dart_InitPprofSupport(); | 1388 DART_EXPORT void Dart_InitPprofSupport(); |
| 1392 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); | 1389 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); |
| 1393 | 1390 |
| 1394 #endif // INCLUDE_DART_API_H_ | 1391 #endif // INCLUDE_DART_API_H_ |
| OLD | NEW |