Ignore:
Timestamp:
Feb 24, 2016, 12:46:44 PM (9 years ago)
Author:
[email protected]
Message:

Unreviewed, rolling out r197033.
https://bugs.webkit.org/show_bug.cgi?id=154649

"It broke JSC tests when 'this' was loaded from global scope"
(Requested by saamyjoon on #webkit).

Reverted changeset:

"[ES6] Arrow function syntax. Emit loading&putting this/super
only if they are used in arrow function"
https://bugs.webkit.org/show_bug.cgi?id=153981
http://trac.webkit.org/changeset/197033

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp

    r197033 r197043  
    147147RegisterID* ThisNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst)
    148148{
    149     if (generator.constructorKind() == ConstructorKind::Derived && generator.needsToUpdateArrowFunctionContext() && generator.isThisUsedInInnerArrowFunction())
     149    if (generator.constructorKind() == ConstructorKind::Derived && generator.needsToUpdateArrowFunctionContext())
    150150        generator.emitLoadThisFromArrowFunctionLexicalEnvironment();
    151151
     
    724724    //    }
    725725    // }
    726     if (generator.constructorKind() == ConstructorKind::Derived && generator.needsToUpdateArrowFunctionContext() && generator.isThisUsedInInnerArrowFunction())
     726    if (generator.constructorKind() == ConstructorKind::Derived && generator.needsToUpdateArrowFunctionContext())
    727727        generator.emitLoadThisFromArrowFunctionLexicalEnvironment();
    728728
     
    763763        if (generator.isDerivedConstructorContext() || (isConstructorKindDerived && generator.needsToUpdateArrowFunctionContext()))
    764764            generator.emitPutThisToArrowFunctionContextScope();
    765 
     765       
    766766        return ret;
    767767    }
     
    31393139        // If there is no return we must automatically insert one.
    31403140        if (!returnNode) {
    3141             if (generator.constructorKind() == ConstructorKind::Derived && generator.needsToUpdateArrowFunctionContext() && generator.isThisUsedInInnerArrowFunction())
     3141            if (generator.constructorKind() == ConstructorKind::Derived && generator.needsToUpdateArrowFunctionContext())
    31423142                generator.emitLoadThisFromArrowFunctionLexicalEnvironment(); // Arrow function can invoke 'super' in constructor and before leave constructor we need load 'this' from lexical arrow function environment
    31433143           
Note: See TracChangeset for help on using the changeset viewer.