Ignore:
Timestamp:
Jul 24, 2013, 9:00:58 PM (12 years ago)
Author:
[email protected]
Message:

fourthTier: rationalize DFG::CapabilityLevel and DFGCapabilities.[h|cpp]
https://bugs.webkit.org/show_bug.cgi?id=116696

Reviewed by Sam Weinig.

Make it so that all capability calculation is funneled through one function, which tells
you everything you wanted to know: can it be inlined, and can it be compiled.

This work will help with https://bugs.webkit.org/show_bug.cgi?id=116557, since now the
JIT has a fairly authoritative answer to the "can it be inlined" question.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::CodeBlock):
(JSC::ProgramCodeBlock::capabilityLevelInternal):
(JSC::EvalCodeBlock::capabilityLevelInternal):
(JSC::FunctionCodeBlock::capabilityLevelInternal):

  • bytecode/CodeBlock.h:

(CodeBlock):
(JSC::CodeBlock::capabilityLevel):
(JSC::CodeBlock::capabilityLevelState):
(ProgramCodeBlock):
(EvalCodeBlock):
(FunctionCodeBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::debugFail):
(DFG):
(JSC::DFG::canInlineResolveOperations):
(JSC::DFG::capabilityLevel):

  • dfg/DFGCapabilities.h:

(DFG):
(JSC::DFG::capabilityLevel):
(JSC::DFG::evalCapabilityLevel):
(JSC::DFG::programCapabilityLevel):
(JSC::DFG::functionForCallCapabilityLevel):
(JSC::DFG::functionForConstructCapabilityLevel):
(JSC::DFG::canInlineFunctionForCall):
(JSC::DFG::canInlineFunctionForClosureCall):
(JSC::DFG::canInlineFunctionForConstruct):

  • dfg/DFGCommon.h:

(JSC::DFG::canCompile):
(DFG):
(JSC::DFG::canInline):
(JSC::DFG::leastUpperBound):

  • dfg/DFGDriver.cpp:

(JSC::DFG::compile):

  • jit/JIT.cpp:

(JSC::JIT::privateCompile):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::privateCompilePutByIdTransition):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::privateCompilePutByIdTransition):

  • tools/CodeProfile.cpp:

(JSC::CodeProfile::sample):

File:
1 edited

Legend:

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

    r153177 r153179  
    15931593    , m_putToBaseOperations(other.m_putToBaseOperations)
    15941594#if ENABLE(JIT)
    1595     , m_canCompileWithDFGState(DFG::CapabilityLevelNotSet)
     1595    , m_capabilityLevelState(DFG::CapabilityLevelNotSet)
    15961596#endif
    15971597{
     
    28852885}
    28862886
    2887 DFG::CapabilityLevel ProgramCodeBlock::canCompileWithDFGInternal()
    2888 {
    2889     return DFG::canCompileProgram(this);
    2890 }
    2891 
    2892 DFG::CapabilityLevel EvalCodeBlock::canCompileWithDFGInternal()
    2893 {
    2894     return DFG::canCompileEval(this);
    2895 }
    2896 
    2897 DFG::CapabilityLevel FunctionCodeBlock::canCompileWithDFGInternal()
     2887DFG::CapabilityLevel ProgramCodeBlock::capabilityLevelInternal()
     2888{
     2889    return DFG::programCapabilityLevel(this);
     2890}
     2891
     2892DFG::CapabilityLevel EvalCodeBlock::capabilityLevelInternal()
     2893{
     2894    return DFG::evalCapabilityLevel(this);
     2895}
     2896
     2897DFG::CapabilityLevel FunctionCodeBlock::capabilityLevelInternal()
    28982898{
    28992899    if (m_isConstructor)
    2900         return DFG::canCompileFunctionForConstruct(this);
    2901     return DFG::canCompileFunctionForCall(this);
     2900        return DFG::functionForConstructCapabilityLevel(this);
     2901    return DFG::functionForCallCapabilityLevel(this);
    29022902}
    29032903
Note: See TracChangeset for help on using the changeset viewer.