Changeset 128957 in webkit for trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
- Timestamp:
- Sep 18, 2012, 6:20:52 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r128544 r128957 829 829 { 830 830 profile->computeUpdatedPrediction(); 831 return fromObserved(profile ->observedArrayModes(), false);832 } 833 834 Array::Mode getArrayModeAndEmitChecks(ArrayProfile* profile, NodeIndex base)831 return fromObserved(profile, Array::Read, false); 832 } 833 834 Array::Mode getArrayModeAndEmitChecks(ArrayProfile* profile, Array::Action action, NodeIndex base) 835 835 { 836 836 profile->computeUpdatedPrediction(); 837 if (profile->hasDefiniteStructure())838 addToGraph(CheckStructure, OpInfo(m_graph.addStructureSet(profile->expectedStructure())), base);839 837 840 838 #if DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE) 841 839 if (m_inlineStackTop->m_profiledBlock->numberOfRareCaseProfiles()) 842 840 dataLog("Slow case profile for bc#%u: %u\n", m_currentIndex, m_inlineStackTop->m_profiledBlock->rareCaseProfileForBytecodeOffset(m_currentIndex)->m_counter); 843 dataLog("Array profile for bc#%u: %p%s , %u\n", m_currentIndex, profile->expectedStructure(), profile->structureIsPolymorphic() ? " (polymorphic)" : "", profile->observedArrayModes());841 dataLog("Array profile for bc#%u: %p%s%s, %u\n", m_currentIndex, profile->expectedStructure(), profile->structureIsPolymorphic() ? " (polymorphic)" : "", profile->mayInterceptIndexedAccesses() ? " (may intercept)" : "", profile->observedArrayModes()); 844 842 #endif 845 843 … … 848 846 || m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, OutOfBounds); 849 847 850 return fromObserved(profile->observedArrayModes(), makeSafe); 848 Array::Mode result = fromObserved(profile, action, makeSafe); 849 850 if (profile->hasDefiniteStructure() && benefitsFromStructureCheck(result)) 851 addToGraph(CheckStructure, OpInfo(m_graph.addStructureSet(profile->expectedStructure())), base); 852 853 return result; 851 854 } 852 855 … … 2189 2192 2190 2193 NodeIndex base = get(currentInstruction[2].u.operand); 2191 Array::Mode arrayMode = getArrayModeAndEmitChecks(currentInstruction[4].u.arrayProfile, base);2194 Array::Mode arrayMode = getArrayModeAndEmitChecks(currentInstruction[4].u.arrayProfile, Array::Read, base); 2192 2195 NodeIndex property = get(currentInstruction[3].u.operand); 2193 2196 NodeIndex getByVal = addToGraph(GetByVal, OpInfo(arrayMode), OpInfo(prediction), base, property); … … 2200 2203 NodeIndex base = get(currentInstruction[1].u.operand); 2201 2204 2202 Array::Mode arrayMode = getArrayModeAndEmitChecks(currentInstruction[4].u.arrayProfile, base);2205 Array::Mode arrayMode = getArrayModeAndEmitChecks(currentInstruction[4].u.arrayProfile, Array::Write, base); 2203 2206 2204 2207 NodeIndex property = get(currentInstruction[2].u.operand);
Note:
See TracChangeset
for help on using the changeset viewer.