Author: Armin Rigo <[email protected]>
Branch: continulet-jit-3
Changeset: r58134:afc1fe7ce0cb
Date: 2012-10-15 16:34 +0200
http://bitbucket.org/pypy/pypy/changeset/afc1fe7ce0cb/

Log:    hg backout 458e381ff84d: I think we don't need KEEPALIVE any more

diff --git a/pypy/jit/backend/llgraph/llimpl.py 
b/pypy/jit/backend/llgraph/llimpl.py
--- a/pypy/jit/backend/llgraph/llimpl.py
+++ b/pypy/jit/backend/llgraph/llimpl.py
@@ -800,9 +800,6 @@
         self.overflow_flag = ovf
         return z
 
-    def op_keepalive(self, _, x):
-        pass
-
     # ----------
     # delegating to the builtins do_xxx() (done automatically for simple cases)
 
diff --git a/pypy/jit/backend/x86/regalloc.py b/pypy/jit/backend/x86/regalloc.py
--- a/pypy/jit/backend/x86/regalloc.py
+++ b/pypy/jit/backend/x86/regalloc.py
@@ -1441,9 +1441,6 @@
         if jump_op is not None and jump_op.getdescr() is descr:
             self._compute_hint_frame_locations_from_descr(descr)
 
-    def consider_keepalive(self, op):
-        pass
-
     def not_implemented_op(self, op):
         not_implemented("not implemented operation: %s" % op.getopname())
 
diff --git a/pypy/jit/metainterp/executor.py b/pypy/jit/metainterp/executor.py
--- a/pypy/jit/metainterp/executor.py
+++ b/pypy/jit/metainterp/executor.py
@@ -274,9 +274,6 @@
         assert isinstance(x, r_longlong)  # 32-bit
         return BoxFloat(x)
 
-def do_keepalive(cpu, _, x):
-    pass
-
 # ____________________________________________________________
 
 ##def do_force_token(cpu):
diff --git a/pypy/jit/metainterp/pyjitpl.py b/pypy/jit/metainterp/pyjitpl.py
--- a/pypy/jit/metainterp/pyjitpl.py
+++ b/pypy/jit/metainterp/pyjitpl.py
@@ -1391,16 +1391,12 @@
             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, None)
-            if vablebox is not None:
-                self.metainterp.history.record(rop.KEEPALIVE, [vablebox], None)
             self.metainterp.handle_possible_exception()
             if effectinfo.oopspecindex == effectinfo.OS_LIBFFI_CALL:
                 self.metainterp.direct_libffi_call()
@@ -2519,15 +2515,6 @@
         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 do it by
-        # inserting explicitly an extra KEEPALIVE operation.
-        jd = token.outermost_jitdriver_sd
-        if jd.index_of_virtualizable >= 0:
-            return args[jd.index_of_virtualizable]
-        else:
-            return None
 
     def direct_libffi_call(self):
         """Generate a direct call to C code, patching the CALL_MAY_FORCE
diff --git a/pypy/jit/metainterp/resoperation.py 
b/pypy/jit/metainterp/resoperation.py
--- a/pypy/jit/metainterp/resoperation.py
+++ b/pypy/jit/metainterp/resoperation.py
@@ -508,7 +508,6 @@
     'COPYUNICODECONTENT/5',
     'QUASIIMMUT_FIELD/1d',    # [objptr], descr=SlowMutateDescr
     'RECORD_KNOWN_CLASS/2',   # [objptr, clsptr]
-    'KEEPALIVE/1',
 
     '_CANRAISE_FIRST', # ----- start of can_raise operations -----
     '_CALL_FIRST',
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to