/** * Gets the list of instructions. * * @return {@code non-null;} the instruction list */ public DalvInsnList getInsns() { finishProcessingIfNecessary(); return insns; }
/** * Finish processing the catches, if necessary. */ private void finishProcessingIfNecessary() { if (table == null) { table = code.getCatches(); } }
/** * Get the out registers count. * * @return the count */ private int getOutsSize() { return code.getInsns().getOutsSize(); }
/** {@inheritDoc} */ public void addContents(DexFile file) { MixedItemSection byteData = file.getByteData(); TypeIdsSection typeIds = file.getTypeIds(); if (code.hasPositions() || code.hasLocals()) { debugInfo = new DebugInfoItem(code, isStatic, ref); byteData.add(debugInfo); } if (code.hasAnyCatches()) { for (Type type : code.getCatchTypes()) { typeIds.intern(type); } catches = new CatchStructs(code); } for (Constant c : code.getInsnConstants()) { file.internIfAppropriate(c); } }
PositionList positions = code.getPositions(); LocalList locals = code.getLocals(); DalvInsnList insns = code.getInsns(); int codeSize = insns.codeSize(); int regSize = insns.getRegistersSize();
code.assignIndices(new DalvCode.AssignIndicesCallback() { @Override public int getIndex(Constant cst) { int insnsSize = code.getInsns().codeSize(); if ((insnsSize & 1) != 0) { insnsSize++;
code.assignIndices(callback); DalvInsnList instructions= code.getInsns(); codeElement.setAttribute("register-size", String.valueOf(instructions.getRegistersSize())); processLocals(instructions.getRegistersSize(), isStatic, parseClassName(cf.getThisClass().getClassType().getClassName()).toString(), meth.getPrototype().getParameterTypes(), codeElement); Map<Integer, SwitchData> switchDataBlocks= extractSwitchData(instructions); Map<Integer, ArrayData> arrayData= extractArrayData(instructions); CatchTable catches= code.getCatches(); processCatchTable(catches, codeElement); Map<Integer, Target> targets= extractTargets(instructions, catches);
/** * Does the translation and returns the result. * * @return {@code non-null;} the result */ private DalvCode translateAndGetResult() { pickOrder(); outputInstructions(); StdCatchBuilder catches = new StdCatchBuilder(method, order, addresses); return new DalvCode(positionInfo, output.getFinisher(), catches); }
optCode.assignIndices(callback); nonOptCode.assignIndices(callback);
/** {@inheritDoc} */ public void addContents(DexFile file) { MixedItemSection byteData = file.getByteData(); TypeIdsSection typeIds = file.getTypeIds(); if (code.hasPositions() || code.hasLocals()) { debugInfo = new DebugInfoItem(code, isStatic, ref); byteData.add(debugInfo); } if (code.hasAnyCatches()) { for (Type type : code.getCatchTypes()) { typeIds.intern(type); } catches = new CatchStructs(code); } for (Constant c : code.getInsnConstants()) { file.internIfAppropriate(c); } }
PositionList positions = code.getPositions(); LocalList locals = code.getLocals(); DalvInsnList insns = code.getInsns(); int codeSize = insns.codeSize(); int regSize = insns.getRegistersSize();
code.assignIndices(new DalvCode.AssignIndicesCallback() { public int getIndex(Constant cst) { IndexedItem item = file.findItemOrNull(cst); int insnsSize = code.getInsns().codeSize(); if ((insnsSize & 1) != 0) { insnsSize++;
/** * Does the translation and returns the result. * * @return {@code non-null;} the result */ private DalvCode translateAndGetResult() { pickOrder(); outputInstructions(); StdCatchBuilder catches = new StdCatchBuilder(method, order, addresses); return new DalvCode(positionInfo, output.getFinisher(), catches); }
optCode.assignIndices(callback); nonOptCode.assignIndices(callback);
/** {@inheritDoc} */ @Override public void addContents(DexFile file) { MixedItemSection byteData = file.getByteData(); TypeIdsSection typeIds = file.getTypeIds(); if (code.hasPositions() || code.hasLocals()) { debugInfo = new DebugInfoItem(code, isStatic, ref); byteData.add(debugInfo); } if (code.hasAnyCatches()) { for (Type type : code.getCatchTypes()) { typeIds.intern(type); } catches = new CatchStructs(code); } for (Constant c : code.getInsnConstants()) { file.internIfAppropriate(c); } }
PositionList positions = code.getPositions(); LocalList locals = code.getLocals(); DalvInsnList insns = code.getInsns(); int codeSize = insns.codeSize(); int regSize = insns.getRegistersSize();
code.assignIndices(new DalvCode.AssignIndicesCallback() { public int getIndex(Constant cst) { IndexedItem item = file.findItemOrNull(cst); int insnsSize = code.getInsns().codeSize(); if ((insnsSize & 1) != 0) { insnsSize++;
/** * Gets the catch (exception handler) table. * * @return {@code non-null;} the catch table */ public CatchTable getCatches() { finishProcessingIfNecessary(); return catches; }
/** * Get the total registers count. * * @return the count */ private int getRegistersSize() { return code.getInsns().getRegistersSize(); } }
/** * Does the translation and returns the result. * * @return {@code non-null;} the result */ private DalvCode translateAndGetResult() { pickOrder(); outputInstructions(); StdCatchBuilder catches = new StdCatchBuilder(method, order, addresses); return new DalvCode(positionInfo, output.getFinisher(), catches); }