Rizin
unix-like reverse engineering framework and cli tools
opcode_36.c File Reference
#include "opcode.h"

Go to the source code of this file.

Functions

pyc_opcodesopcode_36 (void)
 

Function Documentation

◆ opcode_36()

pyc_opcodes* opcode_36 ( void  )

Definition at line 6 of file opcode_36.c.

6  {
7  pyc_opcodes *ret = opcode_35();
8  if (!ret) {
9  return NULL;
10  }
11 
12  ret->version_sig = (void *(*)())opcode_36;
13 
14  // These are removed since Python 3.6
15  rm_op(.op_obj = ret->opcodes, .op_name = "MAKE_CLOSURE", .op_code = 134);
16  rm_op(.op_obj = ret->opcodes, .op_name = "CALL_FUNCTION_VAR", .op_code = 140);
17  rm_op(.op_obj = ret->opcodes, .op_name = "CALL_FUNCTION_VAR_KW", .op_code = 142);
18 
19  // These are new since Python 3.6
20  store_op00(.op_obj = ret->opcodes, .op_name = "STORE_ANNOTATION", .op_code = 127, .func = NAME_OP); // Index in name list
21  jrel_op(.op_obj = ret->opcodes, .op_name = "SETUP_ASYNC_WITH", .op_code = 154);
22  def_op(.op_obj = ret->opcodes, .op_name = "FORMAT_VALUE", .op_code = 155);
23  varargs_op(.op_obj = ret->opcodes, .op_name = "BUILD_CONST_KEY_MAP", .op_code = 156, .pop = -1, .push = 1); // TOS is count of kwargs
24  nargs_op(.op_obj = ret->opcodes, .op_name = "CALL_FUNCTION_EX", .op_code = 142, .pop = -1, .push = 1);
25  def_op(.op_obj = ret->opcodes, .op_name = "SETUP_ANNOTATIONS", .op_code = 85);
26  def_op(.op_obj = ret->opcodes, .op_name = "BUILD_STRING", .op_code = 157);
27  varargs_op(.op_obj = ret->opcodes, .op_name = "BUILD_TUPLE_UNPACK_WITH_CALL", .op_code = 158);
28 
30  add_arg_fmt(ret, "CALL_FUNCTION_KW", format_CALL_FUNCTION_KW_36);
31  add_arg_fmt(ret, "CALL_FUNCTION_EX", format_CALL_FUNCTION_EX_36);
32  add_arg_fmt(ret, "MAKE_FUNCTION", format_MAKE_FUNCTION_arg_36);
33  add_arg_fmt(ret, "FORMAT_VALUE", format_value_flags_36);
34  add_arg_fmt(ret, "EXTENDED_ARG", format_extended_arg_36);
35 
36  return ret;
37 }
#define NULL
Definition: cris-opc.c:27
RZ_API void rz_list_purge(RZ_NONNULL RzList *list)
Empties the list without freeing the list pointer.
Definition: list.c:120
void add_arg_fmt(pyc_opcodes *ret, char *op_name, const char *(*formatter)(ut32 oparg))
Definition: opcode.c:234
pyc_opcodes * opcode_36(void)
Definition: opcode_36.c:6
#define nargs_op(...)
Definition: opcode.h:171
const char * format_MAKE_FUNCTION_arg_36(ut32 oparg)
const char * format_CALL_FUNCTION_KW_36(ut32 oparg)
const char * format_extended_arg_36(ut32 oparg)
#define varargs_op(...)
Definition: opcode.h:149
#define store_op00(...)
Definition: opcode.h:144
#define jrel_op(...)
Definition: opcode.h:168
#define def_op(...)
Definition: opcode.h:127
#define rm_op(...)
Definition: opcode.h:175
@ NAME_OP
Definition: opcode.h:31
pyc_opcodes * opcode_35(void)
Definition: opcode_35.c:6
const char * format_CALL_FUNCTION_EX_36(ut32 oparg)
const char * format_value_flags_36(ut32 oparg)
char * op_name
Definition: opcode.h:38
void *(* version_sig)()
Definition: opcode.h:49
pyc_opcode_object * opcodes
Definition: opcode.h:51
RzList * opcode_arg_fmt
Definition: opcode.h:50

References add_arg_fmt(), def_op, format_CALL_FUNCTION_EX_36(), format_CALL_FUNCTION_KW_36(), format_extended_arg_36(), format_MAKE_FUNCTION_arg_36(), format_value_flags_36(), jrel_op, NAME_OP, nargs_op, NULL, pyc_opcode_object::op_name, opcode_35(), opcode_36(), pyc_opcodes::opcode_arg_fmt, pyc_opcodes::opcodes, rm_op, rz_list_purge(), store_op00, varargs_op, and pyc_opcodes::version_sig.

Referenced by opcode_36(), and opcode_37().