Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/lib64/python2....
File: opcode.py
[0] Fix | Delete
"""
[1] Fix | Delete
opcode module - potentially shared between dis and other modules which
[2] Fix | Delete
operate on bytecodes (e.g. peephole optimizers).
[3] Fix | Delete
"""
[4] Fix | Delete
[5] Fix | Delete
__all__ = ["cmp_op", "hasconst", "hasname", "hasjrel", "hasjabs",
[6] Fix | Delete
"haslocal", "hascompare", "hasfree", "opname", "opmap",
[7] Fix | Delete
"HAVE_ARGUMENT", "EXTENDED_ARG"]
[8] Fix | Delete
[9] Fix | Delete
cmp_op = ('<', '<=', '==', '!=', '>', '>=', 'in', 'not in', 'is',
[10] Fix | Delete
'is not', 'exception match', 'BAD')
[11] Fix | Delete
[12] Fix | Delete
hasconst = []
[13] Fix | Delete
hasname = []
[14] Fix | Delete
hasjrel = []
[15] Fix | Delete
hasjabs = []
[16] Fix | Delete
haslocal = []
[17] Fix | Delete
hascompare = []
[18] Fix | Delete
hasfree = []
[19] Fix | Delete
[20] Fix | Delete
opmap = {}
[21] Fix | Delete
opname = [''] * 256
[22] Fix | Delete
for op in range(256): opname[op] = '<%r>' % (op,)
[23] Fix | Delete
del op
[24] Fix | Delete
[25] Fix | Delete
def def_op(name, op):
[26] Fix | Delete
opname[op] = name
[27] Fix | Delete
opmap[name] = op
[28] Fix | Delete
[29] Fix | Delete
def name_op(name, op):
[30] Fix | Delete
def_op(name, op)
[31] Fix | Delete
hasname.append(op)
[32] Fix | Delete
[33] Fix | Delete
def jrel_op(name, op):
[34] Fix | Delete
def_op(name, op)
[35] Fix | Delete
hasjrel.append(op)
[36] Fix | Delete
[37] Fix | Delete
def jabs_op(name, op):
[38] Fix | Delete
def_op(name, op)
[39] Fix | Delete
hasjabs.append(op)
[40] Fix | Delete
[41] Fix | Delete
# Instruction opcodes for compiled code
[42] Fix | Delete
# Blank lines correspond to available opcodes
[43] Fix | Delete
[44] Fix | Delete
def_op('STOP_CODE', 0)
[45] Fix | Delete
def_op('POP_TOP', 1)
[46] Fix | Delete
def_op('ROT_TWO', 2)
[47] Fix | Delete
def_op('ROT_THREE', 3)
[48] Fix | Delete
def_op('DUP_TOP', 4)
[49] Fix | Delete
def_op('ROT_FOUR', 5)
[50] Fix | Delete
[51] Fix | Delete
def_op('NOP', 9)
[52] Fix | Delete
def_op('UNARY_POSITIVE', 10)
[53] Fix | Delete
def_op('UNARY_NEGATIVE', 11)
[54] Fix | Delete
def_op('UNARY_NOT', 12)
[55] Fix | Delete
def_op('UNARY_CONVERT', 13)
[56] Fix | Delete
[57] Fix | Delete
def_op('UNARY_INVERT', 15)
[58] Fix | Delete
[59] Fix | Delete
def_op('BINARY_POWER', 19)
[60] Fix | Delete
def_op('BINARY_MULTIPLY', 20)
[61] Fix | Delete
def_op('BINARY_DIVIDE', 21)
[62] Fix | Delete
def_op('BINARY_MODULO', 22)
[63] Fix | Delete
def_op('BINARY_ADD', 23)
[64] Fix | Delete
def_op('BINARY_SUBTRACT', 24)
[65] Fix | Delete
def_op('BINARY_SUBSCR', 25)
[66] Fix | Delete
def_op('BINARY_FLOOR_DIVIDE', 26)
[67] Fix | Delete
def_op('BINARY_TRUE_DIVIDE', 27)
[68] Fix | Delete
def_op('INPLACE_FLOOR_DIVIDE', 28)
[69] Fix | Delete
def_op('INPLACE_TRUE_DIVIDE', 29)
[70] Fix | Delete
def_op('SLICE+0', 30)
[71] Fix | Delete
def_op('SLICE+1', 31)
[72] Fix | Delete
def_op('SLICE+2', 32)
[73] Fix | Delete
def_op('SLICE+3', 33)
[74] Fix | Delete
[75] Fix | Delete
def_op('STORE_SLICE+0', 40)
[76] Fix | Delete
def_op('STORE_SLICE+1', 41)
[77] Fix | Delete
def_op('STORE_SLICE+2', 42)
[78] Fix | Delete
def_op('STORE_SLICE+3', 43)
[79] Fix | Delete
[80] Fix | Delete
def_op('DELETE_SLICE+0', 50)
[81] Fix | Delete
def_op('DELETE_SLICE+1', 51)
[82] Fix | Delete
def_op('DELETE_SLICE+2', 52)
[83] Fix | Delete
def_op('DELETE_SLICE+3', 53)
[84] Fix | Delete
[85] Fix | Delete
def_op('STORE_MAP', 54)
[86] Fix | Delete
def_op('INPLACE_ADD', 55)
[87] Fix | Delete
def_op('INPLACE_SUBTRACT', 56)
[88] Fix | Delete
def_op('INPLACE_MULTIPLY', 57)
[89] Fix | Delete
def_op('INPLACE_DIVIDE', 58)
[90] Fix | Delete
def_op('INPLACE_MODULO', 59)
[91] Fix | Delete
def_op('STORE_SUBSCR', 60)
[92] Fix | Delete
def_op('DELETE_SUBSCR', 61)
[93] Fix | Delete
def_op('BINARY_LSHIFT', 62)
[94] Fix | Delete
def_op('BINARY_RSHIFT', 63)
[95] Fix | Delete
def_op('BINARY_AND', 64)
[96] Fix | Delete
def_op('BINARY_XOR', 65)
[97] Fix | Delete
def_op('BINARY_OR', 66)
[98] Fix | Delete
def_op('INPLACE_POWER', 67)
[99] Fix | Delete
def_op('GET_ITER', 68)
[100] Fix | Delete
[101] Fix | Delete
def_op('PRINT_EXPR', 70)
[102] Fix | Delete
def_op('PRINT_ITEM', 71)
[103] Fix | Delete
def_op('PRINT_NEWLINE', 72)
[104] Fix | Delete
def_op('PRINT_ITEM_TO', 73)
[105] Fix | Delete
def_op('PRINT_NEWLINE_TO', 74)
[106] Fix | Delete
def_op('INPLACE_LSHIFT', 75)
[107] Fix | Delete
def_op('INPLACE_RSHIFT', 76)
[108] Fix | Delete
def_op('INPLACE_AND', 77)
[109] Fix | Delete
def_op('INPLACE_XOR', 78)
[110] Fix | Delete
def_op('INPLACE_OR', 79)
[111] Fix | Delete
def_op('BREAK_LOOP', 80)
[112] Fix | Delete
def_op('WITH_CLEANUP', 81)
[113] Fix | Delete
def_op('LOAD_LOCALS', 82)
[114] Fix | Delete
def_op('RETURN_VALUE', 83)
[115] Fix | Delete
def_op('IMPORT_STAR', 84)
[116] Fix | Delete
def_op('EXEC_STMT', 85)
[117] Fix | Delete
def_op('YIELD_VALUE', 86)
[118] Fix | Delete
def_op('POP_BLOCK', 87)
[119] Fix | Delete
def_op('END_FINALLY', 88)
[120] Fix | Delete
def_op('BUILD_CLASS', 89)
[121] Fix | Delete
[122] Fix | Delete
HAVE_ARGUMENT = 90 # Opcodes from here have an argument:
[123] Fix | Delete
[124] Fix | Delete
name_op('STORE_NAME', 90) # Index in name list
[125] Fix | Delete
name_op('DELETE_NAME', 91) # ""
[126] Fix | Delete
def_op('UNPACK_SEQUENCE', 92) # Number of tuple items
[127] Fix | Delete
jrel_op('FOR_ITER', 93)
[128] Fix | Delete
def_op('LIST_APPEND', 94)
[129] Fix | Delete
name_op('STORE_ATTR', 95) # Index in name list
[130] Fix | Delete
name_op('DELETE_ATTR', 96) # ""
[131] Fix | Delete
name_op('STORE_GLOBAL', 97) # ""
[132] Fix | Delete
name_op('DELETE_GLOBAL', 98) # ""
[133] Fix | Delete
def_op('DUP_TOPX', 99) # number of items to duplicate
[134] Fix | Delete
def_op('LOAD_CONST', 100) # Index in const list
[135] Fix | Delete
hasconst.append(100)
[136] Fix | Delete
name_op('LOAD_NAME', 101) # Index in name list
[137] Fix | Delete
def_op('BUILD_TUPLE', 102) # Number of tuple items
[138] Fix | Delete
def_op('BUILD_LIST', 103) # Number of list items
[139] Fix | Delete
def_op('BUILD_SET', 104) # Number of set items
[140] Fix | Delete
def_op('BUILD_MAP', 105) # Number of dict entries (upto 255)
[141] Fix | Delete
name_op('LOAD_ATTR', 106) # Index in name list
[142] Fix | Delete
def_op('COMPARE_OP', 107) # Comparison operator
[143] Fix | Delete
hascompare.append(107)
[144] Fix | Delete
name_op('IMPORT_NAME', 108) # Index in name list
[145] Fix | Delete
name_op('IMPORT_FROM', 109) # Index in name list
[146] Fix | Delete
jrel_op('JUMP_FORWARD', 110) # Number of bytes to skip
[147] Fix | Delete
jabs_op('JUMP_IF_FALSE_OR_POP', 111) # Target byte offset from beginning of code
[148] Fix | Delete
jabs_op('JUMP_IF_TRUE_OR_POP', 112) # ""
[149] Fix | Delete
jabs_op('JUMP_ABSOLUTE', 113) # ""
[150] Fix | Delete
jabs_op('POP_JUMP_IF_FALSE', 114) # ""
[151] Fix | Delete
jabs_op('POP_JUMP_IF_TRUE', 115) # ""
[152] Fix | Delete
[153] Fix | Delete
name_op('LOAD_GLOBAL', 116) # Index in name list
[154] Fix | Delete
[155] Fix | Delete
jabs_op('CONTINUE_LOOP', 119) # Target address
[156] Fix | Delete
jrel_op('SETUP_LOOP', 120) # Distance to target address
[157] Fix | Delete
jrel_op('SETUP_EXCEPT', 121) # ""
[158] Fix | Delete
jrel_op('SETUP_FINALLY', 122) # ""
[159] Fix | Delete
[160] Fix | Delete
def_op('LOAD_FAST', 124) # Local variable number
[161] Fix | Delete
haslocal.append(124)
[162] Fix | Delete
def_op('STORE_FAST', 125) # Local variable number
[163] Fix | Delete
haslocal.append(125)
[164] Fix | Delete
def_op('DELETE_FAST', 126) # Local variable number
[165] Fix | Delete
haslocal.append(126)
[166] Fix | Delete
[167] Fix | Delete
def_op('RAISE_VARARGS', 130) # Number of raise arguments (1, 2, or 3)
[168] Fix | Delete
def_op('CALL_FUNCTION', 131) # #args + (#kwargs << 8)
[169] Fix | Delete
def_op('MAKE_FUNCTION', 132) # Number of args with default values
[170] Fix | Delete
def_op('BUILD_SLICE', 133) # Number of items
[171] Fix | Delete
def_op('MAKE_CLOSURE', 134)
[172] Fix | Delete
def_op('LOAD_CLOSURE', 135)
[173] Fix | Delete
hasfree.append(135)
[174] Fix | Delete
def_op('LOAD_DEREF', 136)
[175] Fix | Delete
hasfree.append(136)
[176] Fix | Delete
def_op('STORE_DEREF', 137)
[177] Fix | Delete
hasfree.append(137)
[178] Fix | Delete
[179] Fix | Delete
def_op('CALL_FUNCTION_VAR', 140) # #args + (#kwargs << 8)
[180] Fix | Delete
def_op('CALL_FUNCTION_KW', 141) # #args + (#kwargs << 8)
[181] Fix | Delete
def_op('CALL_FUNCTION_VAR_KW', 142) # #args + (#kwargs << 8)
[182] Fix | Delete
[183] Fix | Delete
jrel_op('SETUP_WITH', 143)
[184] Fix | Delete
[185] Fix | Delete
def_op('EXTENDED_ARG', 145)
[186] Fix | Delete
EXTENDED_ARG = 145
[187] Fix | Delete
def_op('SET_ADD', 146)
[188] Fix | Delete
def_op('MAP_ADD', 147)
[189] Fix | Delete
[190] Fix | Delete
del def_op, name_op, jrel_op, jabs_op
[191] Fix | Delete
[192] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function