Re: Defining anonymous classes

2014-08-25 Thread Mark Roos
>From Charles This is how JRuby has survived for years. A classloader-per-class has a big memory load (ClassLoader has a lot of internal state, classes have a lot of metadata) but with permgen bumped up (or replaced with metaspace as in 8) and a few reuse tricks, it hasn't been a major issue for u

Re: Defining anonymous classes

2014-08-25 Thread Charles Oliver Nutter
On Fri, Aug 15, 2014 at 5:39 PM, John Rose wrote: > If the host-class token were changed to a MethodHandles.Lookup object, we > could restrict the host-class to be one which the user already had > appropriate access to. Seems simple, but of course the rest of the project > is complicated: AP

Re: The Great Startup Problem

2014-08-25 Thread Thomas Wuerthinger
Charlie, Truffle is such a general-purpose automatic specialization mechanism that works like you say via just writing Java code and without a need to use invokedynamic and without a need to dynamically generate bytecodes. - thomas On 25 Aug 2014, at 15:25, Charles Oliver Nutter wrote: > On

Re: The Great Startup Problem

2014-08-25 Thread Charles Oliver Nutter
On Mon, Aug 25, 2014 at 6:59 AM, Fredrik Öhrström wrote: > Calle Wilund and I implemented such a indy/methodhandle solution for > JRockit, so I know it works. You can see a demonstration here: > http://medianetwork.oracle.com/video/player/589206011001 That > implementations jump to C-code that per

Re: The Great Startup Problem

2014-08-25 Thread Charles Oliver Nutter
On Mon, Aug 25, 2014 at 4:32 AM, Marcus Lagergren wrote: > LambdaForms were most likely introduced as a platform independent way of > implementing methodhandle combinators in 8, because the 7 native > implementation was not very stable, but it was probably a mistake to add them > as “real” clas

Re: The Great Startup Problem

2014-08-25 Thread Fredrik Öhrström
As I said (many times) before, the methodhandles/indy should be built using a minimal interpreter supported calling convention: invoke (that can box/unbox at runtime) All methodhandles should then be written as static bytecode working with objects (no dynamic generation of specialized bytecode) s

Re: The Great Startup Problem

2014-08-25 Thread Marcus Lagergren
Regarding indy dense code: It is certainly a problem both for JRuby with indy and Nashorn with indy that indy scalability is so bad in 9 builds with the current JITs. I suspect that as Java 8 grows as a code base and as a language, it will turn into a problem with Java 8 lambdas too. Nashorn ge

Re: The Great Startup Problem

2014-08-25 Thread Jochen Theodorou
Am 24.08.2014 20:33, schrieb Charles Oliver Nutter: On Sun, Aug 24, 2014 at 12:55 PM, Jochen Theodorou wrote: afaik you can set how many times a lambda form has to be executed before it is compiled... what happens if you set that very low... like 1 and disable tiered compilation? Forcing all