From 2e761e571f7b3d3df7ba7407a13b37c81ee4e9eb Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 4 Mar 2016 18:36:05 -0800 Subject: add a finalize() method for blocks --- src/wasm.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/wasm.h') diff --git a/src/wasm.h b/src/wasm.h index ec2cd469e..ba9d7de3d 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -794,6 +794,12 @@ public: Name name; ExpressionList list; + + void finalize() { + if (list.size() > 0) { + type = list.back()->type; + } + } }; class If : public Expression { -- cgit v1.2.3