Changeset 39038 in webkit for trunk/JavaScriptCore/jit/JIT.cpp


Ignore:
Timestamp:
Dec 5, 2008, 12:27:58 PM (16 years ago)
Author:
[email protected]
Message:

2008-12-05 Sam Weinig <[email protected]>

Reviewed by Geoffrey Garen.

Encapsulate access to jump tables in the CodeBlock in preparation
of moving them to a rare data structure.

  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::dump): (JSC::CodeBlock::shrinkToFit):
  • bytecode/CodeBlock.h: (JSC::CodeBlock::numberOfImmediateSwitchJumpTables): (JSC::CodeBlock::addImmediateSwitchJumpTable): (JSC::CodeBlock::immediateSwitchJumpTable): (JSC::CodeBlock::numberOfCharacterSwitchJumpTables): (JSC::CodeBlock::addCharacterSwitchJumpTable): (JSC::CodeBlock::characterSwitchJumpTable): (JSC::CodeBlock::numberOfStringSwitchJumpTables): (JSC::CodeBlock::addStringSwitchJumpTable): (JSC::CodeBlock::stringSwitchJumpTable):
  • bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::generate): (JSC::BytecodeGenerator::endSwitch):
  • interpreter/Interpreter.cpp: (JSC::Interpreter::privateExecute): (JSC::Interpreter::cti_op_switch_imm): (JSC::Interpreter::cti_op_switch_char): (JSC::Interpreter::cti_op_switch_string):
  • jit/JIT.cpp: (JSC::JIT::privateCompileMainPass):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/JIT.cpp

    r39020 r39038  
    12461246
    12471247            // create jump table for switch destinations, track this switch statement.
    1248             SimpleJumpTable* jumpTable = &m_codeBlock->immediateSwitchJumpTables[tableIndex];
     1248            SimpleJumpTable* jumpTable = &m_codeBlock->immediateSwitchJumpTable(tableIndex);
    12491249            m_switches.append(SwitchRecord(jumpTable, i, defaultOffset, SwitchRecord::Immediate));
    12501250            jumpTable->ctiOffsets.grow(jumpTable->branchOffsets.size());
     
    12631263
    12641264            // create jump table for switch destinations, track this switch statement.
    1265             SimpleJumpTable* jumpTable = &m_codeBlock->characterSwitchJumpTables[tableIndex];
     1265            SimpleJumpTable* jumpTable = &m_codeBlock->characterSwitchJumpTable(tableIndex);
    12661266            m_switches.append(SwitchRecord(jumpTable, i, defaultOffset, SwitchRecord::Character));
    12671267            jumpTable->ctiOffsets.grow(jumpTable->branchOffsets.size());
     
    12801280
    12811281            // create jump table for switch destinations, track this switch statement.
    1282             StringJumpTable* jumpTable = &m_codeBlock->stringSwitchJumpTables[tableIndex];
     1282            StringJumpTable* jumpTable = &m_codeBlock->stringSwitchJumpTable(tableIndex);
    12831283            m_switches.append(SwitchRecord(jumpTable, i, defaultOffset));
    12841284
Note: See TracChangeset for help on using the changeset viewer.