Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to R8 8.2.46 #1358

Merged
merged 2 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading