Files

37 lines
1.0 KiB
C
Raw Permalink Normal View History

2011-10-23 17:48:10 -07:00
#include "pyc_code.h"
#include "pyc_module.h"
2009-07-26 10:07:13 +00:00
#include "data.h"
2009-07-24 08:35:21 +00:00
namespace Pyc {
2009-07-24 08:35:21 +00:00
enum Opcode {
#define OPCODE(x) x,
#define OPCODE_A_FIRST(x) PYC_HAVE_ARG, x##_A = PYC_HAVE_ARG,
#define OPCODE_A(x) x##_A,
#include "bytecode_ops.inl"
#undef OPCODE_A
#undef OPCODE_A_FIRST
#undef OPCODE
PYC_LAST_OPCODE,
PYC_INVALID_OPCODE = -1,
2009-07-24 08:35:21 +00:00
};
enum DisassemblyFlags {
DISASM_PYCODE_VERBOSE = 0x1,
DISASM_SHOW_CACHES = 0x2,
};
const char* OpcodeName(int opcode);
int ByteToOpcode(int maj, int min, int opcode);
2009-07-24 08:35:21 +00:00
}
void print_const(std::ostream& pyc_output, PycRef<PycObject> obj, PycModule* mod,
2025-03-02 23:48:24 +08:00
const char* parent_f_string_quote = nullptr, bool das_decrypt_print = false);
2009-07-26 10:07:13 +00:00
void bc_next(PycBuffer& source, PycModule* mod, int& opcode, int& operand, int& pos);
void bc_disasm(std::ostream& pyc_output, PycRef<PycCode> code, PycModule* mod,
int indent, unsigned flags);
2025-07-15 22:33:30 +05:30
void bc_exceptiontable(std::ostream& pyc_output, PycRef<PycCode> code,
int indent);