Re: [9, 8u40] RFR (XXS): 8066746: MHs.explicitCastArguments does incorrect type checks for VarargsCollector

2014-12-08 Thread John Rose
Reviewed. — John > On Dec 8, 2014, at 3:47 PM, Vladimir Ivanov > wrote: > > http://cr.openjdk.java.net/~vlivanov/8066746/webrev.00/ > https://bugs.openjdk.java.net/browse/JDK-8066746 > > Recent changes (8057656 [1]) broke MHs.explicitCastArguments for > VarargsCollector case. It introduced a

[9, 8u40] RFR (XXS): 8066746: MHs.explicitCastArguments does incorrect type checks for VarargsCollector

2014-12-08 Thread Vladimir Ivanov
http://cr.openjdk.java.net/~vlivanov/8066746/webrev.00/ https://bugs.openjdk.java.net/browse/JDK-8066746 Recent changes (8057656 [1]) broke MHs.explicitCastArguments for VarargsCollector case. It introduced an equivalence check between MHs.explicitCastArguments and MethodHandle.asType() which d

Re: [9, 8u40] RFR (M): 8057020: LambdaForm caches should support eviction

2014-12-08 Thread Peter Levart
On 12/08/2014 09:09 PM, Vladimir Ivanov wrote: Peter, Just one more thought... In lines: 358 } else if (stale < 0 && k.get() == null) { 359 stale = i; // remember 1st stale entry index 360 } ...an index to 1st stale en

Re: [9, 8u40] RFR (M): 8057020: LambdaForm caches should support eviction

2014-12-08 Thread Vladimir Ivanov
Peter, Just one more thought... In lines: 358 } else if (stale < 0 && k.get() == null) { 359 stale = i; // remember 1st stale entry index 360 } ...an index to 1st stale entry is remembered while scanning the array so that

Re: [9, 8u40] RFR (M): 8057020: LambdaForm caches should support eviction

2014-12-08 Thread Vladimir Ivanov
Peter, First, just a nit. I think that in LambdaFormEditor: 289 private LambdaForm putInCache(Transform key, LambdaForm form) { 290 key = key.withResult(form); 291 for (int pass = 0; ; pass++) { 292 Object c = lambdaForm.transformCache; 293

Re: [9, 8u40] RFR (M): 8057020: LambdaForm caches should support eviction

2014-12-08 Thread Vladimir Ivanov
Peter, Thanks for looking into that and for you initial prototype! So WeakReferences did not hold LambdaForms long enough even with strong back-reference from LambdaForm to the lambda form 'this' was derived from? So final derived LambdaForms (leaves) are not kept referenced from the code? Or d

Re: [9, 8u40] RFR (M): 8057020: LambdaForm caches should support eviction

2014-12-08 Thread Paul Sandoz
On Dec 6, 2014, at 1:30 PM, Peter Levart wrote: > Now what scares me (might be that I don't have an intimacy with LambdaForm > class like you do). There is a situation where you publish LambdaForm > instances via data race. > > One form of LambdaForm.transformCache is an array of Transform obje

Re: [9, 8u40] RFR (M): 8057020: LambdaForm caches should support eviction

2014-12-08 Thread Peter Levart
Just one more thought... In lines: 358 } else if (stale < 0 && k.get() == null) { 359 stale = i; // remember 1st stale entry index 360 } ...an index to 1st stale entry is remembered while scanning the array so that at the end,