Commits

Maciej Fijalkowski committed aa12390

I think this is the right fix for a test (it still fails, but for unrelated reasons I think)

Comments (0)

Files changed (2)

rpython/jit/metainterp/optimizeopt/virtualize.py

         self.emit_operation(op)
 
     def optimize_RESUME_PUT(self, op):
-        self.optimizer.resumebuilder.resume_put(op)
+        if op.getarg(0) in self.optimizer.producer:
+            self.optimizer.resumebuilder.resume_put(op)
+            # otherwise we did not emit the operation just yet
 
 
 dispatch_opt = make_dispatcher_method(OptVirtualize, 'optimize_',

rpython/jit/metainterp/test/test_ajit.py

             found = 0
             for op in get_stats().get_all_loops()[0]._all_operations():
                 if op.getopname() == 'guard_true':
-                    liveboxes = op.getfailargs()
-                    assert len(liveboxes) == 3
-                    for box in liveboxes:
-                        assert isinstance(box, history.BoxInt)
                     found += 1
             assert found == 2
 
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 ProjectModifiedEvent.java.
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.