From 52db5b4a4e6051d790888963499511a8d3835848 Mon Sep 17 00:00:00 2001 From: Chris Fallin Date: Tue, 29 Nov 2022 22:37:35 -0800 Subject: [PATCH] Bugfix --- src/frontend.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/frontend.rs b/src/frontend.rs index 1d5a398..f63e3a7 100644 --- a/src/frontend.rs +++ b/src/frontend.rs @@ -387,6 +387,8 @@ impl LocalTracker { self.cur_block, old_mapping ); + } else { + self.block_end.insert(self.cur_block, FxHashMap::default()); } } @@ -413,7 +415,12 @@ impl LocalTracker { } fn get_in_block(&mut self, body: &mut FunctionBody, at_block: Block, local: Local) -> Value { - log::trace!("get_in_block: at_block {} local {}", at_block, local); + log::trace!( + "get_in_block: at_block {} local {} cur_block {}", + at_block, + local, + self.cur_block + ); let ty = body.locals[local]; if self.cur_block == at_block {