hi, Yuan: Besides the stack iteratoring and tracing (unwinding) the document http://harmony.apache.org/subcomponents/drlvm/developers_guide.html#About_the_Stack also indicate more usages of the M2nFrame:
Container of object handles that are indirect pointers to the Java*<http://harmony.apache.org/subcomponents/drlvm/developers_guide.html#*>heap. Native code must use object handles to enable root set enumeration. During this process, the VM traverses the list of M2nFrames for each thread and enumerates object handles from each frame. Looking in the drlvm interpreter source code, the oh_allocate_local_handle() are often seen for this. I myself do not catch your idea that why M2NFrame is only used in JET/OPT mode. Can you explain that? On Mon, Mar 9, 2009 at 3:38 PM, Yuan Zhang <[email protected]> wrote: > Hello, everyone: > I have read something about the M2nFrame described in “Developer's > Guide"[1] and I thought the main use of M2nFrame is to handle the > difference > of the calling conventions between the native frames and the managed frames > compiled by JIT, so I concluded that M2nFrame would only be used in > JET/OPT > mode. However, I'm a little confused to found out that M2nFrame is also > used > in the interpreter mode because I think in the interpreter mode, the native > function is directed called by interpreter and interpreter runs in native > frames. It seems that there is no need to use M2nFrame in interpreter, and > my only explanation is that using M2nFrame in the interpreter is for stack > iteratoring and tracing. But I'm not sure, can anybody give me some ideas? > Thanks! > > [1] > > http://harmony.apache.org/subcomponents/drlvm/developers_guide.html#About_the_Stack >
