Changeset 100219 in webkit for trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
- Timestamp:
- Nov 14, 2011, 5:04:08 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r99898 r100219 683 683 684 684 return nodeIndex; 685 } 686 687 bool structureChainIsStillValid(bool direct, Structure* previousStructure, StructureChain* chain) 688 { 689 if (direct) 690 return true; 691 692 if (!previousStructure->storedPrototype().isNull() && previousStructure->storedPrototype().asCell()->structure() != chain->head()->get()) 693 return false; 694 695 for (WriteBarrier<Structure>* it = chain->head(); *it; ++it) { 696 if (!(*it)->storedPrototype().isNull() && (*it)->storedPrototype().asCell()->structure() != it[1].get()) 697 return false; 698 } 699 700 return true; 685 701 } 686 702 … … 1804 1820 size_t offset = newStructure->get(*m_globalData, identifier); 1805 1821 1806 if (offset != notFound ) {1822 if (offset != notFound && structureChainIsStillValid(direct, previousStructure, structureChain)) { 1807 1823 addToGraph(CheckStructure, OpInfo(m_graph.addStructureSet(previousStructure)), base); 1808 1824 if (!direct) { 1825 if (!previousStructure->storedPrototype().isNull()) 1826 addToGraph(CheckStructure, OpInfo(m_graph.addStructureSet(previousStructure->storedPrototype().asCell()->structure())), cellConstant(previousStructure->storedPrototype().asCell())); 1827 1809 1828 for (WriteBarrier<Structure>* it = structureChain->head(); *it; ++it) { 1810 1829 JSValue prototype = (*it)->storedPrototype();
Note:
See TracChangeset
for help on using the changeset viewer.