summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-05-09 09:36:45 -0700
committerGitHub <noreply@github.com>2017-05-09 09:36:45 -0700
commit64aa81e0e9655cf16e3af65e1bbe98e7fc6cf974 (patch)
tree26f3608bb1944b63712a8d1a161e61b41956276d /src/wasm.h
parentb856925f6c25df22a0901d8f9e24e4247b4acc18 (diff)
downloadbinaryen-64aa81e0e9655cf16e3af65e1bbe98e7fc6cf974.tar.gz
binaryen-64aa81e0e9655cf16e3af65e1bbe98e7fc6cf974.tar.bz2
binaryen-64aa81e0e9655cf16e3af65e1bbe98e7fc6cf974.zip
Unreachable typing fixes (#1004)
* fix type of drop, set_local, set_global, load, etc: when operand is unreachable, so is the node itself * support binary tests properly in test/passes * fix unreachable typing of blocks with no name and an unreachable child * fix continue emitting in asm2wasm * properly handle emitting of unreachable load
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/wasm.h b/src/wasm.h
index b23dab918..3caab9dbc 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -309,6 +309,8 @@ public:
ExpressionList operands;
Name target;
+
+ void finalize();
};
class CallImport : public SpecificExpression<Expression::CallImportId> {
@@ -317,6 +319,8 @@ public:
ExpressionList operands;
Name target;
+
+ void finalize();
};
class FunctionType {
@@ -340,6 +344,8 @@ public:
ExpressionList operands;
Name fullType;
Expression* target;
+
+ void finalize();
};
class GetLocal : public SpecificExpression<Expression::GetLocalId> {
@@ -355,6 +361,8 @@ public:
SetLocal() {}
SetLocal(MixedArena& allocator) {}
+ void finalize();
+
Index index;
Expression* value;
@@ -377,6 +385,8 @@ public:
Name name;
Expression* value;
+
+ void finalize();
};
class Load : public SpecificExpression<Expression::LoadId> {
@@ -391,6 +401,8 @@ public:
Expression* ptr;
// type must be set during creation, cannot be inferred
+
+ void finalize();
};
class Store : public SpecificExpression<Expression::StoreId> {
@@ -466,6 +478,8 @@ public:
Drop(MixedArena& allocator) {}
Expression* value;
+
+ void finalize();
};
class Return : public SpecificExpression<Expression::ReturnId> {