FTR, there's a good smoke test for the method handles part of JSR 292 in the
JDK sources:
davinci/sources/jdk/test/java/dyn/MethodHandlesTest.java
Running the test requires JUnit 4.5.
$JSR292_JAVA_HOME/bin/java -ea -esa
-XX:+{UnlockExperimentalVMOptions,EnableMethodHandles}
The sources are changing rapidly at this point; I'm working on invokeGeneric.
If you send me a JAR which which can run stand-alone, I can use it as a
regression test.
-- John
On Apr 2, 2010, at 2:36 PM, Attila Szegedi wrote:
On 2010.03.25., at 3:17, Charles Oliver Nutter wrote:
For
At 10:41 PM +0200 4/2/10, Attila Szegedi wrote:
So I decided to throw in the towel, and use Stephen Bannasch's excellent
update.sh
fromhttp://gist.github.com/raw/243072/c2e862bec37bde76f904cbed53b4e95f6ddd6c52/update.sh
It now bombs with:
On 2010.03.25., at 3:17, Charles Oliver Nutter wrote:
For Attila: I had to remove a spreadArguments handle you used for
re-binding the method...not sure why. Here's the diff:
Index: src/org/dynalang/dynalink/support/DynamicLinkerImpl.java
Le 25/03/2010 03:17, Charles Oliver Nutter a écrit :
I love Duby sometimes, I really do.
I've just landed full dynamic dispatch support. Here's an example
script and session:
~/projects/duby ➔ cat examples/dynamic.duby
# Example of using a dynamic type in a method definition
def
On Thu, Mar 25, 2010 at 10:12 AM, Rémi Forax fo...@univ-mlv.fr wrote:
I've also found useful to propagate expected type back to the calling
method.
Example:
if (foo()) { ... }
should be translated to indy foo ()Z instead of ()Object because if ()
wait for a boolean.
Yeah, I suppose this is
Also worth noting is that if you specify a specific return type (i.e. boolean)
at the call site, MOP will ensure that whatever method ends up invoked, the
return value is converted (either using built-in JVM conversions, or even your
own language-specific ones if you provide a
On Thu, Mar 25, 2010 at 3:16 AM, Attila Szegedi szege...@gmail.com wrote:
That's odd. arguments is Object[]; spreadArguments is required to unpack
these arguments and pass them on to the invoked method.
The dynalang-invoke's own test suites fail quite massively when I make the
change, and
On Mar 25, 2010, at 8:12 AM, Rémi Forax wrote:
I've also found useful to propagate expected type back to the calling
method.
Example:
if (foo()) { ... }
should be translated to indy foo ()Z instead of ()Object because if ()
wait for a boolean.
Besides booleans, this is probably most
On 2010.03.25., at 18:33, Charles Oliver Nutter wrote:
Speaking of that...I was surprised there's no baseline bootstrap
method built into dynalang/invoke. It was a trivial amount of code to
write, but I can imagine a lot of simple uses of dynalang/invoke will
just want to use the standard
On Mar 25, 2010, at 10:33 AM, Charles Oliver Nutter wrote:
On Thu, Mar 25, 2010 at 3:16 AM, Attila Szegedi szege...@gmail.com wrote:
That's odd. arguments is Object[]; spreadArguments is required to unpack
these arguments and pass them on to the invoked method.
The dynalang-invoke's own
On Thu, Mar 25, 2010 at 12:56 PM, Attila Szegedi szege...@gmail.com wrote:
I did give tips for usage in DynamicLinker javadoc; the simplest you can get
is:
public class MyLanguageRuntime {
private static final DynamicLinker dynamicLinker = new
DynamicLinkerFactory().createLinker();
On Thu, Mar 25, 2010 at 1:14 PM, John Rose john.r...@sun.com wrote:
MethodHandleImpl.java:1104:in `raiseException':
java.lang.ClassCastException: required class [Ljava.lang.Object; but
encountered class java.util.Collections$UnmodifiableRandomAccessList
from MethodHandle.java:357:in
I love Duby sometimes, I really do.
I've just landed full dynamic dispatch support. Here's an example
script and session:
~/projects/duby ➔ cat examples/dynamic.duby
# Example of using a dynamic type in a method definition
def foo(a:dynamic)
puts I got a #{a.getClass.getName} of size #{a.size}
Very nice stuff. Congratulations!
On Mar 24, 2010, at 7:17 PM, Charles Oliver Nutter wrote:
BTW, what's the current state of the art for emitting .java with an
invokedynamic in it? Duby also has a .java backend, so I'll need to
add indy support there as well (somehow).
This statement:
15 matches
Mail list logo