Ignore:
Timestamp:
Aug 29, 2013, 9:41:07 AM (12 years ago)
Author:
[email protected]
Message:

Unreviewed, rolling out r154804.
http://trac.webkit.org/changeset/154804
https://bugs.webkit.org/show_bug.cgi?id=120477

Broke Windows build (assumes LLInt features not enabled on
this build) (Requested by bfulgham on #webkit).

  • CMakeLists.txt:
  • GNUmakefile.list.am:
  • JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Target.pri:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::linkIncomingCall):
(JSC::CodeBlock::unlinkIncomingCalls):
(JSC::CodeBlock::reoptimize):
(JSC::ProgramCodeBlock::replacement):
(JSC::EvalCodeBlock::replacement):
(JSC::FunctionCodeBlock::replacement):
(JSC::ProgramCodeBlock::compileOptimized):
(JSC::ProgramCodeBlock::replaceWithDeferredOptimizedCode):
(JSC::EvalCodeBlock::compileOptimized):
(JSC::EvalCodeBlock::replaceWithDeferredOptimizedCode):
(JSC::FunctionCodeBlock::compileOptimized):
(JSC::FunctionCodeBlock::replaceWithDeferredOptimizedCode):
(JSC::ProgramCodeBlock::jitCompileImpl):
(JSC::EvalCodeBlock::jitCompileImpl):
(JSC::FunctionCodeBlock::jitCompileImpl):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::jitType):
(JSC::CodeBlock::jitCompile):

  • bytecode/DeferredCompilationCallback.cpp: Removed.
  • bytecode/DeferredCompilationCallback.h: Removed.
  • dfg/DFGDriver.cpp:

(JSC::DFG::compile):
(JSC::DFG::tryCompile):
(JSC::DFG::tryCompileFunction):
(JSC::DFG::tryFinalizePlan):

  • dfg/DFGDriver.h:

(JSC::DFG::tryCompile):
(JSC::DFG::tryCompileFunction):
(JSC::DFG::tryFinalizePlan):

  • dfg/DFGFailedFinalizer.cpp:

(JSC::DFG::FailedFinalizer::finalize):
(JSC::DFG::FailedFinalizer::finalizeFunction):

  • dfg/DFGFailedFinalizer.h:
  • dfg/DFGFinalizer.h:
  • dfg/DFGJITFinalizer.cpp:

(JSC::DFG::JITFinalizer::finalize):
(JSC::DFG::JITFinalizer::finalizeFunction):

  • dfg/DFGJITFinalizer.h:
  • dfg/DFGOSRExitPreparation.cpp:

(JSC::DFG::prepareCodeOriginForOSRExit):

  • dfg/DFGOperations.cpp:
  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::Plan):
(JSC::DFG::Plan::compileInThreadImpl):
(JSC::DFG::Plan::finalize):

  • dfg/DFGPlan.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGWorklist.cpp:

(JSC::DFG::Worklist::completeAllReadyPlansForVM):
(JSC::DFG::Worklist::runThread):

  • ftl/FTLJITFinalizer.cpp:

(JSC::FTL::JITFinalizer::finalize):
(JSC::FTL::JITFinalizer::finalizeFunction):

  • ftl/FTLJITFinalizer.h:
  • heap/Heap.h:
  • interpreter/Interpreter.cpp:

(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):

  • jit/JITDriver.h: Added.

(JSC::jitCompileIfAppropriateImpl):
(JSC::jitCompileFunctionIfAppropriateImpl):
(JSC::jitCompileIfAppropriate):
(JSC::jitCompileFunctionIfAppropriate):

  • jit/JITStubs.cpp:

(JSC::DEFINE_STUB_FUNCTION):
(JSC::jitCompileFor):
(JSC::lazyLinkFor):

  • jit/JITToDFGDeferredCompilationCallback.cpp: Removed.
  • jit/JITToDFGDeferredCompilationCallback.h: Removed.
  • llint/LLIntEntrypoints.cpp:

