summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/jit/JITWriteBarrier.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2013-09-13 12:51:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-19 20:50:05 +0200
commitd441d6f39bb846989d95bcf5caf387b42414718d (patch)
treee367e64a75991c554930278175d403c072de6bb8 /Source/JavaScriptCore/jit/JITWriteBarrier.h
parent0060b2994c07842f4c59de64b5e3e430525c4b90 (diff)
downloadqtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit. Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/JavaScriptCore/jit/JITWriteBarrier.h')
-rw-r--r--Source/JavaScriptCore/jit/JITWriteBarrier.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/JavaScriptCore/jit/JITWriteBarrier.h b/Source/JavaScriptCore/jit/JITWriteBarrier.h
index ee73b702f..9da1ea782 100644
--- a/Source/JavaScriptCore/jit/JITWriteBarrier.h
+++ b/Source/JavaScriptCore/jit/JITWriteBarrier.h
@@ -30,12 +30,13 @@
#include "MacroAssembler.h"
#include "SlotVisitor.h"
+#include "UnusedPointer.h"
#include "WriteBarrier.h"
namespace JSC {
class JSCell;
-class JSGlobalData;
+class VM;
// Needs to be even to appease some of the backends.
#define JITWriteBarrierFlag ((void*)2)
@@ -69,14 +70,14 @@ public:
}
void clear() { clear(0); }
- void clearToMaxUnsigned() { clear(reinterpret_cast<void*>(-1)); }
+ void clearToUnusedPointer() { clear(reinterpret_cast<void*>(unusedPointer)); }
protected:
JITWriteBarrierBase()
{
}
- void set(JSGlobalData&, CodeLocationDataLabelPtr location, JSCell* owner, JSCell* value)
+ void set(VM&, CodeLocationDataLabelPtr location, JSCell* owner, JSCell* value)
{
Heap::writeBarrier(owner, value);
m_location = location;
@@ -90,8 +91,7 @@ protected:
if (!m_location || m_location.executableAddress() == JITWriteBarrierFlag)
return 0;
void* result = static_cast<JSCell*>(MacroAssembler::readPointer(m_location));
- // We use -1 to indicate a "safe" empty value in the instruction stream
- if (result == (void*)-1)
+ if (result == reinterpret_cast<void*>(unusedPointer))
return 0;
return static_cast<JSCell*>(result);
}
@@ -116,15 +116,15 @@ public:
{
}
- void set(JSGlobalData& globalData, CodeLocationDataLabelPtr location, JSCell* owner, T* value)
+ void set(VM& vm, CodeLocationDataLabelPtr location, JSCell* owner, T* value)
{
validateCell(owner);
validateCell(value);
- JITWriteBarrierBase::set(globalData, location, owner, value);
+ JITWriteBarrierBase::set(vm, location, owner, value);
}
- void set(JSGlobalData& globalData, JSCell* owner, T* value)
+ void set(VM& vm, JSCell* owner, T* value)
{
- set(globalData, location(), owner, value);
+ set(vm, location(), owner, value);
}
T* get() const
{