Author: Ronan Lamy <[email protected]>
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.
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit