Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (159986 => 159987)
--- trunk/Source/_javascript_Core/ChangeLog 2013-12-03 01:27:06 UTC (rev 159986)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-12-03 01:32:43 UTC (rev 159987)
@@ -1,3 +1,40 @@
+2013-12-02 Mark Lam <[email protected]>
+
+ Build failure when disabling JIT, YARR_JIT, and ASSEMBLER.
+ https://bugs.webkit.org/show_bug.cgi?id=123809.
+
+ Reviewed by Geoffrey Garen.
+
+ Also fixed build when disabling the DISASSEMBLER.
+ Added some needed #if's and some comments.
+
+ * assembler/LinkBuffer.cpp:
+ (JSC::LinkBuffer::finalizeCodeWithDisassembly):
+ * dfg/DFGDisassembler.cpp:
+ * dfg/DFGDisassembler.h:
+ (JSC::DFG::Disassembler::Disassembler):
+ (JSC::DFG::Disassembler::setStartOfCode):
+ (JSC::DFG::Disassembler::setForBlockIndex):
+ (JSC::DFG::Disassembler::setForNode):
+ (JSC::DFG::Disassembler::setEndOfMainPath):
+ (JSC::DFG::Disassembler::setEndOfCode):
+ (JSC::DFG::Disassembler::dump):
+ (JSC::DFG::Disassembler::reportToProfiler):
+ * disassembler/Disassembler.cpp:
+ * disassembler/X86Disassembler.cpp:
+ * jit/FPRInfo.h:
+ * jit/GPRInfo.h:
+ * jit/JITDisassembler.cpp:
+ * jit/JITDisassembler.h:
+ (JSC::JITDisassembler::JITDisassembler):
+ (JSC::JITDisassembler::setStartOfCode):
+ (JSC::JITDisassembler::setForBytecodeMainPath):
+ (JSC::JITDisassembler::setForBytecodeSlowPath):
+ (JSC::JITDisassembler::setEndOfSlowPath):
+ (JSC::JITDisassembler::setEndOfCode):
+ (JSC::JITDisassembler::dump):
+ (JSC::JITDisassembler::reportToProfiler):
+
2013-12-02 Filip Pizlo <[email protected]>
Baseline JIT calls to CommonSlowPaths shouldn't restore the last result
Modified: trunk/Source/_javascript_Core/assembler/LinkBuffer.cpp (159986 => 159987)
--- trunk/Source/_javascript_Core/assembler/LinkBuffer.cpp 2013-12-03 01:27:06 UTC (rev 159986)
+++ trunk/Source/_javascript_Core/assembler/LinkBuffer.cpp 2013-12-03 01:32:43 UTC (rev 159987)
@@ -49,7 +49,8 @@
ASSERT(Options::showDisassembly() || Options::showDFGDisassembly());
CodeRef result = finalizeCodeWithoutDisassembly();
-
+
+#if ENABLE(DISASSEMBLER)
dataLogF("Generated JIT code for ");
va_list argList;
va_start(argList, format);
@@ -59,6 +60,9 @@
dataLogF(" Code at [%p, %p):\n", result.code().executableAddress(), static_cast<char*>(result.code().executableAddress()) + result.size());
disassemble(result.code(), m_size, " ", WTF::dataFile());
+#else
+ UNUSED_PARAM(format);
+#endif // ENABLE(DISASSEMBLER)
return result;
}
Modified: trunk/Source/_javascript_Core/dfg/DFGDisassembler.cpp (159986 => 159987)
--- trunk/Source/_javascript_Core/dfg/DFGDisassembler.cpp 2013-12-03 01:27:06 UTC (rev 159986)
+++ trunk/Source/_javascript_Core/dfg/DFGDisassembler.cpp 2013-12-03 01:32:43 UTC (rev 159987)
@@ -26,7 +26,7 @@
#include "config.h"
#include "DFGDisassembler.h"
-#if ENABLE(DFG_JIT)
+#if ENABLE(DFG_JIT) && ENABLE(DISASSEMBLER)
#include "CodeBlockWithJITType.h"
#include "DFGGraph.h"
@@ -172,4 +172,4 @@
} } // namespace JSC::DFG
-#endif // ENABLE(DFG_JIT)
+#endif // ENABLE(DFG_JIT) && ENABLE(DISASSEMBLER)
Modified: trunk/Source/_javascript_Core/dfg/DFGDisassembler.h (159986 => 159987)
--- trunk/Source/_javascript_Core/dfg/DFGDisassembler.h 2013-12-03 01:27:06 UTC (rev 159986)
+++ trunk/Source/_javascript_Core/dfg/DFGDisassembler.h 2013-12-03 01:32:43 UTC (rev 159987)
@@ -42,6 +42,8 @@
class Graph;
+#if ENABLE(DISASSEMBLER)
+
class Disassembler {
WTF_MAKE_FAST_ALLOCATED;
public:
@@ -97,6 +99,25 @@
MacroAssembler::Label m_endOfCode;
};
+#else // ENABLE(DISASSEMBLER)
+
+class Disassembler {
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ Disassembler(Graph&) { }
+
+ void setStartOfCode(MacroAssembler::Label) { }
+ void setForBlockIndex(BlockIndex, MacroAssembler::Label) { }
+ void setForNode(Node*, MacroAssembler::Label) { }
+ void setEndOfMainPath(MacroAssembler::Label) { }
+ void setEndOfCode(MacroAssembler::Label) { }
+
+ void dump(LinkBuffer&) { }
+ void reportToProfiler(Profiler::Compilation*, LinkBuffer&) { }
+};
+
+#endif // ENABLE(DISASSEMBLER)
+
} } // namespace JSC::DFG
#endif // ENABLE(DFG_JIT)
Modified: trunk/Source/_javascript_Core/disassembler/Disassembler.cpp (159986 => 159987)
--- trunk/Source/_javascript_Core/disassembler/Disassembler.cpp 2013-12-03 01:27:06 UTC (rev 159986)
+++ trunk/Source/_javascript_Core/disassembler/Disassembler.cpp 2013-12-03 01:32:43 UTC (rev 159987)
@@ -26,6 +26,8 @@
#include "config.h"
#include "Disassembler.h"
+#if ENABLE(DISASSEMBLER)
+
#include "MacroAssemblerCodeRef.h"
#include <wtf/DataLog.h>
@@ -41,3 +43,4 @@
} // namespace JSC
+#endif // ENABLE(DISASSEMBLER)
Modified: trunk/Source/_javascript_Core/disassembler/X86Disassembler.cpp (159986 => 159987)
--- trunk/Source/_javascript_Core/disassembler/X86Disassembler.cpp 2013-12-03 01:27:06 UTC (rev 159986)
+++ trunk/Source/_javascript_Core/disassembler/X86Disassembler.cpp 2013-12-03 01:32:43 UTC (rev 159987)
@@ -26,6 +26,7 @@
#include "config.h"
#include "Disassembler.h"
+#if ENABLE(DISASSEMBLER)
#if USE(UDIS86) || USE(LLVM_DISASSEMBLER)
#include "MacroAssemblerCodeRef.h"
@@ -70,4 +71,4 @@
} // namespace JSC
#endif // USE(UDIS86) || USE(LLVM_DISASSEMBLER)
-
+#endif // ENABLE(DISASSEMBLER)
Modified: trunk/Source/_javascript_Core/jit/FPRInfo.h (159986 => 159987)
--- trunk/Source/_javascript_Core/jit/FPRInfo.h 2013-12-03 01:27:06 UTC (rev 159986)
+++ trunk/Source/_javascript_Core/jit/FPRInfo.h 2013-12-03 01:32:43 UTC (rev 159987)
@@ -34,6 +34,8 @@
typedef MacroAssembler::FPRegisterID FPRReg;
#define InvalidFPRReg ((::JSC::FPRReg)-1)
+#if ENABLE(JIT)
+
#if CPU(X86) || CPU(X86_64)
class FPRInfo {
@@ -108,7 +110,7 @@
static const unsigned InvalidIndex = 0xffffffff;
};
-#endif
+#endif // CPU(X86) || CPU(X86_64)
#if CPU(ARM)
@@ -172,7 +174,7 @@
static const unsigned InvalidIndex = 0xffffffff;
};
-#endif
+#endif // CPU(ARM)
#if CPU(ARM64)
@@ -260,7 +262,7 @@
static const unsigned InvalidIndex = 0xffffffff;
};
-#endif
+#endif // CPU(ARM64)
#if CPU(MIPS)
@@ -327,7 +329,7 @@
static const unsigned InvalidIndex = 0xffffffff;
};
-#endif
+#endif // CPU(MIPS)
#if CPU(SH4)
@@ -389,8 +391,10 @@
static const unsigned InvalidIndex = 0xffffffff;
};
-#endif
+#endif // CPU(SH4)
+#endif // ENABLE(JIT)
+
} // namespace JSC
namespace WTF {
Modified: trunk/Source/_javascript_Core/jit/GPRInfo.h (159986 => 159987)
--- trunk/Source/_javascript_Core/jit/GPRInfo.h 2013-12-03 01:27:06 UTC (rev 159986)
+++ trunk/Source/_javascript_Core/jit/GPRInfo.h 2013-12-03 01:32:43 UTC (rev 159987)
@@ -34,6 +34,8 @@
typedef MacroAssembler::RegisterID GPRReg;
#define InvalidGPRReg ((::JSC::GPRReg)-1)
+#if ENABLE(JIT)
+
#if USE(JSVALUE64)
class JSValueRegs {
public:
@@ -125,7 +127,7 @@
int32_t m_offset;
GPRReg m_base;
};
-#endif
+#endif // USE(JSVALUE64)
#if USE(JSVALUE32_64)
class JSValueRegs {
@@ -276,7 +278,7 @@
int8_t m_payload;
int8_t m_tagType; // Contains the low bits of the tag.
};
-#endif
+#endif // USE(JSVALUE32_64)
// The baseline JIT requires that regT3 be callee-preserved.
@@ -343,7 +345,7 @@
static const unsigned InvalidIndex = 0xffffffff;
};
-#endif
+#endif // CPU(X86)
#if CPU(X86_64)
#if !OS(WINDOWS)
@@ -440,7 +442,7 @@
static const unsigned InvalidIndex = 0xffffffff;
};
-#endif
+#endif // CPU(X86_64)
#if CPU(ARM)
#define NUMBER_OF_ARGUMENT_REGISTERS 4u
@@ -521,7 +523,7 @@
static const unsigned InvalidIndex = 0xffffffff;
};
-#endif
+#endif // CPU(ARM)
#if CPU(ARM64)
#define NUMBER_OF_ARGUMENT_REGISTERS 8u
@@ -619,7 +621,7 @@
static const unsigned InvalidIndex = 0xffffffff;
};
-#endif
+#endif // CPU(ARM64)
#if CPU(MIPS)
#define NUMBER_OF_ARGUMENT_REGISTERS 4u
@@ -695,7 +697,7 @@
static const unsigned InvalidIndex = 0xffffffff;
};
-#endif
+#endif // CPU(MIPS)
#if CPU(SH4)
#define NUMBER_OF_ARGUMENT_REGISTERS 4u
@@ -765,7 +767,7 @@
static const unsigned InvalidIndex = 0xffffffff;
};
-#endif
+#endif // CPU(SH4)
// The baseline JIT uses "accumulator" style execution with regT0 (for 64-bit)
// and regT0 + regT1 (for 32-bit) serving as the accumulator register(s) for
@@ -775,6 +777,8 @@
COMPILE_ASSERT(GPRInfo::regT1 == GPRInfo::returnValueGPR2, regT1_must_equal_returnValueGPR2);
#endif
+#endif // ENABLE(JIT)
+
} // namespace JSC
namespace WTF {
Modified: trunk/Source/_javascript_Core/jit/JITDisassembler.cpp (159986 => 159987)
--- trunk/Source/_javascript_Core/jit/JITDisassembler.cpp 2013-12-03 01:27:06 UTC (rev 159986)
+++ trunk/Source/_javascript_Core/jit/JITDisassembler.cpp 2013-12-03 01:32:43 UTC (rev 159987)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,7 +26,7 @@
#include "config.h"
#include "JITDisassembler.h"
-#if ENABLE(JIT)
+#if ENABLE(JIT) && ENABLE(DISASSEMBLER)
#include "CodeBlock.h"
#include "CodeBlockWithJITType.h"
@@ -164,5 +164,5 @@
} // namespace JSC
-#endif // ENABLE(JIT)
+#endif // ENABLE(JIT) && ENABLE(DISASSEMBLER)
Modified: trunk/Source/_javascript_Core/jit/JITDisassembler.h (159986 => 159987)
--- trunk/Source/_javascript_Core/jit/JITDisassembler.h 2013-12-03 01:27:06 UTC (rev 159986)
+++ trunk/Source/_javascript_Core/jit/JITDisassembler.h 2013-12-03 01:32:43 UTC (rev 159987)
@@ -39,6 +39,8 @@
class CodeBlock;
+#if ENABLE(DISASSEMBLER)
+
class JITDisassembler {
WTF_MAKE_FAST_ALLOCATED;
public:
@@ -84,6 +86,25 @@
MacroAssembler::Label m_endOfCode;
};
+#else // ENABLE(DISASSEMBLER)
+
+class JITDisassembler {
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ JITDisassembler(CodeBlock*) { }
+
+ void setStartOfCode(MacroAssembler::Label) { }
+ void setForBytecodeMainPath(unsigned, MacroAssembler::Label) { }
+ void setForBytecodeSlowPath(unsigned, MacroAssembler::Label) { }
+ void setEndOfSlowPath(MacroAssembler::Label) { }
+ void setEndOfCode(MacroAssembler::Label) { }
+
+ void dump(LinkBuffer&) { }
+ void reportToProfiler(Profiler::Compilation*, LinkBuffer&) { }
+};
+
+#endif // ENABLE(DISASSEMBLER)
+
} // namespace JSC
#endif // ENABLE(JIT)
Modified: trunk/Source/WTF/ChangeLog (159986 => 159987)
--- trunk/Source/WTF/ChangeLog 2013-12-03 01:27:06 UTC (rev 159986)
+++ trunk/Source/WTF/ChangeLog 2013-12-03 01:32:43 UTC (rev 159987)
@@ -1,3 +1,13 @@
+2013-12-02 Mark Lam <[email protected]>
+
+ Build failure when disabling JIT, YARR_JIT, and ASSEMBLER.
+ https://bugs.webkit.org/show_bug.cgi?id=123809.
+
+ Reviewed by Geoffrey Garen.
+
+ * wtf/Platform.h:
+ - Ensure that the ASSEMBLER is enabled when the DISASSEMBLER is enabled.
+
2013-11-30 [email protected] <[email protected]>
[Win] Some _javascript_ date tests are failing.
Modified: trunk/Source/WTF/wtf/Platform.h (159986 => 159987)
--- trunk/Source/WTF/wtf/Platform.h 2013-12-03 01:27:06 UTC (rev 159986)
+++ trunk/Source/WTF/wtf/Platform.h 2013-12-03 01:32:43 UTC (rev 159987)
@@ -851,6 +851,16 @@
#endif
#endif
+/* If the Disassembler is enabled, then the Assembler must be enabled as well: */
+#if ENABLE(DISASSEMBLER)
+#if defined(ENABLE_ASSEMBLER) && !ENABLE_ASSEMBLER
+#error "Cannot enable the Disassembler without enabling the Assembler"
+#else
+#undef ENABLE_ASSEMBLER
+#define ENABLE_ASSEMBLER 1
+#endif
+#endif
+
/* FIXME: We currently unconditionally use spearate stacks. When we switch to using the
C stack for JS frames, we'll need to make the following conditional on ENABLE(LLINT_CLOOP)
only.