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 =
Shouldn't that be
mh.String,Objectinvoke(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 =
Attila Szegedi wrote:
Shouldn't that be
mh.String,Objectinvoke(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
Christian Thalinger wrote:
Attila Szegedi wrote:
Shouldn't that be
mh.String,Objectinvoke(foo)
? It returns a String and takes an Object.
No, the syntax is correct. A MethodHandle invoke only specifies the
return type.
-- Christian
___
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?
* 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
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. Are
On Tue, Aug 18, 2009 at 6:29 AM, Raffaello
Giuliettiraffaello.giulie...@gmail.com 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
On Aug 18, 2009, at 6:07 AM, Raffaello Giulietti wrote:
Hi Christian,
do an upcast
String result = mh.Stringinvoke((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)