Changeset 172742 in webkit
- Timestamp:
- Aug 18, 2014, 9:41:34 PM (11 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r172741 r172742 1 2014-08-18 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r172741. 4 https://bugs.webkit.org/show_bug.cgi?id=136058 5 6 This change is breaking PLT. (Requested by mlam on #webkit). 7 8 Reverted changeset: 9 10 "REGRESSION(r172401): for-in optimization no longer works at 11 all" 12 https://bugs.webkit.org/show_bug.cgi?id=136056 13 http://trac.webkit.org/changeset/172741 14 1 15 2014-08-18 Filip Pizlo <fpizlo@apple.com> 2 16 -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r172741 r172742 1423 1423 for (size_t i = m_forInContextStack.size(); i > 0; i--) { 1424 1424 ForInContext* context = m_forInContextStack[i - 1].get(); 1425 if (context->base() != base) 1426 continue; 1427 1425 1428 if (context->local() != property) 1426 1429 continue; … … 2584 2587 } 2585 2588 2586 void BytecodeGenerator::pushIndexedForInScope(RegisterID* localRegister, RegisterID* indexRegister)2589 void BytecodeGenerator::pushIndexedForInScope(RegisterID* baseRegister, RegisterID* localRegister, RegisterID* indexRegister) 2587 2590 { 2588 2591 if (!localRegister) 2589 2592 return; 2590 m_forInContextStack.append(std::make_unique<IndexedForInContext>( localRegister, indexRegister));2593 m_forInContextStack.append(std::make_unique<IndexedForInContext>(baseRegister, localRegister, indexRegister)); 2591 2594 } 2592 2595 … … 2598 2601 } 2599 2602 2600 void BytecodeGenerator::pushStructureForInScope(RegisterID* localRegister, RegisterID* indexRegister, RegisterID* propertyRegister, RegisterID* enumeratorRegister)2603 void BytecodeGenerator::pushStructureForInScope(RegisterID* baseRegister, RegisterID* localRegister, RegisterID* indexRegister, RegisterID* propertyRegister, RegisterID* enumeratorRegister) 2601 2604 { 2602 2605 if (!localRegister) 2603 2606 return; 2604 m_forInContextStack.append(std::make_unique<StructureForInContext>( localRegister, indexRegister, propertyRegister, enumeratorRegister));2607 m_forInContextStack.append(std::make_unique<StructureForInContext>(baseRegister, localRegister, indexRegister, propertyRegister, enumeratorRegister)); 2605 2608 } 2606 2609 -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
r172741 r172742 100 100 class ForInContext { 101 101 public: 102 ForInContext(RegisterID* localRegister) 103 : m_localRegister(localRegister) 102 ForInContext(RegisterID* baseRegister, RegisterID* localRegister) 103 : m_baseRegister(baseRegister) 104 , m_localRegister(localRegister) 104 105 , m_isValid(true) 105 106 { … … 119 120 virtual ForInContextType type() const = 0; 120 121 122 RegisterID* base() const { return m_baseRegister.get(); } 121 123 RegisterID* local() const { return m_localRegister.get(); } 122 124 123 125 private: 126 RefPtr<RegisterID> m_baseRegister; 124 127 RefPtr<RegisterID> m_localRegister; 125 128 bool m_isValid; … … 128 131 class StructureForInContext : public ForInContext { 129 132 public: 130 StructureForInContext(RegisterID* localRegister, RegisterID* indexRegister, RegisterID* propertyRegister, RegisterID* enumeratorRegister)131 : ForInContext( localRegister)133 StructureForInContext(RegisterID* baseRegister, RegisterID* localRegister, RegisterID* indexRegister, RegisterID* propertyRegister, RegisterID* enumeratorRegister) 134 : ForInContext(baseRegister, localRegister) 132 135 , m_indexRegister(indexRegister) 133 136 , m_propertyRegister(propertyRegister) … … 153 156 class IndexedForInContext : public ForInContext { 154 157 public: 155 IndexedForInContext(RegisterID* localRegister, RegisterID* indexRegister)156 : ForInContext( localRegister)158 IndexedForInContext(RegisterID* baseRegister, RegisterID* localRegister, RegisterID* indexRegister) 159 : ForInContext(baseRegister, localRegister) 157 160 , m_indexRegister(indexRegister) 158 161 { … … 525 528 void popFinallyContext(); 526 529 527 void pushIndexedForInScope(RegisterID* local, RegisterID* index);530 void pushIndexedForInScope(RegisterID* base, RegisterID* local, RegisterID* index); 528 531 void popIndexedForInScope(RegisterID* local); 529 void pushStructureForInScope(RegisterID* local, RegisterID* index, RegisterID* property, RegisterID* enumerator);532 void pushStructureForInScope(RegisterID* base, RegisterID* local, RegisterID* index, RegisterID* property, RegisterID* enumerator); 530 533 void popStructureForInScope(RegisterID* local); 531 534 void invalidateForInContextForLocal(RegisterID* local); -
trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
r172741 r172742 2071 2071 this->emitLoopHeader(generator, propertyName.get()); 2072 2072 2073 generator.pushIndexedForInScope( local.get(), i.get());2073 generator.pushIndexedForInScope(base.get(), local.get(), i.get()); 2074 2074 generator.emitNode(dst, m_statement); 2075 2075 generator.popIndexedForInScope(local.get()); … … 2105 2105 this->emitLoopHeader(generator, propertyName.get()); 2106 2106 2107 generator.pushStructureForInScope( local.get(), i.get(), propertyName.get(), structureEnumerator.get());2107 generator.pushStructureForInScope(base.get(), local.get(), i.get(), propertyName.get(), structureEnumerator.get()); 2108 2108 generator.emitNode(dst, m_statement); 2109 2109 generator.popStructureForInScope(local.get());
Note:
See TracChangeset
for help on using the changeset viewer.