asm merge requestshttps://gitlab.ow2.org/asm/asm/-/merge_requests2022-09-11T07:23:28Zhttps://gitlab.ow2.org/asm/asm/-/merge_requests/362Add CLASS_EXTENDS to visitTypeAnnotation.2022-09-11T07:23:28ZAo LiAdd CLASS_EXTENDS to visitTypeAnnotation.It is possible to have CLASS_EXTENDS annotations in methods (for example https://github.com/google/guava/blob/master/guava/src/com/google/common/util/concurrent/ClosingFuture.java#L445). I also attached the compiled class file. [com.goog...It is possible to have CLASS_EXTENDS annotations in methods (for example https://github.com/google/guava/blob/master/guava/src/com/google/common/util/concurrent/ClosingFuture.java#L445). I also attached the compiled class file. [com.google.common.util.concurrent.ClosingFuture.class](/uploads/c6a0b7abf9f906fe4e0553093089a765/com.google.common.util.concurrent.ClosingFuture.class)Remi ForaxRemi Foraxhttps://gitlab.ow2.org/asm/asm/-/merge_requests/353Allow for Attributes to be read from/written to via different targets than a ...2022-08-03T06:24:05ZraphwAllow for Attributes to be read from/written to via different targets than a ClassReader/ClassWriter.For interoperability between ASM and other byte code processors (namely the Classfile API in the OpenJDK), it would become necessary to read and write Attributes from and to different targets then a ClassReader or ClassWriter. Currently,...For interoperability between ASM and other byte code processors (namely the Classfile API in the OpenJDK), it would become necessary to read and write Attributes from and to different targets then a ClassReader or ClassWriter. Currently, attributes are resolved against a ClassReader or ClassWriter within a protected method what makes it impossible to resolve the byte representation of an attribute from outside ASM. With this binary compatible change, it would become possible to redirect the reading or writing of attributes to any implementation of a ConstantPool(Sink/Source) which can be then be implemented to resolve constant pool indices against a JDK Classfile constant pool instead of a ClassWriter.
I am using this POC for my POC of integrating ASM with the new API. So far it really seems promising to plug ASM into the new API, but Attributes would require an API adjustment. (This is work in progress, but I would appreciate some early feedback, or an alternative suggestion of how to solve this.)
OpenJDK-ASM POC: https://github.com/raphw/asm-jdk-bridge/tree/writer-pochttps://gitlab.ow2.org/asm/asm/-/merge_requests/344Add an analyzeFromFrames method in Analyzer. This will be used in...2022-04-09T15:39:24ZEric BrunetonAdd an analyzeFromFrames method in Analyzer. This will be used in...Add an analyzeFromFrames method in Analyzer. This will be used in CheckClassAdapter to check frames if they are required and not computed with COMPUTE_FRAMES.Add an analyzeFromFrames method in Analyzer. This will be used in CheckClassAdapter to check frames if they are required and not computed with COMPUTE_FRAMES.Remi ForaxRemi Foraxhttps://gitlab.ow2.org/asm/asm/-/merge_requests/337Add getter for `ByteVector.length`2022-03-27T16:14:51ZExE BossAdd getter for `ByteVector.length`This adds the `ByteVector.size()` getter to get the current number of bytes present in the `ByteVector`. The name was chosen to match [`Collection.size()`](https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/util/Collection...This adds the `ByteVector.size()` getter to get the current number of bytes present in the `ByteVector`. The name was chosen to match [`Collection.size()`](https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/util/Collection.html#size()).
When implementing custom `Attribute` subclasses, there were times when I needed to get the size of the `ByteVector`.
---
This was originally merge request [!336](https://gitlab.ow2.org/asm/asm/-/merge_requests/336).https://gitlab.ow2.org/asm/asm/-/merge_requests/331Add assertions to InsnList for easier debugging2022-03-14T10:28:28ZAlexeyAdd assertions to InsnList for easier debuggingThis change adds some assertions to InsnList to to make it easier for developers to find bugs in their libraries and applications, for example, by running unit tests with `-ea` flag.This change adds some assertions to InsnList to to make it easier for developers to find bugs in their libraries and applications, for example, by running unit tests with `-ea` flag.https://gitlab.ow2.org/asm/asm/-/merge_requests/325Use Objects.checkIndex for boundary checking2021-06-22T09:19:44ZYi YangUse Objects.checkIndex for boundary checkingUse Objects.checkIndex for boundary checkingUse Objects.checkIndex for boundary checkinghttps://gitlab.ow2.org/asm/asm/-/merge_requests/320Resolve "CheckClassAdapter visit method does not allow a private or protected...2021-06-06T07:07:27ZEric BrunetonResolve "CheckClassAdapter visit method does not allow a private or protected inner class"Closes #317943.Closes #317943.Remi ForaxRemi Foraxhttps://gitlab.ow2.org/asm/asm/-/merge_requests/313Draft: Add map method for method local variables2021-09-19T10:16:09ZJamie MansfieldDraft: Add map method for method local variablesI'm going to leave this as a draft for a brief time - I want to discuss the change with a few projects that I know remap local variables, and try to make this as workable for them as possible.I'm going to leave this as a draft for a brief time - I want to discuss the change with a few projects that I know remap local variables, and try to make this as workable for them as possible.https://gitlab.ow2.org/asm/asm/-/merge_requests/301Allows classes extending ClassReader to decide if visit MethodParameters2020-12-20T08:02:29ZGuillermo VarelaAllows classes extending ClassReader to decide if visit MethodParametersWith https://gitlab.ow2.org/asm/asm/-/merge_requests/278 MethodParameters attribute is skipped when using SKIP_DEBUG. That's stopping us from upgrading to a newer ASM version.
Having the decision being made in a protected method we coul...With https://gitlab.ow2.org/asm/asm/-/merge_requests/278 MethodParameters attribute is skipped when using SKIP_DEBUG. That's stopping us from upgrading to a newer ASM version.
Having the decision being made in a protected method we could override it and start using a new version of ASM.
For clarity, not using the SKIP_DEBUG flag would not work for our case as that would include too much of extra things. Having a customizable condition for MethodParameters was the cleanest change I could came up with.Remi ForaxRemi Foraxhttps://gitlab.ow2.org/asm/asm/-/merge_requests/296Update MethodWriter.java2020-07-20T14:14:50ZZhang QingsongUpdate MethodWriter.java- update previousFrameOffset for Frame Type F_NEW, too.- update previousFrameOffset for Frame Type F_NEW, too.https://gitlab.ow2.org/asm/asm/-/merge_requests/289Shorts, Bytes, Chars and Booleans are int values2020-04-16T22:25:16ZIdan HorowitzShorts, Bytes, Chars and Booleans are int valuesThis change fixes an exception that is thrown when analyzing load instructions with Short/Byte/Character/Boolean values.
Example stack trace:
`Caused by: java.lang.IllegalArgumentException: Illegal LDC constant 10
at org.objectweb.asm...This change fixes an exception that is thrown when analyzing load instructions with Short/Byte/Character/Boolean values.
Example stack trace:
`Caused by: java.lang.IllegalArgumentException: Illegal LDC constant 10
at org.objectweb.asm.tree.analysis.BasicInterpreter.newOperation(BasicInterpreter.java:145)
at org.objectweb.asm.tree.analysis.BasicInterpreter.newOperation(BasicInterpreter.java:52)
at org.objectweb.asm.tree.analysis.Frame.execute(Frame.java:270)
at org.objectweb.asm.tree.analysis.Analyzer.analyze(Analyzer.java:200)
... 8 more`https://gitlab.ow2.org/asm/asm/-/merge_requests/287Fix code to allow empty record by using a new flag ACC_RECORD2020-04-01T18:03:51ZRemi ForaxFix code to allow empty record by using a new flag ACC_RECORDAllow empty record by flagging all record classes with ACC_RECORDAllow empty record by flagging all record classes with ACC_RECORDEric BrunetonEric Brunetonhttps://gitlab.ow2.org/asm/asm/-/merge_requests/284update bnd gradle plugin to 5.0.02020-03-20T20:18:28ZRemi Foraxupdate bnd gradle plugin to 5.0.0update bnd gradle plugin version
It seems that the previous version is not available anymore ??update bnd gradle plugin version
It seems that the previous version is not available anymore ??Eric BrunetonEric Brunetonhttps://gitlab.ow2.org/asm/asm/-/merge_requests/280Added ClassLoader argument for constructor in ClassReader.2019-12-14T10:27:19ZMaroš PrejsaAdded ClassLoader argument for constructor in ClassReader.https://gitlab.ow2.org/asm/asm/-/merge_requests/279Add an abstract MemberVisitor class to be able to reduce code duplication in...2019-11-25T19:10:22ZEric BrunetonAdd an abstract MemberVisitor class to be able to reduce code duplication in...Add an abstract MemberVisitor class to be able to reduce code duplication in ClassReader. Not sure if the class and/or its methods must be public.
Results of 3 benchmark runs with this change:
Benchmark Mode C...Add an abstract MemberVisitor class to be able to reduce code duplication in ClassReader. Not sure if the class and/or its methods must be public.
Results of 3 benchmark runs with this change:
Benchmark Mode Cnt Score Error Units
AdapterBenchmark.read_asm7_1 thrpt 30 623,892 ± 1,506 ops/s
AdapterBenchmark.read_asmCurrent thrpt 30 621,629 ± 1,835 ops/s
Benchmark Mode Cnt Score Error Units
AdapterBenchmark.read_asm7_1 thrpt 30 624,589 ± 1,260 ops/s
AdapterBenchmark.read_asmCurrent thrpt 30 622,971 ± 2,541 ops/s
Benchmark Mode Cnt Score Error Units
AdapterBenchmark.read_asm7_1 thrpt 30 623,515 ± 1,680 ops/s
AdapterBenchmark.read_asmCurrent thrpt 30 622,151 ± 1,619 ops/s
and without it:
Benchmark Mode Cnt Score Error Units
AdapterBenchmark.read_asm7_1 thrpt 30 624,141 ± 1,511 ops/s
AdapterBenchmark.read_asmCurrent thrpt 30 625,117 ± 1,653 ops/s
Benchmark Mode Cnt Score Error Units
AdapterBenchmark.read_asm7_1 thrpt 30 607,326 ± 1,285 ops/s
AdapterBenchmark.read_asmCurrent thrpt 30 621,902 ± 1,259 ops/s
Benchmark Mode Cnt Score Error Units
AdapterBenchmark.read_asm7_1 thrpt 30 623,548 ± 1,490 ops/s
AdapterBenchmark.read_asmCurrent thrpt 30 621,814 ± 1,579 ops/sRemi ForaxRemi Foraxhttps://gitlab.ow2.org/asm/asm/-/merge_requests/273Publish the license to Maven. It will be available at URLs such as...2019-09-12T07:40:36ZEric BrunetonPublish the license to Maven. It will be available at URLs such as...Publish the license to Maven. It will be available at URLs such as https://repo1.maven.org/maven2/org/ow2/asm/asm/7.2/asm-7.2-LICENSE.txt.
Closes #317881Publish the license to Maven. It will be available at URLs such as https://repo1.maven.org/maven2/org/ow2/asm/asm/7.2/asm-7.2-LICENSE.txt.
Closes #317881https://gitlab.ow2.org/asm/asm/-/merge_requests/268Make build jars reproducible2019-08-07T12:17:20ZVladimir SitnikovMake build jars reproduciblefixes https://gitlab.ow2.org/asm/asm/issues/317879fixes https://gitlab.ow2.org/asm/asm/issues/317879https://gitlab.ow2.org/asm/asm/-/merge_requests/257Cache the CONSTANT_InvokeDynamic constants.2019-03-02T15:06:49ZEric BrunetonCache the CONSTANT_InvokeDynamic constants.I made new measurements which confirm that this does not degrade performance for pre Java 8 classes, and slightly increases performance for classes with CONSTANT_InvokeDynamic constants.I made new measurements which confirm that this does not degrade performance for pre Java 8 classes, and slightly increases performance for classes with CONSTANT_InvokeDynamic constants.Remi ForaxRemi Foraxhttps://gitlab.ow2.org/asm/asm/-/merge_requests/249Fix NPE in CheckMethodAdapter2019-02-23T14:22:28ZEvgeny MandrikovFix NPE in CheckMethodAdapterFixes #317869Fixes #317869https://gitlab.ow2.org/asm/asm/-/merge_requests/243Use a thread local to avoid having to override or call deprecated methods in...2019-02-23T10:10:36ZEric BrunetonUse a thread local to avoid having to override or call deprecated methods in...Use a thread local to avoid having to override or call deprecated methods in MethodVisitor subclasses. See the comments in MethodVisitor. It is possible to get the same behavior by using an unused bit of 'opcode' as the 'preventRedirect'...Use a thread local to avoid having to override or call deprecated methods in MethodVisitor subclasses. See the comments in MethodVisitor. It is possible to get the same behavior by using an unused bit of 'opcode' as the 'preventRedirect' flag, but this would be a non-generic and hacky method.Remi ForaxRemi Forax