diff --git a/document/js-api/index.bs b/document/js-api/index.bs index 2f3588843..be2b3a137 100644 --- a/document/js-api/index.bs +++ b/document/js-api/index.bs @@ -1398,6 +1398,8 @@ In practice, an implementation may run out of resources for valid modules below An implementation must throw a {{RuntimeError}} if one of the following limits is exceeded during runtime: diff --git a/proposals/gc/MVP-JS.md b/proposals/gc/MVP-JS.md index eacfc4141..d8ba1d9db 100644 --- a/proposals/gc/MVP-JS.md +++ b/proposals/gc/MVP-JS.md @@ -69,3 +69,16 @@ internal reference value that is being externalized: _TODO: avoid having to patch the behavior of `extern.internalize` and `extern.internalize` by converting to/from JS numbers separately._ + +## 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) diff --git a/proposals/gc/MVP.md b/proposals/gc/MVP.md index c7eeccb3b..9f058438d 100644 --- a/proposals/gc/MVP.md +++ b/proposals/gc/MVP.md @@ -108,7 +108,7 @@ New abbreviations are introduced for reference types in binary and text format, - `module ::= {..., types vec()}` - 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? * ` @@ -782,8 +782,7 @@ The opcode for heap types is encoded as an `s33`. ## JS API -See [GC JS API document](MVP-JS.md) . - +See [GC JS API document](MVP-JS.md). ## Questions