summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-03-04 18:36:05 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-03-07 13:20:39 -0800
commit2e761e571f7b3d3df7ba7407a13b37c81ee4e9eb (patch)
treed00fe2a02847a9c78a8ed0504b44a4d9bff2d4b5 /src/wasm.h
parent7ffdc335c7c899c282cb3d8216773dca1c26455b (diff)
downloadbinaryen-2e761e571f7b3d3df7ba7407a13b37c81ee4e9eb.tar.gz
binaryen-2e761e571f7b3d3df7ba7407a13b37c81ee4e9eb.tar.bz2
binaryen-2e761e571f7b3d3df7ba7407a13b37c81ee4e9eb.zip
add a finalize() method for blocks
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h6
1 files changed, 6 insertions, 0 deletions
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 {