diff --git a/ASTree.cpp b/ASTree.cpp index e6e6c7e..3542921 100644 --- a/ASTree.cpp +++ b/ASTree.cpp @@ -1820,8 +1820,6 @@ PycRef BuildFromCode(PycRef code, PycModule* mod) blocks.pop(); curblock = blocks.top(); curblock->append(prev.cast()); - - bc_next(source, mod, opcode, operand, pos); } } break; diff --git a/tests/compiled/test_raise_varargs.3.12.pyc b/tests/compiled/test_raise_varargs.3.12.pyc new file mode 100644 index 0000000..0f5a2c9 Binary files /dev/null and b/tests/compiled/test_raise_varargs.3.12.pyc differ diff --git a/tests/input/test_raise_varargs.py b/tests/input/test_raise_varargs.py new file mode 100644 index 0000000..d0cf568 --- /dev/null +++ b/tests/input/test_raise_varargs.py @@ -0,0 +1,7 @@ +import struct + +def bytes_to_words(b): + '''Convert a byte string (little-endian) to a list of 32-bit words.''' + if len(b) % 4 != 0: + raise ValueError('Input bytes length must be a multiple of 4 for word conversion.') + return struct.unpack('<' + 'I' * (len(b) // 4), b) diff --git a/tests/tokenized/test_raise_varargs.txt b/tests/tokenized/test_raise_varargs.txt new file mode 100644 index 0000000..1ef0b67 --- /dev/null +++ b/tests/tokenized/test_raise_varargs.txt @@ -0,0 +1,9 @@ +import struct +def bytes_to_words ( b ) : + +'Convert a byte string (little-endian) to a list of 32-bit words.' +if len ( b ) % 4 != 0 : + +raise ValueError ( 'Input bytes length must be a multiple of 4 for word conversion.' ) + +return struct . unpack ( '<' + 'I' * ( len ( b ) // 4 ) , b )