Commits

Armin Rigo committed 9c8785b

Rename the 'dont_inline' flag to '_dont_inline_' for better
consistency.

Comments (0)

Files changed (13)

pypy/interpreter/pyopcode.py

         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)
         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)))

pypy/module/thread/test/test_ll_thread.py

         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()

pypy/module/thread/test/test_lock.py

         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

pypy/rpython/extfunc.py

                         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().

pypy/rpython/memory/gc/generation.py

             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

pypy/rpython/memory/gc/marksweep.py

         #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):
         #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):
         #                 '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,
         #                 '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

pypy/rpython/memory/gc/semispace.py

         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

pypy/rpython/memory/support.py

             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:

pypy/rpython/microbench/microbench.py

 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,

pypy/translator/backendopt/inline.py

                     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":
                     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)

pypy/translator/c/test/test_newgc.py

             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)
             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()
             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)
             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)
         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)
             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)

pypy/translator/goal/targetlbench.py

         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])

pypy/translator/stackless/code.py

         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