harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Afremov" <pavel.n.afre...@gmail.com>
Subject [drlvm][magic] New Magic features proposal.
Date Mon, 22 Jan 2007 10:50:27 GMT

I have a proposal to improve performance of JITed code <-> VM communication
and fix some potential bugs. To reach it the Magic opportunity should be
extended. One of the new features is creating M2nFrame on the stack.

To support it, the following methods may be added to the Magic:

   1. Address AllocateOnStack(int size) – if  JIT found this during
   compilation, it generate a code which reserve requested area size.
   2. Two static methods put_registers(Adress m2nFrame) and
   m2nFrame) which put all registers to specified address and restores
   them from specified address correspondingly. Jit should inline code
   generated by m2n_gen_push_m2n and m2n_gen_pop_m2n (see
   …./vm/port/src/lil/ia32/pim/ m2n_ia32.cpp line 195, 270 ) istead calls of
   these static methods..

So code which creates N2n on the stack will be look like in following


Address m2nFrame = AllocateOnStack(M2N_FRAME_SIZE);



The other useful feature is a fast native call. I think it can looks like an
analog of JNI call, but without any wrappers and any additional action in
implementation (like exceptions rethrow for example). "fastcall"  calling
convention can be used for it.


Pavel Afremov

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message