]> Repositorios git - scryer-prolog.git/commitdiff
remove redundant skip_stub_try_me_else condition (#1444)
authorMark Thom <[email protected]>
Fri, 29 Apr 2022 01:25:09 +0000 (19:25 -0600)
committerMark Thom <[email protected]>
Fri, 29 Apr 2022 15:16:22 +0000 (09:16 -0600)
src/codegen.rs

index c298c9e0db4428bf13ea444d5794a65489c30b20..4b3d1c26ef7388d2d9e71f00d93d0d9b5382e852 100644 (file)
@@ -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);