summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Wirtz <dcode@dcode.io>2018-01-19 19:01:38 +0100
committerAlon Zakai <alonzakai@gmail.com>2018-01-19 10:01:38 -0800
commit3b1f2c488a1d3f392b2eba2ff08b621e3616783c (patch)
treeaad01b12d04e1fa3af7d426ac07bd422e60ca375
parentba4eeb394c466bf4d64013a71a73ec2c424f14f0 (diff)
downloadbinaryen-3b1f2c488a1d3f392b2eba2ff08b621e3616783c.tar.gz
binaryen-3b1f2c488a1d3f392b2eba2ff08b621e3616783c.tar.bz2
binaryen-3b1f2c488a1d3f392b2eba2ff08b621e3616783c.zip
I64ToI32Lowwering: Skip not applicable globals (#1374)
Currently, whenever a global is used, wasm2asm fails with an assertion error here. While this PR doesn't implement anything, it allows the use of non-i64 globals that aren't lowered anyway.
-rw-r--r--src/passes/I64ToI32Lowering.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/passes/I64ToI32Lowering.cpp b/src/passes/I64ToI32Lowering.cpp
index a9ac2da82..e617c3b83 100644
--- a/src/passes/I64ToI32Lowering.cpp
+++ b/src/passes/I64ToI32Lowering.cpp
@@ -421,10 +421,12 @@ struct I64ToI32Lowering : public WalkerPass<PostWalker<I64ToI32Lowering>> {
}
void visitGetGlobal(GetGlobal* curr) {
+ if (curr->type != i64) return;
assert(false && "GetGlobal not implemented");
}
void visitSetGlobal(SetGlobal* curr) {
+ if (curr->type != i64) return;
assert(false && "SetGlobal not implemented");
}