Alex Gaynor avatar Alex Gaynor committed 7d76bee

(alex, fijal): switch to using box-or-None instead ofa product type

Comments (0)

Files changed (1)

rpython/jit/metainterp/pyjitpl.py

             # residual calls require attention to keep virtualizables in-sync
             self.metainterp.clear_exception()
             if effectinfo.oopspecindex == EffectInfo.OS_JIT_FORCE_VIRTUAL:
-                handled, resbox = self._do_jit_force_virtual(allboxes, descr, pc)
-                if handled:
+                resbox = self._do_jit_force_virtual(allboxes, descr, pc)
+                if resbox is not None:
                     return resbox
             self.metainterp.vable_and_vrefs_before_residual_call()
             resbox = self.metainterp.execute_and_record_varargs(
         if (self.metainterp.jitdriver_sd.virtualizable_info is None and
             self.metainterp.jitdriver_sd.greenfield_info is None):
             # can occur in case of multiple JITs
-            return False, None
+            return None
         vref_box = allboxes[1]
         standard_box = self.metainterp.virtualizable_boxes[-1]
         if standard_box is vref_box:
-            return True, vref_box
+            return vref_box
         if self.metainterp.heapcache.is_nonstandard_virtualizable(vref_box):
-            return False, None
+            return None
         eqbox = self.metainterp.execute_and_record(rop.PTR_EQ, None, vref_box, standard_box)
         eqbox = self.implement_guard_value(eqbox, pc)
         isstandard = eqbox.getint()
         if isstandard:
-            return True, standard_box
+            return standard_box
         else:
-            return False, None
+            return None
 
     def do_residual_or_indirect_call(self, funcbox, argboxes, calldescr, pc):
         """The 'residual_call' operation is emitted in two cases:
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.