comparison paraspace/injection.py @ 112:650dcb9c01ee

Remove unused code
author Thinker K.F. Li <thinker@codemud.net>
date Tue, 02 Aug 2011 13:49:41 +0800
parents 3820379b34e8
children ee13c86d84f2
comparison
equal deleted inserted replaced
111:3820379b34e8 112:650dcb9c01ee
379 methodidx = args[2] 379 methodidx = args[2]
380 if methodidx not in methods_redir: 380 if methodidx not in methods_redir:
381 return opcode, args 381 return opcode, args
382 382
383 return opcode, (args[0], args[1], methods_redir[methodidx], 383 return opcode, (args[0], args[1], methods_redir[methodidx],
384 args[3], args[4], args[5], args[6])
385 methodid = dex.find_methodid_idx(methodidx)
386 method_typeid = methodid.classIdx
387 method_typeidx = dex.get_idx_typeid(method_typeid)
388 if method_typeidx not in types_redir:
389 method_typeid = dex.find_typeid_idx(method_typeidx - 1)
390 return opcode, args
391
392 new_method_typeidx = types_redir[method_typeidx]
393 new_method_typeid = dex.find_typeid_idx(new_method_typeidx)
394 classdef = dex.find_class_typeid(new_method_typeid)
395 method_name = DEXFile_linked.get_methodid_name(methodid)
396 method_proto = methodid.protoIdx
397
398 try:
399 new_method = dex.find_method_name_proto(method_name,
400 method_proto,
401 classdef)
402 except ValueError:
403 return opcode, args
404 new_method_idx = dex.get_idx_method(new_method)
405 return opcode, (args[0], args[1], new_method_idx,
406 args[3], args[4], args[5], args[6]) 384 args[3], args[4], args[5], args[6])
407 return opcode, args 385 return opcode, args
408 386
409 new_op_vectors = [redirect(opcode, args) for opcode, args in op_vectors] 387 new_op_vectors = [redirect(opcode, args) for opcode, args in op_vectors]
410 new_insns_blk = encode_opcode_vectors(new_op_vectors) 388 new_insns_blk = encode_opcode_vectors(new_op_vectors)