summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/wasm-interpreter.h75
-rw-r--r--test/lit/strings.wast5
2 files changed, 44 insertions, 36 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h
index 399910e7a..107f38f09 100644
--- a/src/wasm-interpreter.h
+++ b/src/wasm-interpreter.h
@@ -1958,44 +1958,22 @@ public:
}
return value;
}
- Flow visitStringNew(StringNew* curr) {
- WASM_UNREACHABLE("unimplemented string.new");
- }
- Flow visitStringConst(StringConst* curr) {
- WASM_UNREACHABLE("unimplemented string.const");
- }
- Flow visitStringMeasure(StringMeasure* curr) {
- WASM_UNREACHABLE("unimplemented string.measure");
- }
- Flow visitStringEncode(StringEncode* curr) {
- WASM_UNREACHABLE("unimplemented string.encode");
- }
- Flow visitStringConcat(StringConcat* curr) {
- WASM_UNREACHABLE("unimplemented string.concat");
- }
- Flow visitStringEq(StringEq* curr) {
- WASM_UNREACHABLE("unimplemented string.eq");
- }
- Flow visitStringAs(StringAs* curr) {
- WASM_UNREACHABLE("unimplemented string.as");
- }
+ Flow visitStringNew(StringNew* curr) { WASM_UNREACHABLE("unimp"); }
+ Flow visitStringConst(StringConst* curr) { WASM_UNREACHABLE("unimp"); }
+ Flow visitStringMeasure(StringMeasure* curr) { WASM_UNREACHABLE("unimp"); }
+ Flow visitStringEncode(StringEncode* curr) { WASM_UNREACHABLE("unimp"); }
+ Flow visitStringConcat(StringConcat* curr) { WASM_UNREACHABLE("unimp"); }
+ Flow visitStringEq(StringEq* curr) { WASM_UNREACHABLE("unimp"); }
+ Flow visitStringAs(StringAs* curr) { WASM_UNREACHABLE("unimp"); }
Flow visitStringWTF8Advance(StringWTF8Advance* curr) {
- WASM_UNREACHABLE("unimplemented stringview_adjust*");
- }
- Flow visitStringWTF16Get(StringWTF16Get* curr) {
- WASM_UNREACHABLE("unimplemented stringview_adjust*");
- }
- Flow visitStringIterNext(StringIterNext* curr) {
- WASM_UNREACHABLE("unimplemented stringview_adjust*");
- }
- Flow visitStringIterMove(StringIterMove* curr) {
- WASM_UNREACHABLE("unimplemented stringview_adjust*");
- }
- Flow visitStringSliceWTF(StringSliceWTF* curr) {
- WASM_UNREACHABLE("unimplemented stringview_adjust*");
+ WASM_UNREACHABLE("unimp");
}
+ Flow visitStringWTF16Get(StringWTF16Get* curr) { WASM_UNREACHABLE("unimp"); }
+ Flow visitStringIterNext(StringIterNext* curr) { WASM_UNREACHABLE("unimp"); }
+ Flow visitStringIterMove(StringIterMove* curr) { WASM_UNREACHABLE("unimp"); }
+ Flow visitStringSliceWTF(StringSliceWTF* curr) { WASM_UNREACHABLE("unimp"); }
Flow visitStringSliceIter(StringSliceIter* curr) {
- WASM_UNREACHABLE("unimplemented stringview_adjust*");
+ WASM_UNREACHABLE("unimp");
}
virtual void trap(const char* why) { WASM_UNREACHABLE("unimp"); }
@@ -2300,6 +2278,33 @@ public:
NOTE_ENTER("Rethrow");
return Flow(NONCONSTANT_FLOW);
}
+ Flow visitStringNew(StringNew* curr) { return Flow(NONCONSTANT_FLOW); }
+ Flow visitStringConst(StringConst* curr) { return Flow(NONCONSTANT_FLOW); }
+ Flow visitStringMeasure(StringMeasure* curr) {
+ return Flow(NONCONSTANT_FLOW);
+ }
+ Flow visitStringEncode(StringEncode* curr) { return Flow(NONCONSTANT_FLOW); }
+ Flow visitStringConcat(StringConcat* curr) { return Flow(NONCONSTANT_FLOW); }
+ Flow visitStringEq(StringEq* curr) { return Flow(NONCONSTANT_FLOW); }
+ Flow visitStringAs(StringAs* curr) { return Flow(NONCONSTANT_FLOW); }
+ Flow visitStringWTF8Advance(StringWTF8Advance* curr) {
+ return Flow(NONCONSTANT_FLOW);
+ }
+ Flow visitStringWTF16Get(StringWTF16Get* curr) {
+ return Flow(NONCONSTANT_FLOW);
+ }
+ Flow visitStringIterNext(StringIterNext* curr) {
+ return Flow(NONCONSTANT_FLOW);
+ }
+ Flow visitStringIterMove(StringIterMove* curr) {
+ return Flow(NONCONSTANT_FLOW);
+ }
+ Flow visitStringSliceWTF(StringSliceWTF* curr) {
+ return Flow(NONCONSTANT_FLOW);
+ }
+ Flow visitStringSliceIter(StringSliceIter* curr) {
+ return Flow(NONCONSTANT_FLOW);
+ }
void trap(const char* why) override { throw NonconstantException(); }
diff --git a/test/lit/strings.wast b/test/lit/strings.wast
index e201b2bd7..859d49bee 100644
--- a/test/lit/strings.wast
+++ b/test/lit/strings.wast
@@ -1,8 +1,11 @@
;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.
;; Check that string types are emitted properly in the binary format.
+;;
+;; runs --precompute in order to verify no problems occur in the optimizer's
+;; invocation of the interpreter.
-;; RUN: foreach %s %t wasm-opt --enable-strings --enable-reference-types --enable-gc --roundtrip -S -o - | filecheck %s
+;; RUN: foreach %s %t wasm-opt --enable-strings --enable-reference-types --enable-gc --roundtrip --precompute -S -o - | filecheck %s
(module
;; CHECK: (type $stringref_=>_none (func (param stringref)))