[pypy-svn] r68803 - in pypy/branch/logging/pypy/jit/metainterp: . test

arigo at codespeak.net arigo at codespeak.net
Wed Oct 28 09:31:02 CET 2009


Author: arigo
Date: Wed Oct 28 09:31:02 2009
New Revision: 68803

Modified:
   pypy/branch/logging/pypy/jit/metainterp/logger.py
   pypy/branch/logging/pypy/jit/metainterp/test/oparser.py
   pypy/branch/logging/pypy/jit/metainterp/test/test_oparser.py
Log:
Rename ConstClass into ConstAddr.  It can be much more than
a class -- e.g. it can be a function pointer.


Modified: pypy/branch/logging/pypy/jit/metainterp/logger.py
==============================================================================
--- pypy/branch/logging/pypy/jit/metainterp/logger.py	(original)
+++ pypy/branch/logging/pypy/jit/metainterp/logger.py	Wed Oct 28 09:31:02 2009
@@ -66,7 +66,7 @@
         elif isinstance(arg, BoxFloat):
             return 'f' + str(mv)
         elif isinstance(arg, self.ts.ConstAddr):
-            return 'ConstClass(cls' + str(mv) + ')'
+            return 'ConstAddr(adr' + str(mv) + ')'
         else:
             return '?'
 

Modified: pypy/branch/logging/pypy/jit/metainterp/test/oparser.py
==============================================================================
--- pypy/branch/logging/pypy/jit/metainterp/test/oparser.py	(original)
+++ pypy/branch/logging/pypy/jit/metainterp/test/oparser.py	Wed Oct 28 09:31:02 2009
@@ -147,8 +147,8 @@
                 info = arg.strip("'\"")
                 return ConstPtr(lltype.cast_opaque_ptr(llmemory.GCREF,
                                                        llstr(info)))
-            if arg.startswith('ConstClass('):
-                name = arg[len('ConstClass('):-1]
+            if arg.startswith('ConstAddr('):
+                name = arg[len('ConstAddr('):-1]
                 return self.get_const(name, 'class')
             elif arg == 'None':
                 return None
@@ -160,6 +160,9 @@
             elif arg.startswith('ConstPtr('):
                 name = arg[len('ConstPtr('):-1]
                 return self.get_const(name, 'ptr')
+            elif arg.startswith('ConstClass('):      # compatibility
+                name = arg[len('ConstClass('):-1]
+                return self.get_const(name, 'class')
             return self.vars[arg]
 
     def parse_op(self, line):

Modified: pypy/branch/logging/pypy/jit/metainterp/test/test_oparser.py
==============================================================================
--- pypy/branch/logging/pypy/jit/metainterp/test/test_oparser.py	(original)
+++ pypy/branch/logging/pypy/jit/metainterp/test/test_oparser.py	Wed Oct 28 09:31:02 2009
@@ -165,10 +165,10 @@
 # Loop0 (loop), 12 ops
 [i0, i1]
 debug_merge_point('(no jitdriver.get_printable_location!)')
-i3 = call(ConstClass(cls2), i0, descr=<Descr object at 0xb18a86c>)
+i3 = call(ConstAddr(adr2), i0, descr=<Descr object at 0xb18a86c>)
 guard_no_exception(, descr=<Guard5>) [i0, i1, i3]
 i5 = int_add(i1, 2)
-i7 = call(ConstClass(cls6), i0, descr=<Descr object at 0xb18a86c>)
+i7 = call(ConstAddr(adr6), i0, descr=<Descr object at 0xb18a86c>)
 p9 = guard_exception(4, descr=<Guard6>) [i5, i0, i7]
 i11 = int_sub(i5, 1)
 i12 = int_sub(i0, 1)
@@ -179,10 +179,10 @@
 # Loop1 (entry bridge), 12 ops
 [i0, i1]
 debug_merge_point('(no jitdriver.get_printable_location!)')
-i3 = call(ConstClass(cls2), i0, descr=<Descr object at 0xb18a86c>)
+i3 = call(ConstAddr(adr2), i0, descr=<Descr object at 0xb18a86c>)
 p5 = guard_exception(4, descr=<Guard8>) [i0, i1, i3]
 i7 = int_add(i1, 1)
-i9 = call(ConstClass(cls8), i0, descr=<Descr object at 0xb18a86c>)
+i9 = call(ConstAddr(adr8), i0, descr=<Descr object at 0xb18a86c>)
 p11 = guard_exception(4, descr=<Guard9>) [i7, i0, i9]
 i12 = int_sub(i7, 1)
 i13 = int_sub(i0, 1)
@@ -194,7 +194,7 @@
 [i0, i1, i2]
 p4 = guard_exception(4, descr=<Guard11>) [i0, i1, i2]
 i6 = int_add(i1, 1)
-i8 = call(ConstClass(cls7), i0, descr=<Descr object at 0xb18a86c>)
+i8 = call(ConstAddr(adr7), i0, descr=<Descr object at 0xb18a86c>)
 p10 = guard_exception(4, descr=<Guard12>) [i6, i0, i8]
 i11 = int_sub(i6, 1)
 i12 = int_sub(i0, 1)



More information about the Pypy-commit mailing list