RE: is Edouard on kaffe-core?

Date view Thread view Subject view Author view

From: Parmelan, Edouard (EP510777@exchange.FRANCE.NCR.com)
Date: Fri Dec 18 1998 - 13:06:51 EST


Godmar,

> So, would doing a
>
> if (IS_INTERFACE(meth->class)) {
> MARK_OBJECT_PRECISE(meth->ncode)
> }
>
> or
> if (IS_INTERFACE(meth->class)) {
> markObject(meth->ncode) ?
> }
>
> fix your prob?
I don't it could fix it.

the background:
1. meth->idx == -1 for static methods like <clinit>.

2. buildInterfaceDispatchTable() first lookups for <clinit> and
  then places the trampoline if METHOD_NEEDS_TRAMPOLINE().

3. soft_fixup_trampoline() replace meth->ncode after translation.

4. for classes, trampolines are after class->dtable->meth[class->msize],
  so marked by walkConservative.

We need mark-it iif it's <clinit> of an Interface and it's a trampoline
(ie !METHOD_TRANSLATED(meth))

A possible solution:

Don't append tranpolines as an array after
class->dtable->meth[class->msize].

In buildDispatchTable(), allocate trampoline one per one
as in buildInterfaceDispatchTable() with GC_ALLOC_NORMAL.

Add this lines in walkMethods():
        if(!METHOD_TRANSLATED(m) && (m->ncode != 0))
                walkConservative(m->ncode)

Benefits:
- simple walkMethods()
- a trampoline exist only when need, it is unreferenced
    when his method is translated.

Costs:
  more memory used by trampolines before translation.

Comments ?

Edouard.


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:22 EDT