Re: Anonymous class

2019-01-25 Thread Mandy Chung
On 1/25/19 5:37 AM, David Holmes wrote: > The class name is com.google.common.collect.Iterators$3, and it is an > anonymous class.     I'm confused. Are you talking about Java level anonymous classes or VM     anonymous classes as created by Unsafe.defineAnonymousCla

Re: Anonymous class

2019-01-25 Thread David Holmes
l...@oracle.com>> wrote: On 25/01/2019 6:52 pm, yumin qi wrote: > Hi, > >    I have a question of anonymous class. We know the anonymous class with a > host_klass, and the flag is set when the InstanceKlass is created after the > c

Re: Anonymous class

2019-01-25 Thread yumin qi
David Holmes wrote: > > > On 25/01/2019 6:52 pm, yumin qi wrote: > > Hi, > > > >I have a question of anonymous class. We know the anonymous class > with a > > host_klass, and the flag is set when the InstanceKlass is created after > the > > class

Re: Anonymous class

2019-01-25 Thread David Holmes
On 25/01/2019 6:52 pm, yumin qi wrote: Hi, I have a question of anonymous class. We know the anonymous class with a host_klass, and the flag is set when the InstanceKlass is created after the class parsed. In case of a regular java class file, the flag will be set correctly but for the

Anonymous class

2019-01-25 Thread yumin qi
Hi, I have a question of anonymous class. We know the anonymous class with a host_klass, and the flag is set when the InstanceKlass is created after the class parsed. In case of a regular java class file, the flag will be set correctly but for the case it is not set: SystemDictionary

Re: RFR 8058575: IllegalAccessError trying to access package-private class from VM anonymous class

2016-09-02 Thread harold seigel
575: IllegalAccessError trying to access package-private class from VM anonymous class Hi Rémi, Thank you for looking at this change. Not allowing host classes to be array classes is not completely unrelated to this bug because it affects the implementation of the code that prepends the host clas

Re: RFR 8058575: IllegalAccessError trying to access package-private class from VM anonymous class

2016-09-02 Thread forax
AccessError trying to access package-private > class from VM anonymous class > Hi Rémi, > > Thank you for looking at this change. > > Not allowing host classes to be array classes is not completely > unrelated to this bug because it affects the implementation of the code > that p

Re: RFR 8058575: IllegalAccessError trying to access package-private class from VM anonymous class

2016-09-02 Thread harold seigel
Hi Rémi, Thank you for looking at this change. Not allowing host classes to be array classes is not completely unrelated to this bug because it affects the implementation of the code that prepends the host class's package to the anonymous class. We decided to not allow array host class

Re: RFR 8058575: IllegalAccessError trying to access package-private class from VM anonymous class

2016-09-02 Thread Remi Forax
De: "harold seigel" > À: "Alan Bateman" , "Hotspot dev runtime" > , > core-libs-dev@openjdk.java.net > Envoyé: Vendredi 2 Septembre 2016 17:03:34 > Objet: Re: RFR 8058575: IllegalAccessError trying to access package-private > class from VM anonymous

Re: RFR 8058575: IllegalAccessError trying to access package-private class from VM anonymous class

2016-09-02 Thread harold seigel
Thanks Alan. I'll go ahead and make that change. Harold On 9/2/2016 10:43 AM, Alan Bateman wrote: On 02/09/2016 14:02, harold seigel wrote: Hi, Please review this new fix for JDK-8058575. This fix requires that a VM anonymous class be in either the same package as its host class o

Re: RFR 8058575: IllegalAccessError trying to access package-private class from VM anonymous class

2016-09-02 Thread Alan Bateman
On 02/09/2016 14:02, harold seigel wrote: Hi, Please review this new fix for JDK-8058575. This fix requires that a VM anonymous class be in either the same package as its host class or be in the unnamed package. If the anonymous class is in the unnamed package then this fix puts it into

RFR 8058575: IllegalAccessError trying to access package-private class from VM anonymous class

2016-09-02 Thread harold seigel
Hi, Please review this new fix for JDK-8058575. This fix requires that a VM anonymous class be in either the same package as its host class or be in the unnamed package. If the anonymous class is in the unnamed package then this fix puts it into its host class's package, ensuring tha

Re: [9] RFR (XS): 8046903: VM anonymous class members can't be statically invocable

2014-06-17 Thread Vladimir Ivanov
j.l.i.InvokerBytecodeGenerator::isStaticallyInvocable doesn't distinguish between VM anonymous classes and ordinary classes. In some very specific circumstances (VM anonymous class declared in one of predefined core packages), it can consider a member of VM anonymous class as statically invocable and symbolically refe

Re: [9] RFR (XS): 8046903: VM anonymous class members can't be statically invocable

