Merge "Replace custom maps on primitive int types with fastutil implementation."
diff --git a/build.gradle b/build.gradle
index c6b7c03..b279231 100644
--- a/build.gradle
+++ b/build.gradle
@@ -165,6 +165,16 @@
}
}
+task downloadProguard {
+ cloudDependencies.each { entry ->
+ entry.value.each { entryFile ->
+ if (entryFile.contains("proguard")) {
+ dependsOn "download_deps_${entry.key}/${entryFile}"
+ }
+ }
+ }
+}
+
task downloadDeps {
cloudDependencies.each { entry ->
entry.value.each { entryFile ->
@@ -363,7 +373,7 @@
}
task buildExampleJars {
- dependsOn downloadDeps
+ dependsOn downloadProguard
def examplesDir = file("src/test/examples")
def proguardScript = "third_party/proguard/proguard5.2.1/bin/proguard.sh"
task "compile_examples"(type: JavaCompile) {
diff --git a/src/main/java/com/android/tools/r8/IncrementalDexingBenchmark.java b/src/main/java/com/android/tools/r8/IncrementalDexingBenchmark.java
index 7b9d8aa..e509bf1 100644
--- a/src/main/java/com/android/tools/r8/IncrementalDexingBenchmark.java
+++ b/src/main/java/com/android/tools/r8/IncrementalDexingBenchmark.java
@@ -33,7 +33,7 @@
compile(executor);
}
double elapsedMs = (System.nanoTime() - start) / 1000000.0;
- System.out.println("Runtime: " + elapsedMs + " ms");
+ System.out.println("IncrementalDexing(Runtime): " + elapsedMs + " ms");
} finally {
executor.shutdown();
}
diff --git a/src/main/java/com/android/tools/r8/ir/optimize/Inliner.java b/src/main/java/com/android/tools/r8/ir/optimize/Inliner.java
index dc2ed67..11548bc 100644
--- a/src/main/java/com/android/tools/r8/ir/optimize/Inliner.java
+++ b/src/main/java/com/android/tools/r8/ir/optimize/Inliner.java
@@ -223,7 +223,10 @@
InlineAction result = invoke.computeInlining(oracle);
if (result != null) {
DexEncodedMethod target = appInfo.lookup(invoke.getType(), invoke.getInvokedMethod());
- assert target != null;
+ if (target == null) {
+ // The declared target cannot be found so skip inlining.
+ continue;
+ }
boolean forceInline = target.getOptimizationInfo().forceInline();
if (!target.isProcessed() && !forceInline) {
// Do not inline code that was not processed unless we have to force inline.
diff --git a/src/test/java/com/android/tools/r8/R8RunExamplesAndroidNTest.java b/src/test/java/com/android/tools/r8/R8RunExamplesAndroidNTest.java
index 1335970..c4b13d9 100644
--- a/src/test/java/com/android/tools/r8/R8RunExamplesAndroidNTest.java
+++ b/src/test/java/com/android/tools/r8/R8RunExamplesAndroidNTest.java
@@ -35,17 +35,11 @@
private static Map<DexVm, List<String>> failsOn =
ImmutableMap.of(
DexVm.ART_4_4_4,
- ImmutableList.of(
- // Dex version not supported
- "staticinterfacemethods", "defaultmethods"),
+ ImmutableList.of(),
DexVm.ART_5_1_1,
- ImmutableList.of(
- // Dex version not supported
- "staticinterfacemethods", "defaultmethods"),
+ ImmutableList.of(),
DexVm.ART_6_0_1,
- ImmutableList.of(
- // Dex version not supported
- "staticinterfacemethods", "defaultmethods"),
+ ImmutableList.of(),
DexVm.ART_7_0_0,
ImmutableList.of(),
DexVm.ART_DEFAULT,
@@ -61,7 +55,7 @@
"staticinterfacemethods",
"interfacemethods",
"StaticInterfaceMethods",
- Constants.ANDROID_N_API,
+ Constants.ANDROID_K_API,
options -> options.interfaceMethodDesugaring = OffOrAuto.Auto);
}
@@ -80,7 +74,7 @@
"defaultmethods",
"interfacemethods",
"DefaultMethods",
- Constants.ANDROID_N_API,
+ Constants.ANDROID_K_API,
options -> options.interfaceMethodDesugaring = OffOrAuto.Auto);
}