Changeset 145578 in webkit
- Timestamp:
- Mar 12, 2013 1:38:26 PM (11 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r145551 r145578 1 2013-03-12 Filip Pizlo <fpizlo@apple.com> 2 3 DFG generic array access cases should not be guarded by CheckStructure even of the profiling tells us that it could be 4 https://bugs.webkit.org/show_bug.cgi?id=112183 5 6 Reviewed by Oliver Hunt. 7 8 Slight speed-up on string-unpack-code. 9 10 * dfg/DFGFixupPhase.cpp: 11 (JSC::DFG::FixupPhase::findAndRemoveUnnecessaryStructureCheck): 12 (FixupPhase): 13 (JSC::DFG::FixupPhase::checkArray): 14 (JSC::DFG::FixupPhase::blessArrayOperation): 15 1 16 2013-03-12 Gabor Rapcsanyi <rgabor@webkit.org> 2 17 -
trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
r145052 r145578 839 839 } 840 840 841 Node* checkArray(ArrayMode arrayMode, CodeOrigin codeOrigin, Node* array, Node* index, bool (*storageCheck)(const ArrayMode&) = canCSEStorage) 841 void findAndRemoveUnnecessaryStructureCheck(Node* array, const CodeOrigin& codeOrigin) 842 { 843 for (unsigned index = m_indexInBlock; index--;) { 844 Node* previousNode = m_block->at(index); 845 if (previousNode->codeOrigin != codeOrigin) 846 return; 847 848 if (previousNode->op() != CheckStructure) 849 continue; 850 851 if (previousNode->child1() != array) 852 continue; 853 854 previousNode->child1() = Edge(); 855 previousNode->convertToPhantom(); 856 return; // Assume we were smart enough to only insert one CheckStructure on the array. 857 } 858 } 859 860 Node* checkArray(ArrayMode arrayMode, const CodeOrigin& codeOrigin, Node* array, Node* index, bool (*storageCheck)(const ArrayMode&) = canCSEStorage) 842 861 { 843 862 ASSERT(arrayMode.isSpecific()); … … 851 870 if (m_indexInBlock > 0) { 852 871 // If the previous node was a CheckStructure inserted because of stuff 853 // that the array profile told us, then remove it. 854 Node* previousNode = m_block->at(m_indexInBlock - 1); 855 if (previousNode->op() == CheckStructure 856 && previousNode->child1() == array 857 && previousNode->codeOrigin == codeOrigin) 858 previousNode->convertToPhantom(); 872 // that the array profile told us, then remove it, since we're going to be 873 // doing arrayification instead. 874 findAndRemoveUnnecessaryStructureCheck(array, codeOrigin); 859 875 } 860 876 … … 909 925 910 926 case Array::Generic: 927 findAndRemoveUnnecessaryStructureCheck(base.node(), node->codeOrigin); 911 928 return; 912 929
Note: See TracChangeset
for help on using the changeset viewer.