summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2022-07-08 13:37:50 -0700
committerGitHub <noreply@github.com>2022-07-08 13:37:50 -0700
commitfea11e95c67d51c464f00a5fcdfa6adb2c596f5e (patch)
tree1d4c310461568a66f43391389d7cff345d8615c7 /scripts
parent75d059ad249b9dcedbaaf858747d60d299269d2c (diff)
downloadbinaryen-fea11e95c67d51c464f00a5fcdfa6adb2c596f5e.tar.gz
binaryen-fea11e95c67d51c464f00a5fcdfa6adb2c596f5e.tar.bz2
binaryen-fea11e95c67d51c464f00a5fcdfa6adb2c596f5e.zip
[Strings] string.is_usv_sequence (#4783)
This implements it as a StringMeasure opcode. They do have the same number of operands, same trapping behavior, and same return type. They both get a string and do some inspection of it to return an i32. Perhaps the name could be StringInspect or something like that, rather than StringMeasure..? But I think for now this might be good enough, and the spec may change anyhow later.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gen-s-parser.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/gen-s-parser.py b/scripts/gen-s-parser.py
index 451430cc9..d0848622f 100755
--- a/scripts/gen-s-parser.py
+++ b/scripts/gen-s-parser.py
@@ -619,6 +619,7 @@ instructions = [
("string.const", "makeStringConst(s)"),
("string.measure_wtf8", "makeStringMeasure(s, StringMeasureWTF8)"),
("string.measure_wtf16", "makeStringMeasure(s, StringMeasureWTF16)"),
+ ("string.is_usv_sequence", "makeStringMeasure(s, StringMeasureIsUSV)"),
("string.encode_wtf8", "makeStringEncode(s, StringEncodeWTF8)"),
("string.encode_wtf16", "makeStringEncode(s, StringEncodeWTF16)"),
("string.concat", "makeStringConcat(s)"),