Changeset 197296 in webkit for trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
- Timestamp:
- Feb 28, 2016, 11:14:26 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
r197043 r197296 147 147 RegisterID* ThisNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst) 148 148 { 149 if (generator.constructorKind() == ConstructorKind::Derived && generator.needsToUpdateArrowFunctionContext() )149 if (generator.constructorKind() == ConstructorKind::Derived && generator.needsToUpdateArrowFunctionContext() && generator.isThisUsedInInnerArrowFunction()) 150 150 generator.emitLoadThisFromArrowFunctionLexicalEnvironment(); 151 151 … … 724 724 // } 725 725 // } 726 if (generator.constructorKind() == ConstructorKind::Derived && generator.needsToUpdateArrowFunctionContext() )726 if (generator.constructorKind() == ConstructorKind::Derived && generator.needsToUpdateArrowFunctionContext() && generator.isThisUsedInInnerArrowFunction()) 727 727 generator.emitLoadThisFromArrowFunctionLexicalEnvironment(); 728 728 … … 3139 3139 // If there is no return we must automatically insert one. 3140 3140 if (!returnNode) { 3141 if (generator.constructorKind() == ConstructorKind::Derived && generator.needsToUpdateArrowFunctionContext() )3141 if (generator.constructorKind() == ConstructorKind::Derived && generator.needsToUpdateArrowFunctionContext() && generator.isThisUsedInInnerArrowFunction()) 3142 3142 generator.emitLoadThisFromArrowFunctionLexicalEnvironment(); // Arrow function can invoke 'super' in constructor and before leave constructor we need load 'this' from lexical arrow function environment 3143 3143
Note:
See TracChangeset
for help on using the changeset viewer.