can an object be allocated on the stack?

Lukas Stadler lukas.stadler at jku.at
Tue Jul 30 12:55:10 PDT 2013


At the moment, we do not do this optimization.
I'ts not really a question of support in Graal (it would be rather easy to support in the compiler, because the necessary primitives are there), it's more a question of support in the VM.
We want to keep our native code delta to HotSpot small, and this would need extensive changes to the gc and debug infrastructure.

- Lukas

On Jul 30, 2013, at 6:00 , Garcia Gutierrez Miguel Alfredo <miguelalfredo.garcia at epfl.ch> wrote:

> 
> Sometimes it's safe to allocate an object on the stack, for example for the cases covered in Ch. 5 of http://ssw.jku.at/Research/Papers/Ko05b/
> 
> Can the Graal IR express such code idioms?
> 
> (I guess not, because if so then it would be possible to have a method return a struct, ie just let the caller allocate it on the stack and have the callee modify it via address + offset, the callee itself may be void-returning).
> 
> Or is it?
> 
> 
> Miguel
> http://magarciaepfl.github.io/scala/
> 
> --
> Miguel Garcia
> Swiss Federal Institute of Technology
> EPFL - IC - LAMP1 - INR 328 - Station 14
> CH-1015 Lausanne - Switzerland
> http://lamp.epfl.ch/~magarcia/



More information about the graal-dev mailing list