Changeset 94802 in webkit for trunk/Source/JavaScriptCore/dfg


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):

Location:
trunk/Source/JavaScriptCore/dfg
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

    r94629 r94802  
    3030
    3131#include "DFGAliasTracker.h"
     32#include "DFGCapabilities.h"
    3233#include "DFGScoreBoard.h"
    3334#include "CodeBlock.h"
     
    599600        // Switch on the current bytecode opcode.
    600601        Instruction* currentInstruction = instructionsBegin + m_currentIndex;
    601         switch (interpreter->getOpcodeID(currentInstruction->u.opcode)) {
     602        OpcodeID opcodeID = interpreter->getOpcodeID(currentInstruction->u.opcode);
     603        switch (opcodeID) {
    602604
    603605        // === Function entry opcodes ===
     
    12091211        default:
    12101212            // Parse failed!
     1213            ASSERT(!canCompileOpcode(opcodeID));
    12111214            return false;
    12121215        }
     1216       
     1217        ASSERT(canCompileOpcode(opcodeID));
    12131218    }
    12141219}
Note: See TracChangeset for help on using the changeset viewer.