2014-06-16 Thread John Rose
nonymous classes and ordinary classes. In some very specific > circumstances (VM anonymous class declared in one of predefined core > packages), it can consider a member of VM anonymous class as statically > invocable and symbolically reference it from generated bytecode. It's wr

[9] RFR (XS): 8046903: VM anonymous class members can't be statically invocable

2014-06-16 Thread Vladimir Ivanov
http://cr.openjdk.java.net/~vlivanov/8046903/webrev.00/ https://bugs.openjdk.java.net/browse/JDK-8046903 j.l.i.InvokerBytecodeGenerator::isStaticallyInvocable doesn't distinguish between VM anonymous classes and ordinary classes. In some very specific circumstances (VM anonymous class dec

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-25 Thread Joel Borggren-Franck
s missing the trailing '/798154996' > just before ';' > > > Regards, Peter > > On 11/05/2013 09:55 AM, Peter Levart wrote: > >On 11/04/2013 07:12 PM, robert.fi...@oracle.com wrote: > >>Changeset: 51b002381b35 > >>Author:rfield &

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-12 Thread John Rose
On Nov 11, 2013, at 4:58 AM, Peter Levart wrote: > Hi John, Remi, > > I tried to create a prototype to see how it compares to bytecode-generated > method accessor. Here it is: > > https://bugs.openjdk.java.net/browse/JDK-6824466#comment-13426571 > > It seems that lambda forms do their job qui

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-11 Thread Peter Levart
On 11/05/2013 12:29 AM, Remi Forax wrote: But you are right that there is a performance pothole in the interoperation between lambdas and reflection. This implementation RFE, to use method handles instead of code spinning, would take care of that particular problem: https://bugs.openjdk.java.

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-07 Thread Peter Levart
On 11/07/2013 02:20 AM, John Rose wrote: On Nov 6, 2013, at 11:30 AM, Peter Levart <mailto:peter.lev...@gmail.com>> wrote: Well, indexOf(char) or lastIndexOf(char) searches for a single char. We can do better searching backwards for two chars at the same time. If the "name&qu

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-06 Thread John Rose
On Nov 6, 2013, at 5:32 PM, Boris Davidovich wrote: > Am I missing something? > The intrinsic would be looking at a constant string. — John

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-06 Thread Boris Davidovich
1:30 AM, Peter Levart wrote: > > > Well, indexOf(char) or lastIndexOf(char) searches for a single char. We > can do better searching backwards for two chars at the same time. > > > > If the "name" of VM-anonymous class is always ending with pattern: > "slash foll

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-06 Thread John Rose
On Nov 6, 2013, at 11:30 AM, Peter Levart wrote: > Well, indexOf(char) or lastIndexOf(char) searches for a single char. We can > do better searching backwards for two chars at the same time. > > If the "name" of VM-anonymous class is always ending with pattern: &quo

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-06 Thread Peter Levart
On 11/05/2013 10:10 AM, Brian Goetz wrote: Ineexof(char) sounds like as fast and simpler? Well, indexOf(char) or lastIndexOf(char) searches for a single char. We can do better searching backwards for two chars at the same time. If the "name" of VM-anonymous class is always e

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-06 Thread Peter Levart
On 11/06/2013 11:37 AM, Remi Forax wrote: On 11/05/2013 11:11 AM, Joel Borggrén-Franck wrote: On 5 nov 2013, at 10:51, Peter Levart wrote: On 11/05/2013 10:33 AM, Joel Borggrén-Franck wrote: I would also restructure the Method/Constructor accessor logic differently. The check for ReflectUti

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-06 Thread Remi Forax
On 11/05/2013 11:11 AM, Joel Borggrén-Franck wrote: On 5 nov 2013, at 10:51, Peter Levart wrote: On 11/05/2013 10:33 AM, Joel Borggrén-Franck wrote: I would also restructure the Method/Constructor accessor logic differently. The check for ReflectUtil.isVMAnonymousClass() can be performed jus

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-05 Thread Joel Borggrén-Franck
On 5 nov 2013, at 10:51, Peter Levart wrote: > On 11/05/2013 10:33 AM, Joel Borggrén-Franck wrote: >>> >I would also restructure the Method/Constructor accessor logic >>> >differently. The check for ReflectUtil.isVMAnonymousClass() can be >>> >performed just once (in the newMethodAccessor/newC

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-05 Thread Peter Levart
On 11/05/2013 10:33 AM, Joel Borggrén-Franck wrote: >I would also restructure the Method/Constructor accessor logic differently. The check for ReflectUtil.isVMAnonymousClass() can be performed just once (in the newMethodAccessor/newConstructorAccessor methods) and based on this check, create a

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-05 Thread Joel Borggrén-Franck
Hi Peter, Narrowing this to core-libs-dev. On 5 nov 2013, at 09:25, Peter Levart wrote: > Hi Robert, > > I think this fix is not complete. When one sets the system property > sun.reflect.noInflation=true, reflection proxy is still attempted to be > generated for anonymous classes (see > Ref

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-05 Thread Peter Levart
1-04 10:12 -0800 URL:http://hg.openjdk.java.net/jdk8/tl/jdk/rev/51b002381b35 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class 8027681: Lambda serialization fails once reflection proxy generation kicks in Reviewed-by: ksrini, briangoetz, jfranck Contributed-by:joel.fra...@oracle.

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-05 Thread Brian Goetz
00 >> URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/51b002381b35 >> >> 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class >> 8027681: Lambda serialization fails once reflection proxy generation kicks in >> Reviewed-by: ksrini, briangoetz, jfranck

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-05 Thread Peter Levart
On 11/04/2013 07:12 PM, robert.fi...@oracle.com wrote: Changeset: 51b002381b35 Author:rfield Date: 2013-11-04 10:12 -0800 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/51b002381b35 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class 8027681: Lambda

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-05 Thread Peter Levart
elegate(acc); } Regards, Peter On 11/04/2013 07:12 PM, robert.fi...@oracle.com wrote: Changeset: 51b002381b35 Author:rfield Date: 2013-11-04 10:12 -0800 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/51b002381b35 7194897: JSR 292: Cannot create more than 16 instances of a

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-04 Thread Remi Forax
On 11/04/2013 11:56 PM, John Rose wrote: On Nov 4, 2013, at 1:37 PM, Remi Forax > wrote: Note that while this fix is ok now, it introduced a performance regression, doing reflection on a functional method of an inner class is faster than doing reflection on the functi

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-04 Thread John Rose
On Nov 4, 2013, at 1:37 PM, Remi Forax wrote: > Note that while this fix is ok now, > it introduced a performance regression, doing reflection on a functional > method of an inner class > is faster than doing reflection on the functional method of a lambda proxy. This particular fix didn't intr

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-04 Thread Remi Forax
On 11/04/2013 07:12 PM, robert.fi...@oracle.com wrote: Changeset: 51b002381b35 Author:rfield Date: 2013-11-04 10:12 -0800 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/51b002381b35 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class 8027681: Lambda

hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-04 Thread robert . field
Changeset: 51b002381b35 Author:rfield Date: 2013-11-04 10:12 -0800 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/51b002381b35 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class 8027681: Lambda serialization fails once reflection proxy generation kicks in

hg: jdk8/tl/langtools: 8023682: Incorrect attributes emitted for anonymous class declaration

2013-10-23 Thread eric . mccorkle
Changeset: 119747cd9f25 Author:emc Date: 2013-10-24 01:27 -0400 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/119747cd9f25 8023682: Incorrect attributes emitted for anonymous class declaration Summary: Cause javac to emit type annotations on new instruction as well as

hg: jdk8/tl/langtools: 8008762: Type annotation on inner class in anonymous class show up as regular type annotations; ...

2013-10-10 Thread eric . mccorkle
Changeset: b1b4a6dcc282 Author:emc Date: 2013-10-10 20:12 -0400 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/b1b4a6dcc282 8008762: Type annotation on inner class in anonymous class show up as regular type annotations 8015257: type annotation with TYPE_USE and FIELD

Re: java.util and anonymous class

2011-12-05 Thread Maurizio Cimadamore
ivate Iterator it = list.iterator(); ... } }; generates an anonymous class with two fields: final class Foo$1 implements java.util.Iterator { java.util.Iterator it; final java.util.List val$list; FinalCaptureTooBig$1(java.util.List); ... while this code: List list = Arrays.asList

Re: java.util and anonymous class

2011-12-05 Thread Rémi Forax
(args); Iterator iterator = new Iterator() { private Iterator it = list.iterator(); ... } }; generates an anonymous class with two fields: final class Foo$1 implements java.util.Iterator { java.util.Iterator it; final java.util.List val$list; FinalCaptureTooBig$1(java.util

java.util and anonymous class

2011-12-05 Thread Rémi Forax
rator(); ... } }; generates an anonymous class with two fields: final class Foo$1 implements java.util.Iterator { java.util.Iterator it; final java.util.List val$list; FinalCaptureTooBig$1(java.util.List); ... while this code: List list = Arrays.asList(args); final Iterat

hg: jdk7/tl/langtools: 6931927: position issues with synthesized anonymous class

2010-03-03 Thread jonathan . gibbons
Changeset: 7f5db2e8b423 Author:jjg Date: 2010-03-03 17:22 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/langtools/rev/7f5db2e8b423 6931927: position issues with synthesized anonymous class Reviewed-by: darcy ! src/share/classes/com/sun/tools/javac/parser/JavacParser.java + test