Author: Ronan Lamy <[email protected]>
Branch: translation-cleanup
Changeset: r58007:cee5218b458b
Date: 2012-10-11 05:40 +0100
http://bitbucket.org/pypy/pypy/changeset/cee5218b458b/
Log: Kill HostCode.co_cellvars
diff --git a/pypy/objspace/flow/bytecode.py b/pypy/objspace/flow/bytecode.py
--- a/pypy/objspace/flow/bytecode.py
+++ b/pypy/objspace/flow/bytecode.py
@@ -19,7 +19,7 @@
def __init__(self, argcount, nlocals, stacksize, flags,
code, consts, names, varnames, filename,
- name, firstlineno, lnotab, freevars, cellvars):
+ name, firstlineno, lnotab, freevars):
"""Initialize a new code object"""
self.co_name = name
assert nlocals >= 0
@@ -32,7 +32,6 @@
self.names = names
self.co_varnames = varnames
self.co_freevars = freevars
- self.co_cellvars = cellvars
self.co_filename = filename
self.co_name = name
self.co_firstlineno = firstlineno
@@ -55,8 +54,7 @@
code.co_name,
code.co_firstlineno,
code.co_lnotab,
- list(code.co_freevars),
- list(code.co_cellvars))
+ list(code.co_freevars))
@property
def formalargcount(self):
@@ -73,7 +71,7 @@
if len(closure) != len(self.co_freevars):
raise ValueError("code object received a closure with "
"an unexpected number of free variables")
- return [Cell() for _ in self.co_cellvars] + closure
+ return closure
def read(self, pos):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit