summaryrefslogtreecommitdiff
path: root/src/wasm-builder.h
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2019-11-22 12:46:04 -0800
committerGitHub <noreply@github.com>2019-11-22 12:46:04 -0800
commite2587f30827cd3d35dd409c2958b25a6c5517092 (patch)
tree22a372a3986cbfbc6db09df45bffe00631083f69 /src/wasm-builder.h
parenta0c423ef501ea7267c24c46e645296e713b2ea42 (diff)
downloadbinaryen-e2587f30827cd3d35dd409c2958b25a6c5517092.tar.gz
binaryen-e2587f30827cd3d35dd409c2958b25a6c5517092.tar.bz2
binaryen-e2587f30827cd3d35dd409c2958b25a6c5517092.zip
Multivalue type creation and inspection (#2459)
Adds the ability to create multivalue types from vectors of concrete value types. All types are transparently interned, so their representation is still a single uint32_t. Types can be extracted into vectors of their component parts, and all the single value types expand into vectors containing themselves. Multivalue types are not yet used in the IR, but their creation and inspection functionality is exposed and tested in the C and JS APIs. Also makes common type predicates methods of Type and improves the ergonomics of type printing.
Diffstat (limited to 'src/wasm-builder.h')
-rw-r--r--src/wasm-builder.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wasm-builder.h b/src/wasm-builder.h
index d47ec413f..87b1f0306 100644
--- a/src/wasm-builder.h
+++ b/src/wasm-builder.h
@@ -325,7 +325,7 @@ public:
ret->value = value;
ret->valueType = type;
ret->finalize();
- assert(isConcreteType(ret->value->type) ? ret->value->type == type : true);
+ assert(ret->value->type.isConcrete() ? ret->value->type == type : true);
return ret;
}
Store* makeAtomicStore(unsigned bytes,
@@ -596,7 +596,7 @@ public:
static Index addVar(Function* func, Name name, Type type) {
// always ok to add a var, it does not affect other indices
- assert(isConcreteType(type));
+ assert(type.isConcrete());
Index index = func->getNumLocals();
if (name.is()) {
func->localIndices[name] = index;
@@ -701,7 +701,7 @@ public:
// Drop an expression if it has a concrete type
Expression* dropIfConcretelyTyped(Expression* curr) {
- if (!isConcreteType(curr->type)) {
+ if (!curr->type.isConcrete()) {
return curr;
}
return makeDrop(curr);