modifying a method
Doug Simon
doug.simon at oracle.com
Thu Jun 13 01:35:11 PDT 2013
What kind of modification are you planning on doing? Almost certainly it's going to be best to do it as a graph transformation right after the initial graph for your method has been constructed (i.e., after the GraphBuilderPhase has run). One way to do this would be to modify VMToCompilerImple.createPhasePlan() to inject a new phase for doing your transformation:
phasePlan.addPhase(PhasePosition.AFTER_PARSING, new MyPhase());
-Doug
On Jun 13, 2013, at 7:42 AM, SINGH Ranjeet <s1255495 at sms.ed.ac.uk> wrote:
> Hi,
>
> I'm using Graal for my university project and one part of my project requires modifying methods which have a specific annotation at runtime. I was thinking of putting my code to do this in the CompilationTask.runCompilation() method before GraalCompiler.compileGraph get's called (this might not be the best place to put it), my code would check if the method coming in has the annotation I'm looking for if it has then modify the body of the method. Is what I'm trying to do possible in Graal? and if yes how?
>
> Thanks.
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
More information about the graal-dev
mailing list