[pypy-svn] r67722 - pypy/trunk/pypy/rlib

antocuni at codespeak.net antocuni at codespeak.net
Wed Sep 16 22:49:44 CEST 2009


Author: antocuni
Date: Wed Sep 16 22:49:42 2009
New Revision: 67722

Modified:
   pypy/trunk/pypy/rlib/jit.py
Log:
annotate the hooks only after we annotate jit_merge_point, as the annotation of the arguments passed to can_enter_jit could be slightly different


Modified: pypy/trunk/pypy/rlib/jit.py
==============================================================================
--- pypy/trunk/pypy/rlib/jit.py	(original)
+++ pypy/trunk/pypy/rlib/jit.py	Wed Sep 16 22:49:42 2009
@@ -210,10 +210,11 @@
         return annmodel.s_None
 
     def annotate_hooks(self, **kwds_s):
-        driver = self.instance.im_self
-        self.annotate_hook(driver.can_inline, driver.greens, **kwds_s)
-        self.annotate_hook(driver.get_printable_location, driver.greens, **kwds_s)
-        self.annotate_hook(driver.leave, driver.greens + driver.reds, **kwds_s)
+        if self.instance.im_func is JitDriver.jit_merge_point.im_func:
+            driver = self.instance.im_self
+            self.annotate_hook(driver.can_inline, driver.greens, **kwds_s)
+            self.annotate_hook(driver.get_printable_location, driver.greens, **kwds_s)
+            self.annotate_hook(driver.leave, driver.greens + driver.reds, **kwds_s)
 
     def annotate_hook(self, func, variables, **kwds_s):
         if func is None:



More information about the Pypy-commit mailing list