From 14fe75e4d6e670d2e7f3e171d3d96c340b574eab Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 23 Aug 2016 11:39:58 -0700 Subject: when replacing an if with its condition (when it has no body), we must drop it --- test/unit.asm.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/unit.asm.js') diff --git a/test/unit.asm.js b/test/unit.asm.js index b4c10b1d2..8f0812e29 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -308,6 +308,17 @@ function asm(global, env, buffer) { } while(0); } + function ifChainEmpty(label) { + label = label | 0; + if ((label|0) == 4) { + return 0; + } + else if ((label|0) == 7) { + // unreachable; + } + return 0; + } + function z() { } function w() { -- cgit v1.2.3