On Aug 18, 2009, at 6:07 AM, Raffaello Giulietti wrote:
> Hi Christian,
>
> do an upcast
>
> String result = mh.invoke((Object) "foo");
Yes. The difference between the two call sites is:
(Ljava/lang/String;)Ljava/lang/String;
vs.
(Ljava/lang/Object;)Ljava/lang/String;
The actual (erased)
On Tue, Aug 18, 2009 at 6:29 AM, Raffaello
Giulietti wrote:
> The language compiler complains about an
> unreported exception Throwable; must be caught or declared to be thrown
> in using both InvokeDynamic and the (invisible) MethodHandle.invoke()
>
> Why is this so?
> What about an (unchecked) Ru
Raffaello Giulietti wrote:
> * Is there a special -XX: flag to turn on inlining of methods invoked
> via method handles?
> * Or must something be enabled during the build of mlvm?
No, inlining is enabled by default. Currently only DMH invokes are
inlined, but I'm working on inlining the rest. Ar
* Is there a special -XX: flag to turn on inlining of methods invoked
via method handles?
* Or must something be enabled during the build of mlvm?
Thanks
Raffaello
___
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/l
The language compiler complains about an
unreported exception Throwable; must be caught or declared to be thrown
in using both InvokeDynamic and the (invisible) MethodHandle.invoke()
Why is this so?
What about an (unchecked) RuntimeException instead?
__
Christian Thalinger wrote:
> Attila Szegedi wrote:
>> Shouldn't that be
>>
>> mh.invoke("foo")
>>
>> ? It returns a String and takes an Object.
>
> No, the syntax is correct. A MethodHandle invoke only specifies the
> return type.
>
> -- Christian
> __
Attila Szegedi wrote:
> Shouldn't that be
>
> mh.invoke("foo")
>
> ? It returns a String and takes an Object.
No, the syntax is correct. A MethodHandle invoke only specifies the
return type.
-- Christian
___
mlvm-dev mailing list
mlvm-dev@openjdk.jav
Shouldn't that be
mh.invoke("foo")
? It returns a String and takes an Object.
Attila.
On 2009.08.18., at 10:55, Christian Thalinger wrote:
> MethodHandle mh = MethodHandles.lookup().findVirtual(Object.class,
> "toString", MethodType.make(String.class));
> String result = mh.invoke("foo");
Hi!
Looks like there is a problem with findVirtual. Since I don't know very
much about the MethodHandle Java level, I want to be sure it's not my fault.
Doing:
MethodHandle mh = MethodHandles.lookup().findVirtual(Object.class,
"toString", MethodType.make(String.class));
String result = mh.i