From 4367194dc08e981b85effc2127564f53ecbc0af1 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 24 Aug 2017 18:53:06 -0700 Subject: set the type of a set_local properly when it is unreachable --- src/wasm/wasm.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/wasm/wasm.cpp') diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp index f82a06e68..ab2db6bd5 100644 --- a/src/wasm/wasm.cpp +++ b/src/wasm/wasm.cpp @@ -332,6 +332,10 @@ void SetLocal::setTee(bool is) { void SetLocal::finalize() { if (value->type == unreachable) { type = unreachable; + } else if (isTee()) { + type = value->type; + } else { + type = none; } } -- cgit v1.2.3