Diff
Modified: branches/dfgFourthTier/Source/_javascript_Core/ChangeLog (151353 => 151354)
--- branches/dfgFourthTier/Source/_javascript_Core/ChangeLog 2013-06-09 06:36:47 UTC (rev 151353)
+++ branches/dfgFourthTier/Source/_javascript_Core/ChangeLog 2013-06-09 19:04:22 UTC (rev 151354)
@@ -1,3 +1,40 @@
+2013-06-09 Mark Lam <[email protected]>
+
+ Fix broken no-DFG build.
+ https://bugs.webkit.org/show_bug.cgi?id=117381.
+
+ Reviewed by Geoffrey Garen.
+
+ * bytecode/CodeBlock.cpp:
+ * bytecode/CodeBlock.h:
+ (CodeBlock):
+ (ProgramCodeBlock):
+ (EvalCodeBlock):
+ (FunctionCodeBlock):
+ * dfg/DFGCapabilities.h:
+ * dfg/DFGDriver.h:
+ (JSC::DFG::tryCompile):
+ (JSC::DFG::tryCompileFunction):
+ * dfg/DFGJITCode.cpp:
+ * dfg/DFGRepatch.h:
+ (JSC::DFG::dfgResetGetByID):
+ (JSC::DFG::dfgResetPutByID):
+ * heap/DFGCodeBlocks.cpp:
+ (JSC::DFGCodeBlocks::jettison):
+ * interpreter/CallFrame.h:
+ (ExecState):
+ (JSC::ExecState::trueCallFrame):
+ * interpreter/Interpreter.cpp:
+ (JSC::getCallerInfo):
+ * runtime/Executable.cpp:
+ * runtime/Executable.h:
+ (EvalExecutable):
+ (ProgramExecutable):
+ (FunctionExecutable):
+ * runtime/ExecutionHarness.h:
+ * runtime/VM.cpp:
+ (JSC::VM::~VM):
+
2013-06-08 Filip Pizlo <[email protected]>
fourthTier: Recursive deadlock in DFG::ByteCodeParser
Modified: branches/dfgFourthTier/Source/_javascript_Core/bytecode/CodeBlock.cpp (151353 => 151354)
--- branches/dfgFourthTier/Source/_javascript_Core/bytecode/CodeBlock.cpp 2013-06-09 06:36:47 UTC (rev 151353)
+++ branches/dfgFourthTier/Source/_javascript_Core/bytecode/CodeBlock.cpp 2013-06-09 19:04:22 UTC (rev 151354)
@@ -2868,6 +2868,7 @@
return &static_cast<FunctionExecutable*>(ownerExecutable())->generatedBytecodeFor(m_isConstructor ? CodeForConstruct : CodeForCall);
}
+#if ENABLE(DFG_JIT)
JSObject* ProgramCodeBlock::compileOptimized(ExecState* exec, JSScope* scope, CompilationResult& result, unsigned bytecodeIndex)
{
if (JITCode::isHigherTier(replacement()->jitType(), jitType())) {
@@ -2912,6 +2913,7 @@
{
return static_cast<FunctionExecutable*>(ownerExecutable())->replaceWithDeferredOptimizedCodeFor(plan, m_isConstructor ? CodeForConstruct : CodeForCall);
}
+#endif // ENABLE(DFG_JIT)
DFG::CapabilityLevel ProgramCodeBlock::capabilityLevelInternal()
{
Modified: branches/dfgFourthTier/Source/_javascript_Core/bytecode/CodeBlock.h (151353 => 151354)
--- branches/dfgFourthTier/Source/_javascript_Core/bytecode/CodeBlock.h 2013-06-09 06:36:47 UTC (rev 151353)
+++ branches/dfgFourthTier/Source/_javascript_Core/bytecode/CodeBlock.h 2013-06-09 19:04:22 UTC (rev 151354)
@@ -282,8 +282,10 @@
{
return jitType() == JITCode::BaselineJIT;
}
+#if ENABLE(DFG_JIT)
virtual JSObject* compileOptimized(ExecState*, JSScope*, CompilationResult&, unsigned bytecodeIndex) = 0;
virtual CompilationResult replaceWithDeferredOptimizedCode(PassRefPtr<DFG::Plan>) = 0;
+#endif // ENABLE(DFG_JIT)
void jettison();
CompilationResult jitCompile(ExecState* exec)
{
@@ -1147,8 +1149,11 @@
#if ENABLE(JIT)
protected:
+#if ENABLE(DFG_JIT)
virtual JSObject* compileOptimized(ExecState*, JSScope*, CompilationResult&, unsigned bytecodeIndex);
virtual CompilationResult replaceWithDeferredOptimizedCode(PassRefPtr<DFG::Plan>);
+#endif // ENABLE(DFG_JIT)
+
virtual void jettisonImpl();
virtual CompilationResult jitCompileImpl(ExecState*);
virtual CodeBlock* replacement();
@@ -1173,8 +1178,11 @@
#if ENABLE(JIT)
protected:
+#if ENABLE(DFG_JIT)
virtual JSObject* compileOptimized(ExecState*, JSScope*, CompilationResult&, unsigned bytecodeIndex);
virtual CompilationResult replaceWithDeferredOptimizedCode(PassRefPtr<DFG::Plan>);
+#endif // ENABLE(DFG_JIT)
+
virtual void jettisonImpl();
virtual CompilationResult jitCompileImpl(ExecState*);
virtual CodeBlock* replacement();
@@ -1199,8 +1207,11 @@
#if ENABLE(JIT)
protected:
+#if ENABLE(DFG_JIT)
virtual JSObject* compileOptimized(ExecState*, JSScope*, CompilationResult&, unsigned bytecodeIndex);
virtual CompilationResult replaceWithDeferredOptimizedCode(PassRefPtr<DFG::Plan>);
+#endif // ENABLE(DFG_JIT)
+
virtual void jettisonImpl();
virtual CompilationResult jitCompileImpl(ExecState*);
virtual CodeBlock* replacement();
Modified: branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGCapabilities.h (151353 => 151354)
--- branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGCapabilities.h 2013-06-09 06:36:47 UTC (rev 151353)
+++ branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGCapabilities.h 2013-06-09 19:04:22 UTC (rev 151354)
@@ -26,12 +26,13 @@
#ifndef DFGCapabilities_h
#define DFGCapabilities_h
-#include "Intrinsic.h"
+#include "CodeBlock.h"
#include "DFGCommon.h"
#include "DFGNode.h"
#include "Executable.h"
+#include "Interpreter.h"
+#include "Intrinsic.h"
#include "Options.h"
-#include "Interpreter.h"
#include <wtf/Platform.h>
namespace JSC { namespace DFG {
Modified: branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGDriver.h (151353 => 151354)
--- branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGDriver.h 2013-06-09 06:36:47 UTC (rev 151353)
+++ branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGDriver.h 2013-06-09 19:04:22 UTC (rev 151354)
@@ -46,8 +46,8 @@
CompilationResult tryCompileFunction(ExecState*, CodeBlock*, RefPtr<JSC::JITCode>&, MacroAssemblerCodePtr& jitCodeWithArityCheck, unsigned bytecodeIndex);
CompilationResult tryFinalizePlan(PassRefPtr<Plan>, RefPtr<JSC::JITCode>&, MacroAssemblerCodePtr* jitCodeWithArityCheck);
#else
-inline CompilationResult tryCompile(ExecState*, CodeBlock*, RefPtr<JSC::JITCode>&, unsigned) { return false; }
-inline CompilationResult tryCompileFunction(ExecState*, CodeBlock*, RefPtr<JSC::JITCode>&, MacroAssemblerCodePtr&, unsigned) { return false; }
+inline CompilationResult tryCompile(ExecState*, CodeBlock*, RefPtr<JSC::JITCode>&, unsigned) { return CompilationFailed; }
+inline CompilationResult tryCompileFunction(ExecState*, CodeBlock*, RefPtr<JSC::JITCode>&, MacroAssemblerCodePtr&, unsigned) { return CompilationFailed; }
inline CompilationResult tryFinalizePlan(PassRefPtr<Plan>, RefPtr<JSC::JITCode>&, MacroAssemblerCodePtr*)
{
UNREACHABLE_FOR_PLATFORM();
Modified: branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGJITCode.cpp (151353 => 151354)
--- branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGJITCode.cpp 2013-06-09 06:36:47 UTC (rev 151353)
+++ branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGJITCode.cpp 2013-06-09 19:04:22 UTC (rev 151354)
@@ -26,6 +26,8 @@
#include "config.h"
#include "DFGJITCode.h"
+#if ENABLE(DFG_JIT)
+
namespace JSC { namespace DFG {
JITCode::JITCode()
@@ -59,3 +61,4 @@
} } // namespace JSC::DFG
+#endif // ENABLE(DFG_JIT)
Modified: branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGRepatch.h (151353 => 151354)
--- branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGRepatch.h 2013-06-09 06:36:47 UTC (rev 151353)
+++ branches/dfgFourthTier/Source/_javascript_Core/dfg/DFGRepatch.h 2013-06-09 19:04:22 UTC (rev 151354)
@@ -59,8 +59,8 @@
namespace DFG {
-inline NO_RETURN_DUE_TO_ASSERT void dfgResetGetByID(RepatchBuffer&, StructureStubInfo&) { RELEASE_ASSERT_NOT_REACHED(); }
-inline NO_RETURN_DUE_TO_ASSERT void dfgResetPutByID(RepatchBuffer&, StructureStubInfo&) { RELEASE_ASSERT_NOT_REACHED(); }
+inline NO_RETURN void dfgResetGetByID(RepatchBuffer&, StructureStubInfo&) { RELEASE_ASSERT_NOT_REACHED(); }
+inline NO_RETURN void dfgResetPutByID(RepatchBuffer&, StructureStubInfo&) { RELEASE_ASSERT_NOT_REACHED(); }
} } // namespace JSC::DFG
Modified: branches/dfgFourthTier/Source/_javascript_Core/heap/DFGCodeBlocks.cpp (151353 => 151354)
--- branches/dfgFourthTier/Source/_javascript_Core/heap/DFGCodeBlocks.cpp 2013-06-09 06:36:47 UTC (rev 151353)
+++ branches/dfgFourthTier/Source/_javascript_Core/heap/DFGCodeBlocks.cpp 2013-06-09 19:04:22 UTC (rev 151354)
@@ -91,7 +91,7 @@
#else // ENABLE(DFG_JIT)
-void DFGCodeBlocks::jettison(PassOwnPtr<CodeBlock>)
+void DFGCodeBlocks::jettison(PassRefPtr<CodeBlock>)
{
}
Modified: branches/dfgFourthTier/Source/_javascript_Core/interpreter/CallFrame.h (151353 => 151354)
--- branches/dfgFourthTier/Source/_javascript_Core/interpreter/CallFrame.h 2013-06-09 06:36:47 UTC (rev 151353)
+++ branches/dfgFourthTier/Source/_javascript_Core/interpreter/CallFrame.h 2013-06-09 19:04:22 UTC (rev 151354)
@@ -162,7 +162,9 @@
void setLocationAsRawBits(unsigned);
void setLocationAsBytecodeOffset(unsigned);
+#if ENABLE(DFG_JIT)
unsigned bytecodeOffsetFromCodeOriginIndex();
+#endif
Register* frameExtent()
{
@@ -282,7 +284,7 @@
// HostCallFrameFlag stuff.
CallFrame* trueCallerFrame();
#else
- CallFrame* trueCallFrame(AbstractPC) { return this; }
+ CallFrame* trueCallFrame() { return this; }
CallFrame* trueCallerFrame() { return callerFrame()->removeHostCallFrameFlag(); }
#endif
CallFrame* callerFrameNoFlags() { return callerFrame()->removeHostCallFrameFlag(); }
Modified: branches/dfgFourthTier/Source/_javascript_Core/interpreter/Interpreter.cpp (151353 => 151354)
--- branches/dfgFourthTier/Source/_javascript_Core/interpreter/Interpreter.cpp 2013-06-09 06:36:47 UTC (rev 151353)
+++ branches/dfgFourthTier/Source/_javascript_Core/interpreter/Interpreter.cpp 2013-06-09 19:04:22 UTC (rev 151354)
@@ -594,9 +594,11 @@
}
CodeBlock* callerCodeBlock = trueCallerFrame->codeBlock();
+#if ENABLE(DFG_JIT)
if (trueCallerFrame->hasLocationAsCodeOriginIndex())
bytecodeOffset = trueCallerFrame->bytecodeOffsetFromCodeOriginIndex();
else
+#endif // ENABLE(DFG_JIT)
bytecodeOffset = trueCallerFrame->locationAsBytecodeOffset();
caller = callerCodeBlock;
Modified: branches/dfgFourthTier/Source/_javascript_Core/runtime/Executable.cpp (151353 => 151354)
--- branches/dfgFourthTier/Source/_javascript_Core/runtime/Executable.cpp 2013-06-09 06:36:47 UTC (rev 151353)
+++ branches/dfgFourthTier/Source/_javascript_Core/runtime/Executable.cpp 2013-06-09 19:04:22 UTC (rev 151354)
@@ -155,6 +155,7 @@
static_cast<FunctionExecutable*>(cell)->FunctionExecutable::~FunctionExecutable();
}
+#if ENABLE(DFG_JIT)
JSObject* EvalExecutable::compileOptimized(ExecState* exec, JSScope* scope, CompilationResult& result, unsigned bytecodeIndex)
{
ASSERT(exec->vm().dynamicGlobalObject);
@@ -167,6 +168,7 @@
ASSERT(!!m_evalCodeBlock);
return error;
}
+#endif // ENABLE(DFG_JIT)
#if ENABLE(JIT)
CompilationResult EvalExecutable::jitCompile(ExecState* exec)
@@ -236,11 +238,13 @@
return 0;
}
+#if ENABLE(DFG_JIT)
CompilationResult EvalExecutable::replaceWithDeferredOptimizedCode(PassRefPtr<DFG::Plan> plan)
{
return JSC::replaceWithDeferredOptimizedCode(
plan, m_evalCodeBlock, m_jitCodeForCall, 0, 0);
}
+#endif // ENABLE(DFG_JIT)
#if ENABLE(JIT)
void EvalExecutable::jettisonOptimizedCode(VM& vm)
@@ -292,6 +296,7 @@
return error.toErrorObject(lexicalGlobalObject, m_source);
}
+#if ENABLE(DFG_JIT)
JSObject* ProgramExecutable::compileOptimized(ExecState* exec, JSScope* scope, CompilationResult& result, unsigned bytecodeIndex)
{
RELEASE_ASSERT(exec->vm().dynamicGlobalObject);
@@ -304,6 +309,7 @@
ASSERT(!!m_programCodeBlock);
return error;
}
+#endif // ENABLE(DFG_JIT)
#if ENABLE(JIT)
CompilationResult ProgramExecutable::jitCompile(ExecState* exec)
@@ -342,11 +348,13 @@
return 0;
}
+#if ENABLE(DFG_JIT)
CompilationResult ProgramExecutable::replaceWithDeferredOptimizedCode(PassRefPtr<DFG::Plan> plan)
{
return JSC::replaceWithDeferredOptimizedCode(
plan, m_programCodeBlock, m_jitCodeForCall, 0, 0);
}
+#endif // ENABLE(DFG_JIT)
#if ENABLE(JIT)
void ProgramExecutable::jettisonOptimizedCode(VM& vm)
@@ -466,6 +474,7 @@
return result;
}
+#if ENABLE(DFG_JIT)
JSObject* FunctionExecutable::compileOptimizedForCall(ExecState* exec, JSScope* scope, CompilationResult& result, unsigned bytecodeIndex)
{
RELEASE_ASSERT(exec->vm().dynamicGlobalObject);
@@ -491,6 +500,7 @@
ASSERT(!!m_codeBlockForConstruct);
return error;
}
+#endif // ENABLE(DFG_JIT)
#if ENABLE(JIT)
CompilationResult FunctionExecutable::jitCompileForCall(ExecState* exec)
@@ -560,12 +570,14 @@
return 0;
}
+#if ENABLE(DFG_JIT)
CompilationResult FunctionExecutable::replaceWithDeferredOptimizedCodeForCall(PassRefPtr<DFG::Plan> plan)
{
return JSC::replaceWithDeferredOptimizedCode(
plan, m_codeBlockForCall, m_jitCodeForCall, &m_jitCodeForCallWithArityCheck,
&m_numParametersForCall);
}
+#endif // ENABLE(DFG_JIT)
JSObject* FunctionExecutable::compileForConstructInternal(ExecState* exec, JSScope* scope, JITCode::JITType jitType, CompilationResult* result, unsigned bytecodeIndex)
{
@@ -595,12 +607,14 @@
return 0;
}
+#if ENABLE(DFG_JIT)
CompilationResult FunctionExecutable::replaceWithDeferredOptimizedCodeForConstruct(PassRefPtr<DFG::Plan> plan)
{
return JSC::replaceWithDeferredOptimizedCode(
plan, m_codeBlockForConstruct, m_jitCodeForConstruct,
&m_jitCodeForConstructWithArityCheck, &m_numParametersForConstruct);
}
+#endif // ENABLE(DFG_JIT)
#if ENABLE(JIT)
void FunctionExecutable::jettisonOptimizedCodeForCall(VM& vm)
Modified: branches/dfgFourthTier/Source/_javascript_Core/runtime/Executable.h (151353 => 151354)
--- branches/dfgFourthTier/Source/_javascript_Core/runtime/Executable.h 2013-06-09 06:36:47 UTC (rev 151353)
+++ branches/dfgFourthTier/Source/_javascript_Core/runtime/Executable.h 2013-06-09 19:04:22 UTC (rev 151354)
@@ -439,8 +439,10 @@
return error;
}
+#if ENABLE(DFG_JIT)
JSObject* compileOptimized(ExecState*, JSScope*, CompilationResult&, unsigned bytecodeIndex);
CompilationResult replaceWithDeferredOptimizedCode(PassRefPtr<DFG::Plan>);
+#endif // ENABLE(DFG_JIT)
#if ENABLE(JIT)
void jettisonOptimizedCode(VM&);
@@ -517,8 +519,10 @@
return error;
}
+#if ENABLE(DFG_JIT)
JSObject* compileOptimized(ExecState*, JSScope*, CompilationResult&, unsigned bytecodeIndex);
CompilationResult replaceWithDeferredOptimizedCode(PassRefPtr<DFG::Plan>);
+#endif // ENABLE(DFG_JIT)
#if ENABLE(JIT)
void jettisonOptimizedCode(VM&);
@@ -613,8 +617,10 @@
return error;
}
+#if ENABLE(DFG_JIT)
JSObject* compileOptimizedForCall(ExecState*, JSScope*, CompilationResult&, unsigned bytecodeIndex);
CompilationResult replaceWithDeferredOptimizedCodeForCall(PassRefPtr<DFG::Plan>);
+#endif // ENABLE(DFG_JIT)
#if ENABLE(JIT)
void jettisonOptimizedCodeForCall(VM&);
@@ -642,8 +648,10 @@
return error;
}
+#if ENABLE(DFG_JIT)
JSObject* compileOptimizedForConstruct(ExecState*, JSScope*, CompilationResult&, unsigned bytecodeIndex);
CompilationResult replaceWithDeferredOptimizedCodeForConstruct(PassRefPtr<DFG::Plan>);
+#endif // ENABLE(DFG_JIT)
#if ENABLE(JIT)
void jettisonOptimizedCodeForConstruct(VM&);
@@ -673,6 +681,7 @@
return compileForConstruct(exec, scope);
}
+#if ENABLE(DFG_JIT)
JSObject* compileOptimizedFor(ExecState* exec, JSScope* scope, CompilationResult& result, unsigned bytecodeIndex, CodeSpecializationKind kind)
{
ASSERT(exec->callee());
@@ -691,6 +700,7 @@
return replaceWithDeferredOptimizedCodeForCall(plan);
return replaceWithDeferredOptimizedCodeForConstruct(plan);
}
+#endif // ENABLE(DFG_JIT)
#if ENABLE(JIT)
void jettisonOptimizedCodeFor(VM& vm, CodeSpecializationKind kind)
Modified: branches/dfgFourthTier/Source/_javascript_Core/runtime/ExecutionHarness.h (151353 => 151354)
--- branches/dfgFourthTier/Source/_javascript_Core/runtime/ExecutionHarness.h 2013-06-09 06:36:47 UTC (rev 151353)
+++ branches/dfgFourthTier/Source/_javascript_Core/runtime/ExecutionHarness.h 2013-06-09 19:04:22 UTC (rev 151354)
@@ -139,6 +139,7 @@
sink, codeBlock, jitCode, jitCodeWithArityCheck, &numParameters);
}
+#if ENABLE(DFG_JIT)
template<typename CodeBlockType>
inline CompilationResult replaceWithDeferredOptimizedCode(
PassRefPtr<DFG::Plan> passedPlan, RefPtr<CodeBlockType>& sink, RefPtr<JITCode>& jitCode,
@@ -158,6 +159,7 @@
jitCodeWithArityCheck ? *jitCodeWithArityCheck : MacroAssemblerCodePtr(),
numParameters);
}
+#endif // ENABLE(DFG_JIT)
} // namespace JSC
Modified: branches/dfgFourthTier/Source/_javascript_Core/runtime/VM.cpp (151353 => 151354)
--- branches/dfgFourthTier/Source/_javascript_Core/runtime/VM.cpp 2013-06-09 06:36:47 UTC (rev 151353)
+++ branches/dfgFourthTier/Source/_javascript_Core/runtime/VM.cpp 2013-06-09 19:04:22 UTC (rev 151354)
@@ -256,12 +256,14 @@
VM::~VM()
{
+#if ENABLE(DFG_JIT)
// Make sure concurrent compilations are done, but don't install them, since installing
// them might cause a GC. We don't want to GC right now.
if (worklist) {
worklist->waitUntilAllPlansForVMAreReady(*this);
worklist->removeAllReadyPlansForVM(*this);
}
+#endif // ENABLE(DFG_JIT)
// Clear this first to ensure that nobody tries to remove themselves from it.
m_perBytecodeProfiler.clear();