asm merge requestshttps://gitlab.ow2.org/asm/asm/-/merge_requests2019-03-02T15:06:49Zhttps://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/188Avoid double-compilation of :asm2018-12-01T12:36:10ZNikita SkvortcovAvoid double-compilation of :asmReuse production classes of ":asm" project. Postpone retrofitting until a jar of production classes is required (e.g., for publishing). Use raw production classes as dependencies of tools, required to produce the jar.
This also allows th...Reuse production classes of ":asm" project. Postpone retrofitting until a jar of production classes is required (e.g., for publishing). Use raw production classes as dependencies of tools, required to produce the jar.
This also allows the project to be correctly imported by Intellij IDEAhttps://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/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/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/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/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/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/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/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 Forax