SPRING PATCH: no preview mode check for ASM 9 experimental, enabling it by default. */ - int ASM9_EXPERIMENTAL = 1 << 24 | 9 << 16 | 0 << 8; + int ASM10_EXPERIMENTAL = 1 << 24 | 10 << 16 | 0 << 8; /* * Internal flags used to redirect calls to deprecated methods. For instance, if a visitOldStuff @@ -279,6 +280,7 @@ public interface Opcodes { int V13 = 0 << 16 | 57; int V14 = 0 << 16 | 58; int V15 = 0 << 16 | 59; + int V16 = 0 << 16 | 60; /** * Version flag indicating that the class is using 'preview' features. diff --git a/spring-core/src/main/java/org/springframework/asm/RecordComponentVisitor.java b/spring-core/src/main/java/org/springframework/asm/RecordComponentVisitor.java index 60db34c9c581..0a79e2cb4486 100644 --- a/spring-core/src/main/java/org/springframework/asm/RecordComponentVisitor.java +++ b/spring-core/src/main/java/org/springframework/asm/RecordComponentVisitor.java @@ -37,8 +37,8 @@ */ public abstract class RecordComponentVisitor { /** - * The ASM API version implemented by this visitor. The value of this field must be {@link - * Opcodes#ASM8}. + * The ASM API version implemented by this visitor. The value of this field must be one of {@link + * Opcodes#ASM8} or {@link Opcodes#ASM9}. */ protected final int api; @@ -50,7 +50,8 @@ public abstract class RecordComponentVisitor { /** * Constructs a new {@link RecordComponentVisitor}. * - * @param api the ASM API version implemented by this visitor. Must be {@link Opcodes#ASM8}. + * @param api the ASM API version implemented by this visitor. Must be one of {@link Opcodes#ASM8} + * or {@link Opcodes#ASM9}. */ public RecordComponentVisitor(final int api) { this(api, null); @@ -65,12 +66,13 @@ public RecordComponentVisitor(final int api) { */ public RecordComponentVisitor( final int api, final RecordComponentVisitor recordComponentVisitor) { - if (api != Opcodes.ASM8 + if (api != Opcodes.ASM9 + && api != Opcodes.ASM8 && api != Opcodes.ASM7 && api != Opcodes.ASM6 && api != Opcodes.ASM5 && api != Opcodes.ASM4 - && api != Opcodes.ASM9_EXPERIMENTAL) { + && api != Opcodes.ASM10_EXPERIMENTAL) { throw new IllegalArgumentException("Unsupported api " + api); } // SPRING PATCH: no preview mode check for ASM 9 experimental diff --git a/spring-core/src/main/java/org/springframework/asm/RecordComponentWriter.java b/spring-core/src/main/java/org/springframework/asm/RecordComponentWriter.java index 98687e60df9b..bd007ac26d61 100644 --- a/spring-core/src/main/java/org/springframework/asm/RecordComponentWriter.java +++ b/spring-core/src/main/java/org/springframework/asm/RecordComponentWriter.java @@ -94,7 +94,7 @@ final class RecordComponentWriter extends RecordComponentVisitor { final String name, final String descriptor, final String signature) { - super(/* latest api = */ Opcodes.ASM8); + super(/* latest api = */ Opcodes.ASM9); this.symbolTable = symbolTable; this.nameIndex = symbolTable.addConstantUtf8(name); this.descriptorIndex = symbolTable.addConstantUtf8(descriptor); diff --git a/spring-core/src/main/java/org/springframework/asm/SpringAsmInfo.java b/spring-core/src/main/java/org/springframework/asm/SpringAsmInfo.java index aa34d8d470dc..609551fd40dd 100644 --- a/spring-core/src/main/java/org/springframework/asm/SpringAsmInfo.java +++ b/spring-core/src/main/java/org/springframework/asm/SpringAsmInfo.java @@ -18,7 +18,7 @@ /** * Utility class exposing constants related to Spring's internal repackaging - * of the ASM bytecode library: currently based on ASM 8.x plus minor patches. + * of the ASM bytecode library: currently based on ASM 9.0 plus minor patches. * *
See package-level javadocs for more * information on {@code org.springframework.asm}. @@ -31,8 +31,8 @@ public final class SpringAsmInfo { /** * The ASM compatibility version for Spring's ASM visitor implementations: - * currently {@link Opcodes#ASM9_EXPERIMENTAL}, as of Spring Framework 5.3. + * currently {@link Opcodes#ASM10_EXPERIMENTAL}, as of Spring Framework 5.3. */ - public static final int ASM_VERSION = Opcodes.ASM9_EXPERIMENTAL; + public static final int ASM_VERSION = Opcodes.ASM10_EXPERIMENTAL; } diff --git a/spring-core/src/main/java/org/springframework/asm/package-info.java b/spring-core/src/main/java/org/springframework/asm/package-info.java index b1ae94438ce4..18df410f4266 100644 --- a/spring-core/src/main/java/org/springframework/asm/package-info.java +++ b/spring-core/src/main/java/org/springframework/asm/package-info.java @@ -1,6 +1,6 @@ /** * Spring's repackaging of - * ASM 8.1 + * ASM 9.0 * (with Spring-specific patches; for internal use only). * *
This repackaging technique avoids any potential conflicts with