Lines Matching refs:indexMap
273 private int readIntoMap(Dex.Section in, TableOfContents.Section section, IndexMap indexMap, in readIntoMap() argument
277 T v = read(in, indexMap, index); in readIntoMap()
304 updateIndex(e1.offset, e1.indexMap, e1.index, outCount - 1); in mergeUnsorted()
308 updateIndex(e2.offset, e2.indexMap, e2.index, outCount - 1); in mergeUnsorted()
318 private List<UnsortedValue> readUnsortedValues(Dex source, IndexMap indexMap) { in readUnsortedValues() argument
328 T value = read(in, indexMap, 0); in readUnsortedValues()
329 result.add(new UnsortedValue(source, indexMap, value, i, offset)); in readUnsortedValues()
335 abstract T read(Dex.Section in, IndexMap indexMap, int index); in read() argument
336 abstract void updateIndex(int offset, IndexMap indexMap, int oldIndex, int newIndex); in updateIndex() argument
341 final IndexMap indexMap; field in DexMerger.IdMerger.UnsortedValue
346 UnsortedValue(Dex source, IndexMap indexMap, T value, int index, int offset) { in UnsortedValue() argument
348 this.indexMap = indexMap; in UnsortedValue()
377 @Override String read(Dex.Section in, IndexMap indexMap, int index) { in mergeStringIds() argument
381 @Override void updateIndex(int offset, IndexMap indexMap, int oldIndex, int newIndex) { in mergeStringIds() argument
382 indexMap.stringIds[oldIndex] = newIndex; in mergeStringIds()
399 @Override Integer read(Dex.Section in, IndexMap indexMap, int index) { in mergeTypeIds() argument
401 return indexMap.adjustString(stringIndex); in mergeTypeIds()
404 @Override void updateIndex(int offset, IndexMap indexMap, int oldIndex, int newIndex) { in mergeTypeIds() argument
408 indexMap.typeIds[oldIndex] = (short) newIndex; in mergeTypeIds()
423 @Override TypeList read(Dex.Section in, IndexMap indexMap, int index) { in mergeTypeLists() argument
424 return indexMap.adjustTypeList(in.readTypeList()); in mergeTypeLists()
427 @Override void updateIndex(int offset, IndexMap indexMap, int oldIndex, int newIndex) { in mergeTypeLists() argument
428 indexMap.putTypeListOffset(offset, typeListOut.getPosition()); in mergeTypeLists()
443 @Override ProtoId read(Dex.Section in, IndexMap indexMap, int index) { in mergeProtoIds() argument
444 return indexMap.adjust(in.readProtoId()); in mergeProtoIds()
447 @Override void updateIndex(int offset, IndexMap indexMap, int oldIndex, int newIndex) { in mergeProtoIds() argument
451 indexMap.protoIds[oldIndex] = (short) newIndex; in mergeProtoIds()
466 @Override FieldId read(Dex.Section in, IndexMap indexMap, int index) { in mergeFieldIds() argument
467 return indexMap.adjust(in.readFieldId()); in mergeFieldIds()
470 @Override void updateIndex(int offset, IndexMap indexMap, int oldIndex, int newIndex) { in mergeFieldIds() argument
474 indexMap.fieldIds[oldIndex] = (short) newIndex; in mergeFieldIds()
489 @Override MethodId read(Dex.Section in, IndexMap indexMap, int index) { in mergeMethodIds() argument
490 return indexMap.adjust(in.readMethodId()); in mergeMethodIds()
493 @Override void updateIndex(int offset, IndexMap indexMap, int oldIndex, int newIndex) { in mergeMethodIds() argument
498 indexMap.methodIds[oldIndex] = (short) newIndex; in mergeMethodIds()
513 @Override Annotation read(Dex.Section in, IndexMap indexMap, int index) { in mergeAnnotations() argument
514 return indexMap.adjust(in.readAnnotation()); in mergeAnnotations()
517 @Override void updateIndex(int offset, IndexMap indexMap, int oldIndex, int newIndex) { in mergeAnnotations() argument
518 indexMap.putAnnotationOffset(offset, annotationOut.getPosition()); in mergeAnnotations()
582 IndexMap indexMap) { in readSortableTypes() argument
584 SortableType sortableType = indexMap.adjust( in readSortableTypes()
585 new SortableType(buffer, indexMap, classDef)); in readSortableTypes()
617 private void transformAnnotationSets(Dex in, IndexMap indexMap) { in transformAnnotationSets() argument
622 transformAnnotationSet(indexMap, setIn); in transformAnnotationSets()
627 private void transformAnnotationSetRefLists(Dex in, IndexMap indexMap) { in transformAnnotationSetRefLists() argument
632 transformAnnotationSetRefList(indexMap, setIn); in transformAnnotationSetRefLists()
637 private void transformAnnotationDirectories(Dex in, IndexMap indexMap) { in transformAnnotationDirectories() argument
642 transformAnnotationDirectory(directoryIn, indexMap); in transformAnnotationDirectories()
647 private void transformStaticValues(Dex in, IndexMap indexMap) { in transformStaticValues() argument
652 transformStaticValues(staticValuesIn, indexMap); in transformStaticValues()
661 private void transformClassDef(Dex in, ClassDef classDef, IndexMap indexMap) { in transformClassDef() argument
668 int sourceFileIndex = indexMap.adjustString(classDef.getSourceFileIndex()); in transformClassDef()
672 idsDefsOut.writeInt(indexMap.adjustAnnotationDirectory(annotationsOff)); in transformClassDef()
680 transformClassData(in, classData, indexMap); in transformClassDef()
684 idsDefsOut.writeInt(indexMap.adjustStaticValues(staticValuesOff)); in transformClassDef()
691 Dex.Section directoryIn, IndexMap indexMap) { in transformAnnotationDirectory() argument
694 indexMap.putAnnotationDirectoryOffset( in transformAnnotationDirectory()
697 int classAnnotationsOffset = indexMap.adjustAnnotationSet(directoryIn.readInt()); in transformAnnotationDirectory()
711 annotationsDirectoryOut.writeInt(indexMap.adjustField(directoryIn.readInt())); in transformAnnotationDirectory()
714 annotationsDirectoryOut.writeInt(indexMap.adjustAnnotationSet(directoryIn.readInt())); in transformAnnotationDirectory()
719 annotationsDirectoryOut.writeInt(indexMap.adjustMethod(directoryIn.readInt())); in transformAnnotationDirectory()
723 indexMap.adjustAnnotationSet(directoryIn.readInt())); in transformAnnotationDirectory()
728 annotationsDirectoryOut.writeInt(indexMap.adjustMethod(directoryIn.readInt())); in transformAnnotationDirectory()
732 indexMap.adjustAnnotationSetRefList(directoryIn.readInt())); in transformAnnotationDirectory()
739 private void transformAnnotationSet(IndexMap indexMap, Dex.Section setIn) { in transformAnnotationSet() argument
742 indexMap.putAnnotationSetOffset(setIn.getPosition(), annotationSetOut.getPosition()); in transformAnnotationSet()
748 annotationSetOut.writeInt(indexMap.adjustAnnotation(setIn.readInt())); in transformAnnotationSet()
755 private void transformAnnotationSetRefList(IndexMap indexMap, Dex.Section refListIn) { in transformAnnotationSetRefList() argument
758 indexMap.putAnnotationSetRefListOffset( in transformAnnotationSetRefList()
764 annotationSetRefListOut.writeInt(indexMap.adjustAnnotationSet(refListIn.readInt())); in transformAnnotationSetRefList()
768 private void transformClassData(Dex in, ClassData classData, IndexMap indexMap) { in transformClassData() argument
781 transformFields(indexMap, staticFields); in transformClassData()
782 transformFields(indexMap, instanceFields); in transformClassData()
783 transformMethods(in, indexMap, directMethods); in transformClassData()
784 transformMethods(in, indexMap, virtualMethods); in transformClassData()
787 private void transformFields(IndexMap indexMap, ClassData.Field[] fields) { in transformFields() argument
790 int outFieldIndex = indexMap.adjustField(field.getFieldIndex()); in transformFields()
797 private void transformMethods(Dex in, IndexMap indexMap, ClassData.Method[] methods) { in transformMethods() argument
800 int outMethodIndex = indexMap.adjustMethod(method.getMethodIndex()); in transformMethods()
811 transformCode(in, in.readCode(method), indexMap); in transformMethods()
816 private void transformCode(Dex in, Code code, IndexMap indexMap) { in transformCode() argument
831 transformDebugInfoItem(in.open(debugInfoOffset), indexMap); in transformCode() local
837 short[] newInstructions = instructionTransformer.transform(indexMap, instructions); in transformCode()
853 int[] offsets = transformCatchHandlers(indexMap, catchHandlers); in transformCode()
861 private int[] transformCatchHandlers(IndexMap indexMap, Code.CatchHandler[] catchHandlers) { in transformCatchHandlers() argument
867 transformEncodedCatchHandler(catchHandlers[i], indexMap); in transformCatchHandlers()
892 private void transformDebugInfoItem(Dex.Section in, IndexMap indexMap) { in transformDebugInfoItem() argument
902 debugInfoOut.writeUleb128p1(indexMap.adjustString(parameterName)); in transformDebugInfoItem()
935 debugInfoOut.writeUleb128p1(indexMap.adjustString(nameIndex)); in transformDebugInfoItem()
937 debugInfoOut.writeUleb128p1(indexMap.adjustType(typeIndex)); in transformDebugInfoItem()
940 debugInfoOut.writeUleb128p1(indexMap.adjustString(sigIndex)); in transformDebugInfoItem()
952 debugInfoOut.writeUleb128p1(indexMap.adjustString(nameIndex)); in transformDebugInfoItem()
963 private void transformEncodedCatchHandler(Code.CatchHandler catchHandler, IndexMap indexMap) { in transformEncodedCatchHandler() argument
975 codeOut.writeUleb128(indexMap.adjustType(typeIndexes[i])); in transformEncodedCatchHandler()
984 private void transformStaticValues(Dex.Section in, IndexMap indexMap) { in transformStaticValues() argument
986 indexMap.putStaticValuesOffset(in.getPosition(), encodedArrayOut.getPosition()); in transformStaticValues()
987 indexMap.adjustEncodedArray(in.readEncodedArray()).writeTo(encodedArrayOut); in transformStaticValues()