Author: Maciej Fijalkowski <[email protected]>
Branch: vmprof
Changeset: r76501:f361fc756693
Date: 2015-03-22 10:50 +0200
http://bitbucket.org/pypy/pypy/changeset/f361fc756693/

Log:    make code obj ids more unique

diff --git a/pypy/interpreter/executioncontext.py 
b/pypy/interpreter/executioncontext.py
--- a/pypy/interpreter/executioncontext.py
+++ b/pypy/interpreter/executioncontext.py
@@ -2,6 +2,7 @@
 from pypy.interpreter.error import OperationError, get_cleared_operation_error
 from rpython.rlib.unroll import unrolling_iterable
 from rpython.rlib import jit
+from rpython.rlib.objectmodel import we_are_translated
 
 TICK_COUNTER_STEP = 100
 
@@ -37,7 +38,11 @@
         if sys.maxint == 2147483647:
             self._code_unique_id = 0 # XXX this is wrong, it won't work on 
32bit
         else:
-            self._code_unique_id = 0x7000000000000000
+            if we_are_translated():
+                self._code_unique_id = 0x7000000000000000
+            else:
+                self._code_unique_id = 0x7700000000000000
+                # should be enough code objects
         self._code_callback = None
 
     @staticmethod
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to