[pypy-commit] pypy translation-cleanup: Flowspacify STORE_GLOBAL
rlamy
noreply at buildbot.pypy.org
Tue Oct 16 16:18:30 CEST 2012
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: translation-cleanup
Changeset: r58139:f790da70aa4e
Date: 2012-10-16 15:18 +0100
http://bitbucket.org/pypy/pypy/changeset/f790da70aa4e/
Log: Flowspacify STORE_GLOBAL
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
@@ -759,6 +759,11 @@
assert w_newvalue is not None
self.locals_stack_w[varindex] = w_newvalue
+ def STORE_GLOBAL(self, nameindex, next_instr):
+ varname = self.getname_u(nameindex)
+ raise FlowingError(self,
+ "Attempting to modify global variable %r." % (varname))
+
def BUILD_LIST_FROM_ARG(self, _, next_instr):
# This opcode was added with pypy-1.8. Here is a simpler
# version, enough for annotation.
More information about the pypy-commit
mailing list