Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(476)

Side by Side Diff: runtime/include/dart_api.h

Issue 9531001: Implement weak references sets and provide an embedding API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address review comments Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 void* peer, 244 void* peer,
245 Dart_WeakPersistentHandleFinalizer callback); 245 Dart_WeakPersistentHandleFinalizer callback);
246 246
247 /** 247 /**
248 * Is this object a weak persistent handle? 248 * Is this object a weak persistent handle?
249 * 249 *
250 * Requires there to be a current isolate. 250 * Requires there to be a current isolate.
251 */ 251 */
252 DART_EXPORT bool Dart_IsWeakPersistentHandle(Dart_Handle object); 252 DART_EXPORT bool Dart_IsWeakPersistentHandle(Dart_Handle object);
253 253
254
255 /**
256 * Constructs a set of weak references from the Cartesian product of
257 * the objects in the key set and the objects in values set.
258 *
259 * \param keys A set of object references. These references will be
260 * considered weak by the garbage collector.
261 * \param num_keys the number of objects in the keys set.
262 * \param values A set of object references. These references will be
263 * considered weak by garbage collector unless any object reference
264 * in 'keys' is found to be strong.
265 * \param num_values the size of the values set
266 *
267 * \return Success if the weak reference set could be created.
268 * Otherwise, returns an error handle.
269 */
270 DART_EXPORT Dart_Handle Dart_NewWeakReferenceSet(Dart_Handle* keys,
271 intptr_t num_keys,
272 Dart_Handle* values,
273 intptr_t num_values);
274
275
254 // --- Initialization and Globals --- 276 // --- Initialization and Globals ---
255 277
256 /** 278 /**
257 * An isolate creation and initialization callback function. 279 * An isolate creation and initialization callback function.
258 * 280 *
259 * This callback, provided by the embedder, is called when an isolate needs 281 * This callback, provided by the embedder, is called when an isolate needs
260 * to be created. The callback should create an isolate and load the 282 * to be created. The callback should create an isolate and load the
261 * required scripts for execution. 283 * required scripts for execution.
262 * 284 *
263 * \param error A structure into which the embedder can place a 285 * \param error A structure into which the embedder can place a
(...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after
1828 1850
1829 // --- Profiling support ---- 1851 // --- Profiling support ----
1830 1852
1831 // External pprof support for gathering and dumping symbolic 1853 // External pprof support for gathering and dumping symbolic
1832 // information that can be used for better profile reports for 1854 // information that can be used for better profile reports for
1833 // dynamically generated code. 1855 // dynamically generated code.
1834 DART_EXPORT void Dart_InitPprofSupport(); 1856 DART_EXPORT void Dart_InitPprofSupport();
1835 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); 1857 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size);
1836 1858
1837 #endif // INCLUDE_DART_API_H_ 1859 #endif // INCLUDE_DART_API_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698