mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Implement basic of AsyncGeneratorFunction
* Add ScriptAsyncGeneratorFunctionObject, AsyncGeneatorObject * Implement basic behavior of AsyncGeneratorFunction Update Script Parser * Reverse allowYield value. * Allow AsyncGenerator * In parameter, we should not allow yield, await expression Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
f2439c2a41
commit
f61ef74973
27 changed files with 982 additions and 682 deletions
|
|
@ -44,9 +44,11 @@ ScriptFunctionObject::ScriptFunctionObject(ExecutionState& state, CodeBlock* cod
|
|||
{
|
||||
initStructureAndValues(state, isConstructor, isGenerator, isAsync);
|
||||
|
||||
if (isGenerator) {
|
||||
if (UNLIKELY(isGenerator && isAsync)) {
|
||||
Object::setPrototypeForIntrinsicObjectCreation(state, state.context()->globalObject()->asyncFunctionPrototype());
|
||||
} else if (UNLIKELY(isGenerator)) {
|
||||
Object::setPrototypeForIntrinsicObjectCreation(state, state.context()->globalObject()->generator());
|
||||
} else if (isAsync) {
|
||||
} else if (UNLIKELY(isAsync)) {
|
||||
Object::setPrototypeForIntrinsicObjectCreation(state, state.context()->globalObject()->asyncFunctionPrototype());
|
||||
} else {
|
||||
Object::setPrototypeForIntrinsicObjectCreation(state, state.context()->globalObject()->functionPrototype());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue