MethodSubstitution for JDK method

Doug Simon doug.simon at oracle.com
Wed Jun 4 13:38:36 UTC 2014


On Jun 4, 2014, at 2:28 PM, Deneau, Tom <tom.deneau at amd.com> wrote:

> Currently, the HSAIL backend codegen must inline everything and so can't handle recursive calls.
> Let's say we come upon some recursive method deep in the JDK.  For example
>       private static sun.misc.FDBigInteger.big5powRec(int p)
> 
> And say we wanted to method-substitute a non-recursive implementation.  But in our non-recursive implementation we would like to use some of the existing non-public methods or data structures in sun.misc.FDBigInteger.
> 
> Is there a way to do that?

Not currently. In a previous eject (Maxine), we had support for aliasing hidden methods and fields and being able to access them via the aliases. Until we import such a mechanism into Graal, copy-and-paste is the only solution.

-Doug


More information about the graal-dev mailing list