chiark / gitweb /
script lower: Fix handling of heavy targets
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 10 Jul 2021 16:54:52 +0000 (17:54 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 10 Jul 2021 18:32:58 +0000 (19:32 +0100)
We need to keep walking if there are any, or they won't end up moved.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
templates/script.ts

index c49bc1415b20511744a40922e05d3a088baa57d4..e3ed01d9c12f3269edb98ef84bd631bf02fe9d6f 100644 (file)
@@ -658,15 +658,10 @@ function lower_pieces(targets_todo: LowerTodoList):
 
   let walk = pieces_marker;
   for (;;) { // starting at the bottom of the stack order
-    if (n_targets_todo_light == 0
-       && q_z_top !== null) {
-      // no light targets left, state Z, we can stop now
-      console.log('LOWER STATE Z FINISHED');
-      break;
-    }
     if (Object.keys(targets_todo).length == 0 &&
        q_z_top !== null) {
-      console.log('LOWER NO TARGETS BUT LIGHT!', n_targets_todo_light);
+      // no targets left, state Z, we can stop now
+      console.log('LOWER STATE Z FINISHED');
       break;
     }