asm merge requestshttps://gitlab.ow2.org/asm/asm/-/merge_requests2020-07-20T14:14:50Zhttps://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/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/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/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/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/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/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/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/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/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 Forax