| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 3 * for details. All rights reserved. Use of this source code is governed by a | 3 * for details. All rights reserved. Use of this source code is governed by a |
| 4 * BSD-style license that can be found in the LICENSE file. | 4 * BSD-style license that can be found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #ifndef RUNTIME_INCLUDE_DART_API_H_ | 7 #ifndef RUNTIME_INCLUDE_DART_API_H_ |
| 8 #define RUNTIME_INCLUDE_DART_API_H_ | 8 #define RUNTIME_INCLUDE_DART_API_H_ |
| 9 | 9 |
| 10 /** \mainpage Dart Embedding API Reference | 10 /** \mainpage Dart Embedding API Reference |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 Dart_NewWeakPersistentHandle(Dart_Handle object, | 511 Dart_NewWeakPersistentHandle(Dart_Handle object, |
| 512 void* peer, | 512 void* peer, |
| 513 intptr_t external_allocation_size, | 513 intptr_t external_allocation_size, |
| 514 Dart_WeakPersistentHandleFinalizer callback); | 514 Dart_WeakPersistentHandleFinalizer callback); |
| 515 | 515 |
| 516 DART_EXPORT void Dart_DeleteWeakPersistentHandle( | 516 DART_EXPORT void Dart_DeleteWeakPersistentHandle( |
| 517 Dart_Isolate isolate, | 517 Dart_Isolate isolate, |
| 518 Dart_WeakPersistentHandle object); | 518 Dart_WeakPersistentHandle object); |
| 519 | 519 |
| 520 /* | 520 /* |
| 521 * ============================ | |
| 522 * Garbage Collection Callbacks | |
| 523 * ============================ | |
| 524 */ | |
| 525 | |
| 526 /** | |
| 527 * Callbacks signal the beginning and end of a garbage collection. | |
| 528 * | |
| 529 * These signals are intended to be used by the embedder to manage the | |
| 530 * lifetime of native objects with a managed object peer. | |
| 531 */ | |
| 532 | |
| 533 /** | |
| 534 * A callback invoked at the beginning of a garbage collection. | |
| 535 */ | |
| 536 typedef void (*Dart_GcPrologueCallback)(); | |
| 537 | |
| 538 /** | |
| 539 * A callback invoked at the end of a garbage collection. | |
| 540 */ | |
| 541 typedef void (*Dart_GcEpilogueCallback)(); | |
| 542 | |
| 543 /** | |
| 544 * Adds garbage collection callbacks (prologue and epilogue). | |
| 545 * | |
| 546 * \param prologue_callback A function pointer to a prologue callback function. | |
| 547 * A prologue callback function should not be already set when this function | |
| 548 * is called. A NULL value removes the existing prologue callback function | |
| 549 * if any. | |
| 550 * | |
| 551 * \param epilogue_callback A function pointer to an epilogue callback function. | |
| 552 * An epilogue callback function should not be already set when this function | |
| 553 * is called. A NULL value removes the existing epilogue callback function | |
| 554 * if any. | |
| 555 * | |
| 556 * \return Success if the callbacks were added. Otherwise, returns an | |
| 557 * error handle. | |
| 558 */ | |
| 559 DART_EXPORT Dart_Handle | |
| 560 Dart_SetGcCallbacks(Dart_GcPrologueCallback prologue_callback, | |
| 561 Dart_GcEpilogueCallback epilogue_callback); | |
| 562 | |
| 563 /* | |
| 564 * ========================== | 521 * ========================== |
| 565 * Initialization and Globals | 522 * Initialization and Globals |
| 566 * ========================== | 523 * ========================== |
| 567 */ | 524 */ |
| 568 | 525 |
| 569 /** | 526 /** |
| 570 * Gets the version string for the Dart VM. | 527 * Gets the version string for the Dart VM. |
| 571 * | 528 * |
| 572 * The version of the Dart VM can be accessed without initializing the VM. | 529 * The version of the Dart VM can be accessed without initializing the VM. |
| 573 * | 530 * |
| (...skipping 2755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3329 * compiled with DART_PRECOMPILED_RUNTIME). | 3286 * compiled with DART_PRECOMPILED_RUNTIME). |
| 3330 */ | 3287 */ |
| 3331 DART_EXPORT bool Dart_IsPrecompiledRuntime(); | 3288 DART_EXPORT bool Dart_IsPrecompiledRuntime(); |
| 3332 | 3289 |
| 3333 /** | 3290 /** |
| 3334 * Print a native stack trace. Used for crash handling. | 3291 * Print a native stack trace. Used for crash handling. |
| 3335 */ | 3292 */ |
| 3336 DART_EXPORT void Dart_DumpNativeStackTrace(void* context); | 3293 DART_EXPORT void Dart_DumpNativeStackTrace(void* context); |
| 3337 | 3294 |
| 3338 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 3295 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
| OLD | NEW |