Hi, Tim!
On Jan 16, 2008 8:31 PM, Tim Ellison wrote:
> Can I go back a moment to hear about the scalar replacement technique
> in Jitrino? Feel free to point me to some doc or code if that is easier.
Pavel or Egor might have input here. I don't know exact doc on which
DRLVM implementation is based.
> So how does Jitrino both unbox the primitive and preserve the 'box' for
> when it must be returned? [If you see what I mean, otherwise I'll try
> and rephrase it]
The thing is, once HashMap methods got *inlined* in some upper
methods, where actually working with data goes, then escape analysis
might check whether the "box" is needed outside the method (not
HashMap one, but hu-u-u-uge workload method), and then, judging on
this data some instances might be unboxed by scalar replacement.
Hopefully, when correct inlining occurs such opportunity exists. Of
course, such an opportunity can't be exposed to HashMap methods
directly, as you correctly pointed out.
And so, escape analysis (and thus scalar replacement) heavily depends
on inliner.
Thanks,
Aleksey.