Longjumps considered inexpensive...until they aren't
John Rose
John.Rose at Sun.COM
Wed Jun 4 19:13:33 PDT 2008
On Jun 4, 2008, at 6:15 PM, Rémi Forax wrote:
> I've sketched a prototype that enable to force inlining at Java
> Level using a
> new method of sun.misc.Unsafe.
> I think it's a better solution than using an annotation (or an
> attribute)
> because it's more flexible.
True. Annotations are *almost* what we want for passing this sort of
information around, except that they must be known at javac time (or
apt time).
As we refactor the way the JVM loads things, we should consider
allowing partial class files which contribute annotations to
previously loaded classes. That way we wouldn't have to re-invent
class schema decorations yet another time.
For now, we have been using the compiler oracle mechanism as a way of
tagging methods to the compilers...
> It seems to works on a small test.
Yes, that's the right experiment to do... But I think the
information should be passed through compilerOracle.cpp, which
already has a "inline" directive. If that is not the right thing,
perhaps we want a new command ("force_inline") or, better, an option
(see the "option" command).
-- John
More information about the mlvm-dev
mailing list