-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Implement WeakReference
, Finalizer
in dartdevc
#47776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@sigmundch - who's a likely owner here? |
@lrhn suggested that if I'll update the documentation in the VM CL, but of course it should be implemented as such in dartdevc as well then. https://dart-review.googlesource.com/c/sdk/+/229544/8/sdk/lib/core/weak.dart#185 |
Sounds good, will do! |
Unnecessary overhead was my main worry. The current implementation uses a Dart-side weak-map to map detach objects to "attachment ID"s. Would you still worry about overhead if that mapping we kept in the native implementation instead, as part of the same data structure which maintain the attachments. (Or is the lookup requirement going to make it equally expensive in native code?) |
@lrhn I think I would still be worried. I would like most common use-case to be very low-overhead --- meaning that there should be no additional book-keeping allocated beyond absolutely necessary one e.g. in case of Maybe for |
I just want to check if we are in agreement that we are not going to change API and keep the original (JS) semantics where you need to explicitly pass |
I have updated the CL to not use |
Routes implementation to JavaScript WeakRef and FinalizerRegistry APIs using JS foreign function calls. Uses Wrapper names for the Dart library to avoid issues with DDC. Bug: #47775, #47776 Change-Id: Iad82bd83ac10c666d08a2c042a8ed6109b8b58c8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229180 Reviewed-by: Stephen Adams <[email protected]> Reviewed-by: Sigmund Cherem <[email protected]> Reviewed-by: Nicholas Shahan <[email protected]> Commit-Queue: Riley Porter <[email protected]>
DDC implementation landed in 278a040 |
No description provided.
The text was updated successfully, but these errors were encountered: