From 64aa81e0e9655cf16e3af65e1bbe98e7fc6cf974 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 9 May 2017 09:36:45 -0700 Subject: 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 --- src/wasm.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/wasm.h') 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 { @@ -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 { @@ -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 { @@ -391,6 +401,8 @@ public: Expression* ptr; // type must be set during creation, cannot be inferred + + void finalize(); }; class Store : public SpecificExpression { @@ -466,6 +478,8 @@ public: Drop(MixedArena& allocator) {} Expression* value; + + void finalize(); }; class Return : public SpecificExpression { -- cgit v1.2.3