[pypy-commit] pypy default: remove dead code (plus some random import cleanup)

alex_gaynor noreply at buildbot.pypy.org
Sat Dec 1 22:06:55 CET 2012


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: 
Changeset: r59187:2c343bdf8b7c
Date: 2012-12-01 13:06 -0800
http://bitbucket.org/pypy/pypy/changeset/2c343bdf8b7c/

Log:	remove dead code (plus some random import cleanup)

diff --git a/pypy/objspace/fake/checkmodule.py b/pypy/objspace/fake/checkmodule.py
--- a/pypy/objspace/fake/checkmodule.py
+++ b/pypy/objspace/fake/checkmodule.py
@@ -12,4 +12,4 @@
         for name in module.loaders:
             module._load_lazily(space, name)
     #
-    space.translates(**{'translation.list_comprehension_operations':True})
+    space.translates(**{'translation.list_comprehension_operations': True})
diff --git a/pypy/objspace/fake/objspace.py b/pypy/objspace/fake/objspace.py
--- a/pypy/objspace/fake/objspace.py
+++ b/pypy/objspace/fake/objspace.py
@@ -1,17 +1,15 @@
-from pypy.interpreter.baseobjspace import W_Root, ObjSpace
-from pypy.interpreter.baseobjspace import Wrappable, SpaceCache
+from pypy.annotation.model import SomeInstance, s_None
 from pypy.interpreter import argument, gateway
+from pypy.interpreter.baseobjspace import W_Root, ObjSpace, Wrappable, SpaceCache
 from pypy.interpreter.typedef import TypeDef, GetSetProperty
-from pypy.annotation.model import SomeInstance, s_None
-from pypy.rpython.extregistry import ExtRegistryEntry
-from pypy.rpython.lltypesystem import lltype
-from pypy.tool.sourcetools import compile2, func_with_new_name
-from pypy.rlib.unroll import unrolling_iterable
 from pypy.rlib.objectmodel import instantiate, we_are_translated
 from pypy.rlib.nonconst import NonConstant
 from pypy.rlib.rarithmetic import r_uint, r_singlefloat
+from pypy.rpython.extregistry import ExtRegistryEntry
+from pypy.rpython.lltypesystem import lltype
+from pypy.tool.option import make_config
+from pypy.tool.sourcetools import compile2, func_with_new_name
 from pypy.translator.translator import TranslationContext
-from pypy.tool.option import make_config
 
 
 class W_MyObject(Wrappable):
diff --git a/pypy/objspace/std/frame.py b/pypy/objspace/std/frame.py
--- a/pypy/objspace/std/frame.py
+++ b/pypy/objspace/std/frame.py
@@ -115,42 +115,3 @@
     if space.config.objspace.std.optimized_comparison_op:
         StdObjSpaceFrame.COMPARE_OP = fast_COMPARE_OP
     return StdObjSpaceFrame
-
-
-def get_logging():
-    for name, func in pyframe.PyFrame.__dict__.iteritems():
-        if hasattr(func, 'binop'):
-            operationname = func.binop
-            def make_opimpl(operationname):
-                def opimpl(f, *ignored):
-                    operation = getattr(f.space, operationname)
-                    w_2 = f.popvalue()
-                    w_1 = f.popvalue()
-                    if we_are_translated():
-                        s = operationname + ' ' + str(w_1) + ' ' + str(w_2)
-                    else:
-                        names = (w_1.__class__.__name__ + ' ' +
-                                 w_2.__class__.__name__)
-                        s = operationname + ' ' + names
-                    f._space_op_types.append(s)
-                    w_result = operation(w_1, w_2)
-                    f.pushvalue(w_result)
-                return func_with_new_name(opimpl,
-                                          "opcode_impl_for_%s" % operationname)
-            yield name, make_opimpl(operationname)
-        elif hasattr(func, 'unaryop'):
-            operationname = func.unaryop
-            def make_opimpl(operationname):
-                def opimpl(f, *ignored):
-                    operation = getattr(f.space, operationname)
-                    w_1 = f.popvalue()
-                    if we_are_translated():
-                        s = operationname + ' ' + str(w_1)
-                    else:
-                        s = operationname + ' ' + w_1.__class__.__name__
-                    f._space_op_types.append(s)
-                    w_result = operation(w_1)
-                    f.pushvalue(w_result)
-                return func_with_new_name(opimpl,
-                                          "opcode_impl_for_%s" % operationname)
-            yield name, make_opimpl(operationname)


More information about the pypy-commit mailing list