Ignore:
Timestamp:
Apr 19, 2016, 6:29:54 AM (9 years ago)
Author:
[email protected]
Message:

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

It caused a serious regression on 32 bit platform (Requested
by gskachkov on #webkit).

Reverted changeset:

"calling super() a second time in a constructor should throw"
https://bugs.webkit.org/show_bug.cgi?id=151113
http://trac.webkit.org/changeset/199712

Patch by Commit Queue <[email protected]> on 2016-04-19

File:
1 edited

Legend:

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

    r199712 r199724  
    759759        generator.emitMove(callArguments.thisRegister(), generator.newTarget());
    760760        RegisterID* ret = generator.emitConstruct(returnValue.get(), func.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd());
    761 
    762         bool isConstructorKindDerived = generator.constructorKind() == ConstructorKind::Derived;
    763         bool doWeUseArrowFunctionInConstructor = isConstructorKindDerived && generator.needsToUpdateArrowFunctionContext();
    764 
    765         if (generator.isDerivedConstructorContext() || (doWeUseArrowFunctionInConstructor && generator.isSuperCallUsedInInnerArrowFunction()))
    766             generator.emitLoadThisFromArrowFunctionLexicalEnvironment();
    767        
    768         RefPtr<Label> thisIsEmptyLabel = generator.newLabel();
    769         generator.emitJumpIfTrue(generator.emitIsEmpty(generator.newTemporary(), generator.thisRegister()), thisIsEmptyLabel.get());
    770         generator.emitThrowReferenceError(ASCIILiteral("'super()' can't be called more than once in a constructor."));
    771         generator.emitLabel(thisIsEmptyLabel.get());
    772 
    773761        generator.emitMove(generator.thisRegister(), ret);
    774762       
    775         if (generator.isDerivedConstructorContext() || doWeUseArrowFunctionInConstructor)
     763        bool isConstructorKindDerived = generator.constructorKind() == ConstructorKind::Derived;
     764        if (generator.isDerivedConstructorContext() || (isConstructorKindDerived && generator.needsToUpdateArrowFunctionContext()))
    776765            generator.emitPutThisToArrowFunctionContextScope();
    777766       
Note: See TracChangeset for help on using the changeset viewer.