[pypy-commit] pypy translation-cleanup: Flowspacify LOAD_ATTR and kill FlowObjSpace.config
rlamy
noreply at buildbot.pypy.org
Sat Sep 29 01:09:34 CEST 2012
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: translation-cleanup
Changeset: r57641:6cb7e857c34f
Date: 2012-09-28 07:14 +0100
http://bitbucket.org/pypy/pypy/changeset/6cb7e857c34f/
Log: Flowspacify LOAD_ATTR and kill FlowObjSpace.config
diff --git a/pypy/objspace/flow/flowcontext.py b/pypy/objspace/flow/flowcontext.py
--- a/pypy/objspace/flow/flowcontext.py
+++ b/pypy/objspace/flow/flowcontext.py
@@ -714,6 +714,14 @@
w_result = self.space.find_global(self.w_globals, self.getname_u(nameindex))
self.pushvalue(w_result)
+ def LOAD_ATTR(self, nameindex, next_instr):
+ "obj.attributename"
+ w_obj = self.popvalue()
+ w_attributename = self.getname_w(nameindex)
+ w_value = self.space.getattr(w_obj, w_attributename)
+ self.pushvalue(w_value)
+ LOOKUP_METHOD = LOAD_ATTR
+
def BUILD_LIST_FROM_ARG(self, _, next_instr):
# This opcode was added with pypy-1.8. Here is a simpler
# version, enough for annotation.
diff --git a/pypy/objspace/flow/objspace.py b/pypy/objspace/flow/objspace.py
--- a/pypy/objspace/flow/objspace.py
+++ b/pypy/objspace/flow/objspace.py
@@ -45,11 +45,6 @@
(the bytecode of) some function.
"""
def __init__(self, config=None):
- if config is None:
- from pypy.config.pypyoption import get_pypy_config
- config = get_pypy_config(translating=False)
- self.config = config
-
self.w_None = Constant(None)
self.builtin = Constant(__builtin__)
self.sys = Constant(sys)
More information about the pypy-commit
mailing list