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-builder.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/wasm-builder.h') diff --git a/src/wasm-builder.h b/src/wasm-builder.h index 4ef4b1e0b..7432562d1 100644 --- a/src/wasm-builder.h +++ b/src/wasm-builder.h @@ -164,14 +164,14 @@ public: auto* ret = allocator.alloc(); ret->index = index; ret->value = value; - ret->type = none; + ret->finalize(); return ret; } SetLocal* makeTeeLocal(Index index, Expression* value) { auto* ret = allocator.alloc(); ret->index = index; ret->value = value; - ret->type = value->type; + ret->setTee(true); return ret; } GetGlobal* makeGetGlobal(Name name, WasmType type) { -- cgit v1.2.3