[pypy-commit] pypy kill-someobject: Remove another pyobj usage.

alex_gaynor noreply at buildbot.pypy.org
Sun Oct 7 18:27:36 CEST 2012


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: kill-someobject
Changeset: r57827:0425059c3e0e
Date: 2012-10-07 18:26 +0200
http://bitbucket.org/pypy/pypy/changeset/0425059c3e0e/

Log:	Remove another pyobj usage.

diff --git a/pypy/rpython/ootypesystem/rdict.py b/pypy/rpython/ootypesystem/rdict.py
--- a/pypy/rpython/ootypesystem/rdict.py
+++ b/pypy/rpython/ootypesystem/rdict.py
@@ -7,6 +7,8 @@
 from pypy.rpython.ootypesystem import ootype
 from pypy.rlib import objectmodel
 from pypy.rpython import rmodel, llinterp
+# This is needed by other things, don't remove!
+from pypy.rpython.rdict import rtype_newdict
 
 
 class DictRepr(AbstractDictRepr):
diff --git a/pypy/rpython/rdict.py b/pypy/rpython/rdict.py
--- a/pypy/rpython/rdict.py
+++ b/pypy/rpython/rdict.py
@@ -1,10 +1,5 @@
-from pypy.tool.pairtype import pairtype
 from pypy.annotation import model as annmodel
-from pypy.objspace.flow.model import Constant
 from pypy.rpython.lltypesystem import lltype
-from pypy.rlib.rarithmetic import r_uint
-from pypy.rlib.objectmodel import hlinvoke
-from pypy.rlib import objectmodel
 from pypy.rpython import rmodel
 
 
@@ -58,9 +53,6 @@
 def rtype_newdict(hop):
     hop.inputargs()    # no arguments expected
     r_dict = hop.r_result
-    if r_dict == robject.pyobj_repr: # special case: SomeObject: SomeObject dicts!
-        cdict = hop.inputconst(robject.pyobj_repr, dict)
-        return hop.genop('simple_call', [cdict], resulttype = robject.pyobj_repr)
     cDICT = hop.inputconst(lltype.Void, r_dict.DICT)
     v_result = hop.gendirectcall(hop.rtyper.type_system.rdict.ll_newdict, cDICT)
     return v_result
diff --git a/pypy/translator/interactive.py b/pypy/translator/interactive.py
--- a/pypy/translator/interactive.py
+++ b/pypy/translator/interactive.py
@@ -1,9 +1,7 @@
-import optparse
-
-import autopath
 from pypy.translator.translator import TranslationContext
 from pypy.translator import driver
 
+
 DEFAULTS = {
   'translation.backend': None,
   'translation.type_system': None,


More information about the pypy-commit mailing list