diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-08-28 16:36:12 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-08-28 16:36:12 (GMT) |
commit | 63db7b9ca13cf319aeef9bab4aa107502d3f5907 (patch) | |
tree | 56fb7f432fb67de024e155f619709cebd96ec822 /Tools/compiler | |
parent | f354575328becbdd21a92f0386db6568dcdd8d45 (diff) | |
download | cpython-63db7b9ca13cf319aeef9bab4aa107502d3f5907.zip cpython-63db7b9ca13cf319aeef9bab4aa107502d3f5907.tar.gz cpython-63db7b9ca13cf319aeef9bab4aa107502d3f5907.tar.bz2 |
XXX_NAME ops should affect varnames
varnames should list all the local variables (with arguments first).
The XXX_NAME ops typically occur at the module level and assignment
ops should create locals.
Diffstat (limited to 'Tools/compiler')
-rw-r--r-- | Tools/compiler/compiler/pyassem.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Tools/compiler/compiler/pyassem.py b/Tools/compiler/compiler/pyassem.py index 0684623..3063b5b 100644 --- a/Tools/compiler/compiler/pyassem.py +++ b/Tools/compiler/compiler/pyassem.py @@ -491,9 +491,12 @@ class PyFlowGraph(FlowGraph): _convert_STORE_FAST = _convert_LOAD_FAST _convert_DELETE_FAST = _convert_LOAD_FAST + def _convert_LOAD_NAME(self, arg): + return self._lookupName(arg, self.names) + def _convert_NAME(self, arg): + self._lookupName(arg, self.varnames) return self._lookupName(arg, self.names) - _convert_LOAD_NAME = _convert_NAME _convert_STORE_NAME = _convert_NAME _convert_DELETE_NAME = _convert_NAME _convert_IMPORT_NAME = _convert_NAME |