[kaffe] trampolines in kaffe

kalyan ram ckalyan76 at yahoo.com
Sun May 18 00:21:02 PDT 2003


Hai
    Can someone clarify whether my thinking on how the
dispatch tables are linked in kaffe is right?I am
assuming that each class has its own dispatchTable.
Let us suppose that there is class A and function a()
is present in that class.If I call this function from
the class B which has method b() as:
    class  B
    {
            void b()
            {
                 A.a(); //assuming a() is static
             }
    }
1)The dispatchTable for class B with function b() slot
will call the trampoline function for b() method.
2)This will invoke translator for method b().But b()
will have A.a()not translated to native code(assuming
that A.a() was just loaded).My question is :what will
happen here?

If my thinking is right,A.a() will be translated to
native code first and the native code address for a()
is placed in the class A's dispatchTable.Then the
native code for b() function in class B will point to
the A class dispatchTable which has native code
address for a() method.Is this right?My specific
question here is:where does the native code of B.b()
point to---is it the dispatchTable for class A where 
a() function slot is there or does it point directly
to A.a() native code address?

Please give me more information or pointers on how
trampolines work,how they interact with the translator
and how translator works.I want to see how the
assembly language instructions get executed at the
lowest level. 
      
Any help is greatly appreciated.

Thanks
Ram

=====
C.Kalyan Ram
2221,S St
Apt #23,Lincoln
NE-68503
Email:ckalyan76 at yahoo.com
Ph:(402)742-9671
University Of Nebraska-Lincoln

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com




More information about the kaffe mailing list