summaryrefslogtreecommitdiffstats
path: root/Lib/compiler/pyassem.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2000-10-12 20:23:23 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2000-10-12 20:23:23 (GMT)
commit4e1be72e6babf857d9f263b087dae3123ac8efe1 (patch)
tree893b3b47a6a83f4beaaa1d31636ea98a0e1a6b01 /Lib/compiler/pyassem.py
parentbabe326c65a3d00c0f236628a17e39df81bcf13d (diff)
downloadcpython-4e1be72e6babf857d9f263b087dae3123ac8efe1.zip
cpython-4e1be72e6babf857d9f263b087dae3123ac8efe1.tar.gz
cpython-4e1be72e6babf857d9f263b087dae3123ac8efe1.tar.bz2
Fix SF bug #116263: support for from .. import *
transformer.py: return '*', None from com_import_as_name pycodegen.py: special case for name == '*' pyassem.py: fix stack counting for IMPORT_ opcodes
Diffstat (limited to 'Lib/compiler/pyassem.py')
-rw-r--r--Lib/compiler/pyassem.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/compiler/pyassem.py b/Lib/compiler/pyassem.py
index 74ea562..3411273 100644
--- a/Lib/compiler/pyassem.py
+++ b/Lib/compiler/pyassem.py
@@ -515,12 +515,14 @@ class StackDepthTracker:
'BUILD_MAP': 1,
'COMPARE_OP': -1,
'STORE_FAST': -1,
+ 'IMPORT_STAR': -1,
+ 'IMPORT_NAME': 0,
+ 'IMPORT_FROM': 1,
}
# use pattern match
patterns = [
('BINARY_', -1),
('LOAD_', 1),
- ('IMPORT_', 1),
]
# special cases: