Skip to content

Commit 1533149

Browse files
committed
bugfix
1 parent e1ae559 commit 1533149

7 files changed

+719
-677
lines changed

src/builtins.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -10904,7 +10904,7 @@ function compileVisitMembersWithSwitchCase(compiler: Compiler): ExpressionRef {
1090410904
current,
1090510905
cases[names.length - 1]
1090610906
], TypeRef.None);
10907-
return current;
10907+
return module.flatten([current, module.unreachable()]);
1090810908
}
1090910909

1091010910
function compileVisitMembersWithCallIndirect(compiler: Compiler): ExpressionRef {
@@ -10963,7 +10963,7 @@ export function compileVisitMembers(compiler: Compiler): void {
1096310963
createType([sizeTypeRef, TypeRef.I32]), // this, cookie
1096410964
TypeRef.None, // => void
1096510965
null,
10966-
module.flatten([current, module.unreachable()])
10966+
current,
1096710967
);
1096810968
}
1096910969

tests/compiler/bindings/esm.debug.wat

-1
Original file line numberDiff line numberDiff line change
@@ -2979,7 +2979,6 @@
29792979
i32.sub
29802980
i32.load
29812981
call_indirect $~/lib/rt/visitor (type $0)
2982-
unreachable
29832982
)
29842983
(func $~setArgumentsLength (param $0 i32)
29852984
local.get $0

0 commit comments

Comments
 (0)