[pypy-svn] r49853 - in pypy/dist/pypy: interpreter module/thread/test rpython rpython/memory rpython/memory/gc rpython/microbench translator/backendopt translator/c/test translator/goal translator/stackless

arigo at codespeak.net arigo at codespeak.net
Sun Dec 16 18:14:16 CET 2007


Author: arigo
Date: Sun Dec 16 18:14:15 2007
New Revision: 49853

Modified:
   pypy/dist/pypy/interpreter/pyopcode.py
   pypy/dist/pypy/module/thread/test/test_ll_thread.py
   pypy/dist/pypy/module/thread/test/test_lock.py
   pypy/dist/pypy/rpython/extfunc.py
   pypy/dist/pypy/rpython/memory/gc/generation.py
   pypy/dist/pypy/rpython/memory/gc/marksweep.py
   pypy/dist/pypy/rpython/memory/gc/semispace.py
   pypy/dist/pypy/rpython/memory/support.py
   pypy/dist/pypy/rpython/microbench/microbench.py
   pypy/dist/pypy/translator/backendopt/inline.py
   pypy/dist/pypy/translator/c/test/test_newgc.py
   pypy/dist/pypy/translator/goal/targetlbench.py
   pypy/dist/pypy/translator/stackless/code.py
Log:
Rename the 'dont_inline' flag to '_dont_inline_' for better
consistency.


Modified: pypy/dist/pypy/interpreter/pyopcode.py
==============================================================================
--- pypy/dist/pypy/interpreter/pyopcode.py	(original)
+++ pypy/dist/pypy/interpreter/pyopcode.py	Sun Dec 16 18:14:15 2007
@@ -291,7 +291,7 @@
         varname = f.getlocalvarname(varindex)
         message = "local variable '%s' referenced before assignment" % varname
         raise OperationError(f.space.w_UnboundLocalError, f.space.wrap(message))
-    _load_fast_failed.dont_inline = True
+    _load_fast_failed._dont_inline_ = True
 
     def LOAD_CONST(f, constindex, *ignored):
         w_const = f.getconstant_w(constindex)
@@ -653,7 +653,7 @@
         message = "global name '%s' is not defined" % varname
         raise OperationError(f.space.w_NameError,
                              f.space.wrap(message))
-    _load_global_failed.dont_inline = True
+    _load_global_failed._dont_inline_ = True
 
     def LOAD_GLOBAL(f, nameindex, *ignored):
         f.pushvalue(f._load_global(f.getname_w(nameindex)))

Modified: pypy/dist/pypy/module/thread/test/test_ll_thread.py
==============================================================================
--- pypy/dist/pypy/module/thread/test/test_ll_thread.py	(original)
+++ pypy/dist/pypy/module/thread/test/test_ll_thread.py	Sun Dec 16 18:14:15 2007
@@ -63,7 +63,7 @@
         y = Y()
         y.z = Z(i)
         start_new_thread(Y.bootstrap, (y,))
-    g.dont_inline = True
+    g._dont_inline_ = True
 
     def f():
         main_ident = get_ident()

Modified: pypy/dist/pypy/module/thread/test/test_lock.py
==============================================================================
--- pypy/dist/pypy/module/thread/test/test_lock.py	(original)
+++ pypy/dist/pypy/module/thread/test/test_lock.py	Sun Dec 16 18:14:15 2007
@@ -41,7 +41,7 @@
         ok3 = l.acquire(False)
         res = ok1 and not ok2 and ok3
         return res
-    g.dont_inline = True
+    g._dont_inline_ = True
     def f():
         res = g()
         # the lock must have been freed by now - we use refcounting

Modified: pypy/dist/pypy/rpython/extfunc.py
==============================================================================
--- pypy/dist/pypy/rpython/extfunc.py	(original)
+++ pypy/dist/pypy/rpython/extfunc.py	Sun Dec 16 18:14:15 2007
@@ -192,7 +192,7 @@
                         return original_impl(*args)
                 impl = func_with_new_name(ll_wrapper, name + '_wrapper')
             if rtyper.annotator.translator.config.translation.sandbox:
-                impl.dont_inline = True
+                impl._dont_inline_ = True
             # store some attributes to the 'impl' function, where
             # the eventual call to rtyper.getcallable() will find them
             # and transfer them to the final lltype.functionptr().

