test/jdk/java/lang/instrument/asmlib/Instrumentor.java
>
>
> @asotona Would you mind reviewing?
liach has updated the pull request incrementally with one additional commit
since the last revision:
Shorten lines, move from mask() to ACC_ constants, other misc improvements
-
Changes
On Wed, 15 Mar 2023 02:37:05 GMT, liach wrote:
>> 8302822: Method/Field/Constructor/RecordComponent::getGenericInfo() is not
>> thread safe
>
> liach has updated the pull request with a new target base due to a merge or a
> rebase. The incremental webrev excludes the unre
> 8302822: Method/Field/Constructor/RecordComponent::getGenericInfo() is not
> thread safe
liach has updated the pull request with a new target base due to a merge or a
rebase. The incremental webrev excludes the unrelated changes brought in by the
merge/rebase. The pull request contain
Add Constant Descriptors for DirectMethodHandleDesc of MethodHandles::classData
and classDataAt in ConstantDescs. This facilitates easier access of class data
via condy in Classfile API-generated bytecode. Most other constant bootstrap
methods provided in the JDK, notably from `ConstantBootstrap
On Tue, 14 Mar 2023 17:32:00 GMT, ExE Boss wrote:
> I meant that `instanceof DynamicConstantDesc` would go after concrete classes
> (`Integer`, `Long`, `Float`, `Double`, and `String`), but before the
> `ConstantDesc` interfaces.
Still not feasible to make ReferenceClassDescImpl to go through
Such an API allows creating TypeKind from both Class and ClassDesc than having
to call descriptorString() explicitly at every use site.
See https://mail.openjdk.org/pipermail/classfile-api-dev/2023-March/000240.html
for context.
Upgraded usages of `fromDescriptor` to `from` in applicable use si
On Tue, 14 Mar 2023 15:27:50 GMT, Adam Sotona wrote:
>> jdk.jlink internal plugins are heavily using ASM
>>
>> This patch converts ASM calls to Classfile API.
>>
>> Please review.
>> Thanks,
>> Adam
>
> Adam Sotona has updated the pull request incrementally with three additional
> commits sinc
On Tue, 14 Mar 2023 14:51:34 GMT, Thiago Henrique Hüpner
wrote:
> 8304148: Remapping a class with Invokedynamic constant loses static bootstrap
> arguments
Created a JBS issue for you at https://bugs.openjdk.org/browse/JDK-8304148
-
PR: https://git.openjdk.org/jdk/pull/13021
Add String constants INIT_NAME, CLASS_INIT_NAME, MTD_void for the names and
method type of instance and class initializers; add String constant MAIN_NAME
and MTD_void_StringArray for the name and method type of main method.
Update occurrences of and in core libraries API specification
to refe
Summaries:
1. A few recommendations about updating the constant API is made at
https://mail.openjdk.org/pipermail/classfile-api-dev/2023-March/000233.html and
I may update this patch shall the API changes be integrated before
2. One ASM library-specific test, `LambdaAsm` is removed. Others have t
On Mon, 13 Mar 2023 23:46:58 GMT, ExE Boss wrote:
> Arguably, the `instanceof DynamicConstantDesc` check should go first, as
> there can be only one superclass, but multiple implemented interfaces.
I think this ordering is rather ranked by their relative frequency in bytecode.
Having integer c
On Mon, 13 Mar 2023 21:02:51 GMT, Adam Sotona wrote:
>> jdk/classfile/CorpusTest.java rarely fails in 1 of 6754 parametrised
>> parallel junit tests
>>
>> The root cause seems to be thread-unsafe lazy initialisation of
>> `TypeKind.newarraycodeToTypeTag` in `TypeKind::fromNewArrayCode`. Provid
On Mon, 13 Mar 2023 18:54:11 GMT, Adam Sotona wrote:
> jdk/classfile/CorpusTest.java rarely fails in 1 of 6754 parametrised parallel
> junit tests
>
> The root cause seems to be thread-unsafe lazy initialisation of
> `TypeKind.newarraycodeToTypeTag` in `TypeKind::fromNewArrayCode`. Provided
>
On Mon, 13 Mar 2023 08:13:44 GMT, liach wrote:
> Without this patch, the Classfile API tries to encode PrimitiveClassDesc as
> CONSTANT_Class_info and error in `toInternalName`.
@asotona Would you mind review this?
-
PR: https://git.openjdk.org/jdk/pull/12996
Without this patch, the Classfile API tries to encode PrimitiveClassDesc as
CONSTANT_Class_info and error in `toInternalName`.
-
Commit messages:
- 8304031: Classfile API cannot encode Primitive Class as Condy
Changes: https://git.openjdk.org/jdk/pull/12996/files
Webrev: https://w
On Fri, 10 Mar 2023 16:46:35 GMT, Glavo wrote:
> The Classfile API looks great. I want to ask if you have any plans to
> completely replace all uses of `jdk.internal.org.objectweb.asm` and delete
> its source code from OpenJDK in a short time?
I guess yes. https://bugs.openjdk.org/browse/JDK-8
On Fri, 10 Mar 2023 08:48:14 GMT, Adam Sotona wrote:
>> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy
>> classes and this patch converts it to use Classfile API.
>>
>> Please review.
>>
>> Thank you,
>> Adam
>
> Adam Sotona has updated the pull request with a new target
Also remove redundant casts to avoid javac warnings.
-
Commit messages:
- Move MethodTypeDesc api notes to MethodTypeDesc
- Merge branch 'master' of https://git.openjdk.java.net/jdk into
constdesc-override
- Remove redundant casts
- Covariant override of resolveConstantDesc for
Parameterizes `Lookup::accessClass` and `Lookup::ensureInitialized`. Updated an
applicable use-site within JDK to benefit from this patch.
-
Commit messages:
- update use sites
- 8288730: `Lookup::accessClass(Class)` should be generic on the type of
`targetClass`
Changes: https:/
On Fri, 10 Mar 2023 08:46:16 GMT, Adam Sotona wrote:
>> 8294962: java.base jdk.internal.module package uses ASM to modify and write
>> module-info.class.
>> This patch converts it to use Classfile API.
>>
>> Please review.
>> Thanks,
>> Adam
>
> Adam Sotona has updated the pull request with a n
BoundsException, and throws
> IllegalArgumentException in the Jshell for this patch.
liach has updated the pull request incrementally with one additional commit
since the last revision:
Copyright year
-
Changes:
- all: https://git.openjdk.org/jdk/pull/12964/files
- new: https://git.op
This typo doesn't allow creation of malformed ClassDesc or MethodTypeDesc, but
it produces an erroneous exception on certain inputs. Running
`java.lang.constant.MethodTypeDesc.ofDescriptor("(I[[[V)I")` in Jshell
19.0.2 throws StringIndexOutOfBoundsException, and throws
IllegalArgumentExcept
On Fri, 25 Nov 2022 14:38:55 GMT, Adam Sotona wrote:
> 8294962: java.base jdk.internal.module package uses ASM to modify and write
> module-info.class.
> This patch converts it to use Classfile API.
>
> Please review.
> Thanks,
> Adam
src/java.base/share/classes/jdk/internal/module/ModuleInfoW
On Thu, 9 Mar 2023 11:15:44 GMT, Adam Sotona wrote:
>> src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java line 661:
>>
>>> 659: */
>>> 660: private void generateMethod(ClassBuilder clb, ClassDesc
>>> className) {
>>> 661: MethodTypeDesc desc = MethodT
On Thu, 9 Feb 2023 18:48:19 GMT, Adam Sotona wrote:
>> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy
>> classes and this patch converts it to use Classfile API.
>>
>> Please review.
>>
>> Thank you,
>> Adam
>
> Adam Sotona has updated the pull request with a new target
On Sun, 19 Feb 2023 08:28:37 GMT, Ravali Yatham wrote:
> Added specific class loader object to proxy IllegalArgumentException from
> which the class was not visible
>
> The bug report for the same: https://bugs.openjdk.org/browse/JDK-8302791
src/java.base/share/classes/java/lang/reflect/Proxy.
On Mon, 20 Feb 2023 13:24:27 GMT, Tingjun Yuan wrote:
>> src/java.base/share/classes/java/util/Set.java line 742:
>>
>>> 740: E e1 = it.next();
>>> 741: if (!it.hasNext()) {
>>> 742: return Set.of(e0, e1);
>>
>> Bad change, doesn't handle e0.equals(e1), and this is g
On Mon, 20 Feb 2023 13:15:03 GMT, Tingjun Yuan wrote:
>> Currently, the two subclasses of `java.util.EnumSet` optimize bulk
>> operations when the argument is also a `EnumSet`, but there is no such
>> optimization for wrapper sets (returned by `Collections.unmodifiableSet`,
>> `Collections.syn
On Sun, 19 Feb 2023 18:41:18 GMT, liach wrote:
> 8302822: Method/Field/Constructor/RecordComponent::getGenericInfo() is not
> thread safe
We don't fear calling the factory twice for benign races, as the distinct
constructor factory instances are behaviorally the same.
The true is
On Thu, 9 Feb 2023 16:20:31 GMT, Tingjun Yuan wrote:
> Currently, the two subclasses of `java.util.EnumSet` optimize bulk operations
> when the argument is also a `EnumSet`, but there is no such optimization for
> wrapper sets (returned by `Collections.unmodifiableSet`,
> `Collections.synchron
8302822: Method/Field/Constructor/RecordComponent::getGenericInfo() is not
thread safe
-
Commit messages:
- 8302822: Method/Field/Constructor/RecordComponent::getGenericInfo() is not
thread safe
Changes: https://git.openjdk.org/jdk/pull/12643/files
Webrev: https://webrevs.openjdk
On Thu, 9 Feb 2023 18:11:18 GMT, Volker Simonis wrote:
>> Prior to
>> [JDK-8239384](https://bugs.openjdk.org/browse/JDK-8239384)/[JDK-8238358](https://bugs.openjdk.org/browse/JDK-8238358)
>> LambdaMetaFactory has created VM-anonymous classes which could easily be
>> unloaded once they were not
On Fri, 18 Nov 2022 18:12:56 GMT, Joe Darcy wrote:
>> Update the spec of Class.getModifiers to match long-standing behavior for
>> primitive and array classes. Remove unneeded implementation flexibility with
>> regard to setting other bit positions. This work was prompted to better
>> support
On Fri, 15 Apr 2022 05:58:32 GMT, liach wrote:
> Explicitly implement `remove` and `replace` in `IdentityHashMap` to compare
> values by identity. Updated API documentation of these two methods
> ([Preview](https://cr.openjdk.java.net/~liach/8178355/IdentityHashMap.html#remove(java.la
On Wed, 5 Oct 2022 03:40:27 GMT, liach wrote:
>> Explicitly implement `remove` and `replace` in `IdentityHashMap` to compare
>> values by identity. Updated API documentation of these two methods
>> ([Preview](https://cr.openjdk.java.net/~liach/8178355/IdentityH
On Mon, 17 Oct 2022 10:19:26 GMT, Сергей Цыпанов wrote:
>> We can use `Comparator.naturalOrder()` for cases when a `TreeMap` instance
>> is constructed without comparator. This allows to squash two branches in
>> `TreeMap.get()` into one.
>>
>> P.S. I think the comment of `TreeMap.getEntryUsin
On Wed, 5 Oct 2022 03:40:27 GMT, liach wrote:
>> Explicitly implement `remove` and `replace` in `IdentityHashMap` to compare
>> values by identity. Updated API documentation of these two methods
>> ([Preview](https://cr.openjdk.java.net/~liach/8178355/IdentityH
> Explicitly implement `remove` and `replace` in `IdentityHashMap` to compare
> values by identity. Updated API documentation of these two methods
> ([Preview](https://cr.openjdk.java.net/~liach/8178355/IdentityHashMap.html#remove(java.lang.Object,java.lang.Object)))
> to mention s
> Explicitly implement `remove` and `replace` in `IdentityHashMap` to compare
> values by identity. Updated API documentation of these two methods
> ([Preview](https://cr.openjdk.java.net/~liach/8178355/IdentityHashMap.html#remove(java.lang.Object,java.lang.Object)))
> to mention s
On Wed, 17 Aug 2022 11:23:57 GMT, Сергей Цыпанов wrote:
> We can use `Comparator.naturalOrder()` for cases when a `TreeMap` instance is
> constructed without comparator. This allows to squash two branches in
> `TreeMap.get()` into one.
>
> P.S. I think the comment of `TreeMap.getEntryUsingComp
On Fri, 6 May 2022 22:05:35 GMT, liach wrote:
>> Explicitly implement `remove` and `replace` in `IdentityHashMap` to compare
>> values by identity. Updated API documentation of these two methods
>> ([Preview](https://cr.openjdk.java.net/~liach/8178355/IdentityH
On Fri, 6 May 2022 22:05:35 GMT, liach wrote:
>> Explicitly implement `remove` and `replace` in `IdentityHashMap` to compare
>> values by identity. Updated API documentation of these two methods
>> ([Preview](https://cr.openjdk.java.net/~liach/8178355/IdentityH
On Tue, 17 May 2022 04:40:50 GMT, liach wrote:
> Generic repositories, the implementation detail for generic information in
> core reflection, can be updated to use the `@Stable` annotation to replace
> their `volatile` access. Their existing accessor code is already safe,
> readi
On Tue, 5 Jul 2022 22:22:46 GMT, Joe Darcy wrote:
> Update existing examples in java.lang.invoke.{MethodHandle, MethodHandles}
> to use snippets rather than the older markup idiom.
In addition, I believe we can add link in many examples, but I am not sure if
this is part of this issue or if i
On Wed, 22 Jun 2022 21:29:50 GMT, Andrey Turbanov wrote:
>> Instead of separate ConcurrentHashMap.get call, we can use result of
>> previous putIfAbsent call.
>
> Andrey Turbanov has updated the pull request incrementally with one
> additional commit since the last revision:
>
> 8288723: Avo
On Fri, 1 Jul 2022 20:39:49 GMT, Сергей Цыпанов wrote:
>> @Stable is only effective if the path leading to @Stable value can be
>> constant-folded by JIT. In above test, you have an instance field Method
>> method. This can not be constant-folded, so neither can @stable fiels in the
>> Field o
On Fri, 17 Jun 2022 11:21:49 GMT, Сергей Цыпанов wrote:
>> If there are two threads calling `Executable.hasRealParameterData()` under
>> race and the first one writes into volatile `Executable.parameters` field
>> (doing _releasing store_) and the second thread reads non-null value from
>> the
On Mon, 18 Apr 2022 06:15:54 GMT, liach wrote:
> Currently, in ProxyBuilder::mapToModule and ProxyBuilder::defineProxyClass,
> the interfaces are iterated twice. The two passes can be merged into one,
> yielding the whole proxy definition context (module, package, whether there
On Fri, 6 May 2022 22:05:35 GMT, liach wrote:
>> Explicitly implement `remove` and `replace` in `IdentityHashMap` to compare
>> values by identity. Updated API documentation of these two methods
>> ([Preview](https://cr.openjdk.java.net/~liach/8178355/IdentityH
On Thu, 26 May 2022 23:20:27 GMT, liach wrote:
>> Currently, in ProxyBuilder::mapToModule and ProxyBuilder::defineProxyClass,
>> the interfaces are iterated twice. The two passes can be merged into one,
>> yielding the whole proxy definition context (module, package, w
lem, I would
>> prefer szegedi's suggestion.
>
> @liach advance apologies for nitpicking: `ConcurrentHashMap` doesn't in
> general block while the mapping function runs. It can block _some_ concurrent
> updates, namely those that [hash to the same
> bin](https://u
On Mon, 20 Jun 2022 09:11:31 GMT, Attila Szegedi wrote:
>> Instead of separate ConcurrentHashMap.get call, we can use result of
>> previous putIfAbsent call.
>
> src/java.base/share/classes/java/time/format/DateTimeTextProvider.java line
> 319:
>
>> 317: store = prev;
>> 318:
he `ParameterData.parameters` field can probably be marked as [`@Stable`]
>> (since the `parameters` array is never modified):
>> Suggestion:
>>
>> record ParameterData(@Stable Parameter[] parameters, boolean real) {}
>>
>>
>> Also the `real` record
On Fri, 17 Jun 2022 06:14:32 GMT, liach wrote:
>> src/java.base/share/classes/java/lang/reflect/Executable.java line 453:
>>
>>> 451:
>>> 452: private transient boolean hasRealParameterData;
>>> 453: private transient volatile Parameter[] p
On Fri, 17 Jun 2022 05:34:25 GMT, ExE Boss wrote:
>> Сергей Цыпанов has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> 8288327: Add clarifying comments
>
> src/java.base/share/classes/java/lang/reflect/Executable.java line 453:
>
>> 451:
55 matches
Mail list logo