Re: Trying to work newer indy into JRuby

2009-05-19 Thread Rémi Forax
Fredrik Öhrström a écrit : > Charles Oliver Nutter skrev: > >> I must also remark how similar this feels to LLVM's method invocation >> APIs, where they toss "function" objects into the IR and it just >> optimizes the calling logic. It seems to me that the new indy stuff >> could be the underpin

Re: indy and jython not getting along

2009-05-19 Thread Charles Oliver Nutter
Frank Wierzbicki wrote: > Hi all, > > In my experiments it seems like even the simplest invokedynamic calls > will crash in the presence of an initialized jython. > > To reproduce: > > co https://jython.svn.sourceforge.net/svnroot/jython/trunk/jython > ant jar-complete > > put the [jython]/dist

Re: Trying to work newer indy into JRuby

2009-05-19 Thread Charles Oliver Nutter
Rémi Forax wrote: > If you take a close look to the current API: > http://download.java.net/jdk7/docs/api/java/dyn/MethodHandles.html > there are not lot of primitive adapters, i.e adapters that can not be > written from > the others. Are these all functional right now? I could obviously use guar

Re: Trying to work newer indy into JRuby

2009-05-19 Thread Fredrik Öhrström
Rémi Forax skrev: > In that case, guards etc can be implemented using only convert, spread > and collect and the JavaMethodHandle. > If you have collect/spread that converts each array element, then you do not need the JavaMethodHandle. > But, for my pet project, for Groovy or for Neal's closur

Re: indy and jython not getting along

2009-05-19 Thread Frank Wierzbicki
On Tue, May 19, 2009 at 11:12 AM, Charles Oliver Nutter > Are there perhaps additional patches above and beyond what's in jdk7 > that are needed? You might give it a shot with MLVM additions and > bsd-port base, maybe. I'm running on Linux, so the bsd-ports wouldn't apply (right?) -- are there any

Re: indy and jython not getting along

2009-05-19 Thread Charles Oliver Nutter
Frank Wierzbicki wrote: > On Tue, May 19, 2009 at 11:12 AM, Charles Oliver Nutter >> Are there perhaps additional patches above and beyond what's in jdk7 >> that are needed? You might give it a shot with MLVM additions and >> bsd-port base, maybe. > I'm running on Linux, so the bsd-ports wouldn't a

Re: Trying to work newer indy into JRuby

2009-05-19 Thread Rémi Forax
Charles Oliver Nutter a écrit : > Rémi Forax wrote: > >> If you take a close look to the current API: >> http://download.java.net/jdk7/docs/api/java/dyn/MethodHandles.html >> there are not lot of primitive adapters, i.e adapters that can not be >> written from >> the others. >> > > Are the

Re: Trying to work newer indy into JRuby

2009-05-19 Thread Rémi Forax
Charles Oliver Nutter a écrit : > FYI, for JRuby I did not use langtools and instead pulled the branch > of ASM that supports invokedynamic. It did need an additional patch, > however, since it was not properly calculating stack manipulations. > > The branch is here: > > svn://svn.forge.objectweb

Re: Trying to work newer indy into JRuby

2009-05-19 Thread Charles Oliver Nutter
Rémi Forax wrote: > Ok, I've forget to update that code when the encoding of invokedynamic > bytecode change. > I haven't applied your patch because I think it is simpler to use a > specific case for INVOKEDYNAMIC. No problem...when you've applied your change let me know and I'll update. I don'

Re: Trying to work newer indy into JRuby

2009-05-19 Thread John Rose
On May 19, 2009, at 2:17 PM, Charles Oliver Nutter wrote: > I don't think there's going to be any more changes at the bytecode > level, right? Can we get this pushed into an ASM release soon? Anything's possible, but I don't expect the current format to change. -- John __

Re: Trying to work newer indy into JRuby

2009-05-19 Thread John Rose
On May 19, 2009, at 1:00 AM, Rémi Forax wrote: > The purpose of primitive adapters is to hep the language developer > to fight > the inherent complexity of dealing with polymorphic signature. Yes, that's the key point. As Fredrik says, you can hide the polymorphism by going to a reflective (

Re: indy and jython not getting along

2009-05-19 Thread John Rose
On May 19, 2009, at 9:50 AM, Charles Oliver Nutter wrote: > The MLVM patches are now rebased to bsd-port, so if you wanted to > apply > them you'd want to build off bsd-port (which builds just fine on Linux > too). It would also be worth at least checking what's in the current > patch set, since

Re: Trying to work newer indy into JRuby

2009-05-19 Thread Charles Oliver Nutter
John Rose wrote: > The combineArguments combinator is both polymorphic and pretty nearly > universal (without boxing). I hope to implement it mostly "in the > metal", under the name "flyby adapter". The idea is you get a > subroutine to witness the full argument list and make some > compu

Re: Crash with invokeDynamic on MethodMissing attempt

2009-05-19 Thread John Rose
I've reproduced your crash from the command line; thanks for the clean instructions. The crash is for: def foo(a); end; a = 1; while a < 1_000_000; foo(a); a += 1; end There is a basic nbproject in the jruby repo, but no debug or run targets. Is there a secret combination to getting a deb

Re: Trying to work newer indy into JRuby

2009-05-19 Thread Rémi Forax
John Rose a écrit : > On May 19, 2009, at 2:17 PM, Charles Oliver Nutter wrote: > > >> I don't think there's going to be any more changes at the bytecode >> level, right? Can we get this pushed into an ASM release soon? >> > > Anything's possible, but I don't expect the current format to ch

Re: indy and jython not getting along

2009-05-19 Thread John Rose
Thanks! -- John On May 18, 2009, at 8:41 PM, Frank Wierzbicki wrote: > I will try to narrow this down further tomorrow, maybe I can find a > simple subset of Jython that triggers these crashes. ___ mlvm-dev mailing list mlvm-dev@openjdk.java.net http:

Re: indy and jython not getting along

2009-05-19 Thread Frank Wierzbicki
On Tue, May 19, 2009 at 6:14 PM, John Rose wrote: > For language integration work, we should all be building from the MLVM > patch repo, since it is a few steps in advance of the JDK7 repo. > > There is a small amount of new stuff beyond JDK7 (b59, M3) in there > now, and I am collecting more stuf

Re: indy and jython not getting along

2009-05-19 Thread Charles Oliver Nutter
Frank Wierzbicki wrote: > On Tue, May 19, 2009 at 6:14 PM, John Rose wrote: >> For language integration work, we should all be building from the MLVM >> patch repo, since it is a few steps in advance of the JDK7 repo. >> >> There is a small amount of new stuff beyond JDK7 (b59, M3) in there >> now

Re: Crash with invokeDynamic on MethodMissing attempt

2009-05-19 Thread Charles Oliver Nutter
Check in netbeans-ant.xml, there should be one or more debug targets in there and instructions on how to modify the JRuby command line. I *think* they still work, but I don't use NB debugging much. Note that it's passing the arguments directly to 'java' and org.jruby.Main, so JVM args would be