Changeset 200083 in webkit for trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
- Timestamp:
- Apr 26, 2016, 7:19:19 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
r199927 r200083 764 764 generator.emitMove(callArguments.thisRegister(), generator.newTarget()); 765 765 RegisterID* ret = generator.emitConstruct(returnValue.get(), func.get(), NoExpectedFunction, callArguments, divot(), divotStart(), divotEnd()); 766 767 bool isConstructorKindDerived = generator.constructorKind() == ConstructorKind::Derived; 768 bool doWeUseArrowFunctionInConstructor = isConstructorKindDerived && generator.needsToUpdateArrowFunctionContext(); 769 770 if (generator.isDerivedConstructorContext() || (doWeUseArrowFunctionInConstructor && generator.isSuperCallUsedInInnerArrowFunction())) 771 generator.emitLoadThisFromArrowFunctionLexicalEnvironment(); 772 773 RefPtr<Label> thisIsEmptyLabel = generator.newLabel(); 774 generator.emitJumpIfTrue(generator.emitIsEmpty(generator.newTemporary(), generator.thisRegister()), thisIsEmptyLabel.get()); 775 generator.emitThrowReferenceError(ASCIILiteral("'super()' can't be called more than once in a constructor.")); 776 generator.emitLabel(thisIsEmptyLabel.get()); 777 766 778 generator.emitMove(generator.thisRegister(), ret); 767 779 768 bool isConstructorKindDerived = generator.constructorKind() == ConstructorKind::Derived; 769 if (generator.isDerivedConstructorContext() || (isConstructorKindDerived && generator.needsToUpdateArrowFunctionContext())) 780 if (generator.isDerivedConstructorContext() || doWeUseArrowFunctionInConstructor) 770 781 generator.emitPutThisToArrowFunctionContextScope(); 771 782
Note:
See TracChangeset
for help on using the changeset viewer.