Changeset 39038 in webkit for trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
- Timestamp:
- Dec 5, 2008, 12:27:58 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r38917 r39038 140 140 } 141 141 #endif 142 143 m_codeBlock->instructions.shrinkToFit(); 144 m_codeBlock->globalResolveInstructions.shrinkToFit(); 145 m_codeBlock->propertyAccessInstructions.shrinkToFit(); 146 m_codeBlock->callLinkInfos.shrinkToFit(); 147 m_codeBlock->linkedCallerList.shrinkToFit(); 148 149 m_codeBlock->identifiers.shrinkToFit(); 150 m_codeBlock->functions.shrinkToFit(); 151 m_codeBlock->functionExpressions.shrinkToFit(); 152 m_codeBlock->constantRegisters.shrinkToFit(); 153 m_codeBlock->unexpectedConstants.shrinkToFit(); 154 m_codeBlock->regexps.shrinkToFit(); 155 m_codeBlock->exceptionHandlers.shrinkToFit(); 156 m_codeBlock->expressionInfo.shrinkToFit(); 157 m_codeBlock->lineInfo.shrinkToFit(); 158 159 m_codeBlock->immediateSwitchJumpTables.shrinkToFit(); 160 m_codeBlock->characterSwitchJumpTables.shrinkToFit(); 161 m_codeBlock->stringSwitchJumpTables.shrinkToFit(); 162 142 143 m_codeBlock->shrinkToFit(); 163 144 } 164 145 … … 1711 1692 m_switchContextStack.removeLast(); 1712 1693 if (switchInfo.switchType == SwitchInfo::SwitchImmediate) { 1713 instructions()[switchInfo.bytecodeOffset + 1] = m_codeBlock-> immediateSwitchJumpTables.size();1694 instructions()[switchInfo.bytecodeOffset + 1] = m_codeBlock->numberOfImmediateSwitchJumpTables(); 1714 1695 instructions()[switchInfo.bytecodeOffset + 2] = defaultLabel->offsetFrom(switchInfo.bytecodeOffset + 3); 1715 1696 1716 m_codeBlock->immediateSwitchJumpTables.append(SimpleJumpTable()); 1717 SimpleJumpTable& jumpTable = m_codeBlock->immediateSwitchJumpTables.last(); 1718 1697 SimpleJumpTable& jumpTable = m_codeBlock->addImmediateSwitchJumpTable(); 1719 1698 prepareJumpTableForImmediateSwitch(jumpTable, switchInfo.bytecodeOffset + 3, clauseCount, labels, nodes, min, max); 1720 1699 } else if (switchInfo.switchType == SwitchInfo::SwitchCharacter) { 1721 instructions()[switchInfo.bytecodeOffset + 1] = m_codeBlock-> characterSwitchJumpTables.size();1700 instructions()[switchInfo.bytecodeOffset + 1] = m_codeBlock->numberOfCharacterSwitchJumpTables(); 1722 1701 instructions()[switchInfo.bytecodeOffset + 2] = defaultLabel->offsetFrom(switchInfo.bytecodeOffset + 3); 1723 1702 1724 m_codeBlock->characterSwitchJumpTables.append(SimpleJumpTable()); 1725 SimpleJumpTable& jumpTable = m_codeBlock->characterSwitchJumpTables.last(); 1726 1703 SimpleJumpTable& jumpTable = m_codeBlock->addCharacterSwitchJumpTable(); 1727 1704 prepareJumpTableForCharacterSwitch(jumpTable, switchInfo.bytecodeOffset + 3, clauseCount, labels, nodes, min, max); 1728 1705 } else { 1729 1706 ASSERT(switchInfo.switchType == SwitchInfo::SwitchString); 1730 instructions()[switchInfo.bytecodeOffset + 1] = m_codeBlock-> stringSwitchJumpTables.size();1707 instructions()[switchInfo.bytecodeOffset + 1] = m_codeBlock->numberOfStringSwitchJumpTables(); 1731 1708 instructions()[switchInfo.bytecodeOffset + 2] = defaultLabel->offsetFrom(switchInfo.bytecodeOffset + 3); 1732 1709 1733 m_codeBlock->stringSwitchJumpTables.append(StringJumpTable()); 1734 StringJumpTable& jumpTable = m_codeBlock->stringSwitchJumpTables.last(); 1735 1710 StringJumpTable& jumpTable = m_codeBlock->addStringSwitchJumpTable(); 1736 1711 prepareJumpTableForStringSwitch(jumpTable, switchInfo.bytecodeOffset + 3, clauseCount, labels, nodes); 1737 1712 }
Note:
See TracChangeset
for help on using the changeset viewer.