-
Notifications
You must be signed in to change notification settings - Fork 21
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
Editorial: Cursory review of JSPI spec. #54
Open
sjrd
wants to merge
1
commit into
WebAssembly:main
Choose a base branch
from
sjrd:cursory-spec-review
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1436,7 +1436,7 @@ interface Suspending { | |
1. Assert: |map| does not contain any entry for |ec|. | ||
1. Add an entry mapping |ec| to [=active=] in |map|. | ||
1. Let (|store|, |result|) be the result of [=func_invoke=](|store|, |funcaddr|, |args|). | ||
1. Assert: If control reaches here, we have done waiting for suspended imports. | ||
1. Assert: If control reaches here, we are done waiting for suspended imports. | ||
1. If the entry for |ec| in |map| is not [=active=] then throw a WebAssembly {{RuntimeError}} exception. Otherwise, remove the entry for |ec| from [=map=]. | ||
1. Set the [=surrounding agent=]'s [=associated store=] to |store|. | ||
1. If |result| is [=error=], throw a WebAssembly {{RuntimeError}} exception, unless otherwise indicated by <a href="#errors">the WebAssembly error mapping</a>. | ||
|
@@ -1445,12 +1445,12 @@ interface Suspending { | |
1. Otherwise, | ||
1. Assert: |result| is a [=list=] of WebAssembly values. | ||
1. Let |outArity| be the [=list/size=] of |result|. | ||
1. If |outArity| is 0, return undefined. | ||
1. If |outArity| is 0, let |jsReturnValue| be undefined. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we factor out this section with the same spec steps found in "call an Exported Function"? |
||
1. Otherwise, if |outArity| is 1, let |jsReturnValue| be [=ToJSValue=](|result|[0]). | ||
1. Otherwise, | ||
1. Let |values| be « ». | ||
1. [=list/iterate|For each=] |r| of |result|, | ||
1. [=list/Append=] [=ToJSValue=](|r|) to |values|. | ||
1. [=list/Append=] [=ToJSValue=](|r|) to |values|. | ||
1. Let |jsReturnValue| be [$CreateArrayFromList$](|values|). | ||
1. [=Resolve=] |promise| with |jsReturnValue|. | ||
1. Return UNUSED. | ||
|
@@ -1498,8 +1498,8 @@ To <dfn>create a suspending function</dfn> from a JavaScript function |func|, wi | |
1. Perform [=throw a JavaScript exception=] with a {{RuntimeError}}. | ||
1. Otherwise, set the entry to [=active=]. | ||
1. If |awaitResult|.\[[Type]] is <emu-const>throw</emu-const>, then: | ||
1. Let |type|, |payload| and |opaqueData| be the result of [=coerce a JavaScript exception|coercing the JavaScript exception=] |ret|.\[[Value]]. | ||
1. [=WebAssembly/Throw=] with |type|, |payload| and |opaqueData|. | ||
1. Let |type|, |payload| and |opaqueData| be the result of [=coerce a JavaScript exception|coercing the JavaScript exception=] |ret|.\[[Value]]. | ||
1. [=WebAssembly/Throw=] with |type|, |payload| and |opaqueData|. | ||
1. Otherwise, return the result of performing [=coerce a JavaScript return=] on |resultTypes| and |awaitResult|. | ||
1. Otherwise, return the result of performing [=coerce a JavaScript return=] on |resultTypes| and |ret|. | ||
1. Let |store| be the [=surrounding agent=]'s [=associated store=]. | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this one.