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

Possible EvaluateSync Implementation #37

Open
guybedford opened this issue Apr 1, 2024 · 0 comments
Open

Possible EvaluateSync Implementation #37

guybedford opened this issue Apr 1, 2024 · 0 comments

Comments

@guybedford
Copy link
Collaborator

An alternative to implementing EvaluateSync through promise unwrapping could be to fully clone and specialize the Evaluate() function to synchronous evaluation, possibly with a sync arg for InnerModuleEvaluation.

It's entirely editorial, but thought it worth mentioning while we are thinking about the synchronous models in general if we want to more carefully specify it.

I believe Spidermonkey implements Evaluate() as conditionally returning a promise, which I like as an implementation. Another option might even be to hard-code that although it does complicate spec handling a little conditionally checking promises at call sites.

Alternatively feel free to close, just thought it's worth some discussion since we are introducing this method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant