Changeset 210558 in webkit
- Timestamp:
- Jan 10, 2017 1:13:33 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r210522 r210558 1 2017-01-10 Skachkov Oleksandr <gskachkov@gmail.com> 2 3 Calling async arrow function which is in a class's member function will cause error 4 https://bugs.webkit.org/show_bug.cgi?id=166879 5 6 Reviewed by Saam Barati. 7 8 * stress/async-arrow-functions-lexical-binding-in-class.js: Added. 9 (shouldBe): 10 (shouldBeAsync): 11 (BaseClass.prototype.baseClassValue): 12 (BaseClass.prototype.get property): 13 (BaseClass): 14 (runSomething): 15 (ChildClass.prototype.classValue): 16 (ChildClass.prototype.get classProperty): 17 (ChildClass.prototype.asyncValueExp): 18 (ChildClass.prototype.asyncValueBody): 19 (ChildClass.prototype.asyncThisPropExp): 20 (ChildClass.prototype.asyncThisPropBody): 21 (ChildClass.prototype.asyncThisPropInEvalExp): 22 (ChildClass.prototype.asyncThisPropInEvalBody): 23 (ChildClass.prototype.asyncThisValueExp): 24 (ChildClass.prototype.asyncThisValueBody): 25 (ChildClass.prototype.asyncThisValueInEvalExp): 26 (ChildClass.prototype.asyncThisValueInEvalBody): 27 (ChildClass): 28 (ChildClass2): 29 (ChildClass2.prototype.classValue): 30 (ChildClass2.prototype.get classProperty): 31 * stress/async-arrow-functions-lexical-super-binding.js: 32 1 33 2017-01-09 Yusuke Suzuki <utatane.tea@gmail.com> 2 34 -
trunk/JSTests/stress/async-arrow-functions-lexical-super-binding.js
r208843 r210558 39 39 } 40 40 41 // FIXME: super bindings in async arrow functions are broken42 41 shouldBeAsync("BaseClassValue", new ChildClass().asyncSuperProp()); 43 42 shouldBeAsync("BaseClassValue", new ChildClass().asyncSuperProp2()); -
trunk/Source/JavaScriptCore/ChangeLog
r210557 r210558 1 2017-01-10 Skachkov Oleksandr <gskachkov@gmail.com> 2 3 Calling async arrow function which is in a class's member function will cause error 4 https://bugs.webkit.org/show_bug.cgi?id=166879 5 6 Reviewed by Saam Barati. 7 8 Current patch fixed loading 'super' in async arrow function. Errored appear becuase 9 super was loaded always nevertherless if it used in async arrow function or not, but bytecompiler 10 put to arrow function context only if it used within arrow function. So to fix this issue we need to 11 check if super was used in arrow function. 12 13 * bytecompiler/BytecodeGenerator.h: 14 * bytecompiler/NodesCodegen.cpp: 15 (JSC::FunctionNode::emitBytecode): 16 1 17 2017-01-10 Commit Queue <commit-queue@webkit.org> 2 18 -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
r210522 r210558 906 906 907 907 bool isNewTargetUsedInInnerArrowFunction(); 908 bool isArgumentsUsedInInnerArrowFunction(); 909 910 public: 908 911 bool isSuperUsedInInnerArrowFunction(); 909 bool isArgumentsUsedInInnerArrowFunction();910 911 public:912 912 bool isSuperCallUsedInInnerArrowFunction(); 913 913 bool isThisUsedInInnerArrowFunction(); -
trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
r210522 r210558 3503 3503 generator.emitNode(next.get(), funcExpr); 3504 3504 3505 if (generator.superBinding() == SuperBinding::Needed || generator.parseMode() == SourceParseMode::AsyncArrowFunctionMode) { 3506 // FIXME: Don't always load home object for async arrows 3505 if (generator.superBinding() == SuperBinding::Needed || (generator.parseMode() == SourceParseMode::AsyncArrowFunctionMode && generator.isSuperUsedInInnerArrowFunction())) { 3507 3506 RefPtr<RegisterID> homeObject = emitHomeObjectForCallee(generator); 3508 3507 emitPutHomeObject(generator, next.get(), homeObject.get());
Note: See TracChangeset
for help on using the changeset viewer.