Profiling workarounds, more coverage ...

test/Makefile: more grammar checking. Update python versions
10_del.pyc add test of DEL_GLOBAL

check_ast.py, pysource.py: Profileing workarounds
This commit is contained in:
rocky
2017-11-15 03:16:54 -05:00
parent 9a141a3144
commit 63a43d0c93
9 changed files with 24 additions and 2 deletions

View File

@@ -2239,6 +2239,10 @@ def deparse_code(version, co, out=sys.stdout, showasm=None, showast=False,
isTopLevel = co.co_name == '<module>'
deparsed.ast = deparsed.build_ast(tokens, customize, isTopLevel=isTopLevel)
#### XXX workaround for profiling
if deparsed.ast is None:
return None
assert deparsed.ast == 'stmts', 'Should have parsed grammar start'
del tokens # save memory