(JSC::LLInt::getFunctionEntrypoint):
(JSC::LLInt::getEvalEntrypoint):
(JSC::LLInt::getProgramEntrypoint):

  • llint/LLIntEntrypoints.h:

(JSC::LLInt::getEntrypoint):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::jitCompileAndSetHeuristics):
(JSC::LLInt::setUpCall):

  • runtime/ArrayPrototype.cpp:

(JSC::isNumericCompareFunction):

  • runtime/CommonSlowPaths.cpp:
  • runtime/CompilationResult.cpp:

(WTF::printInternal):

  • runtime/CompilationResult.h:
  • runtime/Executable.cpp:

(JSC::EvalExecutable::compileOptimized):
(JSC::EvalExecutable::jitCompile):
(JSC::EvalExecutable::compileInternal):
(JSC::EvalExecutable::replaceWithDeferredOptimizedCode):
(JSC::ProgramExecutable::compileOptimized):
(JSC::ProgramExecutable::jitCompile):
(JSC::ProgramExecutable::compileInternal):
(JSC::ProgramExecutable::replaceWithDeferredOptimizedCode):
(JSC::FunctionExecutable::compileOptimizedForCall):
(JSC::FunctionExecutable::compileOptimizedForConstruct):
(JSC::FunctionExecutable::jitCompileForCall):
(JSC::FunctionExecutable::jitCompileForConstruct):
(JSC::FunctionExecutable::produceCodeBlockFor):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::replaceWithDeferredOptimizedCodeForCall):
(JSC::FunctionExecutable::compileForConstructInternal):
(JSC::FunctionExecutable::replaceWithDeferredOptimizedCodeForConstruct):

  • runtime/Executable.h:

(JSC::ExecutableBase::offsetOfJITCodeWithArityCheckFor):
(JSC::ExecutableBase::offsetOfNumParametersFor):
(JSC::ExecutableBase::catchRoutineFor):
(JSC::EvalExecutable::compile):
(JSC::ProgramExecutable::compile):
(JSC::FunctionExecutable::compileForCall):
(JSC::FunctionExecutable::compileForConstruct):
(JSC::FunctionExecutable::compileFor):
(JSC::FunctionExecutable::compileOptimizedFor):
(JSC::FunctionExecutable::replaceWithDeferredOptimizedCodeFor):
(JSC::FunctionExecutable::jitCompileFor):

  • runtime/ExecutionHarness.h: Added.

