-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
Implement Atomics
builtin
#3394
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3394 +/- ##
==========================================
- Coverage 45.45% 44.82% -0.63%
==========================================
Files 483 488 +5
Lines 49715 50497 +782
==========================================
+ Hits 22599 22637 +38
- Misses 27116 27860 +744
☔ View full report in Codecov by Sentry. |
Test262 conformance changes
Fixed tests (540):
|
Atomics
builtinAtomics
builtin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice work @jedel1043!
Still have some parts to review, have some small nitpicks :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work and really nice docs on the futex!
This PR implements the
Atomics
object (excludingAtomics.waitAsync
, because thread-safe async timers are hard 😭), and implements the required glue code inboa_tester
to run the related tests.The implementation is mostly based on V8's, but thanks to the
intrusive-collections
crate, we didn't need to handle too much unsafe code related to doubly linked lists.Will try to add documentation about how exactly everything works, but I'm opening this for reviews on the implementation.Documented everything, including the futex algorithm. Hopefully this makes it a bit easier to understand!