Skip to content

Commit

Permalink
add to MVP-JS.md and spec docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tlively committed Mar 23, 2023
1 parent b72fd8a commit e3d676a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
13 changes: 13 additions & 0 deletions proposals/gc/MVP-JS.md
Expand Up @@ -63,3 +63,16 @@ internal reference value that is being externalized:
- If the value is a struct or array reference, create a new JS wrapper for it.
- Otherwise if the reference is an internalized host reference, return the
original external host reference.

## Implementation-defined Limits

The following limits will be added to the Implementation-defined Limits
[section](https://webassembly.github.io/spec/js-api/index.html#limits) of the JS
API.

- The maximum number of recursion groups is 1000000. (The maximum number of
individual types remains unchanged and is also 1000000.)
- The maximum number of struct fields is 10000.
- The maximum number of operands to `array.new_fixed` is 10000.
- The maximum length of a supertype chain is 63. (A type declared with no
supertypes has a supertype chain of length 0)
5 changes: 3 additions & 2 deletions proposals/gc/MVP.md
Expand Up @@ -108,7 +108,7 @@ New abbreviations are introduced for reference types in binary and text format,
- `module ::= {..., types vec(<deftype>)}`
- a `rec` definition defines a group of mutually recursive types that can refer to each other; it thereby defines several type indices at a time
- a single type definition, as in Wasm before this proposal, is reinterpreted as a short-hand for a recursive group containing just one type
- Note that the number of type section entries is now the number of recursion groups rather than the number of individual types.
- Note that the number of type section entries is now the number of recursion groups rather than the number of individual types.

* `subtype` is a new category of type defining a single type, as a subtype of possible other types
- `subtype ::= sub final? <typeidx>* <strtype>`
Expand Down Expand Up @@ -779,9 +779,10 @@ The opcode for heap types is encoded as an `s33`.
| 0xfb70 | `extern.internalize` | |
| 0xfb71 | `extern.externalize` | |


## JS API

See [GC JS API document](../../document/js-api/index.bs).
See [GC JS API document](MVP-JS.md).

## Questions

Expand Down

0 comments on commit e3d676a

Please sign in to comment.