Modified: pypy/dist/pypy/rpython/memory/gc/generation.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/gc/generation.py	(original)
+++ pypy/dist/pypy/rpython/memory/gc/generation.py	Sun Dec 16 18:14:15 2007
@@ -312,4 +312,4 @@
             oldhdr.tid &= ~GCFLAG_NO_YOUNG_PTRS
         if oldhdr.tid & GCFLAG_NO_HEAP_PTRS:
             self.move_to_static_roots(addr_struct)
-    remember_young_pointer.dont_inline = True
+    remember_young_pointer._dont_inline_ = True

Modified: pypy/dist/pypy/rpython/memory/gc/marksweep.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/gc/marksweep.py	(original)
+++ pypy/dist/pypy/rpython/memory/gc/marksweep.py	Sun Dec 16 18:14:15 2007
@@ -102,7 +102,7 @@
         #llop.debug_print(lltype.Void, 'malloc typeid', typeid,
         #                 '->', llmemory.cast_adr_to_int(result))
         return llmemory.cast_adr_to_ptr(result, llmemory.GCREF)
-    malloc_fixedsize.dont_inline = True
+    malloc_fixedsize._dont_inline_ = True
 
     def malloc_fixedsize_clear(self, typeid, size, can_collect,
                                has_finalizer=False, contains_weakptr=False):
@@ -136,7 +136,7 @@
         #llop.debug_print(lltype.Void, 'malloc typeid', typeid,
         #                 '->', llmemory.cast_adr_to_int(result))
         return llmemory.cast_adr_to_ptr(result, llmemory.GCREF)
-    malloc_fixedsize_clear.dont_inline = True
+    malloc_fixedsize_clear._dont_inline_ = True
 
     def malloc_varsize(self, typeid, length, size, itemsize, offset_to_length,
                        can_collect, has_finalizer=False):
@@ -171,7 +171,7 @@
         #                 'typeid', typeid,
         #                 '->', llmemory.cast_adr_to_int(result))
         return llmemory.cast_adr_to_ptr(result, llmemory.GCREF)
-    malloc_varsize.dont_inline = True
+    malloc_varsize._dont_inline_ = True
 
     def malloc_varsize_clear(self, typeid, length, size, itemsize,
                              offset_to_length, can_collect,
@@ -208,7 +208,7 @@
         #                 'typeid', typeid,
         #                 '->', llmemory.cast_adr_to_int(result))
         return llmemory.cast_adr_to_ptr(result, llmemory.GCREF)
-    malloc_varsize_clear.dont_inline = True
+    malloc_varsize_clear._dont_inline_ = True
 
     def collect(self):
         # 1. mark from the roots, and also the objects that objects-with-del

Modified: pypy/dist/pypy/rpython/memory/gc/semispace.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/gc/semispace.py	(original)
+++ pypy/dist/pypy/rpython/memory/gc/semispace.py	Sun Dec 16 18:14:15 2007
@@ -107,7 +107,7 @@
         if not self.try_obtain_free_space(needed):
             raise memoryError
         return self.free
-    obtain_free_space.dont_inline = True
+    obtain_free_space._dont_inline_ = True
 
     def try_obtain_free_space(self, needed):
         # XXX for bonus points do big objects differently

Modified: pypy/dist/pypy/rpython/memory/support.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/support.py	(original)
+++ pypy/dist/pypy/rpython/memory/support.py	Sun Dec 16 18:14:15 2007
@@ -47,14 +47,14 @@
             new.length = 0
             self.chunk = new
             return new
-        enlarge.dont_inline = True
+        enlarge._dont_inline_ = True
 
         def shrink(self):
             old = self.chunk
             self.chunk = old.previous
             unused_chunks.put(old)
             return self.chunk
-        shrink.dont_inline = True
+        shrink._dont_inline_ = True
 
         def append(self, addr):
             if addr == llmemory.NULL:

Modified: pypy/dist/pypy/rpython/microbench/microbench.py
==============================================================================
--- pypy/dist/pypy/rpython/microbench/microbench.py	(original)
+++ pypy/dist/pypy/rpython/microbench/microbench.py	Sun Dec 16 18:14:15 2007
@@ -11,7 +11,7 @@
 class MetaBench(type):
     def __new__(self, cls_name, bases, cls_dict):
         loop = cls_dict['loop']
-        loop.dont_inline = True
+        loop._dont_inline_ = True
         myglob = {
             'init': cls_dict['init'],
             'loop': loop,

Modified: pypy/dist/pypy/translator/backendopt/inline.py
==============================================================================
--- pypy/dist/pypy/translator/backendopt/inline.py	(original)
+++ pypy/dist/pypy/translator/backendopt/inline.py	Sun Dec 16 18:14:15 2007
@@ -634,7 +634,7 @@
                     graph = getattr(funcobj, 'graph', None)
                     if graph is not None:
                         if getattr(getattr(funcobj, '_callable', None),
-                                   'dont_inline', False):
+                                   '_dont_inline_', False):
                             continue
                         result.append((parentgraph, graph))
                 if op.opname == "oosend":
@@ -666,7 +666,7 @@
                     graph = getattr(funcobj, 'graph', None)
                     if graph is not None:
                         if getattr(getattr(funcobj, '_callable', None),
-                                   'dont_inline', False):
+                                   '_dont_inline_', False):
                             continue
                     if candidate(graph):
                         tag = Constant('inline', Void)

