summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h')
-rw-r--r--Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h28
1 files changed, 12 insertions, 16 deletions
diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h b/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h
index b4d6c0bfb..5f8ba8a92 100644
--- a/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h
+++ b/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h
@@ -36,7 +36,7 @@
// ASSERT_VALID_CODE_POINTER checks that ptr is a non-null pointer, and that it is a valid
// instruction address on the platform (for example, check any alignment requirements).
-#if CPU(ARM_THUMB2) && ENABLE(JIT)
+#if CPU(ARM_THUMB2) && !ENABLE(LLINT_C_LOOP)
// ARM instructions must be 16-bit aligned. Thumb2 code pointers to be loaded into
// into the processor are decorated with the bottom bit set, while traditional ARM has
// the lower bit clear. Since we don't know what kind of pointer, we check for both
@@ -132,12 +132,6 @@ public:
ASSERT_VALID_CODE_POINTER(m_value);
}
- template<typename returnType, typename argType1, typename argType2, typename argType3, typename argType4, typename argType5, typename argType6>
- FunctionPtr(returnType(*value)(argType1, argType2, argType3, argType4, argType5, argType6))
- : m_value((void*)value)
- {
- ASSERT_VALID_CODE_POINTER(m_value);
- }
// MSVC doesn't seem to treat functions with different calling conventions as
// different types; these methods already defined for fastcall, below.
#if CALLING_CONVENTION_IS_STDCALL && !OS(WINDOWS)
@@ -260,11 +254,6 @@ public:
}
void* value() const { return m_value; }
-
- void dump(PrintStream& out) const
- {
- out.print(RawPointer(m_value));
- }
private:
void* m_value;
@@ -299,10 +288,12 @@ public:
return result;
}
- static MacroAssemblerCodePtr createLLIntCodePtr(OpcodeID codeId)
+#if ENABLE(LLINT)
+ static MacroAssemblerCodePtr createLLIntCodePtr(LLIntCode codeId)
{
return createFromExecutableAddress(LLInt::getCodePtr(codeId));
}
+#endif
explicit MacroAssemblerCodePtr(ReturnAddressPtr ra)
: m_value(ra.value())
@@ -318,7 +309,10 @@ public:
void* dataLocation() const { ASSERT_VALID_CODE_POINTER(m_value); return m_value; }
#endif
- explicit operator bool() const { return m_value; }
+ bool operator!() const
+ {
+ return !m_value;
+ }
bool operator==(const MacroAssemblerCodePtr& other) const
{
@@ -410,11 +404,13 @@ public:
return MacroAssemblerCodeRef(codePtr);
}
+#if ENABLE(LLINT)
// Helper for creating self-managed code refs from LLInt.
- static MacroAssemblerCodeRef createLLIntCodeRef(OpcodeID codeId)
+ static MacroAssemblerCodeRef createLLIntCodeRef(LLIntCode codeId)
{
return createSelfManagedCodeRef(MacroAssemblerCodePtr::createFromExecutableAddress(LLInt::getCodePtr(codeId)));
}
+#endif
ExecutableMemoryHandle* executableMemory() const
{
@@ -438,7 +434,7 @@ public:
return JSC::tryToDisassemble(m_codePtr, size(), prefix, WTF::dataFile());
}
- explicit operator bool() const { return !!m_codePtr; }
+ bool operator!() const { return !m_codePtr; }
void dump(PrintStream& out) const
{