Ignore:
Timestamp:
Jun 12, 2008, 2:03:41 AM (17 years ago)
Author:
[email protected]
Message:

2008-06-12 Cameron Zwarich <[email protected]>

Reviewed by Maciej.

Bug 19510: CodeBlock::needsFullScopeChain not always set for global code
<https://bugs.webkit.org/show_bug.cgi?id=19510>

This fixes the symptoms by using CodeGenerator::m_codeType to determine
when to use temporaries instead of CodeBlock::needsFullScopeChain, but
it does not fix the problem itself.

JavaScriptCore:

  • VM/CodeGenerator.h: (KJS::CodeGenerator::leftHandSideNeedsCopy):

LayoutTests:

  • fast/js/codegen-temporaries-multiple-global-blocks-expected.txt: Added.
  • fast/js/codegen-temporaries-multiple-global-blocks.html: Added.
  • fast/js/resources/codegen-temporaries-multiple-global-blocks-1.js: Added.
  • fast/js/resources/codegen-temporaries-multiple-global-blocks-2.js: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/VM/CodeGenerator.h

    r34500 r34510  
    174174        ALWAYS_INLINE bool leftHandSideNeedsCopy(bool rightHasAssignments)
    175175        {
    176             return m_codeBlock->needsFullScopeChain || rightHasAssignments;
     176            return m_codeType != FunctionCode || m_codeBlock->needsFullScopeChain || rightHasAssignments;
    177177        }
    178178
Note: See TracChangeset for help on using the changeset viewer.