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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
231 */ | 231 */ |
232 DART_EXPORT void Dart_DeletePersistentHandle(Dart_Handle object); | 232 DART_EXPORT void Dart_DeletePersistentHandle(Dart_Handle object); |
233 | 233 |
234 /** | 234 /** |
235 * Allocates a weak persistent handle for an object. | 235 * Allocates a weak persistent handle for an object. |
236 * | 236 * |
237 * This handle has the lifetime of the current isolate unless it is | 237 * This handle has the lifetime of the current isolate unless it is |
238 * explicitly deallocated by calling Dart_DeletePersistentHandle. | 238 * explicitly deallocated by calling Dart_DeletePersistentHandle. |
239 * | 239 * |
240 * Requires there to be a current isolate. | 240 * Requires there to be a current isolate. |
241 * | |
242 * \param object An object. | |
243 * \param peer A pointer to a native object or NULL. This value is | |
244 * provided to callback when it is invoked. | |
245 * \param callback A function pointer that will be invoked sometime | |
246 * after the object is garbage collected. | |
247 * | |
248 * \return Success if the weak persistent handle was | |
249 * created. Otherwise, returns an error. | |
241 */ | 250 */ |
242 DART_EXPORT Dart_Handle Dart_NewWeakPersistentHandle( | 251 DART_EXPORT Dart_Handle Dart_NewWeakPersistentHandle( |
243 Dart_Handle object, | 252 Dart_Handle object, |
244 void* peer, | 253 void* peer, |
245 Dart_WeakPersistentHandleFinalizer callback); | 254 Dart_WeakPersistentHandleFinalizer callback); |
246 | 255 |
247 /** | 256 /** |
248 * Is this object a weak persistent handle? | 257 * Is this object a weak persistent handle? |
249 * | 258 * |
250 * Requires there to be a current isolate. | 259 * Requires there to be a current isolate. |
251 */ | 260 */ |
252 DART_EXPORT bool Dart_IsWeakPersistentHandle(Dart_Handle object); | 261 DART_EXPORT bool Dart_IsWeakPersistentHandle(Dart_Handle object); |
253 | 262 |
263 /** | |
264 * Allocates a prologue weak persistent handle for an object. | |
265 * | |
266 * Prologue weak persistent handles are similar to weak persistent | |
267 * handles but exhibit different behavior during garbage collections | |
268 * that invoke the prologue and epilogue callbacks. While weak | |
269 * persistent handles always weakly reference their referents, | |
270 * prologue weak persistent handles weakly reference their referents | |
271 * only during a garbage collection occurs that invokes the prologue | |
siva
2012/03/13 23:34:30
garbage collection that invokes ....
| |
272 * and epilogue callbacks. During all other garbage collections, | |
273 * prologue weak persistent handles strongly reference their | |
274 * referents. | |
275 * | |
276 * This handle has the lifetime of the current isolate unless it is | |
277 * explicitly deallocated by calling Dart_DeletePersistentHandle. | |
278 * | |
279 * Requires there to be a current isolate. | |
280 * | |
281 * \param object An object. | |
282 * \param peer A pointer to a native object or NULL. This value is | |
283 * provided to callback when it is invoked. | |
284 * \param callback A function pointer that will be invoked sometime | |
285 * after the object is garbage collected. | |
286 * | |
287 * \return Success if the prologue weak persistent handle was created. | |
288 * Otherwise, returns an error. | |
289 */ | |
290 DART_EXPORT Dart_Handle Dart_NewPrologueWeakPersistentHandle( | |
291 Dart_Handle object, | |
292 void* peer, | |
293 Dart_WeakPersistentHandleFinalizer callback); | |
294 | |
295 /** | |
296 * Is this object a prologue weak persistent handle? | |
297 * | |
298 * Requires there to be a current isolate. | |
299 */ | |
300 DART_EXPORT bool Dart_IsPrologueWeakPersistentHandle(Dart_Handle object); | |
254 | 301 |
255 /** | 302 /** |
256 * Constructs a set of weak references from the Cartesian product of | 303 * Constructs a set of weak references from the Cartesian product of |
257 * the objects in the key set and the objects in values set. | 304 * the objects in the key set and the objects in values set. |
258 * | 305 * |
259 * \param keys A set of object references. These references will be | 306 * \param keys A set of object references. These references will be |
260 * considered weak by the garbage collector. | 307 * considered weak by the garbage collector. |
261 * \param num_keys the number of objects in the keys set. | 308 * \param num_keys the number of objects in the keys set. |
262 * \param values A set of object references. These references will be | 309 * \param values A set of object references. These references will be |
263 * considered weak by garbage collector unless any object reference | 310 * considered weak by garbage collector unless any object reference |
(...skipping 1742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2006 | 2053 |
2007 // --- Profiling support ---- | 2054 // --- Profiling support ---- |
2008 | 2055 |
2009 // External pprof support for gathering and dumping symbolic | 2056 // External pprof support for gathering and dumping symbolic |
2010 // information that can be used for better profile reports for | 2057 // information that can be used for better profile reports for |
2011 // dynamically generated code. | 2058 // dynamically generated code. |
2012 DART_EXPORT void Dart_InitPprofSupport(); | 2059 DART_EXPORT void Dart_InitPprofSupport(); |
2013 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); | 2060 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); |
2014 | 2061 |
2015 #endif // INCLUDE_DART_API_H_ | 2062 #endif // INCLUDE_DART_API_H_ |
OLD | NEW |