Chromium Code Reviews| 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 265 * \param num_values the size of the values set | 265 * \param num_values the size of the values set |
| 266 * | 266 * |
| 267 * \return Success if the weak reference set could be created. | 267 * \return Success if the weak reference set could be created. |
| 268 * Otherwise, returns an error handle. | 268 * Otherwise, returns an error handle. |
| 269 */ | 269 */ |
| 270 DART_EXPORT Dart_Handle Dart_NewWeakReferenceSet(Dart_Handle* keys, | 270 DART_EXPORT Dart_Handle Dart_NewWeakReferenceSet(Dart_Handle* keys, |
| 271 intptr_t num_keys, | 271 intptr_t num_keys, |
| 272 Dart_Handle* values, | 272 Dart_Handle* values, |
| 273 intptr_t num_values); | 273 intptr_t num_values); |
| 274 | 274 |
| 275 // --- Garbage Collection Callbacks -- | |
|
turnidge
2012/03/07 00:25:16
Could add general comment here (see other sections
cshapiro
2012/03/07 03:06:10
Done.
| |
| 276 | |
| 277 typedef void (*Dart_GcPrologueCallback)(); | |
| 278 typedef void (*Dart_GcEpilogueCallback)(); | |
|
turnidge
2012/03/07 00:25:16
Comment these in a way similar to other function t
cshapiro
2012/03/07 03:06:10
Done.
| |
| 279 | |
| 280 /** | |
| 281 * Adds a garbage collection prologue callback. | |
| 282 * | |
| 283 * \param callback A function pointer to a prologue callback function. | |
| 284 * This function must not have been previously added as a prologue | |
| 285 * callback. | |
| 286 * | |
| 287 * \return Success if the callback was added. Otherwise, returns an | |
| 288 * error handle. | |
| 289 */ | |
| 290 DART_EXPORT Dart_Handle Dart_NewGcPrologueCallback( | |
|
turnidge
2012/03/07 00:25:16
Consider s/New/add?
cshapiro
2012/03/07 03:06:10
I've make the switch. These are now the only add
| |
| 291 Dart_GcPrologueCallback callback); | |
| 292 | |
| 293 /** | |
| 294 * Removes a garbage collection prologue callback. | |
| 295 * | |
| 296 * \param callback A function pointer to a prologue callback function. | |
| 297 * This function must have been added as a prologue callback. | |
| 298 * | |
| 299 * \return Success if the callback was removed. Otherwise, returns an | |
| 300 * error handle. | |
| 301 */ | |
| 302 DART_EXPORT Dart_Handle Dart_DeleteGcPrologueCallback( | |
|
turnidge
2012/03/07 00:25:16
s/Delete/Remove?
cshapiro
2012/03/07 03:06:10
See above.
| |
| 303 Dart_GcPrologueCallback callback); | |
| 304 | |
| 305 /** | |
| 306 * Adds a garbage collection epilogue callback. | |
| 307 * | |
| 308 * \param callback A function pointer to an epilogue callback | |
| 309 * function. This function must not have been previously added as | |
| 310 * an epilogue callback. | |
| 311 * | |
| 312 * \return Success if the callback was added. Otherwise, returns an | |
| 313 * error handle. | |
| 314 */ | |
| 315 DART_EXPORT Dart_Handle Dart_NewGcEpilogueCallback( | |
| 316 Dart_GcEpilogueCallback callback); | |
| 317 | |
| 318 /** | |
| 319 * Removes a garbage collection epilogue callback. | |
| 320 * | |
| 321 * \param callback A function pointer to an epilogue callback | |
| 322 * function. This function must have been added as an epilogue | |
| 323 * callback. | |
| 324 * | |
| 325 * \return Success if the callback was removed. Otherwise, returns an | |
| 326 * error handle. | |
| 327 */ | |
| 328 DART_EXPORT Dart_Handle Dart_DeleteGcEpilogueCallback( | |
| 329 Dart_GcEpilogueCallback callback); | |
| 275 | 330 |
| 276 // --- Initialization and Globals --- | 331 // --- Initialization and Globals --- |
| 277 | 332 |
| 278 /** | 333 /** |
| 279 * An isolate creation and initialization callback function. | 334 * An isolate creation and initialization callback function. |
| 280 * | 335 * |
| 281 * This callback, provided by the embedder, is called when an isolate needs | 336 * This callback, provided by the embedder, is called when an isolate needs |
| 282 * to be created. The callback should create an isolate and load the | 337 * to be created. The callback should create an isolate and load the |
| 283 * required scripts for execution. | 338 * required scripts for execution. |
| 284 * | 339 * |
| (...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1850 | 1905 |
| 1851 // --- Profiling support ---- | 1906 // --- Profiling support ---- |
| 1852 | 1907 |
| 1853 // External pprof support for gathering and dumping symbolic | 1908 // External pprof support for gathering and dumping symbolic |
| 1854 // information that can be used for better profile reports for | 1909 // information that can be used for better profile reports for |
| 1855 // dynamically generated code. | 1910 // dynamically generated code. |
| 1856 DART_EXPORT void Dart_InitPprofSupport(); | 1911 DART_EXPORT void Dart_InitPprofSupport(); |
| 1857 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); | 1912 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); |
| 1858 | 1913 |
| 1859 #endif // INCLUDE_DART_API_H_ | 1914 #endif // INCLUDE_DART_API_H_ |
| OLD | NEW |