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

Unified Diff: runtime/include/dart_api.h

Issue 1459173004: Remove support for object grouping during Garbage Collection (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code-review Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 29826af16ee46a305255b3649f4bdcdf7c70a045..2ac47398d1090ddfa21905eb56350f9f68c3dfcd 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -501,140 +501,6 @@ DART_EXPORT void Dart_DeleteWeakPersistentHandle(
Dart_Isolate isolate,
Dart_WeakPersistentHandle object);
-/**
- * Allocates a prologue weak persistent handle for an object.
- *
- * Prologue weak persistent handles are similar to weak persistent
- * handles but exhibit different behavior during garbage collections
- * that invoke the prologue and epilogue callbacks. While weak
- * persistent handles always weakly reference their referents,
- * prologue weak persistent handles weakly reference their referents
- * only during a garbage collection that invokes the prologue and
- * epilogue callbacks. During all other garbage collections, prologue
- * weak persistent handles strongly reference their referents.
- *
- * This handle has the lifetime of the current isolate unless the object
- * pointed to by the handle is garbage collected, in this case the VM
- * automatically deletes the handle after invoking the callback associated
- * with the handle. The handle can also be explicitly deallocated by
- * calling Dart_DeleteWeakPersistentHandle.
- *
- * If the object becomes unreachable the callback is invoked with the weak
- * persistent handle and the peer as arguments. This gives the native code the
- * ability to cleanup data associated with the object and clear out any cached
- * references to the handle. All references to this handle after the callback
- * will be invalid. It is illegal to call into the VM from the callback.
- * If the handle is deleted before the object becomes unreachable,
- * the callback is never invoked.
- *
- * Requires there to be a current isolate.
- *
- * \param object An object.
- * \param peer A pointer to a native object or NULL. This value is
- * provided to callback when it is invoked.
- * \param external_allocation_size The number of externally allocated
- * bytes for peer. Used to inform the garbage collector.
- * \param callback A function pointer that will be invoked sometime
- * after the object is garbage collected, unless the handle has been deleted.
- * A valid callback needs to be specified it cannot be NULL.
- *
- * \return Success if the prologue weak persistent handle was created.
- * Otherwise, returns an error.
- */
-DART_EXPORT Dart_WeakPersistentHandle Dart_NewPrologueWeakPersistentHandle(
- Dart_Handle object,
- void* peer,
- intptr_t external_allocation_size,
- Dart_WeakPersistentHandleFinalizer callback);
-
-/**
- * Is this object a prologue weak persistent handle?
- *
- * Requires there to be a current isolate.
- */
-DART_EXPORT bool Dart_IsPrologueWeakPersistentHandle(
- Dart_WeakPersistentHandle object);
-
-typedef struct _Dart_WeakReferenceSetBuilder* Dart_WeakReferenceSetBuilder;
-typedef struct _Dart_WeakReferenceSet* Dart_WeakReferenceSet;
-
-/**
- * Constructs a weak references set builder.
- *
- * \returns a pointer to the weak reference set builder if successful.
- * Otherwise, returns NULL.
- */
-DART_EXPORT Dart_WeakReferenceSetBuilder Dart_NewWeakReferenceSetBuilder();
-
-/**
- * Constructs a set of weak references from the Cartesian product of
- * the objects in the key set and the objects in values set.
- *
- * \param set_builder The weak references set builder which was created
- * using Dart_NewWeakReferenceSetBuilder().
- * \param key An object reference. This references will be
- * considered weak by the garbage collector.
- * \param value An object reference. This reference will be
- * considered weak by garbage collector unless any object reference
- * in 'keys' is found to be strong.
- *
- * \return a pointer to the weak reference set if successful.
- * Otherwise, returns NULL.
- */
-DART_EXPORT Dart_WeakReferenceSet Dart_NewWeakReferenceSet(
- Dart_WeakReferenceSetBuilder set_builder,
- Dart_WeakPersistentHandle key,
- Dart_WeakPersistentHandle value);
-
-/**
- * Append the pair of key/value object references to the weak references set.
- *
- * \param reference_set A weak references set into which the pair of key/value
- * needs to be added.
- * \param key An object reference. This references will be
- * considered weak by the garbage collector.
- * \param value An object reference. This reference will be
- * considered weak by garbage collector unless any object reference
- * in 'keys' is found to be strong.
- *
- * \return Success if the prologue weak persistent handle was created.
- * Otherwise, returns an error.
- */
-DART_EXPORT Dart_Handle Dart_AppendToWeakReferenceSet(
- Dart_WeakReferenceSet reference_set,
- Dart_WeakPersistentHandle key,
- Dart_WeakPersistentHandle value);
-
-/**
- * Append the key object reference to the weak references set.
- *
- * \param reference_set A weak references set into which the key
- * needs to be added.
- * \param key An object reference. This references will be
- * considered weak by the garbage collector.
- *
- * \return Success if the prologue weak persistent handle was created.
- * Otherwise, returns an error.
- */
-DART_EXPORT Dart_Handle Dart_AppendKeyToWeakReferenceSet(
- Dart_WeakReferenceSet reference_set,
- Dart_WeakPersistentHandle key);
-
-/**
- * Append the value object reference to the weak references set.
- *
- * \param reference_set A weak references set into which the key
- * needs to be added.
- * \param value An object reference. This references will be
- * considered weak by the garbage collector.
- *
- * \return Success if the prologue weak persistent handle was created.
- * Otherwise, returns an error.
- */
-DART_EXPORT Dart_Handle Dart_AppendValueToWeakReferenceSet(
- Dart_WeakReferenceSet reference_set,
- Dart_WeakPersistentHandle value);
-
/*
* ============================
« 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