summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-04-10 09:28:39 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-04-10 09:28:39 +0000
commit32761a6cee1d0dee366b885b7b9c777e67885688 (patch)
treed6bec92bebfb216f4126356e55518842c2f476a1 /Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h
parenta4e969f4965059196ca948db781e52f7cfebf19e (diff)
downloadWebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h')
-rw-r--r--Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h32
1 files changed, 12 insertions, 20 deletions
diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h b/Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.h
index 2d9738478..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
{
@@ -327,10 +321,6 @@ public:
void dumpWithName(const char* name, PrintStream& out) const
{
- if (!m_value) {
- out.print(name, "(null)");
- return;
- }
if (executableAddress() == dataLocation()) {
out.print(name, "(", RawPointer(executableAddress()), ")");
return;
@@ -414,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
{
@@ -442,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
{