Commit Graph

526 Commits

Author SHA1 Message Date
Michael Hansen
0710ea07f1 Fix missing includes, which fixes build on GCC 13+ 2023-05-07 13:28:10 -07:00
Michael Hansen
c8156739f1 Merge pull request #344 from seashell11234455/master
Fix unicode string display bug
2023-04-27 08:51:58 -07:00
FeO3
006b3e4bbc Fix unicode string display bug 2023-04-27 20:40:06 +08:00
Dre Cura
a04b6c0258 Merge branch 'zrax:master' into master 2023-04-24 17:37:18 -04:00
Michael Hansen
2e76e56420 Fixup unrelated changes from PR 2023-02-28 15:49:12 -08:00
TheHellTower
4d81a16638 Add PUSH_NULL, PRECALL_A, CALL_A support (#324)
* Add `PUSH_NULL`, `PRECALL_A`, `CALL_A` support

* feat: @zrax

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

* Good suggested change to make the code shorter

* Add `PUSH_NULL`, `PRECALL`, `CALL` test tokenized

* Add `PUSH_NULL`, `PRECALL`, `CALL` test

* Add `PUSH_NULL`, `PRECALL`, `CALL` test compiled

* Delete push_null-precall-call.3.11.pyc

* Delete push_null-precall-call.py

* Delete push_null-precall-call.txt

* Update README.markdown

Blank commit to re-run the tests.

* Join all no-ops/"fake"-ops together

* Update ASTree.cpp

https://github.com/zrax/pycdc/pull/324#issuecomment-1449049283

* Add compiled test for #324

---------

Co-authored-by: Michael Hansen <zrax0111@gmail.com>
2023-02-28 15:48:33 -08:00
Michael Hansen
f4db6a7cf6 Update CodeQL configuration 2023-02-27 13:12:11 -08:00
Michael Hansen
e922c1c224 Merge pull request #325 from zrax/test_calls
Add unit test for basic function calls (py3)
2023-02-27 12:04:36 -08:00
Michael Hansen
9f747e188c Add unit test for basic function calls (py3) 2023-02-27 11:59:01 -08:00
kako57
db92811da8 Added extra rules for operator precedence 2023-02-21 19:40:54 -05:00
Michael Hansen
00d436f87d Reduce code duplication between PycSet/PycTuple/PycList 2023-02-16 22:10:44 -08:00
Michael Hansen
1fcbf4cd4b Keep PycSet objects marshalled from files in order too 2023-02-16 22:01:31 -08:00
Michael Hansen
ded8adfba2 Merge pull request #319 from Ace314159/add-set-ops
Implement BUILD_SET and SET_UPDATE
2023-02-16 21:52:42 -08:00
Akash Munagala
ca73f05830 Print out frozenset in disasm too 2023-02-13 19:33:25 -08:00
Akash Munagala
80e835e197 Properly output frozenset object in pycdas 2023-02-13 19:26:30 -08:00
Akash Munagala
f00921d3d3 Use deque instead of set 2023-02-13 19:25:45 -08:00
Akash Munagala
66c46661d9 Add test 2023-02-12 17:01:37 -08:00
Akash Munagala
aaad868445 Implement BUILD_SET and SET_UPDATE 2023-02-12 16:21:20 -08:00
Michael Hansen
a6de2209fc Add simple_const tests for Python 3.8-3.11, and handle Python 3.11 RESUME opcode 2023-01-24 10:25:10 -08:00
Michael Hansen
60e4eb6316 Handle CACHE instructions in decompyle, and suppress them in disassembly by default.
Showing CACHE instructions and the extra PyCode fields in pycdas is now
controlled by command-line arguments.
2023-01-19 14:50:55 -08:00
Michael Hansen
5d855f0bd2 Fix LOAD_GLOBAL and cell var references in Python 3.11+ 2023-01-19 13:05:06 -08:00
Michael Hansen
379c0c94d0 Merge <3.11 VarNames and >=3.11 Locals+Names into a single variable for simplicity.
Also cleans up some extra verbose output by making extra PyCode fields optional
2023-01-19 11:32:07 -08:00
Michael Hansen
dfb0a976c5 Add additional Code object fields to disassembly output. 2023-01-19 11:32:07 -08:00
Michael Hansen
9f1d0f2a21 Add basic opcode (disassembly) support for Python 3.11 2023-01-19 11:32:07 -08:00
TheHellTower
a3e5ebd481 Add GET_YIELD_FROM_ITER support (#312) 2023-01-19 10:51:08 -08:00
Michael Hansen
3c129a1128 Merge pull request #311 from zrax/upload_artifact
Upload artifacts from Windows build
2023-01-18 13:28:57 -08:00
Michael Hansen
fb4dfa3fdc Upload artifacts from Windows build 2023-01-18 13:19:28 -08:00
Michael Hansen
2075a4ac1f Fix CI failure -- these need to remain in the original order 2022-12-02 14:16:18 -08:00
Michael Hansen
ffeabc3d3f Make cast() checked by default and add try_cast() for cases where a cast
is not required to be successful.
2022-12-01 16:13:31 -08:00
Michael Hansen
305494c4b2 Fix unintentional method shadowing in ASTAnnotatedVar 2022-12-01 16:03:09 -08:00
Michael Hansen
e623e9ac56 For String Refs, inherit the type of the reffed string object. 2022-12-01 11:42:31 -08:00
Michael Hansen
93495c3bfb Reduce unnecessary uses of std::list 2022-12-01 11:35:14 -08:00
Michael Hansen
863e09e9e7 Remove unnecessary Latin-1 conversion code -- PyUnicode ASCII is 7-bit. 2022-11-30 15:05:29 -08:00
Michael Hansen
44a730f3a8 Merge pull request #285 from zrax/simplify_marshal_version
Simplify and improve version setting for marshalled code objects
2022-10-04 15:24:38 -07:00
Michael Hansen
747921a761 Adjust to reduce duplication 2022-10-04 15:19:15 -07:00
Michael Hansen
e2db195b85 Merge from #267 2022-10-04 15:18:35 -07:00
Michael Hansen
8590d67d29 Simplify and improve version setting for marshalled code objects:
* Use a simpler check for validity -- the reverse magic number mapping was
  unnecessary and missed some cases (2.2, 3.2).
* Set the version directly after it is checked for validity.
* Fix unicode flag setting on Python 3.x.
2022-10-04 14:51:23 -07:00
Michael Hansen
6373459830 Merge pull request #283 from DarkGuySM/master
Update README.markdown
2022-10-02 09:31:17 -07:00
DarkGuySM
6cffd49799 Update README.markdown
Corrected spelling mistake.
2022-10-02 15:44:29 +05:30
Michael Hansen
4951905f83 Remove dead code from a previous version of this block.
Fixes #282
2022-09-30 10:07:44 -07:00
Michael Hansen
1b59ea5cd8 Merge pull request #270 from ahaensler/for-loops-v3.8
3.8: parse for loops and fix ternary ifs
2022-07-31 17:09:47 -07:00
Adrian Haensler
5758634f81 support three digit versions in tests 2022-07-30 00:07:38 -05:00
Adrian Haensler
deebbb044d add a test 2022-07-30 00:02:47 -05:00
Adrian Haensler
462260991e fix for loops in 3.8 2022-07-08 20:25:13 -05:00
Adrian Haensler
882571c599 some fixes for 3.9 2022-07-08 17:45:07 -05:00
TrollerOfHolland
25497aabb3 ASTree.cpp bugfix on line 1757, preventing error 'front called on empty vector' 2022-06-23 01:16:41 +02:00
Michael Hansen
b0ce84234a Merge pull request #265 from clubby789/code-obj-support
Code obj support
2022-06-16 09:45:00 -07:00
clubby789
942193e88b Style changes 2022-06-16 12:49:04 +01:00
clubby789
1750e9cb8a Note code object support in readme 2022-06-15 11:37:07 +01:00
clubby789
dc50479d06 Add support for pycdas/pycdc using marshalled code objects
These requires the Python version to be specified as the Pyc header
magic is not present.
2022-06-15 11:33:11 +01:00