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

Unified Diff: src/base/atomic-utils.h

Issue 2428493003: [heap] Reland move slot filtering logic into sweeper. (Closed)
Patch Set: comments Created 4 years, 2 months 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 | src/heap/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/atomic-utils.h
diff --git a/src/base/atomic-utils.h b/src/base/atomic-utils.h
index 7931c7376ab4b5ba4bf27268bbeb124fec6acef8..fd9b1b502d573ea62a66c78f3e5daa7c2a27e2f8 100644
--- a/src/base/atomic-utils.h
+++ b/src/base/atomic-utils.h
@@ -65,6 +65,13 @@ class NoBarrierAtomicValue {
return reinterpret_cast<base::NoBarrierAtomicValue<T>*>(address);
}
+ V8_INLINE bool TrySetValue(T old_value, T new_value) {
+ return base::NoBarrier_CompareAndSwap(
+ &value_, cast_helper<T>::to_storage_type(old_value),
+ cast_helper<T>::to_storage_type(new_value)) ==
+ cast_helper<T>::to_storage_type(old_value);
+ }
+
V8_INLINE T Value() const {
return cast_helper<T>::to_return_type(base::NoBarrier_Load(&value_));
}
« no previous file with comments | « no previous file | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698