Update asm to version 9.7
Fixes: b/321850673
Fixes: b/321869318
Change-Id: Idc40475cc7512f93ff981f7abdd9d6cf3c9f1d87
diff --git a/d8_r8/commonBuildSrc/src/main/kotlin/DependenciesPlugin.kt b/d8_r8/commonBuildSrc/src/main/kotlin/DependenciesPlugin.kt
index 140ef85..bdbd79e 100644
--- a/d8_r8/commonBuildSrc/src/main/kotlin/DependenciesPlugin.kt
+++ b/d8_r8/commonBuildSrc/src/main/kotlin/DependenciesPlugin.kt
@@ -391,7 +391,7 @@
}
object Versions {
- const val asmVersion = "9.6"
+ const val asmVersion = "9.7"
const val errorproneVersion = "2.18.0"
const val fastUtilVersion = "7.2.1"
const val gsonVersion = "2.10.1"
diff --git a/src/main/java/com/android/tools/r8/cf/CfVersion.java b/src/main/java/com/android/tools/r8/cf/CfVersion.java
index 0b5fbcc..73fb34d 100644
--- a/src/main/java/com/android/tools/r8/cf/CfVersion.java
+++ b/src/main/java/com/android/tools/r8/cf/CfVersion.java
@@ -48,8 +48,11 @@
public static final CfVersion V21_PREVIEW = new CfVersion(Opcodes.V21 | Opcodes.V_PREVIEW);
public static final CfVersion V22 = new CfVersion(Opcodes.V22);
public static final CfVersion V22_PREVIEW = new CfVersion(Opcodes.V22 | Opcodes.V_PREVIEW);
- public static final CfVersion V23 = new CfVersion(67);
- public static final CfVersion V23_PREVIEW = new CfVersion(67 | Opcodes.V_PREVIEW);
+ public static final CfVersion V23 = new CfVersion(Opcodes.V23);
+ public static final CfVersion V23_PREVIEW = new CfVersion(Opcodes.V23 | Opcodes.V_PREVIEW);
+ // Tentatively support next class file version for testing with JDK and ASM head.
+ public static final CfVersion V24 = new CfVersion(68);
+ public static final CfVersion V24_PREVIEW = new CfVersion(68 | Opcodes.V_PREVIEW);
private final int version;
@@ -75,7 +78,8 @@
CfVersion.V19,
CfVersion.V20,
CfVersion.V21,
- CfVersion.V22
+ CfVersion.V22,
+ CfVersion.V23
};
// Private constructor in case we want to canonicalize versions.
diff --git a/src/main/java/com/android/tools/r8/utils/InternalOptions.java b/src/main/java/com/android/tools/r8/utils/InternalOptions.java
index e90aa6c..683f441 100644
--- a/src/main/java/com/android/tools/r8/utils/InternalOptions.java
+++ b/src/main/java/com/android/tools/r8/utils/InternalOptions.java
@@ -174,7 +174,7 @@
}
}
- public static final CfVersion SUPPORTED_CF_VERSION = CfVersion.V23;
+ public static final CfVersion SUPPORTED_CF_VERSION = CfVersion.V24;
public static final int SUPPORTED_DEX_VERSION =
AndroidApiLevel.LATEST.getDexVersion().getIntValue();
diff --git a/src/test/java/com/android/tools/r8/cf/ClassFileVersion67Test.java b/src/test/java/com/android/tools/r8/cf/ClassFileVersion67Test.java
index c1b44d5..5b77394 100644
--- a/src/test/java/com/android/tools/r8/cf/ClassFileVersion67Test.java
+++ b/src/test/java/com/android/tools/r8/cf/ClassFileVersion67Test.java
@@ -4,7 +4,6 @@
package com.android.tools.r8.cf;
-import com.android.tools.r8.CompilationFailedException;
import com.android.tools.r8.TestBase;
import com.android.tools.r8.TestParameters;
import com.android.tools.r8.TestParametersCollection;
@@ -34,8 +33,7 @@
this.parameters = parameters;
}
- // TODO(b/321850673): Update ASM once it has a release with v23 support.
- @Test(expected = CompilationFailedException.class)
+ @Test
public void test() throws Exception {
testForD8(parameters.getBackend())
.addProgramClassFileData(transformer(TestClass.class).setVersion(CfVersion.V23).transform())
diff --git a/src/test/java/com/android/tools/r8/cf/ClassFileVersion66Test.java b/src/test/java/com/android/tools/r8/cf/ClassFileVersion68Test.java
similarity index 77%
rename from src/test/java/com/android/tools/r8/cf/ClassFileVersion66Test.java
rename to src/test/java/com/android/tools/r8/cf/ClassFileVersion68Test.java
index aabbf04..12dd840 100644
--- a/src/test/java/com/android/tools/r8/cf/ClassFileVersion66Test.java
+++ b/src/test/java/com/android/tools/r8/cf/ClassFileVersion68Test.java
@@ -1,9 +1,10 @@
-// Copyright (c) 2023, the R8 project authors. Please see the AUTHORS file
+// Copyright (c) 2024, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.cf;
+import com.android.tools.r8.CompilationFailedException;
import com.android.tools.r8.TestBase;
import com.android.tools.r8.TestParameters;
import com.android.tools.r8.TestParametersCollection;
@@ -14,7 +15,7 @@
import org.junit.runners.Parameterized;
@RunWith(Parameterized.class)
-public class ClassFileVersion66Test extends TestBase {
+public class ClassFileVersion68Test extends TestBase {
static final String EXPECTED = StringUtils.lines("Hello, world");
@@ -29,14 +30,15 @@
.build();
}
- public ClassFileVersion66Test(TestParameters parameters) {
+ public ClassFileVersion68Test(TestParameters parameters) {
this.parameters = parameters;
}
- @Test
+ // Update ASM once it has a release with v24 support.
+ @Test(expected = CompilationFailedException.class)
public void test() throws Exception {
testForD8(parameters.getBackend())
- .addProgramClassFileData(transformer(TestClass.class).setVersion(CfVersion.V22).transform())
+ .addProgramClassFileData(transformer(TestClass.class).setVersion(CfVersion.V24).transform())
.setMinApi(parameters)
.run(parameters.getRuntime(), TestClass.class)
.assertSuccessWithOutput(EXPECTED);
diff --git a/src/test/testbase/java/com/android/tools/r8/ToolHelper.java b/src/test/testbase/java/com/android/tools/r8/ToolHelper.java
index 83c77e86..745b3dd 100644
--- a/src/test/testbase/java/com/android/tools/r8/ToolHelper.java
+++ b/src/test/testbase/java/com/android/tools/r8/ToolHelper.java
@@ -208,8 +208,8 @@
public static final String R8_TEST_BUCKET = "r8-test-results";
- public static final String ASM_JAR = BUILD_DIR + "deps/asm-9.6.jar";
- public static final String ASM_UTIL_JAR = BUILD_DIR + "deps/asm-util-9.6.jar";
+ public static final String ASM_JAR = BUILD_DIR + "deps/asm-9.7.jar";
+ public static final String ASM_UTIL_JAR = BUILD_DIR + "deps/asm-util-9.7.jar";
public static final String LINE_SEPARATOR = StringUtils.LINE_SEPARATOR;
public static final String CLASSPATH_SEPARATOR = File.pathSeparator;
diff --git a/third_party/dependencies.tar.gz.sha1 b/third_party/dependencies.tar.gz.sha1
index adea68e..933b6a1 100644
--- a/third_party/dependencies.tar.gz.sha1
+++ b/third_party/dependencies.tar.gz.sha1
@@ -1 +1 @@
-9763dbe9e272504098a0f5ce55f7420f964b50f9
\ No newline at end of file
+e73831faa468788bf1f657991b90d598f48c5264
\ No newline at end of file
diff --git a/tools/asmifier.py b/tools/asmifier.py
index f599876..30412c1 100755
--- a/tools/asmifier.py
+++ b/tools/asmifier.py
@@ -10,7 +10,7 @@
import sys
import utils
-ASM_VERSION = '9.6'
+ASM_VERSION = '9.7'
ASM_JAR = os.path.join(utils.DEPENDENCIES_DIR, 'org', 'ow2', 'asm', 'asm',
ASM_VERSION, 'asm-' + ASM_VERSION + '.jar')
ASM_UTIL_JAR = os.path.join(utils.DEPENDENCIES_DIR, 'org', 'ow2', 'asm',
diff --git a/tools/create_local_maven_with_dependencies.py b/tools/create_local_maven_with_dependencies.py
index b66a639..1e4ae4f 100755
--- a/tools/create_local_maven_with_dependencies.py
+++ b/tools/create_local_maven_with_dependencies.py
@@ -21,7 +21,7 @@
]
ANDRDID_SUPPORT_VERSION = '25.4.0'
-ASM_VERSION = '9.6' # When updating update tools/asmifier.py and Toolhelper as well.
+ASM_VERSION = '9.7' # When updating update tools/asmifier.py and Toolhelper as well.
ESPRESSO_VERSION = '3.0.0'
FASTUTIL_VERSION = '7.2.1'
KOTLIN_METADATA_VERSION = '0.9.0'