Author: Carl Friedrich Bolz <cfb...@gmx.de>
Branch: value-profiling
Changeset: r78925:c7051e9e1c11
Date: 2015-08-11 19:11 +0200
http://bitbucket.org/pypy/pypy/changeset/c7051e9e1c11/

Log:    (cfbolz, arigo): interpreter optimization

diff --git a/pypy/interpreter/valueprof.py b/pypy/interpreter/valueprof.py
--- a/pypy/interpreter/valueprof.py
+++ b/pypy/interpreter/valueprof.py
@@ -1,4 +1,4 @@
-from rpython.rlib import jit
+from rpython.rlib import jit, objectmodel
 from rpython.rlib.rweakref import ref, dead_ref
 
 SEEN_NOTHING = '\x00'
@@ -26,7 +26,10 @@
     def get_int_val(self, w_obj):
         raise NotImplementedError("abstract base")
 
+    @objectmodel.always_inline
     def see_write(self, w_value):
+        if self._vprof_status == SEEN_TOO_MUCH:
+            return
         if self.is_int(w_value):
             return self.see_int(self.get_int_val(w_value))
         return self.see_object(w_value)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to