Commits

Armin Rigo  committed 28c5443

Backed out changeset 4033391a3442
...no, it does not work, because the CALL_ASSEMBLER/GUARD_NOT_FORCED
are paired in the backend and the virtualizable still doesn't survive
past that pair...

  • Participants
  • Parent commits 4033391

Comments (0)

Files changed (3)

File pypy/jit/backend/llgraph/llimpl.py

     'debug_merge_point': (('ref', 'int'), None),
     'force_token'     : ((), 'int'),
     'call_may_force'  : (('int', 'varargs'), 'intorptr'),
-    'guard_not_forced': (('ref',), None),
+    'guard_not_forced': ((), None),
 }
 
 # ____________________________________________________________
         finally:
             self._may_force = -1
 
-    def op_guard_not_forced(self, descr, vable_ignored):
+    def op_guard_not_forced(self, descr):
         forced = self._forced
         self._forced = False
         if forced:

File pypy/jit/metainterp/pyjitpl.py

             resbox = self.metainterp.execute_and_record_varargs(
                 rop.CALL_MAY_FORCE, allboxes, descr=descr)
             self.metainterp.vrefs_after_residual_call()
-            vablebox = None
             if assembler_call:
-                vablebox = self.metainterp.direct_assembler_call(
-                    assembler_call_jd)
+                self.metainterp.direct_assembler_call(assembler_call_jd)
             if resbox is not None:
                 self.make_result_of_lastop(resbox)
             self.metainterp.vable_after_residual_call()
-            self.generate_guard(rop.GUARD_NOT_FORCED,
-                                extraargs=[vablebox or history.CONST_NULL])
+            self.generate_guard(rop.GUARD_NOT_FORCED, None)
             self.metainterp.handle_possible_exception()
             return resbox
         else:
         token = warmrunnerstate.get_assembler_token(greenargs)
         op = op.copy_and_change(rop.CALL_ASSEMBLER, args=args, descr=token)
         self.history.operations.append(op)
-        #
-        # To fix an obscure issue, make sure the vable stays alive
-        # longer than the CALL_ASSEMBLER operation.  We stick it
-        # randomly to the GUARD_NOT_FORCED that follows.
-        jd = token.outermost_jitdriver_sd
-        if jd.index_of_virtualizable >= 0:
-            return args[jd.index_of_virtualizable]
-        else:
-            return None
 
 # ____________________________________________________________
 

File pypy/jit/metainterp/resoperation.py

     'GUARD_EXCEPTION/1d',       # may be called with an exception currently set
     'GUARD_NO_OVERFLOW/0d',
     'GUARD_OVERFLOW/0d',
-    'GUARD_NOT_FORCED/1d',      # may be called with an exception currently set
+    'GUARD_NOT_FORCED/0d',      # may be called with an exception currently set
     'GUARD_NOT_INVALIDATED/0d',
     '_GUARD_LAST', # ----- end of guard operations -----