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

Unified Diff: src/mark-compact.cc

Issue 316133002: Move atomic ops and related files to base library (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 6 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 | « src/lazy-instance.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index acbf90423c912320edadab3ae8834b99b836ac8a..61b1b54c7bd13c95acfe0b71f262e9dd6860c15f 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -4,6 +4,7 @@
#include "src/v8.h"
+#include "src/base/atomicops.h"
#include "src/code-stubs.h"
#include "src/compilation-cache.h"
#include "src/cpu-profiler.h"
@@ -2972,20 +2973,20 @@ static void UpdatePointer(HeapObject** address, HeapObject* object) {
// compare and swap may fail in the case where the pointer update tries to
// update garbage memory which was concurrently accessed by the sweeper.
if (new_addr != NULL) {
- NoBarrier_CompareAndSwap(
- reinterpret_cast<AtomicWord*>(address),
- reinterpret_cast<AtomicWord>(object),
- reinterpret_cast<AtomicWord>(HeapObject::FromAddress(new_addr)));
+ base::NoBarrier_CompareAndSwap(
+ reinterpret_cast<base::AtomicWord*>(address),
+ reinterpret_cast<base::AtomicWord>(object),
+ reinterpret_cast<base::AtomicWord>(HeapObject::FromAddress(new_addr)));
} else {
// We have to zap this pointer, because the store buffer may overflow later,
// and then we have to scan the entire heap and we don't want to find
// spurious newspace pointers in the old space.
// TODO(mstarzinger): This was changed to a sentinel value to track down
// rare crashes, change it back to Smi::FromInt(0) later.
- NoBarrier_CompareAndSwap(
- reinterpret_cast<AtomicWord*>(address),
- reinterpret_cast<AtomicWord>(object),
- reinterpret_cast<AtomicWord>(Smi::FromInt(0x0f100d00 >> 1)));
+ base::NoBarrier_CompareAndSwap(
+ reinterpret_cast<base::AtomicWord*>(address),
+ reinterpret_cast<base::AtomicWord>(object),
+ reinterpret_cast<base::AtomicWord>(Smi::FromInt(0x0f100d00 >> 1)));
}
}
« no previous file with comments | « src/lazy-instance.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698