summaryrefslogtreecommitdiff
path: root/src/wasm-type.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2023-02-15 18:21:26 -0800
committerGitHub <noreply@github.com>2023-02-15 18:21:26 -0800
commit670b73681c56a42930f65c7a293a062e168c39fc (patch)
tree47bda97e22a789338e25a817d44531ddfe405d8e /src/wasm-type.h
parentc4d15efc62fb6e6b55dd128e62896c93ca52c98a (diff)
downloadbinaryen-670b73681c56a42930f65c7a293a062e168c39fc.tar.gz
binaryen-670b73681c56a42930f65c7a293a062e168c39fc.tar.bz2
binaryen-670b73681c56a42930f65c7a293a062e168c39fc.zip
[Strings] Initial string execution support (#5491)
Store string data as GC data. Inefficient (one Const per char), but ok for now. Implement string.new_wtf16 and string.const, enough for basic testing. Create strings in makeConstantExpression, which enables ctor-eval support. Print strings in fuzz-exec which makes testing easier.
Diffstat (limited to 'src/wasm-type.h')
-rw-r--r--src/wasm-type.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wasm-type.h b/src/wasm-type.h
index a359ea794..67223705e 100644
--- a/src/wasm-type.h
+++ b/src/wasm-type.h
@@ -159,6 +159,7 @@ public:
bool isSingle() const { return isConcrete() && !isTuple(); }
bool isRef() const;
bool isFunction() const;
+ // See literal.h.
bool isData() const;
// Checks whether a type is a reference and is nullable. This returns false
// for a value that is not a reference, that is, for which nullability is
@@ -173,6 +174,7 @@ public:
bool isNull() const;
bool isStruct() const;
bool isArray() const;
+ bool isString() const;
bool isDefaultable() const;
Nullability getNullability() const;
@@ -364,6 +366,7 @@ public:
bool isSignature() const;
bool isStruct() const;
bool isArray() const;
+ bool isString() const;
bool isBottom() const;
Signature getSignature() const;