> Hi,
>
> This patch adds an asExact() combinator to VarHandle, that will return a new
> VarHandle that performs exact type checks, similar to
> MethodHandle::invokeExact, to help developers catch inexact VarHandle usage,
> which can lead to performance degradation.
>
> This is implemented usi
> Hi,
>
> This patch adds an asExact() combinator to VarHandle, that will return a new
> VarHandle that performs exact type checks, similar to
> MethodHandle::invokeExact, to help developers catch inexact VarHandle usage,
> which can lead to performance degradation.
>
> This is implemented usi
On Thu, 29 Oct 2020 18:14:05 GMT, Jorn Vernee wrote:
>> Hi,
>>
>> This patch adds an asExact() combinator to VarHandle, that will return a new
>> VarHandle that performs exact type checks, similar to
>> MethodHandle::invokeExact, to help developers catch inexact VarHandle usage,
>> which can
> Hi,
>
> This patch adds an asExact() combinator to VarHandle, that will return a new
> VarHandle that performs exact type checks, similar to
> MethodHandle::invokeExact, to help developers catch inexact VarHandle usage,
> which can lead to performance degradation.
>
> This is implemented usi
On Tue, 27 Oct 2020 15:01:31 GMT, Jorn Vernee wrote:
>> I've updated the implementation of accessModeType to work with the ordinal
>> directly. Note that it was using the AccessType ordinal though, so I also
>> had to change the parameter type of accessModeTypeUncached, and the
>> respective i
On Mon, 26 Oct 2020 18:54:45 GMT, Jorn Vernee wrote:
>> Paul,
>> an invoker has the MethodHandle (resp. VarHandle) as first argument so it's
>> not the same semantics.
>
> I've updated the implementation of accessModeType to work with the ordinal
> directly. Note that it was using the AccessTyp
> Hi,
>
> This patch adds an asExact() combinator to VarHandle, that will return a new
> VarHandle that performs exact type checks, similar to
> MethodHandle::invokeExact, to help developers catch inexact VarHandle usage,
> which can lead to performance degradation.
>
> This is implemented usi
> Hi,
>
> This patch adds an asExact() combinator to VarHandle, that will return a new
> VarHandle that performs exact type checks, similar to
> MethodHandle::invokeExact, to help developers catch inexact VarHandle usage,
> which can lead to performance degradation.
>
> This is implemented usi
On Fri, 23 Oct 2020 17:47:36 GMT, Jorn Vernee wrote:
> Hi,
>
> This patch adds an asExact() combinator to VarHandle, that will return a new
> VarHandle that performs exact type checks, similar to
> MethodHandle::invokeExact, to help developers catch inexact VarHandle usage,
> which can lead t
On Mon, 26 Oct 2020 17:13:05 GMT, Rémi Forax
wrote:
>> We can clarify the new methods and tie them closer to method handle
>> semantics. I suggest the names `asExactInvoker` and `asInvoker`, referencing
>> `MethodHandles.exactInvoker` and `MethodHandles.invoker` respectively. (The
>> term "ge
On Mon, 26 Oct 2020 16:34:10 GMT, Paul Sandoz wrote:
>> The direct use of the enum ordinal is because HotSpot accessing it from the
>> enum value is (or was) not optimal in C2.
>>
>> You can avoid the addition of the stable array by doing the following:
>>
>> public final MethodType acces
On Mon, 26 Oct 2020 16:13:59 GMT, Paul Sandoz wrote:
>> I've updated the javadoc, and added two benchmarks that show the existing
>> discrepancy between an exact and a generic use of a VarHandle, as well as
>> showing that an exact VarHandle is as fast as a generic VarHandle for an
>> exact in
On Mon, 26 Oct 2020 13:37:58 GMT, Jorn Vernee wrote:
>> @PaulSandoz I've implemented your suggestion, by moving the `exact` flag to
>> VarHandle itself. FWIW, the VH::accessModeType method took an AccessMode
>> value as an argument, and the AccessDescriptor only stored the ordinal, so I
>> add
On Fri, 23 Oct 2020 23:58:29 GMT, Jorn Vernee wrote:
>> @PaulSandoz Thanks. I initially tested this with memory access VarHandles,
>> which don't erase the receiver type. e.g.
>>
>> MemoryLayout layout = MemoryLayout.ofSequence(10, JAVA_INT);
>> VarHandle vh = layout.varHandle(int.class,
>> Me
> Hi,
>
> This patch adds an asExact() combinator to VarHandle, that will return a new
> VarHandle that performs exact type checks, similar to
> MethodHandle::invokeExact, to help developers catch inexact VarHandle usage,
> which can lead to performance degradation.
>
> This is implemented usi
> Hi,
>
> This patch adds an asExact() combinator to VarHandle, that will return a new
> VarHandle that performs exact type checks, similar to
> MethodHandle::invokeExact, to help developers catch inexact VarHandle usage,
> which can lead to performance degradation.
>
> This is implemented usi
> Hi,
>
> This patch adds an asExact() combinator to VarHandle, that will return a new
> VarHandle that performs exact type checks, similar to
> MethodHandle::invokeExact, to help developers catch inexact VarHandle usage,
> which can lead to performance degradation.
>
> This is implemented usi
On Fri, 23 Oct 2020 21:38:16 GMT, Jorn Vernee wrote:
>> This approach does not work for reference types, since they are erased to
>> `Object`, and then exact checking will be performed on the erased reference
>> types.
>>
>> For example try this:
>>
>> import java.lang.invoke.MethodHandles;
>
> Hi,
>
> This patch adds an asExact() combinator to VarHandle, that will return a new
> VarHandle that performs exact type checks, similar to
> MethodHandle::invokeExact, to help developers catch inexact VarHandle usage,
> which can lead to performance degradation.
>
> This is implemented usi
On Fri, 23 Oct 2020 20:41:31 GMT, Paul Sandoz wrote:
>> Jorn Vernee has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Make internalName helper method static
>
> This approach does not work for reference types, since they are erased to
> `
On Fri, 23 Oct 2020 18:06:51 GMT, Jorn Vernee wrote:
>> Hi,
>>
>> This patch adds an asExact() combinator to VarHandle, that will return a new
>> VarHandle that performs exact type checks, similar to
>> MethodHandle::invokeExact, to help developers catch inexact VarHandle usage,
>> which can
On Fri, 23 Oct 2020 18:02:11 GMT, Rémi Forax
wrote:
>> Jorn Vernee has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Make internalName helper method static
>
> src/java.base/share/classes/java/lang/invoke/MemoryAccessVarHandleGenerator.ja
On Fri, 23 Oct 2020 18:04:11 GMT, Jorn Vernee wrote:
>> Hi,
>>
>> This patch adds an asExact() combinator to VarHandle, that will return a new
>> VarHandle that performs exact type checks, similar to
>> MethodHandle::invokeExact, to help developers catch inexact VarHandle usage,
>> which can
> Hi,
>
> This patch adds an asExact() combinator to VarHandle, that will return a new
> VarHandle that performs exact type checks, similar to
> MethodHandle::invokeExact, to help developers catch inexact VarHandle usage,
> which can lead to performance degradation.
>
> This is implemented usi
24 matches
Mail list logo