| 1 19 20 25 26 27 28 29 30 31 32 package soot.coffi; 33 import soot.*; 34 import java.io.*; 35 63 abstract class Instruction_branch extends Instruction { 64 public int arg_i; 65 public Instruction target; public Instruction_branch(byte c) { super(c); branches = true; } 67 68 public String toString(cp_info constant_pool[]) { 69 return super.toString(constant_pool) + argsep 70 + "[label_" + Integer.toString(target.label) + "]"; 71 } 72 73 public void offsetToPointer(ByteCode bc) { 74 target = bc.locateInst(arg_i+label); 75 if (target==null) { 76 G.v().out.println("Warning: can't locate target of instruction"); 77 G.v().out.println(" which should be at byte address " + (label+arg_i)); 78 } else 79 target.labelled = true; 80 } 81 public Instruction[] branchpoints(Instruction next) { 84 Instruction i[] = new Instruction[2]; 85 i[0] = target; i[1] = next; 86 return i; 87 } 88 89 public String toString() 90 { 91 return super.toString()+ "\t"+target.label; 92 } 93 } 94 | Popular Tags |