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

fourthTier: There should only be one table of SimpleJumpTables
https://bugs.webkit.org/show_bug.cgi?id=117856

Reviewed by Geoffrey Garen.

Having multiple tables of SimpleJumpTables just means we have to duplicate a
ton of code. This patch deduplicates all of it.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpBytecode):
(JSC):
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::shrinkToFit):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::numberOfSwitchJumpTables):
(JSC::CodeBlock::addSwitchJumpTable):
(JSC::CodeBlock::switchJumpTable):
(JSC::CodeBlock::clearSwitchJumpTables):
(RareData):

  • bytecode/PreciseJumpTargets.cpp:

(JSC):
(JSC::computePreciseJumpTargets):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::shrinkToFit):
(JSC::UnlinkedCodeBlock::numberOfSwitchJumpTables):
(JSC::UnlinkedCodeBlock::addSwitchJumpTable):
(JSC::UnlinkedCodeBlock::switchJumpTable):
(RareData):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC):
(JSC::prepareJumpTableForSwitch):
(JSC::BytecodeGenerator::endSwitch):

  • dfg/DFGByteCodeParser.cpp:

(InlineStackEntry):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::link):

  • dfg/DFGJITCompiler.h:

(JITCompiler):

  • dfg/DFGOperations.cpp:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::emitSwitchIntJump):
(DFG):
(JSC::DFG::SpeculativeJIT::emitSwitchImm):
(JSC::DFG::SpeculativeJIT::emitSwitchCharStringJump):

  • dfg/DFGSpeculativeJIT.h:

(SpeculativeJIT):

  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):

  • jit/JITStubs.cpp:

(JSC::DEFINE_STUB_FUNCTION):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

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

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp

    r153231 r153237  
    693693
    694694    // create jump table for switch destinations, track this switch statement.
    695     SimpleJumpTable* jumpTable = &m_codeBlock->immediateSwitchJumpTable(tableIndex);
     695    SimpleJumpTable* jumpTable = &m_codeBlock->switchJumpTable(tableIndex);
    696696    m_switches.append(SwitchRecord(jumpTable, m_bytecodeOffset, defaultOffset, SwitchRecord::Immediate));
    697697    jumpTable->ctiOffsets.grow(jumpTable->branchOffsets.size());
     
    711711
    712712    // create jump table for switch destinations, track this switch statement.
    713     SimpleJumpTable* jumpTable = &m_codeBlock->characterSwitchJumpTable(tableIndex);
     713    SimpleJumpTable* jumpTable = &m_codeBlock->switchJumpTable(tableIndex);
    714714    m_switches.append(SwitchRecord(jumpTable, m_bytecodeOffset, defaultOffset, SwitchRecord::Character));
    715715    jumpTable->ctiOffsets.grow(jumpTable->branchOffsets.size());
Note: See TracChangeset for help on using the changeset viewer.