Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant [v2]

2025-05-17 Thread ExE Boss
On Mon, 24 Feb 2025 23:45:37 GMT, Chen Liang wrote: >> LF editor spins classes, this avoids the spinning overhead and should speed >> up non-capturing lambdas too. >> >> There may need to be additional intrinsic work for MH combinator lf bytecode >> generation. > > Chen Liang has updated the p

Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant [v2]

2025-05-17 Thread Chen Liang
On Sat, 17 May 2025 14:32:43 GMT, ExE Boss wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> We no longer load DelegateMH as we no longer rebind > > src/java.base/share/classes/java/lang/invoke/MethodHandles.java line

Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant [v2]

2025-03-07 Thread Chen Liang
On Mon, 24 Feb 2025 23:45:37 GMT, Chen Liang wrote: >> LF editor spins classes, this avoids the spinning overhead and should speed >> up non-capturing lambdas too. >> >> There may need to be additional intrinsic work for MH combinator lf bytecode >> generation. > > Chen Liang has updated the p

Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant [v2]

2025-03-05 Thread Claes Redestad
On Tue, 25 Feb 2025 22:08:33 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java line 2241: >> >>> 2239: var form = constantForm(basicType); >>> 2240: >>> 2241: if (type.isPrimitive()) { >> >> I think you could simplify this using `Wrapp

Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant [v2]

2025-03-05 Thread Claes Redestad
On Mon, 24 Feb 2025 23:45:37 GMT, Chen Liang wrote: >> LF editor spins classes, this avoids the spinning overhead and should speed >> up non-capturing lambdas too. >> >> There may need to be additional intrinsic work for MH combinator lf bytecode >> generation. > > Chen Liang has updated the p

Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant [v2]

2025-03-05 Thread Chen Liang
On Tue, 4 Mar 2025 20:36:02 GMT, John R Rose wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> We no longer load DelegateMH as we no longer rebind > > src/java.base/share/classes/java/lang/invoke/SimpleMethodHandle.jav

Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant [v2]

2025-03-04 Thread John R Rose
On Mon, 24 Feb 2025 23:45:37 GMT, Chen Liang wrote: >> LF editor spins classes, this avoids the spinning overhead and should speed >> up non-capturing lambdas too. >> >> There may need to be additional intrinsic work for MH combinator lf bytecode >> generation. > > Chen Liang has updated the p

Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant [v2]

2025-03-04 Thread Chen Liang
On Tue, 25 Feb 2025 21:51:15 GMT, Claes Redestad wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> We no longer load DelegateMH as we no longer rebind > > Just got back home. Some comments inline, will need to run some

Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant [v2]

2025-03-04 Thread Jorn Vernee
On Mon, 24 Feb 2025 23:45:37 GMT, Chen Liang wrote: >> LF editor spins classes, this avoids the spinning overhead and should speed >> up non-capturing lambdas too. >> >> There may need to be additional intrinsic work for MH combinator lf bytecode >> generation. > > Chen Liang has updated the p

Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant [v2]

2025-03-04 Thread Jorn Vernee
On Tue, 4 Mar 2025 14:09:03 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/invoke/LambdaForm.java line 1658: >> >>> 1656: var carrier = argument(0, L_TYPE).withConstraint(species); // >>> BMH bound with data >>> 1657: Name[] constNames = new Name[] { carrier, ne

Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant [v2]

2025-03-04 Thread Chen Liang
On Tue, 4 Mar 2025 13:35:50 GMT, Jorn Vernee wrote: >> I reviewed the other use of `intrinsicData`, `tableSwitch`. I believe the >> intrinsic is actually a regression by growing the bytecode size - we should >> just select a MH via hash table lookup and invoke that MH, given all MHs in >> that

Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant [v2]

2025-03-04 Thread Chen Liang
On Tue, 4 Mar 2025 11:56:50 GMT, Jorn Vernee wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> We no longer load DelegateMH as we no longer rebind > > src/java.base/share/classes/java/lang/invoke/LambdaForm.java line 1

Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant [v2]

2025-03-04 Thread Jorn Vernee
On Mon, 24 Feb 2025 22:08:53 GMT, Chen Liang wrote: > we should just select a MH via hash table lookup and invoke that MH I had something like this in an early prototype of the `tableSwitch` combinator, but it does not work, as it prevents the method handle calls for each case from being inlin

Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant [v2]

2025-03-04 Thread Jorn Vernee
On Mon, 24 Feb 2025 23:45:37 GMT, Chen Liang wrote: >> LF editor spins classes, this avoids the spinning overhead and should speed >> up non-capturing lambdas too. >> >> There may need to be additional intrinsic work for MH combinator lf bytecode >> generation. > > Chen Liang has updated the p

Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant [v2]

2025-02-25 Thread Chen Liang
On Tue, 25 Feb 2025 21:38:58 GMT, Claes Redestad wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> We no longer load DelegateMH as we no longer rebind > > src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.j

Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant [v2]

2025-02-25 Thread Claes Redestad
On Mon, 24 Feb 2025 23:45:37 GMT, Chen Liang wrote: >> LF editor spins classes, this avoids the spinning overhead and should speed >> up non-capturing lambdas too. >> >> There may need to be additional intrinsic work for MH combinator lf bytecode >> generation. > > Chen Liang has updated the p

Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant [v2]

2025-02-24 Thread Chen Liang
> LF editor spins classes, this avoids the spinning overhead and should speed > up non-capturing lambdas too. > > There may need to be additional intrinsic work for MH combinator lf bytecode > generation. Chen Liang has updated the pull request incrementally with one additional commit since th

Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant

2025-02-24 Thread Chen Liang
On Thu, 20 Feb 2025 02:33:59 GMT, Chen Liang wrote: > LF editor spins classes, this avoids the spinning overhead and should speed > up non-capturing lambdas too. > > There may need to be additional intrinsic work for MH combinator lf bytecode > generation. I think this version should be fine:

Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant

2025-02-24 Thread Chen Liang
On Fri, 21 Feb 2025 23:17:50 GMT, John R Rose wrote: >> LF editor spins classes, this avoids the spinning overhead and should speed >> up non-capturing lambdas too. >> >> There may need to be additional intrinsic work for MH combinator lf bytecode >> generation. > > src/java.base/share/classes

Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant

2025-02-24 Thread John R Rose
On Thu, 20 Feb 2025 02:33:59 GMT, Chen Liang wrote: > LF editor spins classes, this avoids the spinning overhead and should speed > up non-capturing lambdas too. > > There may need to be additional intrinsic work for MH combinator lf bytecode > generation. You are on the right track. Some of

RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant

2025-02-24 Thread Chen Liang
LF editor spins classes, this avoids the spinning overhead and should speed up non-capturing lambdas too. There may need to be additional intrinsic work for MH combinator lf bytecode generation. - Commit messages: - Years, roll back unrelated changes - Simplify constant making -