Skip to content

Commit 3b1f2c4

Browse files
dcodeIOkripken
authored andcommitted
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.
1 parent ba4eeb3 commit 3b1f2c4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/passes/I64ToI32Lowering.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,10 +421,12 @@ struct I64ToI32Lowering : public WalkerPass<PostWalker<I64ToI32Lowering>> {
421421
}
422422

423423
void visitGetGlobal(GetGlobal* curr) {
424+
if (curr->type != i64) return;
424425
assert(false && "GetGlobal not implemented");
425426
}
426427

427428
void visitSetGlobal(SetGlobal* curr) {
429+
if (curr->type != i64) return;
428430
assert(false && "SetGlobal not implemented");
429431
}
430432

0 commit comments

Comments
 (0)