(JSC::prepareForExecutionImpl):
(JSC::prepareFunctionForExecutionImpl):
(JSC::installOptimizedCode):
(JSC::prepareForExecution):
(JSC::prepareFunctionForExecution):
(JSC::replaceWithDeferredOptimizedCode):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r154804 r154814  
    3535#include "DFGCapabilities.h"
    3636#include "DFGCommon.h"
    37 #include "DFGDriver.h"
    3837#include "DFGNode.h"
    3938#include "DFGRepatch.h"
     
    4746#include "JSFunction.h"
    4847#include "JSNameScope.h"
    49 #include "LLIntEntrypoints.h"
    5048#include "LowLevelInterpreter.h"
    5149#include "Operations.h"
     
    25392537    m_incomingCalls.push(incoming);
    25402538}
    2541 #endif // ENABLE(JIT)
    25422539
    25432540void CodeBlock::unlinkIncomingCalls()
     
    25462543    while (m_incomingLLIntCalls.begin() != m_incomingLLIntCalls.end())
    25472544        m_incomingLLIntCalls.begin()->unlink();
    2548 #endif // ENABLE(LLINT)
    2549 #if ENABLE(JIT)
     2545#endif
    25502546    if (m_incomingCalls.isEmpty())
    25512547        return;
     
    25532549    while (m_incomingCalls.begin() != m_incomingCalls.end())
    25542550        m_incomingCalls.begin()->unlink(*m_vm, repatchBuffer);
     2551}
    25552552#endif // ENABLE(JIT)
    2556 }
    25572553
    25582554#if ENABLE(LLINT)
     
    26942690}
    26952691
    2696 CompilationResult CodeBlock::prepareForExecutionImpl(
    2697     ExecState* exec, JITCode::JITType jitType, JITCompilationEffort effort,
    2698     unsigned bytecodeIndex, PassRefPtr<DeferredCompilationCallback> callback)
    2699 {
    2700     VM& vm = exec->vm();
    2701    
    2702     if (jitType == JITCode::InterpreterThunk) {
    2703         switch (codeType()) {
    2704         case GlobalCode:
    2705             LLInt::setProgramEntrypoint(vm, static_cast<ProgramCodeBlock*>(this));
    2706             break;
    2707         case EvalCode:
    2708             LLInt::setEvalEntrypoint(vm, static_cast<EvalCodeBlock*>(this));
    2709             break;
    2710         case FunctionCode:
    2711             LLInt::setFunctionEntrypoint(vm, static_cast<FunctionCodeBlock*>(this));
    2712             break;
    2713         }
    2714         return CompilationSuccessful;
    2715     }
    2716    
    2717 #if ENABLE(JIT)
    2718     if (JITCode::isOptimizingJIT(jitType)) {
    2719         ASSERT(effort == JITCompilationCanFail);
    2720         bool hadCallback = !!callback;
    2721         CompilationResult result = DFG::tryCompile(exec, this, bytecodeIndex, callback);
    2722         ASSERT_UNUSED(hadCallback, result != CompilationDeferred || hadCallback);
    2723         return result;
    2724     }
    2725    
    2726     MacroAssemblerCodePtr jitCodeWithArityCheck;
    2727     RefPtr<JITCode> jitCode = JIT::compile(&vm, this, effort, &jitCodeWithArityCheck);
    2728     if (!jitCode)
    2729         return CompilationFailed;
    2730     setJITCode(jitCode, jitCodeWithArityCheck);
    2731     return CompilationSuccessful;
    2732 #else
    2733     UNUSED_PARAM(effort);
    2734     UNUSED_PARAM(bytecodeIndex);
    2735     UNUSED_PARAM(callback);
    2736     return CompilationFailed;
    2737 #endif // ENABLE(JIT)
    2738 }
    2739 
    2740 CompilationResult CodeBlock::prepareForExecution(
    2741     ExecState* exec, JITCode::JITType jitType,
    2742     JITCompilationEffort effort, unsigned bytecodeIndex)
    2743 {
    2744     CompilationResult result =
    2745         prepareForExecutionImpl(exec, jitType, effort, bytecodeIndex, 0);
    2746     ASSERT(result != CompilationDeferred);
    2747     return result;
    2748 }
    2749 
    2750 CompilationResult CodeBlock::prepareForExecutionAsynchronously(
    2751     ExecState* exec, JITCode::JITType jitType,
    2752     PassRefPtr<DeferredCompilationCallback> passedCallback,
    2753     JITCompilationEffort effort, unsigned bytecodeIndex)
    2754 {
    2755     RefPtr<DeferredCompilationCallback> callback = passedCallback;
    2756     CompilationResult result =
    2757         prepareForExecutionImpl(exec, jitType, effort, bytecodeIndex, callback);
    2758     if (result != CompilationDeferred)
    2759         callback->compilationDidComplete(this, result);
    2760     return result;
    2761 }
    2762 
    2763 void CodeBlock::install()
    2764 {
    2765     ownerExecutable()->installCode(this);
    2766 }
    2767 
    2768 PassRefPtr<CodeBlock> CodeBlock::newReplacement()
    2769 {
    2770     return ownerExecutable()->newReplacementCodeBlockFor(specializationKind());
    2771 }
    2772 
    27732692#if ENABLE(JIT)
    27742693void CodeBlock::reoptimize()
     
    27962715    return &static_cast<FunctionExecutable*>(ownerExecutable())->generatedBytecodeFor(m_isConstructor ? CodeForConstruct : CodeForCall);
    27972716}
     2717
     2718#if ENABLE(DFG_JIT)
     2719JSObject* ProgramCodeBlock::compileOptimized(ExecState* exec, JSScope* scope, CompilationResult& result, unsigned bytecodeIndex)
     2720{
     2721    if (JITCode::isHigherTier(replacement()->jitType(), jitType())) {
     2722        result = CompilationNotNeeded;
     2723        return 0;
     2724    }
     2725    JSObject* error = static_cast<ProgramExecutable*>(ownerExecutable())->compileOptimized(exec, scope, result, bytecodeIndex);
     2726    return error;
     2727}
     2728
     2729CompilationResult ProgramCodeBlock::replaceWithDeferredOptimizedCode(PassRefPtr<DFG::Plan> plan)
     2730{
     2731    return static_cast<ProgramExecutable*>(ownerExecutable())->replaceWithDeferredOptimizedCode(plan);
     2732}
     2733
     2734JSObject* EvalCodeBlock::compileOptimized(ExecState* exec, JSScope* scope, CompilationResult& result, unsigned bytecodeIndex)
     2735{
     2736    if (JITCode::isHigherTier(replacement()->jitType(), jitType())) {
     2737        result = CompilationNotNeeded;
     2738        return 0;
     2739    }
     2740    JSObject* error = static_cast<EvalExecutable*>(ownerExecutable())->compileOptimized(exec, scope, result, bytecodeIndex);
     2741    return error;
     2742}
     2743
     2744CompilationResult EvalCodeBlock::replaceWithDeferredOptimizedCode(PassRefPtr<DFG::Plan> plan)
     2745{
     2746    return static_cast<EvalExecutable*>(ownerExecutable())->replaceWithDeferredOptimizedCode(plan);
     2747}
     2748
     2749JSObject* FunctionCodeBlock::compileOptimized(ExecState* exec, JSScope* scope, CompilationResult& result, unsigned bytecodeIndex)
     2750{
     2751    if (JITCode::isHigherTier(replacement()->jitType(), jitType())) {
     2752        result = CompilationNotNeeded;
     2753        return 0;
     2754    }
     2755    JSObject* error = static_cast<FunctionExecutable*>(ownerExecutable())->compileOptimizedFor(exec, scope, result, bytecodeIndex, m_isConstructor ? CodeForConstruct : CodeForCall);
     2756    return error;
     2757}
     2758
     2759CompilationResult FunctionCodeBlock::replaceWithDeferredOptimizedCode(PassRefPtr<DFG::Plan> plan)
     2760{
     2761    return static_cast<FunctionExecutable*>(ownerExecutable())->replaceWithDeferredOptimizedCodeFor(plan, m_isConstructor ? CodeForConstruct : CodeForCall);
     2762}
     2763#endif // ENABLE(DFG_JIT)
    27982764
    27992765DFG::CapabilityLevel ProgramCodeBlock::capabilityLevelInternal()
     
    28382804{
    28392805    static_cast<FunctionExecutable*>(ownerExecutable())->jettisonOptimizedCodeFor(*vm(), m_isConstructor ? CodeForConstruct : CodeForCall);
     2806}
     2807
     2808CompilationResult ProgramCodeBlock::jitCompileImpl(ExecState* exec)
     2809{
     2810    ASSERT(jitType() == JITCode::InterpreterThunk);
     2811    ASSERT(this == replacement());
     2812    return static_cast<ProgramExecutable*>(ownerExecutable())->jitCompile(exec);
     2813}
     2814
     2815CompilationResult EvalCodeBlock::jitCompileImpl(ExecState* exec)
     2816{
     2817    ASSERT(jitType() == JITCode::InterpreterThunk);
     2818    ASSERT(this == replacement());
     2819    return static_cast<EvalExecutable*>(ownerExecutable())->jitCompile(exec);
     2820}
     2821
     2822CompilationResult FunctionCodeBlock::jitCompileImpl(ExecState* exec)
     2823{
     2824    ASSERT(jitType() == JITCode::InterpreterThunk);
     2825    ASSERT(this == replacement());
     2826    return static_cast<FunctionExecutable*>(ownerExecutable())->jitCompileFor(exec, m_isConstructor ? CodeForConstruct : CodeForCall);
    28402827}
    28412828#endif
Note: See TracChangeset for help on using the changeset viewer.