From fea11e95c67d51c464f00a5fcdfa6adb2c596f5e Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 8 Jul 2022 13:37:50 -0700 Subject: [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. --- src/passes/Print.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/passes/Print.cpp') diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index cf4e6c9e9..ec9926a30 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -2253,6 +2253,9 @@ struct PrintExpressionContents case StringMeasureWTF16: printMedium(o, "string.measure_wtf16"); break; + case StringMeasureIsUSV: + printMedium(o, "string.is_usv_sequence"); + break; default: WASM_UNREACHABLE("invalid string.measure*"); } -- cgit v1.2.3