"this" missing after await in async arrow function
https://bugs.webkit.org/show_bug.cgi?id=166919
Reviewed by Saam Barati.
Source/JavaScriptCore:
This patch fixed issue in async arrow function. Issue appears because in arrow
function _this_ is loaded from arrow function virtual scope.
Async arrow function can be suspended and when resuming should be used _this_ from
virtual scope, to allow this we load _this_ from virtual scope before store it to
generator.generatorThis property
* bytecompiler/NodesCodegen.cpp:
(JSC::FunctionNode::emitBytecode):
JSTests:
* stress/async-arrow-functions-lexical-binding-in-class.js:
(ChildClass.prototype.asyncThisPropWithAwaitBody):
(ChildClass.prototype.asyncThisPropInEvalWithAwaitBody):
(ChildClass.prototype.asyncThisValueBodyWithAwait):
(ChildClass.prototype.asyncThisValueInEvalWithAwaitBody):
(ChildClass):
(ChildClass3):
(ChildClass3.prototype.classValue):
(ChildClass3.prototype.get classProperty):
* stress/async-arrow-functions-lexical-new.target-binding.js:
(C2WithAwait):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@210925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
5 files changed