Skip to content

Commit

Permalink
Update to R8 8.2.46
Browse files Browse the repository at this point in the history
  • Loading branch information
msridhar committed Jan 15, 2024
1 parent b04124b commit dd2dfc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,23 +95,14 @@ private static Set<Pair<CGNode, CGNode>> edgeDiff(
return result;
}

private static void test(String mainClass, String javaScopeFile)
throws IllegalArgumentException, IOException, CancelException, ClassHierarchyException {
test(mainClass, javaScopeFile, false);
}

/**
* Run tests to compare the call graphs computing with the JVM bytecode frontend vs the Dalvik
* frontend
*
* @param mainClass main class for the test
* @param javaScopeFile scope file for the test
* @param allowExtraJavaCGEdges if true, allow extra edges in the JVM bytecode frontend call
* graph. This flag is temporarily required due to issues with JLex caused by
* https://issuetracker.google.com/issues/316744331. TODO: remove this flag once the D8 issue
* is fixed.
*/
private static void test(String mainClass, String javaScopeFile, boolean allowExtraJavaCGEdges)
private static void test(String mainClass, String javaScopeFile)
throws IllegalArgumentException, IOException, CancelException, ClassHierarchyException {
Pair<CallGraph, PointerAnalysis<InstanceKey>> java = makeJavaBuilder(javaScopeFile, mainClass);

Expand All @@ -124,11 +115,9 @@ private static void test(String mainClass, String javaScopeFile, boolean allowEx
Set<MethodReference> androidMethods = applicationMethods(android.fst);
Set<MethodReference> javaMethods = applicationMethods(java.fst);

if (!allowExtraJavaCGEdges) {
Set<Pair<CGNode, CGNode>> javaExtraEdges = edgeDiff(java.fst, android.fst, false);
assert !checkEdgeDiff(android, androidMethods, javaMethods, javaExtraEdges)
: "found extra edges in Java call graph";
}
Set<Pair<CGNode, CGNode>> javaExtraEdges = edgeDiff(java.fst, android.fst, false);
assert !checkEdgeDiff(android, androidMethods, javaMethods, javaExtraEdges)
: "found extra edges in Java call graph";

Set<Pair<CGNode, CGNode>> androidExtraEdges = edgeDiff(android.fst, java.fst, true);
assert !checkEdgeDiff(java, javaMethods, androidMethods, androidExtraEdges)
Expand Down Expand Up @@ -221,7 +210,7 @@ private static boolean checkEdgeDiff(
@Test
public void testJLex()
throws ClassHierarchyException, IllegalArgumentException, IOException, CancelException {
test(TestConstants.JLEX_MAIN, TestConstants.JLEX, true);
test(TestConstants.JLEX_MAIN, TestConstants.JLEX);
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ktfmt = "0.44"
spotless = "6.23.3"

[libraries]
android-tools = "com.android.tools:r8:8.2.39"
android-tools = "com.android.tools:r8:8.2.46"
ant = "org.apache.ant:ant:1.10.14"
assertj-core = "org.assertj:assertj-core:3.24.2"
commons-cli = "commons-cli:commons-cli:1.5.0"
Expand Down

0 comments on commit dd2dfc3

Please sign in to comment.