diff options
author | Jérôme Vouillon <jerome.vouillon@gmail.com> | 2023-05-12 23:43:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-12 14:43:09 -0700 |
commit | 71a151240241fd50c42d88fe0ba9800c03527387 (patch) | |
tree | de98957b6f5341c3b14147c0cf6e1753d38940fe /src/js/binaryen.js-post.js | |
parent | d7b14a67ca4e9b111d5733239af88328cb779030 (diff) | |
download | binaryen-71a151240241fd50c42d88fe0ba9800c03527387.tar.gz binaryen-71a151240241fd50c42d88fe0ba9800c03527387.tar.bz2 binaryen-71a151240241fd50c42d88fe0ba9800c03527387.zip |
[Strings] Adopt new instruction binary encoding (#5714)
See WebAssembly/stringref#46.
This format is already adopted by V8: https://chromium-review.googlesource.com/c/v8/v8/+/3892695.
The text format is left unchanged (see #5607 for a discussion on the subject).
I have also added support for string.encode_lossy_utf8 and
string.encode_lossy_utf8 array (by allowing the replace policy for
Binaryen's string.encode_wtf8 instruction).
Diffstat (limited to 'src/js/binaryen.js-post.js')
-rw-r--r-- | src/js/binaryen.js-post.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js index 1101c1aab..1cbecfaff 100644 --- a/src/js/binaryen.js-post.js +++ b/src/js/binaryen.js-post.js @@ -578,11 +578,11 @@ function initializeConstants() { 'BrOnCastFail', 'StringNewUTF8', 'StringNewWTF8', - 'StringNewReplace', + 'StringNewLossyUTF8', 'StringNewWTF16', 'StringNewUTF8Array', 'StringNewWTF8Array', - 'StringNewReplaceArray', + 'StringNewLossyUTF8Array', 'StringNewWTF16Array', 'StringNewFromCodePoint', 'StringMeasureUTF8', @@ -591,9 +591,11 @@ function initializeConstants() { 'StringMeasureIsUSV', 'StringMeasureWTF16View', 'StringEncodeUTF8', + 'StringEncodeLossyUTF8', 'StringEncodeWTF8', 'StringEncodeWTF16', 'StringEncodeUTF8Array', + 'StringEncodeLossyUTF8Array', 'StringEncodeWTF8Array', 'StringEncodeWTF16Array', 'StringAsWTF8', |