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

Unified Diff: src/atomic-utils.h

Issue 1346973002: Reland of "[heap] Concurrency support for heap book-keeping info" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/atomic-utils.h
diff --git a/src/atomic-utils.h b/src/atomic-utils.h
index 0bfd52cfe95995e3d49ff0c8afdf8072e114b59c..2aa78f8b5e22458fed9a9505b9f71f6e029f72e0 100644
--- a/src/atomic-utils.h
+++ b/src/atomic-utils.h
@@ -30,6 +30,11 @@ class AtomicNumber {
base::Release_Store(&value_, static_cast<base::AtomicWord>(new_value));
}
+ V8_INLINE T operator=(T value) {
+ SetValue(value);
+ return value;
+ }
+
private:
STATIC_ASSERT(sizeof(T) <= sizeof(base::AtomicWord));
@@ -41,6 +46,8 @@ class AtomicNumber {
template <typename T>
class AtomicValue {
public:
+ AtomicValue() : value_(0) {}
+
explicit AtomicValue(T initial)
: value_(cast_helper<T>::to_storage_type(initial)) {}
« no previous file with comments | « no previous file | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698