On the 0x1FA day of Apache Harmony Mikhail Fursov wrote:
> On 10/6/06, Ivan Volosyuk <[EMAIL PROTECTED]> wrote:
> >
> > If it is possible to get somehow valid offset within object then it is
> > great! I would be happy to see this solved this way. Waiting for your
> > patch.
> 
> 
> Yes, before reporting all objects and mptr for a method JIT is able to
> calculate offsets and use them when reporting mptrs.

BTW, what is mptr? is it 'base + offset' by definition? today I am
more about dummy questions :)

'offset' is sometimes an operand (a mem location or a register) and
not a mere int. As in our example, when arrays are accessed. Do I get
it right?

Is it always easy to deduce which mem address relates to which base
and preserve that information throughout all high-level optimizations?

One example that does not let me sleep well at night.
Some optimization (strength reduction) can convert a code like this:
for (int i = 0; i < length; i++) {
    A[A.base + i * sizeof(elem)] = X
}
to something like:
for (int i = A.base; i < A.base + length * sizeof(elem); 
     i += sizeof(elem) ) {
    A[i] = X
}

we need to report 'i' as a base + offset. Where is the base? Reporting
'i' as interior (to search A.base at runtime) has been easy, but now
it is not supposed to work. What do we offer instead?

Mikhail, maybe, your strategy covers that situation well, I just want
be happy understanding all these things.

> For, now I have attached to JIRA HARMONY-1682 the pessimistic variant
> > of fix for those who may not be interested in the discussion and wants
> > to have the problem fixed (workarounded?) anyhow.
> >
> 
> Ok.
> 
> -- 
> Mikhail Fursov

-- 
Egor Pasko, Intel Managed Runtime Division


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to