hg: mlvm/mlvm/jdk: meth-lazy: Added SourceFile attribute.

2012-01-24 Thread christian . thalinger
Changeset: 88582189727e Author:twisti Date: 2012-01-24 04:14 -0800 URL: http://hg.openjdk.java.net/mlvm/mlvm/jdk/rev/88582189727e meth-lazy: Added SourceFile attribute. ! meth-lazy-7023639.bcg.patch ___ mlvm-dev mailing list mlvm-dev@ope

Re: [jvm-l] Re: No way to create a no-op MethodHandle that returns void?

2012-01-24 Thread Charles Oliver Nutter
On Tue, Jan 24, 2012 at 2:40 AM, John Rose wrote: > On Jan 23, 2012, at 11:26 PM, Charles Oliver Nutter wrote: >> FWIW, I'm using this in the tests for invokebinder, for testing the >> tryFinally operation: > > That binder stuff is great.  Next, we want a builder syntax in Java (for more > than j

Re: No way to create a no-op MethodHandle that returns void?

2012-01-24 Thread Rémi Forax
On 01/24/2012 09:40 AM, John Rose wrote: > On Jan 23, 2012, at 11:26 PM, Charles Oliver Nutter wrote: > >> Oh, that does seem to work...what an ugly hack. And actually, you can >> just use Object.class but cast the resulting return to void, and it >> works. >> >> So basically, I do this: >> >> hand

Re: No way to create a no-op MethodHandle that returns void?

2012-01-24 Thread John Rose
On Jan 23, 2012, at 11:26 PM, Charles Oliver Nutter wrote: > Oh, that does seem to work...what an ugly hack. And actually, you can > just use Object.class but cast the resulting return to void, and it > works. > > So basically, I do this: > > handler = MethodHandles.constant(Object.class, null)

Re: No way to create a no-op MethodHandle that returns void?

2012-01-24 Thread Charles Oliver Nutter
Thanks, Chris. I've used this trick to implement "nop" in invokebinder: MethodHandle ignoreException = Binder .from(void.class, RuntimeException.class, String[].class) .nop(); - Charlie On Tue, Jan 24, 2012 at 2:53 AM, Noctarius wrote: > Hi Charlie > The sam

Re: No way to create a no-op MethodHandle that returns void?

2012-01-24 Thread Noctarius
Hi Charlie The same "hack" applies to every situation where a generic returntype "needs" to defined but is not needed in the end. Void is the wrapper type to void and the returnvalue is just discarded whatever it was. Cheers Chris Am 24.01.2012 08:26, schrieb Charles Oliver Nutter: > Oh, that doe