Michael Hansen
21c35b2f4c
Simplify PycDict key/value storage a bit
2023-11-09 15:05:55 -08:00
Michael Hansen
9b384ad1fa
Add basic bytecode and disassembly support for Python 3.12
2023-11-09 12:17:03 -08:00
Michael Hansen
d62c8adf89
Merge branch '3_11-support-for-new-opcodes' of https://github.com/TiZCrocodile/pycdc
2023-08-26 10:58:37 -07:00
Michael Hansen
f5c1d4262b
Move comment closer to where it applies, plus some formatting consistency
2023-08-19 21:24:03 -07:00
Roman Avdeenko
916103179c
Fix LOAD_GLOBAL_A operand printing for versions prior to 3.11
2023-08-19 17:43:04 +03:00
MrDakik
da859f5a2b
Added support for opcodes: (in DESC)
...
`KW_NAMES`
`POP_JUMP_FORWARD_IF_FALSE`
`POP_JUMP_FORWARD_IF_TRUE`
`LOAD_GLOBAL`
2023-07-18 18:33:03 +03:00
Michael Hansen
753d42d94a
Simplify string object printing to reduce code duplication
2023-06-09 09:09:03 -07:00
Michael Hansen
bf3599c87a
Move some output stream parameters forward.
...
This allows us to avoid removing parameter defaults for these functions.
2023-06-05 13:56:25 -07:00
Perceval Wajsbürt
c4c35fc531
Use C++ streams over C style IO
2023-06-02 01:12:59 +02:00
Michael Hansen
ee934a1e99
Show binary ops from Python 3.11 in disassembly
2023-05-30 14:45:22 -07:00
Michael Hansen
0710ea07f1
Fix missing includes, which fixes build on GCC 13+
2023-05-07 13:28:10 -07:00
Akash Munagala
ca73f05830
Print out frozenset in disasm too
2023-02-13 19:33:25 -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
9f1d0f2a21
Add basic opcode (disassembly) support for Python 3.11
2023-01-19 11:32:07 -08:00
Michael Hansen
e623e9ac56
For String Refs, inherit the type of the reffed string object.
2022-12-01 11:42:31 -08:00
Adrian Haensler
882571c599
some fixes for 3.9
2022-07-08 17:45:07 -05:00
Nenad Čaklović
3039d8b410
Disassembler changes in 3.10 under BPO-27129
2022-03-24 22:06:35 +01:00
GawdOfROFL
e4e3a9f4ed
added python 3.10 support
2021-10-10 00:52:41 +05:30
Michael Hansen
6140b4b33e
Protect against out of range lookups in pycdas
...
Fixes #198.
2021-08-16 15:25:16 +00:00
Michael Hansen
56e549640f
Fix format-truncation warning in bytecode.cpp
2021-04-12 10:12:45 -07:00
Michael Hansen
568867c80a
Minor style adjustments
2020-10-20 21:08:02 -07:00
Aralox
0c9fbd9caf
Issue-165 Added support for f-strings (literal string interpolation https://www.python.org/dev/peps/pep-0498/ )
...
Opcodes handled: FORMAT_VALUE, BUILD_STRING.
Added AST node classes for FormattedValue and JoinedStr.
2020-10-17 20:52:57 +11:00
John Richards
ed11ba3fe4
Refactors how we handle NaN and infinity
...
The previous approach didn't work properly under MSVC. The wrong
output would be produced for NaN values.
This new approach will directly print out "nan" and "inf" with the
appropriate sign, rather than just wrapping the value in float('').
2020-10-15 21:35:19 -04:00
John Richards
870ecdc430
Handle NaN and infinity values
...
Right now, NaN/infinity values will produce "nan" and "inf", but
Python doesn't allow those in source code. This change will wrap
those values in float(''), which is allowed.
Tests for Python 2.7 and 3.8 have been added as well.
Fixes #136
2020-10-15 21:04:57 -04:00
Michael Hansen
8460d119fd
Add bytecode support for Python 3.9 rc2
2020-09-29 09:28:15 -07:00
Michael Hansen
428d11c4b5
Add bytecode and disassembly support for Python 3.8.
...
Also fixes running pymultic from outside of its source directory.
2019-10-14 14:48:26 -07:00
Michael Hansen
8014ac2b14
Print unicode as default in Python 2.x when CO_FUTURE_UNICODE_LITERALS
...
is set.
Fixes #141.
2019-10-06 14:34:24 -07:00
Michael Hansen
5c896fa743
Clean up some loops with range-based for.
2019-10-04 15:56:24 -07:00
Michael Hansen
a9a362254e
Use fputs instead of fprintf when no formatting is required
2018-01-28 15:37:44 -08:00
Michael Hansen
98ad031109
Add initial 3.7 alpha support, and fix 3.6 opcode map
2017-12-20 13:49:28 -08:00
Michael Hansen
b9dd99d518
Don't create special objects for NULL, just use NULL directly.
...
Also move null check into PycRef for nullable references.
2017-07-05 16:36:04 -07:00
Michael Hansen
6a9d6a6132
Update bytecode for Python 3.6 beta3, and use a common file for opcode names
2016-11-08 16:00:56 -08:00
Michael Hansen
5ee15c890c
Fix display of cell vars
2016-09-07 18:22:49 -07:00
Michael Hansen
35e74d0e6e
Show jump target on FOR_ITER instructions
2016-09-07 18:22:22 -07:00
Michael Hansen
4b55e0bcea
Fix '...' missing in output
2016-08-30 13:32:53 -07:00
Dirk Faust
159c0c91f6
fix: conversion
2016-07-28 09:48:17 +02:00
Maxim
221ccdb67a
size_t instead of ssize_t
2016-07-27 15:15:19 +03:00
Maxim
ed96c41005
Fix build with msvc
2016-07-27 14:00:17 +03:00
Michael Hansen
7701ed420e
Make the comparison ops a bit more visually distinct
2016-07-15 13:37:50 -07:00
Fabien Siron
5936171e7a
Add comparison argument to disassembly output
2016-07-10 19:45:29 +00:00
Michael Hansen
605d064fe7
Initial support for Python 3.6 disassembly
2016-06-22 22:06:09 -07:00
Michael Hansen
5fae3e2d1f
Add Python 3.5 disassembly support
2015-10-01 16:06:09 -07:00
Michael Hansen
820397f9bf
Interned strings and ASCII literals are always in the native format
2014-01-21 00:47:11 -08:00
Michael Hansen
176a049a68
Support new marshal types from Python 3.4
2014-01-21 00:42:37 -08:00
Michael Hansen
6ecbcfb564
Add documentation and initial framework for Python 3.4 support
2013-11-27 14:10:05 -08:00
Michael Hansen
ad03ec3034
Fixes for large operands (> 0x7fff). Closes #34
2013-08-06 22:16:28 -07:00
Michael Hansen
50657fb984
Preview of Python 3.3 support
2012-05-26 14:09:52 -07:00
Michael Hansen
f030a77767
Allow for output file override
2011-10-23 19:04:06 -07:00