Skip to content

Commit

Permalink
Fixup typos
Browse files Browse the repository at this point in the history
  • Loading branch information
eqrion committed Apr 10, 2024
1 parent 6a7a39b commit f13f076
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions proposals/js-string-builtins/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ The simplest way is to have a module import each string as an immutable global.

This proposal adds an extension to JS-API compile routine to support optimized 'imported string constants' to address this use-case.

The `WebAssemblyCompileOptions` is extended with a `boolean importedStringConstants` flag. When this is set, the module may define imports of the form `(import "'" %stringConstant (global externref))`, and the JS-API will use the provided `%stringConstant%` import field name to be the value of the global. This allows for any UTF-8 string to be imported with minimal overhead.
The `WebAssemblyCompileOptions` is extended with a `boolean importedStringConstants` flag. When this is set, the module may define imports of the form `(import "'" "%stringConstant%"" (global externref))`, and the JS-API will use the provided `%stringConstant%` import field name to be the value of the global. This allows for any UTF-8 string to be imported with minimal overhead.

The string namespace is chosen to be the single quote ASCII character `'`. We may revise this to be a longer name before this proposal is finalized.

All imports that reference this namespace must be globals of immutable externref. If they are not, an eager compile error is emitted.
All imports that reference this namespace must be globals of type immutable externref. If they are not, an eager compile error is emitted.

## JS String Builtin API

Expand Down

0 comments on commit f13f076

Please sign in to comment.