コード例 #1
0
 def BINARY_SUBSCR(decompiler):
     oper2 = decompiler.stack.pop()
     oper1 = decompiler.stack.pop()
     if isinstance(oper2, ast.Sliceobj) and len(oper2.nodes) == 2:
         a, b = oper2.nodes
         a = None if isinstance(a, ast.Const) and a.value == None else a
         b = None if isinstance(b, ast.Const) and b.value == None else b
         return ast.Slice(oper1, 'OP_APPLY', a, b)
     elif isinstance(oper2, ast.Tuple):
         return ast.Subscript(oper1, 'OP_APPLY', list(oper2.nodes))
     else:
         return ast.Subscript(oper1, 'OP_APPLY', [ oper2 ])
コード例 #2
0
 def SLICE_3(decompiler):
     tos = decompiler.stack.pop()
     tos1 = decompiler.stack.pop()
     tos2 = decompiler.stack.pop()
     return ast.Slice(tos2, 'OP_APPLY', tos1, tos)
コード例 #3
0
 def SLICE_2(decompiler):
     tos = decompiler.stack.pop()
     tos1 = decompiler.stack.pop()
     return ast.Slice(tos1, 'OP_APPLY', None, tos)
コード例 #4
0
 def SLICE_0(decompiler):
     return ast.Slice(decompiler.stack.pop(), 'OP_APPLY', None, None)