⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 107348 in webkit


Ignore:
Timestamp:
Feb 9, 2012, 7:48:54 PM (15 years ago)
Author:
commit-queue@webkit.org
Message:

Eliminate dead code in BytecodeGenerator::resolve()
https://bugs.webkit.org/show_bug.cgi?id=78242

Patch by Andy Wingo <wingo@igalia.com> on 2012-02-09
Reviewed by Gavin Barraclough.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::resolve):
BytecodeGenerator::shouldOptimizeLocals() is only true for
FunctionCode, and thus cannot be true for GlobalCode.

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r107345 r107348  
     12012-02-09  Andy Wingo  <wingo@igalia.com>
     2
     3        Eliminate dead code in BytecodeGenerator::resolve()
     4        https://bugs.webkit.org/show_bug.cgi?id=78242
     5
     6        Reviewed by Gavin Barraclough.
     7
     8        * bytecompiler/BytecodeGenerator.cpp:
     9        (JSC::BytecodeGenerator::resolve):
     10        BytecodeGenerator::shouldOptimizeLocals() is only true for
     11        FunctionCode, and thus cannot be true for GlobalCode.
     12
    1132012-02-09  Andy Wingo  <wingo@igalia.com>
    214
  • trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp

    r107345 r107348  
    11631163
    11641164    // Cases where we cannot statically optimize the lookup.
    1165     if (property == propertyNames().arguments || !canOptimizeNonLocals()) {
    1166         if (shouldOptimizeLocals() && m_codeType == GlobalCode) {
    1167             ScopeChainIterator iter = m_scopeChain->begin();
    1168             JSObject* globalObject = iter->get();
    1169             ASSERT((++iter) == m_scopeChain->end());
    1170             return ResolveResult::globalResolve(globalObject);
    1171         } else
    1172             return ResolveResult::dynamicResolve(0);
    1173     }
     1165    if (property == propertyNames().arguments || !canOptimizeNonLocals())
     1166        return ResolveResult::dynamicResolve(0);
    11741167
    11751168    ScopeChainIterator iter = m_scopeChain->begin();
Note: See TracChangeset for help on using the changeset viewer.