From 3f76b7e6e465a7109f78d499996246d8de26f6a8 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Thu, 12 Apr 2001 06:52:27 +0000 Subject: Fix unpackSequence() to use _nameOp() rather than LOAD_FAST --- Lib/compiler/pycodegen.py | 3 ++- Tools/compiler/compiler/pycodegen.py | 3 ++- 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): -- cgit v0.12