On Thu, Aug 20, 2009 at 3:25 PM, Phil Dawes<[email protected]> wrote:
> (I wasn't sure where to stick the vm struct so have given it it's own vm
> vocab in basic for now)
That looks good.
> Incidently I was going to make rt-vm a 1 arg relocation type with the
> offset into the struct passed at compile time. Unfortunately I was
> getting crashes because something was passing a crazy offset during
> bootstrap (via jit-rel), so I gave up on that idea and am now just
> generating asm to add the offset at runtime. (my limited hacking time is
> precious so I tend to give up on stuff easily and go for the quick win).
Args for relocations are taken from the literal table so make sure to
add an entry if needed.
> Out of interest does anything else invoke the do-primitive code other
> than that generated by make-primitive? To make the above work I needed
> it to pass a 0 offset arg as well as the primitive name so that it could
> be picked up by rt-vm at jit-compile time during bootstrap.
Primitives are compiled by the jit; look at
basis/cpu/x86/{32,64}/bootstrap.factor.
Slava
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk