Ignore:
Timestamp:
Sep 8, 2011, 2:38:04 PM (14 years ago)
Author:
[email protected]
Message:

Value profling and execution count profiling is performed even for
code that cannot be optimized
https://bugs.webkit.org/show_bug.cgi?id=67694

Reviewed by Gavin Barraclough.

This is a 2% speed-up on V8 when tiered compilation is enabled.

(JSC::ProgramCodeBlock::canCompileWithDFG):
(JSC::EvalCodeBlock::canCompileWithDFG):
(JSC::FunctionCodeBlock::canCompileWithDFG):

  • bytecode/CodeBlock.h:
  • dfg/DFGCapabilities.cpp: Added.

(JSC::DFG::canCompileOpcodes):

  • dfg/DFGCapabilities.h: Added.

(JSC::DFG::mightCompileEval):
(JSC::DFG::mightCompileProgram):
(JSC::DFG::mightCompileFunctionForCall):
(JSC::DFG::mightCompileFunctionForConstruct):
(JSC::DFG::canCompileOpcode):
(JSC::DFG::canCompileEval):
(JSC::DFG::canCompileProgram):
(JSC::DFG::canCompileFunctionForCall):
(JSC::DFG::canCompileFunctionForConstruct):

  • jit/JIT.cpp:

(JSC::JIT::emitOptimizationCheck):
(JSC::JIT::privateCompile):

  • jit/JIT.h:

(JSC::JIT::shouldEmitProfiling):

  • jit/JITInlineMethods.h:

(JSC::JIT::emitValueProfilingSite):

File:
1 edited

Legend:

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

    r94731 r94802  
    3232
    3333#include "BytecodeGenerator.h"
     34#include "DFGCapabilities.h"
    3435#include "Debugger.h"
    3536#include "Interpreter.h"
     
    19311932    return error;
    19321933}
     1934
     1935bool ProgramCodeBlock::canCompileWithDFG()
     1936{
     1937    return DFG::canCompileProgram(this);
     1938}
     1939
     1940bool EvalCodeBlock::canCompileWithDFG()
     1941{
     1942    return DFG::canCompileEval(this);
     1943}
     1944
     1945bool FunctionCodeBlock::canCompileWithDFG()
     1946{
     1947    if (m_isConstructor)
     1948        return DFG::canCompileFunctionForConstruct(this);
     1949    return DFG::canCompileFunctionForCall(this);
     1950}
    19331951#endif
    19341952
Note: See TracChangeset for help on using the changeset viewer.