Skip to content

Commit

Permalink
move to actual js doc
Browse files Browse the repository at this point in the history
  • Loading branch information
tlively committed Mar 23, 2023
1 parent 5d9f2e9 commit 79ccc85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
4 changes: 4 additions & 0 deletions document/js-api/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,8 @@ In practice, an implementation may run out of resources for valid modules below
<ul>
<li>The maximum size of a module is 1073741824 bytes (1 GiB).</li>
<li>The maximum number of types defined in the types section is 1000000.</li>
<li>The maximum number of recursion groups defined in the types sections is 1000000.</li>
<li>The maximum depth of a defined subtype hierarchy is 63 (where a type defined with no supertype has depth 0).
<li>The maximum number of functions defined in a module is 1000000.</li>
<li>The maximum number of imports declared in a module is 100000.</li>
<li>The maximum number of exports declared in a module is 100000.</li>
Expand All @@ -1413,6 +1415,8 @@ In practice, an implementation may run out of resources for valid modules below
<li>The maximum number of return values for any function or block is 1000.</li>
<li>The maximum size of a function body, including locals declarations, is 7654321 bytes.</li>
<li>The maximum number of locals declared in a function, including implicitly declared as parameters, is 50000.</li>
<li>The maximum number of fields in a struct is 10000.</li>
<li>The maximum number of operands to `array.new_fixed` is 10000.</li>
</ul>

An implementation must throw a {{RuntimeError}} if one of the following limits is exceeded during runtime:
Expand Down
12 changes: 1 addition & 11 deletions proposals/gc/MVP.md
Original file line number Diff line number Diff line change
Expand Up @@ -779,19 +779,9 @@ The opcode for heap types is encoded as an `s33`.
| 0xfb70 | `extern.internalize` | |
| 0xfb71 | `extern.externalize` | |

## 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)

## JS API

See [GC JS API document](MVP-JS.md) .

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

## Questions

Expand Down

0 comments on commit 79ccc85

Please sign in to comment.