John Rose wrote:
> The reason we are doing method handles the way we are is to cut down the 
> complexity of dealing with a variety of call signatures in a runtime. 
>  Probably, most runtimes, like JRuby, fix a handful of manually-defined 
> call types and manually sort them out.  It is possible to make 
> factory-based systems also which can spin out an infinity of call types 
> (that's the way my old esh VM worked).  But the real simplification of 
> such tasks will come when the JVM can manage hundreds of call signatures 
> without creating hundreds of glue interfaces and classes, and when we 
> build a low-level runtime that makes the management simple.

It's worth mentioning that I did prototype a factory system that would 
generate call site adapters with varying parameter lengths, to support 
the 'n' possible cases of finite argument passing (and eventually, 
propagate type information), and it worked pretty well (one more call 
monomorphized didn't hurt, either). But I knew it would only ever be a 
prototype and the early work was largely scrapped. The reason? Too 
expensive. Even with the best tricks, it would end up generating an 
ungodly amount of code and classes. So the knob stayed where it is 
currently and we accept that the best compromise for now is manually 
adding a few call paths and propagating arity, if not type. We could do 
more, but this covers a good 95% of calls with a minimal cost.

JSR292 and related work are going to make all that possible...and even 
better, make a lot of it totally unnecessary. And I promise I'll have 
JRuby builds, patches, and switches to take advantage of each feature as 
they're available.

- Charlie

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to