]> Repositorios git - scryer-prolog.git/commitdiff
move propagated_var_nums insertion to proper scope (#2183)
authorMark <[email protected]>
Sat, 2 Dec 2023 05:35:36 +0000 (22:35 -0700)
committerMark <[email protected]>
Sat, 2 Dec 2023 05:35:36 +0000 (22:35 -0700)
src/codegen.rs

index 806872bf49cb6b9360d8640b91dc4e855680c95b..fd0d21f92c33fa530d38d13b8a693ba8b3e56cc4 100644 (file)
@@ -85,10 +85,10 @@ impl BranchCodeStack {
 
                             self.stack[idx][branch_idx].push_back(instr!("put_variable", r, 0));
                         }
+                    }
 
-                        if idx > self.stack.len() - depth {
-                            propagated_var_nums.insert(var_num);
-                        }
+                    if idx > self.stack.len() - depth {
+                        propagated_var_nums.insert(var_num);
                     }
 
                     subsumed_hits.insert(var_num);