Armin Rigo avatar Armin Rigo committed ac2bd75

Improve the test

Comments (0)

Files changed (1)


                 loadcodes.append(' ^'[load])
                 if load:
                     b2 = b1.clonebox()
-                    ops += [
-                        ResOperation(rop.SAME_AS, [b1], b2)
-                        ]
+                    ops.insert(rnd.randrange(0, len(ops)+1),
+                               ResOperation(rop.SAME_AS, [b1], b2))
                     b1 = b2
             loadcodes = ''.join(loadcodes)
                 ResOperation(rop.FINISH, [], None, descr=BasicFinalDescr(0))
+            # keep alive a random subset of the insideboxes
+            for b1 in insideboxes:
+                if rnd.random() < 0.333:
+                    ops.insert(-1, ResOperation(rop.SAME_AS, [b1],
+                                                b1.clonebox()))
             looptoken = JitCellToken()
             self.cpu.compile_loop(argboxes, ops, looptoken)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.