Ignore:
Timestamp:
Dec 17, 2012, 1:38:51 PM (13 years ago)
Author:
[email protected]
Message:

Rationalize array profiling for out-of-bounds and hole cases
https://bugs.webkit.org/show_bug.cgi?id=105139

Reviewed by Geoffrey Garen.

This makes ArrayProfile track whether or not we had out-of-bounds, which allows
for more precise decision-making in the DFG.

Also cleaned up ExitKinds for out-of-bounds and hole cases to make it easier to
look at them in the profiler.

Slight speed-up (5-8%) on SunSpider/crypto-md5.

  • bytecode/ArrayProfile.cpp:

(JSC::ArrayProfile::computeUpdatedPrediction):
(JSC::ArrayProfile::briefDescription):

  • bytecode/ArrayProfile.h:

(JSC::ArrayProfile::ArrayProfile):
(JSC::ArrayProfile::addressOfOutOfBounds):
(JSC::ArrayProfile::expectedStructure):
(JSC::ArrayProfile::structureIsPolymorphic):
(JSC::ArrayProfile::outOfBounds):
(JSC::ArrayProfile::polymorphicStructure):

  • bytecode/CodeBlock.cpp:

(JSC::dumpChain):

  • bytecode/ExitKind.cpp:

(JSC::exitKindToString):
(JSC::exitKindIsCountable):

  • bytecode/ExitKind.h:
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::getArrayModeAndEmitChecks):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileDoublePutByVal):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • jit/JIT.h:
  • jit/JITInlines.h:

(JSC::JIT::emitArrayProfileOutOfBoundsSpecialCase):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emitSlow_op_get_by_val):
(JSC::JIT::emitSlow_op_put_by_val):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emitSlow_op_get_by_val):
(JSC::JIT::emitSlow_op_put_by_val):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/ExitKind.h

    r137175 r137937  
    3737    Overflow, // We exited because of overflow.
    3838    NegativeZero, // We exited because we encountered negative zero.
     39    StoreToHole, // We had a store to a hole.
     40    LoadFromHole, // We had a load from a hole.
    3941    OutOfBounds, // We had an out-of-bounds access to an array.
     42    StoreToHoleOrOutOfBounds, // We're simultaneously speculating that we're in bounds and not accessing a hole, and one of those things didn't pan out.
    4043    InadequateCoverage, // We exited because we ended up in code that didn't have profiling coverage.
    4144    ArgumentsEscaped, // We exited because arguments escaped but we didn't expect them to.
Note: See TracChangeset for help on using the changeset viewer.