Add bytecode 1.4 small tests

Many bugs in 1.4 exist. For a future release
This commit is contained in:
rocky
2018-05-19 11:31:23 -04:00
parent e5f3d803a8
commit a9515c7aab
11 changed files with 20 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
PHONY=check clean dist distclean test test-unit test-functional rmChangeLog clean_pyc nosetests \ PHONY=check clean dist distclean test test-unit test-functional rmChangeLog clean_pyc nosetests \
check-bytecode-1.5 check-bytecode-1 check-bytecode-2 check-bytecode-3 \ check-bytecode-1 check-bytecode-1.4 check-bytecode-1.5 \
check-bytecode-2 check-bytecode-3 \
check-bytecode-2.2 check-byteocde-2.3 check-bytecode-2.4 \ check-bytecode-2.2 check-byteocde-2.3 check-bytecode-2.4 \
check-short check-2.6 check-2.7 check-3.0 check-3.1 check-3.2 check-3.3 \ check-short check-2.6 check-2.7 check-3.0 check-3.1 check-3.2 check-3.3 \
check-3.4 check-3.5 check-3.6 check-3.7 check-5.6 5.6 5.8 \ check-3.4 check-3.5 check-3.6 check-3.7 check-5.6 5.6 5.8 \
@@ -76,7 +77,7 @@ check-disasm:
$(PYTHON) dis-compare.py $(PYTHON) dis-compare.py
#: Check deparsing bytecode 1.x only #: Check deparsing bytecode 1.x only
check-bytecode-1: check-bytecode-1.5 check-bytecode-1: check-bytecode-1.4 check-bytecode-1.5
#: Check deparsing bytecode 2.x only #: Check deparsing bytecode 2.x only
check-bytecode-2: check-bytecode-2:
@@ -93,11 +94,17 @@ check-bytecode-3:
#: Check deparsing bytecode that works running Python 2 and Python 3 #: Check deparsing bytecode that works running Python 2 and Python 3
check-bytecode: check-bytecode-3 check-bytecode: check-bytecode-3
$(PYTHON) test_pythonlib.py \ $(PYTHON) test_pythonlib.py \
--bytecode-1.4 --bytecode-1.5 \
--bytecode-2.2 --bytecode-2.3 --bytecode-2.4 \
--bytecode-2.1 --bytecode-2.2 --bytecode-2.3 --bytecode-2.4 \ --bytecode-2.1 --bytecode-2.2 --bytecode-2.3 --bytecode-2.4 \
--bytecode-2.5 --bytecode-2.6 --bytecode-2.7 \ --bytecode-2.5 --bytecode-2.6 --bytecode-2.7 \
--bytecode-pypy2.7 --bytecode-pypy2.7
#: Check deparsing bytecode 1.4 only
check-bytecode-1.4:
$(PYTHON) test_pythonlib.py --bytecode-1.4
#: Check deparsing bytecode 1.5 only #: Check deparsing bytecode 1.5 only
check-bytecode-1.5: check-bytecode-1.5:
$(PYTHON) test_pythonlib.py --bytecode-1.5 $(PYTHON) test_pythonlib.py --bytecode-1.5

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -78,7 +78,7 @@ for vers in (2.7, 3.4, 3.5, 3.6):
test_options[key] = (os.path.join(src_dir, pythonlib), PYOC, key, vers) test_options[key] = (os.path.join(src_dir, pythonlib), PYOC, key, vers)
pass pass
for vers in (1.5, for vers in (1.4, 1.5,
2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7,
3.0, 3.1, 3.2, 3.3, 3.0, 3.1, 3.2, 3.3,
3.4, 3.5, 3.6, 3.7, 'pypy3.2', 'pypy2.7'): 3.4, 3.5, 3.6, 3.7, 'pypy3.2', 'pypy2.7'):

View File

@@ -12,6 +12,7 @@ class Python14Parser(Python15Parser):
# RAISE_EXCEPTION, BUILD_FUNCTION, UNPACK_ARG, UNPACK_VARARG, LOAD_LOCAL, # RAISE_EXCEPTION, BUILD_FUNCTION, UNPACK_ARG, UNPACK_VARARG, LOAD_LOCAL,
# SET_FUNC_ARGS, and RESERVE_FAST # SET_FUNC_ARGS, and RESERVE_FAST
""" """
def __init__(self, debug_parser=PARSER_DEFAULT_DEBUG): def __init__(self, debug_parser=PARSER_DEFAULT_DEBUG):
super(Python14Parser, self).__init__(debug_parser) super(Python14Parser, self).__init__(debug_parser)
self.customized = {} self.customized = {}

View File

@@ -25,3 +25,12 @@ class Scanner14(scan.Scanner15):
self.version = 1.4 self.version = 1.4
self.genexpr_name = '<generator expression>' self.genexpr_name = '<generator expression>'
return return
# def ingest22(self, co, classname=None, code_objects={}, show_asm=None):
# tokens, customize = self.parent_ingest(co, classname, code_objects, show_asm)
# tokens = [t for t in tokens if t.kind != 'SET_LINENO']
# # for t in tokens:
# # print(t)
return tokens, customize