A sudden concern about invokedynamic

Charles Oliver Nutter charles.nutter at sun.com
Sat Jun 21 00:31:38 PDT 2008


It occurred to me just now there could be a small snag with 
invokedynamic. Maybe it's addressed in the spec, but I don't have it 
here right now. If it's not a problem, a 5-second explanation would do. 
Otherwise, we might want to discuss here, since it's certainly 
multi-language related.

How would invokedynamic work if we don't have compiled Java bytecode 
anywhere to dispatch to? For example, JRuby is mixed mode right now, and 
some methods are interpreted (AST or various bytecode specs) while some 
methods get compiled to JVM bytecode on-the-fly. For the compiled ones, 
invokedynamic would just get a normal method handle. What about for the 
interpreted ones? Essentially we want to be able to pass out a method 
handle that's actually just a call into the JRuby interpreter.

I don't recall seeing anything in the docs that might show how to do 
that. Did I miss something?

- Charlie



More information about the mlvm-dev mailing list