Commit Graph

535 Commits

Author SHA1 Message Date
352d14ec82 fix: type hints, match 2025-03-26 15:10:12 +08:00
e7397945d3 feat: file format detection, single file mode v0.1.0 2025-03-25 23:47:21 +08:00
48cab893c9 ci: build workflow 2025-03-15 23:26:59 +08:00
64df67ac8a fix: temp patch for robustness 2025-03-15 22:35:38 +08:00
d9e00c3762 docs: update readme 2025-03-07 11:08:08 +08:00
1d5b35a9d6 fix: py3.12 py3.13 limited support v0.0.1 2025-03-07 00:10:45 +08:00
d88944b832 fix: py3.8 limited support 2025-03-06 14:55:22 +08:00
dc5d2b95e0 fix: py3.11 limited support 2025-03-05 20:07:46 +08:00
c3f9db22c1 fix: py3.10 limited support 2025-03-05 18:08:18 +08:00
7d0e38e9cf chore: interact & quality 2025-03-05 10:41:09 +08:00
c66529938f fix: type hints (GH-2) 2025-03-04 21:22:56 +08:00
a3bf6aa443 chore: do not treat warnings as errors 2025-03-04 20:02:27 +08:00
Suyun114
3aaae62400 fix: use cast to avoid warnings 2025-03-04 19:34:16 +08:00
832f35413b feat: mix str for disasm 2025-03-02 23:48:24 +08:00
6465cf03fe wip: executable 2025-03-02 22:42:04 +08:00
87b83d754a wip: ast! :) 2025-03-02 21:39:14 +08:00
69bb088847 fix: wrong xor key offset, remove redeclaration 2025-03-01 17:27:06 +08:00
93ad403e99 wip: co_code 2025-03-01 15:25:03 +08:00
dacfd29c02 wip: co_flags 2025-02-28 16:56:15 +08:00
21785687b6 wip: fulfill co_code aes nonce xor key calculate 2025-02-28 14:38:42 +08:00
5f66aa8d25 wip: co_code aes nonce xor key calculate 2025-02-28 00:39:00 +08:00
2cab8c4c92 wip: header parsing 2025-02-27 16:10:30 +08:00
79e22e193a wip: extract data 2025-02-27 14:01:14 +08: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