Commit Graph

529 Commits

Author SHA1 Message Date
Sahil Jain
e8e10f1419 Parse exception table 2025-07-15 22:47:02 +05:30
Michael Hansen
a267bfb47f Merge pull request #561 from whoami730/bug-fix
Fix bug in RAISE_VARARGS
2025-07-04 12:41:02 -07:00
Sahil Jain
8b0ea9450e Fix RAISE_VARARGS bug 2025-07-04 19:16:04 +05:30
Michael Hansen
7d2039d24e Merge pull request #557 from whoami730/new-opcodes
Support py 3.12 opcodes: part 2
2025-07-02 07:58:23 -07:00
Michael Hansen
e64ea4bdec Merge branch 'master' into new-opcodes 2025-07-02 07:56:28 -07:00
Michael Hansen
4badfa6321 Merge pull request #555 from whoami730/master
Support py 3.12 opcodes: part 1
2025-07-02 07:51:36 -07:00
Sahil Jain
6e0089e01c Update 2025-07-01 22:52:59 +05:30
Sahil Jain
3afcfbc6a7 Fix compilation error 2025-07-01 14:01:05 +05:30
Sahil Jain
aa292c7682 Add newlines 2025-07-01 09:27:07 +05:30
Sahil Jain
5fe61462a2 Support COPY opcde 2025-07-01 09:25:49 +05:30
Sahil Jain
ad5f39db56 Support SLICE opcodes 2025-07-01 09:24:53 +05:30
Sahil Jain
97ec04789d Add JUMP_BACKWARD + CACHE comments 2025-07-01 09:22:57 +05:30
Sahil Jain
6dae4e801f Remove COPY opcode 2025-07-01 09:22:57 +05:30
Sahil Jain
040732920b Add comment 2025-07-01 09:22:57 +05:30
Sahil Jain
a93fd14672 Add new loop tests 2025-07-01 09:22:57 +05:30
Sahil Jain
a4a6a24f3e Support END_FOR opcode 2025-07-01 09:22:56 +05:30
Michael Hansen
307e0b8fd7 Update to upload-artifact/v4 to fix CI 2025-06-30 19:21:38 -07:00
Michael Hansen
5e1c4037a9 Merge pull request #522 from samyk/report-invalid-opcode
show INVALID opcode properly if < 0
2024-10-13 09:54:24 -07:00
samy kamkar
bbc19885f4 show INVALID opcode properly if < 0 2024-10-12 13:45:16 -07:00
Michael Hansen
dc6ca4ae36 Remove additional specialized opcode that wasn't ordered with the others 2024-08-12 11:39:36 -07:00
Michael Hansen
19f8372358 Remove specialized opcodes.
They are used at runtime, and not written to .pyc / .pyo objects.
2024-08-12 11:24:07 -07:00
Michael Hansen
f37caa8f2a Test runner refactor (#508)
* Port test runner script to Python.

This allows us to keep the test output in sorted order while still running the
tests in parallel.  It also now defaults to using the number of available CPU
threads for parallel execution, rather than the previously hard-coded default.

* Also port decompyle_test.sh script to python within run_tests.py

* Fix cmake check target for multi-config generators.

Adds testing of release builds on both MSVC and GCC.

* Fix diff comparisons on Windows

* Ubuntu runners don't have ninja by default
2024-08-08 15:55:35 -07:00
Michael Hansen
b939aeb87c Update operand documentation for new opcodes and oparg changes.
Also extends the disassembly oparg decoding for new 3.13 additions.
2024-08-07 15:44:36 -07:00
Alex
75de28decc Python 3.13 initial support (#497)
* Support for JUMP_BACKWARD

* Initial support for Python 3.13

* Remove opcode from another old PR, not needed in the current one

* Update bytes/python_3_13.cpp

Co-authored-by: Michael Hansen <zrax0111@gmail.com>

* Update bytecode_ops.inl

Co-authored-by: Michael Hansen <zrax0111@gmail.com>

* Update .gitignore

Co-authored-by: Michael Hansen <zrax0111@gmail.com>

* Update bytecode_ops.inl

---------

Co-authored-by: Michael Hansen <zrax0111@gmail.com>
2024-08-07 15:39:40 -07:00
Michael Hansen
48d1bfa59f Fix a null dereference.
Fixes #486
2024-08-06 08:21:12 -07:00
Alex
cb32b581ee Add one more missed flag: CO_ASYNC_GENERATOR (#505)
* Support for JUMP_BACKWARD

* Add missed flag CO_ASYNC_GENERATOR

* Revert "Support for JUMP_BACKWARD"

This reverts commit 81543ece8c481b6e6b0f5724d8aa6766d3dcb8ae.
2024-08-05 12:35:10 -07:00
Michael Hansen
c925dafcdf Also update the disassembly output to match the new flag values 2024-08-04 12:55:35 -07:00
Michael Hansen
0942dec653 Adjust CO_FUTURE_ flags to match Python 3.8 changes, and add some missing flags
Fixes #504
2024-08-04 12:55:28 -07:00
Michael Hansen
0b45b5fa07 Fix FORMAT_VALUE for values that have both a conversion and a format_spec.
Also output the conversion and flags in disassembly.
2024-08-01 13:28:43 -07:00
easyz
6ad3ceb67e Add support for swap bytecode and simple WITH_EXCEPT_START bytecode support. (#488)
* Modify .gitignore

* Added support for SWAP and WITH_EXCEPT_START, WITH_EXCEPT_START is simply added on top of SETUP_WITH_A so that it works properly.

* Resolve the warning about comparing size_t and int.

* Revert "Resolve the warning about comparing size_t and int."

This reverts commit 54dfe36629855ca557277572d307dacaf6a64fe9.

* Reapply "Resolve the warning about comparing size_t and int."

This reverts commit d21d1681ed6496856ea65151e5fd798f0a718416.

* Modify decompyle_test.sh

* Modify .gitignore

* Fix the logic error by placing the assignment inside the tuple

* Re-adding test files

* Fixing redundant brackets

* Add support for swap bytecode and simple WITH_EXCEPT_START bytecode support.

* Clean up some formatting issues

---------

Co-authored-by: Michael Hansen <zrax0111@gmail.com>
2024-06-23 11:59:30 -07:00
Michael Hansen
b9f3d145bb Merge pull request #490 from Levak/levak/tests-parallel
Run tests in parallel or only some with a filter
2024-06-23 11:49:06 -07:00
Michael Hansen
462fc46424 Add JOBS parameter to GH workflows (currently default, but not guaranteed)
... and fix missing newline at EOF
2024-06-23 11:46:17 -07:00
Michael Hansen
d10c47af1e Add some tests for #492 2024-06-23 11:36:20 -07:00
Michael Hansen
ed49554b79 Merge pull request #492 from Levak/levak/fix_long_numeric
Fix Long Numeric Integer representation for Python 3
2024-06-23 11:35:10 -07:00
Levak Borok
2ae7f58a26 Fix Long Numeric Integer representation for Python 3
Before Python 3, long integers were input with an L suffix. Since
Python 3, all integers are 64-bit and do not need the L suffix.
2024-06-22 23:19:18 +02:00
Levak Borok
d8f955d692 Run tests in parallel or only some with a filter
`make check JOBS=4` will spawn 4 workers and spread the tests among them.
`make check FILTER=try` will only run tests that contain `try` in their name.
2024-06-19 17:56:06 +02:00
Michael Hansen
513e03c883 Remove unnecessary template parameter in destructor. Fixes #487 2024-05-30 14:56:07 -07:00
Michael Hansen
6467c2cc52 Merge pull request #469 from greenozon/master
Fix for Centos6/7 compilation issues
2024-03-12 15:56:16 -07:00
Alex
8367a8e0ab Return back a fix for Centos6/7 compilation issues not related to shadow ones 2024-03-12 22:58:43 +02:00
Alex
fd80a359c7 Restore changes for shadow warnings... 2024-03-12 22:55:56 +02:00
Alex
ba91ff2de5 Revert shadow changes and add option -Wno-error=shadow to cmakefile 2024-03-12 22:40:50 +02:00
Alex
68a697dfc1 Revert "Fix for Centos6/7 compilation issues"
This reverts commit f80b662f77.
2024-03-12 22:38:03 +02:00
Alex
ce439a67bb Return back -Wshadow compiler option into non-Windows envs 2024-03-11 22:51:17 +02:00
Alex
6bae7e6df5 Fix unhappy MSVC compiler on special toekens 2024-03-11 22:43:26 +02:00
Alex
28fdb904a0 Prefer the parameters be renamed and this warning (-Wshadow) kept to make GCC happy 2024-03-11 22:24:40 +02:00
Alex
f80b662f77 Fix for Centos6/7 compilation issues 2024-03-08 14:27:36 +02:00
Michael Hansen
1f30136e21 Merge branch 'master' of github.com:ncaklovic/pycdc 2024-02-28 15:43:58 -08:00
Michael Hansen
8e48bf2194 Merge pull request #462 from greenozon/master
Aligning some opcodes for Python 3.11, 3.12: LOAD_GLOBAL, LOAD_ATTR
2024-02-28 15:40:02 -08:00
ncaklovic
32c1ca10bb Update ASTree.cpp
Co-authored-by: Michael Hansen <zrax0111@gmail.com>
2024-02-28 12:34:32 +01:00
ncaklovic
28b62b6534 Update bytecode.cpp
Co-authored-by: Michael Hansen <zrax0111@gmail.com>
2024-02-28 12:34:15 +01:00