Skip to content

Commit 373b6d7

Browse files
authored
Some editorial improvements to the Wasm/JS spec (#623)
* Editorial: Use USVString rather than DOMString to explain encoding WebAssembly names are in the AST as strings of Unicode code points, rather than UTF-8-encoded byte sequences. This patch uses WebIDL's USVString type to encode this--the type is sequences of code points in IDL-land, which is then converted to an ECMAScript value by encoding in UTF-16. The place where this is inapplicable is custom sections, which don't have a decoded name, but whose name is still validated as UTF-8. Thanks to @lukewagner for pointing this out in #591 (comment) * Editorial: Clean up caching JS objects Previously, the instantiate function had some kind of complicated logic to make it so just one JS object per memory, table or exported function would be created per address in the store without having a global mapping. This patch switches to a global mapping to make the specification easier to read and modify over time. The change here was discussed in this comment thread: #591 (comment) * Editorial: Improve comment * Editorial: Further wording improvements Suggested by @rossberg * Editorial: Consolidate storage sections * Editorial: Fix link to the moved core WebAssembly specification * Editorial: Further changes from @rossberg's review
1 parent bb329a6 commit 373b6d7

File tree

1 file changed

+76
-85
lines changed

1 file changed

+76
-85
lines changed

0 commit comments

Comments
 (0)