Author: Ronan Lamy <[email protected]>
Branch: no-class-specialize
Changeset: r80224:d734e4d41935
Date: 2015-10-14 21:20 +0100
http://bitbucket.org/pypy/pypy/changeset/d734e4d41935/
Log: fix PyPy translation
diff --git a/pypy/module/_minimal_curses/interp_curses.py
b/pypy/module/_minimal_curses/interp_curses.py
--- a/pypy/module/_minimal_curses/interp_curses.py
+++ b/pypy/module/_minimal_curses/interp_curses.py
@@ -13,7 +13,7 @@
def __init__(self, msg):
self.msg = msg
-from rpython.annotator.description import FORCE_ATTRIBUTES_INTO_CLASSES
+from rpython.annotator.classdesc import FORCE_ATTRIBUTES_INTO_CLASSES
from rpython.annotator.model import SomeString
# this is necessary due to annmixlevel
diff --git a/pypy/tool/ann_override.py b/pypy/tool/ann_override.py
--- a/pypy/tool/ann_override.py
+++ b/pypy/tool/ann_override.py
@@ -2,6 +2,7 @@
from rpython.annotator.policy import AnnotatorPolicy
from rpython.flowspace.model import Constant
from rpython.annotator import specialize
+from rpython.annotator.classdesc import InstanceSource, ClassDef
@@ -20,7 +21,6 @@
def specialize__wrap(self, funcdesc, args_s):
from pypy.interpreter.baseobjspace import W_Root
- from rpython.annotator.classdef import ClassDef
W_Root_def = funcdesc.bookkeeper.getuniqueclassdef(W_Root)
typ = args_s[1].knowntype
if isinstance(typ, ClassDef):
@@ -73,7 +73,6 @@
return False
def consider_lookup(self, bookkeeper, attr):
- from rpython.annotator.classdef import InstanceSource
assert attr not in self.lookups
from pypy.objspace.std import typeobject
cached = "cached_%s" % attr
@@ -88,7 +87,6 @@
self.lookups[attr] = True
def consider_lookup_in_type_where(self, bookkeeper, attr):
- from rpython.annotator.classdef import InstanceSource
assert attr not in self.lookups_where
from pypy.objspace.std import typeobject
cached = "cached_where_%s" % attr
@@ -135,7 +133,6 @@
def event(self, bookkeeper, what, x):
from pypy.objspace.std import typeobject
if isinstance(x, typeobject.W_TypeObject):
- from rpython.annotator.classdef import InstanceSource
clsdef = bookkeeper.getuniqueclassdef(typeobject.W_TypeObject)
self.pypytypes[x] = True
#print "TYPE", x
diff --git a/rpython/translator/tool/graphpage.py
b/rpython/translator/tool/graphpage.py
--- a/rpython/translator/tool/graphpage.py
+++ b/rpython/translator/tool/graphpage.py
@@ -3,7 +3,7 @@
from rpython.translator.tool.make_dot import DotGen, make_dot_graphs
from rpython.annotator.model import SomePBC
from rpython.annotator.description import MethodDesc
-from rpython.annotator.classdef import ClassDef
+from rpython.annotator.classdesc import ClassDef
from rpython.tool.uid import uid
from rpython.tool.udir import udir
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit