-
Notifications
You must be signed in to change notification settings - Fork 36
Merging the entire reference types repository #112
Conversation
I missed this in #988.
The full error message generated by the interpreter is "unreachable executed", but all of the other tests check for just "unreachable".
* Add missing eq_ref * Fix export index computation * Remove bogus test
The start function is invoked after the store has been modified. So if a start function traps, all data and element segments will have been copied into the memory and table respectively. This means that functions can be invoked on this instance, even though the instance is not available to the embedder directly.
use `local.get` name instead of `get_local` which isn't used elsewhere.
…Assembly#75) * Rename elem/data.drop * Reorder bulk instructions * Rename interpreter AST ref constructors to match reftype repo * Update interpreter README
… op proposal (WebAssembly#35) Adds table.size, table.grow, table.fill to overview, spec, interpreter, and tests, as decided at recent CG meeting. Also adds a few more tests for table.get and table.set. Also, change interpreter's segment encoding to match bulk ops proposal, addressing WebAssembly#18. (Not updated in spec yet, since corresponding spec text is still missing from bulk ops proposal.)
The data count section has a count that must match the number of data segments. If the data count section isn't present, then `memory.init` and `data.drop` cannot be used. Fixes issue WebAssembly#73.
* Add definition of free index sets * Simplify datacount side condition * Explain convention about multiple occurrences of meta variables
Issue WebAssembly/reference-types#69 requires that `ref.null` instructions include a reference type immediate. This concept isn't present in the bulk-memory proposal, but the encoding is (in element segment expressions). This change updates the binary and text format, but not the syntax. This is OK for now, since the only reference type allowed here is `funcref`.
The original commit to add a bottom type removed this test as it would now unexpectedly validate. Now that a bottom type is removed it would be good to keep it.
In the generated test files the generic imports contained a function that does not exist anymore. This caused all tests to fail. This PR removes the function from the imports.
* [js-api] Link to the fork for the core specification. * [js-api] More subtyping removal. * [js-api] Fix bugs in Table constructor. * Add an assertion to ToWebAssemblyValue.
Thanks. By the way, I know I once asked you to squash all commits in #96 because I was not sure adding hundreds of commits from the upstream to this repo as is was a good idea, but I noticed other downstream repos are merging upstream commits as they are. Is there a rule on how to do this? If merging commits as they are is the rule, should we revert #96? @rossberg |
If you squash upstream commits, then I think you might run into a lot more merge conflicts when you re-merge again later. |
@aheejin no problem at all, I am sorry for not noticing https://github.com/WebAssembly/proposals/blob/master/howto.md#syncing-with-upstream-changes earlier! 😬 I'm on it. I just noticed that #91 was also squashed, so what I'll do is merge reference-types/master on top of e7196b7 (just before #91) and then cherry pick all changes (except #91 and #96). Then I'll force push to my branch to update this PR. |
To sync our spec with the reference type repo, we need this submodule too.
Following the discussions in WebAssembly#90, it seems desirable and less error-prone to make `rethrow` and `br_on_exn` trap in case the value on top of the stack is of `nullref` type. Closes WebAssembly#90.
This adds overview on traps not being caught by the `catch` instruction and its relationship with the JS API. Closes WebAssembly#1 and closes WebAssembly#89.
This PR adds the dependency to multi-value to the exception handling proposal text and to the README. I wrote an explanation of this dependency on the proposal text, but it's easier to see this once the verification and execution steps of `br_on_exn` and of `try` blocks are written out, as done [here](WebAssembly#87 (comment)) by @rossberg : Validation: ``` ft = t1* -> t2* C, label t2* |- e1* : t1* -> t2* C, label t2* |- e2* : exnref -> t2* ----------------------------------- C |- try ft e1* catch e2* end : ft C_label(l) = C_exn(x) = t* ------------------------------------- C |- br_on_exn l x : exnref -> exnref ``` Execution: ``` v^n (try ft e1* catch e2* end) --> catch_m{e2*} (label_m{} v^n e1* end) end) (iff ft = t1^n -> t2^m) S; F; catch_m{e*} T[v^n (throw a)] end --> S; F; label_m{} (exn a v^n) e* end (iff S_exn(a) = {typ t^n}) F; (exn a v*) (br_on_exn l x) --> F; v* (br l) (iff F_exn(x) = a) ``` Concerning the functionality of `try`-`catch` blocks, note especially the passing of `v^n` values into a `label_m{}`. Concerning the functionality of `br_on_exn`, note especially the execution step resulting in a `br` instruction.
In WebAssembly#90 it was decided to move the event section between memory section and global section. This change is reflected in the next paragraph, but not in the introduction.
Currently, the link to the instruction syntax document results in a 404. This commit updates the link to point to a instructions.rst that exists and hopefully is the correct one to link to.
045e74b
to
a58f37f
Compare
@aheejin: the changes I force-pushed are just as I described in my last comment. Reverting the two commits I mention above, naturally creates lots of conflicts. Is the PR ok like this or shall I retry, merging on top of the current master branch instead? |
Import reference types repo: https://github.com/WebAssembly/reference-types/tree/5bc46bbd387b51f52ee0088e76ff401ece0c8e4a
Update README
As last time, I just copy pasted the entire reference type repository,