From e4eefc92f46b60cbfd61e5cb0e04f4c849b7a0ea Mon Sep 17 00:00:00 2001 From: Mark Thom Date: Thu, 28 Apr 2022 19:25:09 -0600 Subject: [PATCH] remove redundant skip_stub_try_me_else condition (#1444) --- src/codegen.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/codegen.rs b/src/codegen.rs index c298c9e0..4b3d1c26 100644 --- a/src/codegen.rs +++ b/src/codegen.rs @@ -1080,7 +1080,13 @@ impl<'b, TermMarker: Allocator> CodeGenerator<'b, TermMarker> { // the peculiar condition of this block, when false, // anticipates code.pop_front() being called about a // dozen lines below. - self.increment_jmp_by_locs_by(code.len()); + + if !skip_stub_try_me_else { + // if the condition is false, code_offsets.no_indices() is false, + // so don't repeat the work of the condition on skip_stub_try_me_else + // below. + self.increment_jmp_by_locs_by(code.len()); + } } self.skeleton.clauses.push_back(clause_index_info); -- 2.54.0