Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async function expression execution #1806

Closed
Razican opened this issue Jan 29, 2022 · 1 comment
Closed

Async function expression execution #1806

Razican opened this issue Jan 29, 2022 · 1 comment
Labels
E-Hard Hard difficulty problem enhancement New feature or request execution Issues or PRs related to code execution

Comments

@Razican
Copy link
Member

Razican commented Jan 29, 2022

ECMASCript feature
Boa is already capable of parsing async functions, but it's not able to execute them. The current implementation just returns an "undefined" value if one gets executed:

boa/boa/src/bytecompiler.rs

Lines 879 to 882 in 672eede

// TODO: implement AsyncFunctionExpr
Node::AsyncFunctionExpr(_) => {
self.emit_opcode(Opcode::PushUndefined);
}

You can learn about runtime semantics here: https://tc39.es/ecma262/#sec-runtime-semantics-instantiateasyncfunctionobject

You will need to implement async function objects:

Note that the implementation of await is out of the scope of this issue.

@Razican Razican added enhancement New feature or request execution Issues or PRs related to code execution E-Hard Hard difficulty problem labels Jan 29, 2022
@raskad
Copy link
Member

raskad commented Jul 11, 2022

Implemented in #2158

@raskad raskad closed this as completed Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-Hard Hard difficulty problem enhancement New feature or request execution Issues or PRs related to code execution
Projects
None yet
Development

No branches or pull requests

2 participants