summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-04-12 06:52:27 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-04-12 06:52:27 (GMT)
commit3f76b7e6e465a7109f78d499996246d8de26f6a8 (patch)
tree35559f013b6e4196dca9caa4b7c32e4bbed972ad
parent660cc77abb561233c30f375310cec67211e4bacb (diff)
downloadcpython-3f76b7e6e465a7109f78d499996246d8de26f6a8.zip
cpython-3f76b7e6e465a7109f78d499996246d8de26f6a8.tar.gz
cpython-3f76b7e6e465a7109f78d499996246d8de26f6a8.tar.bz2
Fix unpackSequence() to use _nameOp() rather than LOAD_FAST
-rw-r--r--Lib/compiler/pycodegen.py3
-rw-r--r--Tools/compiler/compiler/pycodegen.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/Lib/compiler/pycodegen.py b/Lib/compiler/pycodegen.py
index 444b065..c0bbed3 100644
--- a/Lib/compiler/pycodegen.py
+++ b/Lib/compiler/pycodegen.py
@@ -1117,7 +1117,7 @@ class AbstractFunctionCode:
if type(elt) == types.TupleType:
self.unpackSequence(elt)
else:
- self.emit('STORE_FAST', elt)
+ self._nameOp('STORE', elt)
unpackTuple = unpackSequence
@@ -1153,6 +1153,7 @@ class AbstractClassCode:
self.setDocstring(klass.doc)
def _nameOp(self, prefix, name):
+ # Class namespaces are always unoptimized
self.emit(prefix + '_NAME', name)
def finish(self):
diff --git a/Tools/compiler/compiler/pycodegen.py b/Tools/compiler/compiler/pycodegen.py
index 444b065..c0bbed3 100644
--- a/Tools/compiler/compiler/pycodegen.py
+++ b/Tools/compiler/compiler/pycodegen.py
@@ -1117,7 +1117,7 @@ class AbstractFunctionCode:
if type(elt) == types.TupleType:
self.unpackSequence(elt)
else:
- self.emit('STORE_FAST', elt)
+ self._nameOp('STORE', elt)
unpackTuple = unpackSequence
@@ -1153,6 +1153,7 @@ class AbstractClassCode:
self.setDocstring(klass.doc)
def _nameOp(self, prefix, name):
+ # Class namespaces are always unoptimized
self.emit(prefix + '_NAME', name)
def finish(self):