Home
last modified time | relevance | path

Searched refs:DexType (Results 1 – 25 of 135) sorted by relevance

123456

/external/r8/src/main/java/com/android/tools/r8/graph/
DDexItemFactory.java31 private final Map<DexType, DexType> types = new HashMap<>();
50 public static final DexType catchAllType = new DexType(new DexString("CATCH_ALL"));
103 private DexType charArrayType = createType(charArrayDescriptor);
106 public DexType booleanType = createType(booleanDescriptor);
107 public DexType byteType = createType(byteDescriptor);
108 public DexType charType = createType(charDescriptor);
109 public DexType doubleType = createType(doubleDescriptor);
110 public DexType floatType = createType(floatDescriptor);
111 public DexType intType = createType(intDescriptor);
112 public DexType longType = createType(longDescriptor);
[all …]
DDexType.java20 public class DexType extends IndexedDexItem implements PresortedComparable<DexType> { class
28 private final static Set<DexType> NO_DIRECT_SUBTYPE = ImmutableSet.of();
33 private Set<DexType> directSubtypes = NO_DIRECT_SUBTYPE;
35 DexType(DexString descriptor) { in DexType() method in DexType
45 if (other instanceof DexType) { in computeEquals()
46 return descriptor.equals(((DexType) other).descriptor); in computeEquals()
72 public void addDirectSubtype(DexType type) { in addDirectSubtype()
88 public void addInterfaceSubtype(DexType type) { in addInterfaceSubtype()
96 static void clearSubtypeInformation(DexType type) { in clearSubtypeInformation()
101 public boolean isSubtypeOf(DexType other, AppInfo appInfo) { in isSubtypeOf()
[all …]
DAppInfoWithSubtyping.java18 private Set<DexType> missingClasses = Sets.newIdentityHashSet();
20 private final Hashtable<DexType, ImmutableSet<DexType>> subtypeMap = new Hashtable<>();
39 public Set<DexType> getMissingClasses() { in getMissingClasses()
43 public ImmutableSet<DexType> subtypes(DexType type) { in subtypes()
45 ImmutableSet<DexType> subtypes = subtypeMap.get(type); in subtypes()
49 private void populateSuperType(Hashtable<DexType, Set<DexType>> map, DexType superType, in populateSuperType() argument
50 DexClass baseClass, Function<DexType, DexClass> definitions) { in populateSuperType() argument
52 Set<DexType> set = map.computeIfAbsent(superType, ignore -> new HashSet<>()); in populateSuperType()
60 private void populateAllSuperTypes(Hashtable<DexType, Set<DexType>> map, DexType holder, in populateAllSuperTypes() argument
61 DexClass baseClass, Function<DexType, DexClass> definitions) { in populateAllSuperTypes() argument
[all …]
DGraphLense.java30 private final Map<DexType, DexType> typeMap = new IdentityHashMap<>();
34 public void map(DexType from, DexType to) { in map()
60 public abstract DexType lookupType(DexType type, DexEncodedMethod context); in lookupType()
79 public DexType lookupType(DexType type, DexEncodedMethod context) { in lookupType()
104 private final Map<DexType, DexType> typeMap;
105 private final Map<DexType, DexType> arrayTypeCache = new IdentityHashMap<>();
109 private NestedGraphLense(Map<DexType, DexType> typeMap, Map<DexMethod, DexMethod> methodMap, in NestedGraphLense() argument
119 public DexType lookupType(DexType type, DexEncodedMethod context) { in lookupType()
121 DexType result = arrayTypeCache.get(type); in lookupType()
123 DexType baseType = type.toBaseType(dexItemFactory); in lookupType()
[all …]
DAppInfo.java21 private final ConcurrentHashMap<DexType, Map<Descriptor, KeyedDexItem>> definitions =
41 private Map<Descriptor, KeyedDexItem> computeDefinitions(DexType type) { in computeDefinitions()
68 public DexClass definitionFor(DexType type) { in definitionFor()
80 private Map<Descriptor, KeyedDexItem> getDefinitions(DexType type) { in getDefinitions()
128 public DexEncodedMethod lookupVirtualTarget(DexType type, DexMethod method) { in lookupVirtualTarget()
150 public DexEncodedMethod lookupVirtualDefinition(DexType type, DexMethod method) { in lookupVirtualDefinition()
163 public DexEncodedField lookupInstanceTarget(DexType type, DexField field) { in lookupInstanceTarget()
171 public DexEncodedField lookupStaticTarget(DexType type, DexField field) { in lookupStaticTarget()
184 DexType type, in lookupTargetAlongSuperChain()
206 DexType type, in lookupTargetAlongSuperAndInterfaceChain()
[all …]
DJarApplicationReader.java34 public DexType getType(Type type) { in getType()
38 public DexType getTypeFromName(String name) { in getTypeFromName()
43 public DexType getTypeFromDescriptor(String desc) { in getTypeFromDescriptor()
52 DexType[] types = new DexType[names.length]; in getTypeListFromNames()
63 DexType[] types = new DexType[descriptors.length]; in getTypeListFromDescriptors()
74 public DexField getField(DexType owner, String name, String desc) { in getField()
82 public DexMethod getMethod(DexType owner, String name, String desc) { in getMethod()
/external/r8/src/main/java/com/android/tools/r8/ir/desugar/
DLambdaMainMethodSourceCode.java13 import com.android.tools.r8.graph.DexType;
32 DexType[] captures, DexType[] enforcedParams, DexType enforcedReturnType, in checkSignatures()
33 List<DexType> implReceiverAndArgs, DexType implReturnType) { in checkSignatures()
34 List<DexType> capturesAndParams = new ArrayList<>(); in checkSignatures()
56 private DexType getPrimitiveFromBoxed(DexType boxedPrimitive) { in getPrimitiveFromBoxed()
86 private DexType getBoxedForPrimitiveType(DexType primitive) { in getBoxedForPrimitiveType()
110 private boolean isSameOrAdaptableTo(DexType a, DexType b) { in isSameOrAdaptableTo()
127 DexType boxedPrimitiveType = getBoxedForPrimitiveType(a); in isSameOrAdaptableTo()
139 DexType unboxedA = getPrimitiveFromBoxed(a); in isSameOrAdaptableTo()
180 DexType[] capturedTypes = captures(); in prepareInstructions()
[all …]
DLambdaClass.java24 import com.android.tools.r8.graph.DexType;
53 final DexType type;
61 LambdaClass(LambdaRewriter rewriter, DexType accessedFrom, in LambdaClass()
62 DexType lambdaClassType, LambdaDescriptor descriptor) { in LambdaClass()
87 static DexType createLambdaClassType( in createLambdaClassType()
88 LambdaRewriter rewriter, DexType accessedFrom, LambdaDescriptor match) { in createLambdaClassType()
196 DexType[] fieldTypes = descriptor.captures.values; in synthesizeInstanceFields()
228 List<DexType> interfaces = descriptor.interfaces; in buildInterfaces()
230 : new DexTypeList(interfaces.toArray(new DexType[interfaces.size()])); in buildInterfaces()
235 private Target createTarget(DexType accessedFrom) { in createTarget()
[all …]
DLambdaRewriter.java16 import com.android.tools.r8.graph.DexType;
66 final DexType serializableType;
85 private final Map<DexType, LambdaClass> knownLambdaClasses = new IdentityHashMap<>();
88 public static boolean hasLambdaClassPrefix(DexType clazz) { in hasLambdaClassPrefix()
97 DexType metafactoryType = factory.createType(METAFACTORY_TYPE_DESCR); in LambdaRewriter()
98 DexType callSiteType = factory.createType(CALLSITE_TYPE_DESCR); in LambdaRewriter()
99 DexType lookupType = factory.createType(LOOKUP_TYPE_DESCR); in LambdaRewriter()
100 DexType methodTypeType = factory.createType(METHODTYPE_TYPE_DESCR); in LambdaRewriter()
101 DexType methodHandleType = factory.createType(METHODHANDLE_TYPE_DESCR); in LambdaRewriter()
102 DexType objectArrayType = factory.createType(OBJECT_ARRAY_TYPE_DESCR); in LambdaRewriter()
[all …]
DLambdaDescriptor.java17 import com.android.tools.r8.graph.DexType;
41 final List<DexType> interfaces = new ArrayList<>();
60 DexMethodHandle implHandle, DexType mainInterface, DexTypeList captures) { in LambdaDescriptor()
81 final DexType getImplReceiverType() { in getImplReceiverType()
84 DexType[] params = enforcedProto.parameters.values; in getImplReceiverType()
85 DexType[] captures = this.captures.values; in getImplReceiverType()
136 final boolean targetFoundInClass(DexType type) { in targetFoundInClass()
152 boolean needsAccessor(DexType accessedFrom) { in needsAccessor()
252 DexType mainFuncInterface = lambdaFactoryProto.returnType; in infer()
285 DexType type = getBootstrapArgument( in extractExtraLambdaInfo()
[all …]
DSynthesizedLambdaSourceCode.java9 import com.android.tools.r8.graph.DexType;
19 SynthesizedLambdaSourceCode(DexType receiver, LambdaClass lambda, DexMethod currentMethod) { in SynthesizedLambdaSourceCode()
33 final DexType[] captures() { in captures()
43 final int enforceParameterType(int register, DexType paramType, DexType enforcedType) { in enforceParameterType()
/external/r8/src/main/java/com/android/tools/r8/naming/
DMethodNameMinifier.java12 import com.android.tools.r8.graph.DexType;
89 private final Map<DexType, NamingState<DexProto>> states = new IdentityHashMap<>();
106 Map<DexType, DexType> frontierMap = new IdentityHashMap<>(); in computeRenaming()
113 DexType.forAllInterfaces(appInfo.dexItemFactory, iface -> { in computeRenaming()
135 private void assignNamesToClassesMethods(DexType type, boolean doPrivates, in assignNamesToClassesMethods()
162 private Set<NamingState<DexProto>> getReachableStates(DexType type, in getReachableStates()
163 Map<DexType, DexType> frontierMap) { in getReachableStates() argument
164 Set<DexType> interfaces = Sets.newIdentityHashSet(); in getReachableStates()
169 for (DexType iface : interfaces) { in getReachableStates()
182 private void assignNamesToInterfaceMethods(Map<DexType, DexType> frontierMap, in assignNamesToInterfaceMethods() argument
[all …]
DFieldNameMinifier.java11 import com.android.tools.r8.graph.DexType;
23 private final Map<DexType, NamingState<DexType>> states = new IdentityHashMap<>();
32 NamingState<DexType> rootState = NamingState.createRoot(appInfo.dexItemFactory, dictionary); in computeRenaming()
39 DexType.forAllInterfaces(appInfo.dexItemFactory, in computeRenaming()
43 DexType.forAllInterfaces(appInfo.dexItemFactory, this::renameFieldsInSubtypes); in computeRenaming()
47 private void reserveNamesInSubtypes(DexType type, NamingState<DexType> state) { in reserveNamesInSubtypes()
52 NamingState<DexType> newState = states.computeIfAbsent(type, t -> state.createChild()); in reserveNamesInSubtypes()
58 private void reserveFieldNames(NamingState<DexType> state, DexEncodedField[] fields, in reserveFieldNames()
68 private void renameFieldsInSubtypes(DexType type) { in renameFieldsInSubtypes()
73 NamingState<DexType> state = states.get(clazz.type); in renameFieldsInSubtypes()
[all …]
DClassNameMinifier.java10 import com.android.tools.r8.graph.DexType;
33 private final Map<DexType, DexString> renaming = Maps.newIdentityHashMap();
47 public Map<DexType, DexString> computeRenaming() { in computeRenaming()
74 private void registerClassAsUsed(DexType type) { in registerClassAsUsed()
78 DexType outerClass = getOutClassForType(type); in registerClassAsUsed()
88 private DexType getOutClassForType(DexType type) { in getOutClassForType()
112 DexType outerClass = getOutClassForType(clazz.type); in computeName()
136 private NamingState getStateForOuterClass(DexType outer) { in getStateForOuterClass()
157 private void renameArrayTypeIfNeeded(DexType type) { in renameArrayTypeIfNeeded()
159 DexType base = type.toBaseType(appInfo.dexItemFactory); in renameArrayTypeIfNeeded()
DNamingLens.java9 import com.android.tools.r8.graph.DexType;
26 public abstract DexString lookupDescriptor(DexType type); in lookupDescriptor()
40 abstract void forAllRenamedTypes(Consumer<DexType> consumer); in forAllRenamedTypes()
58 public DexString lookupDescriptor(DexType type) { in lookupDescriptor()
73 void forAllRenamedTypes(Consumer<DexType> consumer) { in forAllRenamedTypes()
/external/r8/src/test/java/com/android/tools/r8/shaking/
DR8Shaking2LookupTest.java14 import com.android.tools.r8.graph.DexType;
35 private void validateSubtype(DexType super_type, DexType sub_type) { in validateSubtype()
43 private void validateSubtypeSize(DexType type, int size) { in validateSubtypeSize()
49 DexType object_type = dexItemFactory.createType("Ljava/lang/Object;"); in testLookup()
51 DexType interface_type = dexItemFactory.createType("Lshaking2/Interface;"); in testLookup()
52 DexType superInterface1_type = dexItemFactory.createType("Lshaking2/SuperInterface1;"); in testLookup()
53 DexType superInterface2_type = dexItemFactory.createType("Lshaking2/SuperInterface2;"); in testLookup()
55 DexType superclass_type = dexItemFactory.createType("Lshaking2/SuperClass;"); in testLookup()
56 DexType subClass1_type = dexItemFactory.createType("Lshaking2/SubClass1;"); in testLookup()
57 DexType subClass2_type = dexItemFactory.createType("Lshaking2/SubClass2;"); in testLookup()
/external/r8/src/main/java/com/android/tools/r8/shaking/
DMainDexListBuilder.java23 import com.android.tools.r8.graph.DexType;
40 private final Set<DexType> baseClasses;
42 private final Set<DexType> mainDexTypes = new HashSet<>();
47 private final Set<DexType> enumTypes;
48 private final Set<DexType> annotationTypes;
49 private final Map<DexType, Boolean> annotationTypeContainEnum;
56 public MainDexListBuilder(Set<DexType> baseClasses, DexApplication application) { in MainDexListBuilder()
74 public Set<DexType> run() { in run()
82 DexType dexType = clazz.type; in traceRuntimeAnnotationsWithEnumForMainDex()
100 private boolean isAnnotationWithEnum(DexType dexType) { in isAnnotationWithEnum()
[all …]
DSimpleClassMerger.java16 import com.android.tools.r8.graph.DexType;
61 private final Map<DexType, DexType> mergedClasses = new IdentityHashMap<>();
106 private boolean isProgramClass(DexType type) { in isProgramClass()
120 for (DexType type : dexMethod.proto.parameters.values) { in removeNonProgram()
247 Set<DexType> interfaces = mergeArrays(target.interfaces.values, source.interfaces.values); in merge()
258 : new DexTypeList(interfaces.toArray(new DexType[interfaces.size()])); in merge()
348 private DexString makeMergedName(String nameString, DexType holder) { in makeMergedName()
385 DexType holder = method.method.holder; in renameConstructors()
403 DexType holder = method.method.holder; in renameMethod()
413 DexType holder = field.field.clazz; in renameField()
[all …]
DRootSetBuilder.java19 import com.android.tools.r8.graph.DexType;
64 private boolean anySuperTypeMatches(DexType type, ProguardTypeMatcher name, in anySuperTypeMatches()
85 for (DexType iface : clazz.interfaces.values) { in anyImplementedInterfaceMatches()
110 private DexType[] specificDexTypes(ProguardConfigurationRule rule) { in specificDexTypes()
117 DexType[] result = new DexType[length]; in specificDexTypes()
211 DexType[] specifics = specificDexTypes(rule); in run()
215 for (DexType type : specifics) { in run()
246 DexType onlyIfClassKept) { in markMatchingVisibleMethods()
257 DexType onlyIfClassKept) { in markMatchingFields()
288 for (DexType param : method.proto.parameters.values) { in writeSeeds()
[all …]
DProguardTypeMatcher.java7 import com.android.tools.r8.graph.DexType;
26 public abstract boolean matches(DexType type); in matches()
73 public boolean matches(DexType type) { in matches()
98 public boolean matches(DexType type) { in matches()
138 public boolean matches(DexType type) { in matches()
163 public boolean matches(DexType type) { in matches()
185 public final DexType type;
187 private MatchSpecificType(DexType type) { in MatchSpecificType()
192 public boolean matches(DexType type) { in matches()
226 public boolean matches(DexType type) { in matches()
DEnqueuer.java25 import com.android.tools.r8.graph.DexType;
69 private Map<DexType, Set<DexMethod>> virtualInvokes = Maps.newIdentityHashMap();
70 private Map<DexType, Set<DexMethod>> superInvokes = Maps.newIdentityHashMap();
71 private Map<DexType, Set<DexMethod>> directInvokes = Maps.newIdentityHashMap();
72 private Map<DexType, Set<DexMethod>> staticInvokes = Maps.newIdentityHashMap();
73 private Map<DexType, Set<DexField>> instanceFieldsWritten = Maps.newIdentityHashMap();
74 private Map<DexType, Set<DexField>> instanceFieldsRead = Maps.newIdentityHashMap();
75 private Map<DexType, Set<DexField>> staticFieldsRead = Maps.newIdentityHashMap();
76 private Map<DexType, Set<DexField>> staticFieldsWritten = Maps.newIdentityHashMap();
83 private Map<DexType, SetWithReason<DexEncodedMethod>> reachableVirtualMethods = Maps
[all …]
/external/r8/src/main/java/com/android/tools/r8/utils/
DClassProvider.java13 import com.android.tools.r8.graph.DexType;
51 public abstract void collectClass(DexType type, Consumer<T> classConsumer); in collectClass()
58 public abstract Collection<DexType> collectTypes(); in collectTypes()
69 ImmutableListMultimap.Builder<DexType, T> builder = ImmutableListMultimap.builder(); in forPreloadedClasses()
96 public void collectClass(DexType type, Consumer<T> classConsumer) { in collectClass()
111 public Collection<DexType> collectTypes() { in collectTypes()
112 List<DexType> types = new ArrayList<>(); in collectTypes()
126 private final Multimap<DexType, T> classes;
128 private PreloadedClassProvider(ClassKind classKind, Multimap<DexType, T> classes) { in PreloadedClassProvider() argument
134 public void collectClass(DexType type, Consumer<T> classConsumer) { in collectClass()
[all …]
DClassMap.java10 import com.android.tools.r8.graph.DexType;
30 private final Map<DexType, Supplier<T>> classes;
40 ClassMap(Map<DexType, Supplier<T>> classes, ClassProvider<T> classProvider) { in ClassMap() argument
64 public T get(DexType type) { in get()
111 public void forceLoad(Predicate<DexType> load) { in forceLoad()
112 Set<DexType> knownClasses; in forceLoad()
135 for (DexType type : knownClasses) { in forceLoad()
149 Iterator<Map.Entry<DexType, Supplier<T>>> iterator = classes.entrySet().iterator(); in forceLoad()
151 Map.Entry<DexType, Supplier<T>> e = iterator.next(); in forceLoad()
180 private DexType type;
[all …]
/external/r8/src/main/java/com/android/tools/r8/ir/synthetic/
DForwardMethodSourceCode.java10 import com.android.tools.r8.graph.DexType;
21 private final DexType targetReceiver;
25 public ForwardMethodSourceCode(DexType receiver, DexProto proto, in ForwardMethodSourceCode()
26 DexType targetReceiver, DexMethod target, Invoke.Type invokeType) { in ForwardMethodSourceCode()
47 List<DexType> sourceParams = new ArrayList<>(); in checkSignatures()
53 List<DexType> targetParams = new ArrayList<>(); in checkSignatures()
61 DexType source = sourceParams.get(i); in checkSignatures()
62 DexType target = targetParams.get(i); in checkSignatures()
85 DexType[] accessorParams = proto.parameters.values; in prepareInstructions()
/external/r8/src/main/java/com/android/tools/r8/optimize/
DMemberRebindingAnalysis.java13 import com.android.tools.r8.graph.DexType;
41 DexType newHolder; in validTargetFor()
57 DexType newHolder; in validTargetFor()
66 private <T> DexType firstLibraryClassForInterfaceTarget(T target, DexType current, in firstLibraryClassForInterfaceTarget()
75 DexType matchingSuper = firstLibraryClassForInterfaceTarget(target, clazz.superType, lookup); in firstLibraryClassForInterfaceTarget()
81 for (DexType iface : clazz.interfaces.values) { in firstLibraryClassForInterfaceTarget()
82 DexType matchingIface = firstLibraryClassForInterfaceTarget(target, iface, lookup); in firstLibraryClassForInterfaceTarget()
91 private DexType firstLibraryClass(DexType top, DexType bottom) { in firstLibraryClass()
163 for (DexType iface : originalClass.interfaces.values) { in findBridgeMethodHolder()
182 BiFunction<DexType, DexField, DexEncodedField> lookup, in computeFieldRebinding() argument

123456