Changeset 192935 in webkit for trunk/Source/JavaScriptCore/bytecode/BytecodeLivenessAnalysis.cpp
- Timestamp:
- Dec 1, 2015, 5:37:19 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecode/BytecodeLivenessAnalysis.cpp
r192914 r192935 99 99 // exception handlers in the uses. 100 100 template<typename UseFunctor, typename DefFunctor> 101 static void stepOverInstruction(CodeBlock* codeBlock, BytecodeBasicBlock* block,Vector<std::unique_ptr<BytecodeBasicBlock>>& basicBlocks, unsigned bytecodeOffset, const UseFunctor& use, const DefFunctor& def)101 static void stepOverInstruction(CodeBlock* codeBlock, Vector<std::unique_ptr<BytecodeBasicBlock>>& basicBlocks, unsigned bytecodeOffset, const UseFunctor& use, const DefFunctor& def) 102 102 { 103 103 // This abstractly execute the instruction in reverse. Instructions logically first use operands and … … 117 117 118 118 computeDefsForBytecodeOffset( 119 codeBlock, b lock, bytecodeOffset,119 codeBlock, bytecodeOffset, 120 120 [&] (CodeBlock* codeBlock, Instruction*, OpcodeID, int operand) { 121 121 if (isValidRegisterForLiveness(codeBlock, operand)) … … 124 124 125 125 computeUsesForBytecodeOffset( 126 codeBlock, b lock, bytecodeOffset,126 codeBlock, bytecodeOffset, 127 127 [&] (CodeBlock* codeBlock, Instruction*, OpcodeID, int operand) { 128 128 if (isValidRegisterForLiveness(codeBlock, operand)) 129 129 use(VirtualRegister(operand).toLocal()); 130 130 }); 131 131 132 132 // If we have an exception handler, we want the live-in variables of the 133 133 // exception handler block to be included in the live-in of this particular bytecode. … … 139 139 } 140 140 141 static void stepOverInstruction(CodeBlock* codeBlock, BytecodeBasicBlock* block,Vector<std::unique_ptr<BytecodeBasicBlock>>& basicBlocks, unsigned bytecodeOffset, FastBitVector& out)141 static void stepOverInstruction(CodeBlock* codeBlock, Vector<std::unique_ptr<BytecodeBasicBlock>>& basicBlocks, unsigned bytecodeOffset, FastBitVector& out) 142 142 { 143 143 stepOverInstruction( 144 codeBlock, b lock, basicBlocks, bytecodeOffset,144 codeBlock, basicBlocks, bytecodeOffset, 145 145 [&] (unsigned bitIndex) { 146 146 // This is the use functor, so we set the bit. … … 165 165 break; 166 166 167 stepOverInstruction(codeBlock, b lock, basicBlocks, bytecodeOffset, out);167 stepOverInstruction(codeBlock, basicBlocks, bytecodeOffset, out); 168 168 } 169 169 … … 181 181 { 182 182 UnlinkedCodeBlock* unlinkedCodeBlock = m_codeBlock->unlinkedCodeBlock(); 183 unsigned numberOfVariables = unlinkedCodeBlock->m_numCallee Locals;183 unsigned numberOfVariables = unlinkedCodeBlock->m_numCalleeRegisters; 184 184 185 185 for (unsigned i = 0; i < m_basicBlocks.size(); i++) { … … 249 249 for (unsigned i = block->bytecodeOffsets().size(); i--;) { 250 250 unsigned bytecodeOffset = block->bytecodeOffsets()[i]; 251 stepOverInstruction(m_codeBlock, block,m_basicBlocks, bytecodeOffset, out);251 stepOverInstruction(m_codeBlock, m_basicBlocks, bytecodeOffset, out); 252 252 result.m_map[bytecodeOffset] = out; 253 253 } … … 272 272 unsigned bytecodeOffset = block->bytecodeOffsets()[i]; 273 273 stepOverInstruction( 274 m_codeBlock, block,m_basicBlocks, bytecodeOffset,274 m_codeBlock, m_basicBlocks, bytecodeOffset, 275 275 [&] (unsigned index) { 276 276 // This is for uses.
Note:
See TracChangeset
for help on using the changeset viewer.