Hi,

As I understood my reason for doing this was that many closures point to
the same code fragment
and If we compile one of those closures the others will not benefit. So
therefore I stored the native
code at the beginning of the rtl code fragment and used this mechanism. I
have not gotten this nailed
though because I'm unsure how to treat this data correctly w.r.t. GC.
Currently I just keep a reference
to the native code to prevent garbage collection if I'm not miss-remember.
But perhaps I'm missing
something in this argument I would be glad to be wrong in this case :-). Of
cause if we compile the
module directly to native code this will be a non issue and I completely
agree with your approach.

Cheers!
Stefan


On Mon, Jan 21, 2013 at 2:21 PM, Andy Wingo <[email protected]> wrote:

> On Thu 09 Aug 2012 20:59, Stefan Israelsson Tampe <[email protected]>
> writes:
>
> > DO you think that this will do as an initial patch to wip-rtl in order
> > to introduce the possibility to
> > execute native code or JIT:ed code. We reserve the first two indexes in
> > the ip text area to fit
> > a pointer to native code to be executed.
>
> I would rather use a different tc7 and the existing fallback `apply'
> loop.  Note that this does not preclude JIT compilation: we can change
> the tc7 of an object at runtime.
>
> Cheers,
>
> Andy
> --
> http://wingolog.org/
>

Reply via email to