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

Spec updates for innative#57 #1

Merged
merged 147 commits into from
May 26, 2020
Merged

Conversation

Connicpu
Copy link

Spec updates for innative-sdk/innative#57

Contains the up to date WebAssembly/spec master + the threads proposal merged

binji and others added 30 commits April 18, 2017 09:58
* An initial overview of threads

* try to match spec notation

* fix link and clarify alignment

* require natural alignment, rename i32.wake -> wake

* grow_memory reword, clarify wait alignment, comment about shared w/out maximum size

* initial pass at JS API changes

* fix some links

* more cleanup of markdown

* Clarify that a shared buffer is never detached

* remove HasProperty
* WIP on writing up alternate encoding

* A little more work on the alternate proposal

* Add encoding proposal that uses sign-extension operator

* Update Overview.md

* Fix table
* WIP on globals

* Update Overview.md

WebAssembly.Instance constructor changes

* Update Overview.md

Fix [[Global]]

* Update Overview.md

WebAssembly.Instance constructor global imports
* Remove float atomics
* Use 0xfe as prefix byte
* Add sign-extending conversion operators
* Remove sign-extending atomic-operators (encoding proposal 3)
* Add clearer examples to Globals.md for rationale

* Fix destructuring

* Add comment about using globals for other TLS values

* Add example using WebAssembly.Global
See comments in WebAssembly#24:

* Throw an error when constructing shared memory without maximum.
* Lazily create a new SharedArrayBuffer and freeze it after grow.
The new names are:
- `i32.extend8_s`
- `i32.extend16_s`
- `i64.extend8_s`
- `i64.extend16_s`

`i64.extend32_s` has also been added for consistency.

See issue WebAssembly#34.
* Clarify wait and wake operators in web embedding

See issue WebAssembly#25.

* Add link to Int32Array

* Info about `i64.wait`, agent suspension

* Clarify wait/wake, mention spurious wakeup

* Remove mention of embedder waking agent
Fix links to WebAssembly stack and evaluation context.
In section "Initializing Memory Only Once" the WebAssembly.instantiate is missing a paren.
Doesn't include execution yet.
rossberg and others added 29 commits October 7, 2019 18:42
I will be taking over Dan's duties as editor.
Similar to WebAssembly#1076, don't include index numbers in expected error messages
from validation. This allows implementations to avoid creating
dynamically formatted strings for validation error messages. Admittedly
this isn't a huge burden, but it does seem like something that shouldn't
be required to pass the spec test.
* Test that INT_MIN/0 gets a divide-by-zero trap.

* Test Unicode characters that differ with NFC, NFD, NFKC, and NFKD.

There are three characters whose normalization forms under NFC, NFD, NFKC,
and NFKD are all different. Test them.

* Add a testcase for unreachable in an if-then with no else.
according to
https://webassembly.github.io/spec/core/exec/instructions.html#exec-return
the `Return` instruction pops the top of the stack, until the next
frame. The equivalent in the reference interpreter should be to set
the value stack to `[]`. This is what is happening for `Break` as well.
So for consistency, also do it here.

This has no visible effect: If the first instruction is `Returning`, the
stack is ignored.
The URL points to latest spec draft so it should be just ECMAScript and not ES2018. This also make it consistent with [WebAssembly JS API Normative Reference](https://www.w3.org/TR/2019/PR-wasm-js-api-1-20191001/#normative)
As discussed in the CG on November 12, 2019 and in WebAssembly#144. Specifically,
all atomic accesses are now allowed to validate and execute normally
on unshared memories and wait operations trap when used with unshared
memories.

The PR updates Overview.md and makes a best-effort
attempt at updating the spec, making no changes when there is
already a TODO for updating spec text. It also adds new TODO comments
to the reference interpreter where changes will have to be made.
The new names are memory.atomic.notify, memory.atomic.wait32, and
memory.atomic.wait64.

See WebAssembly/threads#145.
* Extend underlines
* Remove link to syntax-trace (doesn't exist yet)
* Missing \\
* ATOMICNOTIFY -> MEMORYATOMICNOTIFY
…embly#158)

The current text specifies the return value to be the current size of memory in pages (before resizing), but this is somewhat ambiguous and can lead to implementation specific behavior. For example, engines can decide to return the value at the time the grow method was called, or at the time the memory was updated, and these can be different values depending on the strictness of the implementation itself, and if there are multiple grow calls that occur at the same time. 

Add a note to clarify that the return value should essentially be an atomic RMW to the length of the underlying buffer. The implication
of this is that m ore than one grow call cannot return the same value.
@ErikMcClure ErikMcClure merged commit 5b5e1dc into innative-sdk:master May 26, 2020
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

Successfully merging this pull request may close these issues.