- Body body = getInitBody(mc);
- InstanceFieldRef ifr = Jimple.v().newInstanceFieldRef(thisLocal(c,body), f.makeRef());
- body.getUnits().addFirst(Jimple.v().newAssignStmt(ifr, IntConstant.v(0)));
-
- map.put(c, f);
- }
- return Scene.v().makeFieldRef(mc, name, IntType.v(), false);
- }
- public SootFieldRef getGladiatorFieldMaxRef(SootClass c) {
- SootClass mc = getParent(c);
- String name = c.getShortName().substring(c.getShortName().lastIndexOf('$')+1) + "$$max";
- if (map.get(name) == null) {
- SootField f = new SootField(name, IntType.v());
- mc.addField(f);
-
- Body body = getInitBody(mc);
- InstanceFieldRef ifr = Jimple.v().newInstanceFieldRef(thisLocal(c,body), f.makeRef());
- body.getUnits().addFirst(Jimple.v().newAssignStmt(ifr, IntConstant.v(initialSize)));
-
- map.put(c, f);
- }
- return Scene.v().makeFieldRef(mc, name, IntType.v(), false);
- }
-
- public boolean isGladiatorType(Type t) { return (t instanceof RefType) && isGladiator(((RefType)t).getSootClass()); }
-
-
-
-
- boolean done = false;