diff options
Diffstat (limited to 'Source/JavaScriptCore/jit/JITWriteBarrier.h')
-rw-r--r-- | Source/JavaScriptCore/jit/JITWriteBarrier.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/jit/JITWriteBarrier.h b/Source/JavaScriptCore/jit/JITWriteBarrier.h index 9da1ea782..b410ecadb 100644 --- a/Source/JavaScriptCore/jit/JITWriteBarrier.h +++ b/Source/JavaScriptCore/jit/JITWriteBarrier.h @@ -31,6 +31,7 @@ #include "MacroAssembler.h" #include "SlotVisitor.h" #include "UnusedPointer.h" +#include "VM.h" #include "WriteBarrier.h" namespace JSC { @@ -42,8 +43,7 @@ class VM; #define JITWriteBarrierFlag ((void*)2) class JITWriteBarrierBase { public: - typedef void* (JITWriteBarrierBase::*UnspecifiedBoolType); - operator UnspecifiedBoolType*() const { return get() ? reinterpret_cast<UnspecifiedBoolType*>(1) : 0; } + explicit operator bool() const { return get(); } bool operator!() const { return !get(); } void setFlagOnBarrier() @@ -77,9 +77,9 @@ protected: { } - void set(VM&, CodeLocationDataLabelPtr location, JSCell* owner, JSCell* value) + void set(VM& vm, CodeLocationDataLabelPtr location, JSCell* owner, JSCell* value) { - Heap::writeBarrier(owner, value); + vm.heap.writeBarrier(owner, value); m_location = location; ASSERT(((!!m_location) && m_location.executableAddress() != JITWriteBarrierFlag) || (location.executableAddress() == m_location.executableAddress())); MacroAssembler::repatchPointer(m_location, value); @@ -137,7 +137,7 @@ public: template<typename T> inline void SlotVisitor::append(JITWriteBarrier<T>* slot) { - internalAppend(slot->get()); + internalAppend(0, slot->get()); } } |