Fix old Wasm backend

This commit is contained in:
Alexey Andreev 2024-09-19 20:26:32 +02:00
parent 6968e2cee4
commit 29339f3fbc

View File

@ -1333,7 +1333,9 @@ public abstract class BaseWasmGenerationVisitor implements StatementVisitor, Exp
WasmBlock targetBlock) { WasmBlock targetBlock) {
var exceptionType = ValueType.object(tryCatch.getExceptionType()); var exceptionType = ValueType.object(tryCatch.getExceptionType());
var isMatched = generateInstanceOf(new WasmGetLocal(exceptionVar), exceptionType); var isMatched = generateInstanceOf(new WasmGetLocal(exceptionVar), exceptionType);
target.add(new WasmBranch(isMatched, targetBlock)); var br = new WasmBranch(isMatched, targetBlock);
br.setResult(new WasmGetLocal(exceptionVar));
target.add(new WasmDrop(br));
} }
private void visitMany(List<Statement> statements, List<WasmExpression> target) { private void visitMany(List<Statement> statements, List<WasmExpression> target) {