Modified: pypy/dist/pypy/translator/c/test/test_newgc.py
==============================================================================
--- pypy/dist/pypy/translator/c/test/test_newgc.py	(original)
+++ pypy/dist/pypy/translator/c/test/test_newgc.py	Sun Dec 16 18:14:15 2007
@@ -298,7 +298,7 @@
             a = A()
             a.b = g(1)
             return a
-        make.dont_inline = True
+        make._dont_inline_ = True
         def f():
             a = make()
             llop.gc__collect(lltype.Void)
@@ -316,7 +316,7 @@
             pass
         def g(x): # cause a collect
             llop.gc__collect(lltype.Void)
-        g.dont_inline = True
+        g._dont_inline_ = True
         global_a = A()
         global_a.b = B()
         global_a.b.a = A()
@@ -330,7 +330,7 @@
             g(1)
             b0 = a.b
             b0.c = b.c = 42
-        make.dont_inline = True
+        make._dont_inline_ = True
         def f():
             make()
             llop.gc__collect(lltype.Void)
@@ -356,7 +356,7 @@
             for i in range(1000):
                 prepare(B(), -1)    # probably overwrites collected memory
             return a.value
-        g.dont_inline = True
+        g._dont_inline_ = True
         def f():
             b = B()
             prepare(b, 123)
@@ -420,7 +420,7 @@
         a.x = None
         def make():
             a.x = A(42)
-        make.dont_inline = True
+        make._dont_inline_ = True
         def f():
             make()
             llop.gc__collect(lltype.Void)
@@ -481,12 +481,12 @@
             a = lltype.malloc(A)
             a.value = -n * 7
             return lltype.cast_opaque_ptr(lltype.Ptr(O), a)
-        gethidden.dont_inline = True
+        gethidden._dont_inline_ = True
         def reveal(o):
             return lltype.cast_opaque_ptr(lltype.Ptr(A), o)
         def overwrite(a, i):
             a.value = i
-        overwrite.dont_inline = True
+        overwrite._dont_inline_ = True
         def f():
             o = gethidden(10)
             llop.gc__collect(lltype.Void)

Modified: pypy/dist/pypy/translator/goal/targetlbench.py
==============================================================================
--- pypy/dist/pypy/translator/goal/targetlbench.py	(original)
+++ pypy/dist/pypy/translator/goal/targetlbench.py	Sun Dec 16 18:14:15 2007
@@ -16,7 +16,7 @@
         for i in range(x):
             a.append(i)
     return 0
-longername.dont_inline = True
+longername._dont_inline_ = True
 
 def entry_point(argv):
     size = int(argv[1])

Modified: pypy/dist/pypy/translator/stackless/code.py
==============================================================================
--- pypy/dist/pypy/translator/stackless/code.py	(original)
+++ pypy/dist/pypy/translator/stackless/code.py	Sun Dec 16 18:14:15 2007
@@ -310,7 +310,7 @@
         fn = llmemory.cast_adr_to_ptr(fnaddr, FUNCTYPE)
         return fn()
     call_function_retval_xyz.stackless_explicit = True
-    call_function_retval_xyz.dont_inline = True
+    call_function_retval_xyz._dont_inline_ = True
     fnname = 'call_function_retval_' + typename
     fn = func_with_new_name(call_function_retval_xyz, fnname)
     globals()[fnname] = fn



More information about the Pypy-commit mailing list