Dan Sugalski <[EMAIL PROTECTED]> wrote:
> While the actual compiler code is evil, doing all sorts of things it
> ought not do with absolute addresses (and therefore non-JITtable),
> the forth compiler does work, and will compile things. It ought,
> actually, to be able to be integrated in as a compiler.

> Your task, if you're interested, is to thump it such that forth.pasm
> *can* be loaded in as a compiler module such that you can do:

>    compile P5, ForthCompiler, "1 2 + ."

> and have 3 print out. Should be easy, relatively speaking.

Three Notes WRT that:

1) examples/assembly/nano_forth2.pasm uses PCC to implement such a
compiler. No address hacks, but likely a bit slower.

2) I've checked in the "compreg Sx, Py" opcode, where Py is a Parrot Sub.

3) I'll check in an example soon, how to load and run a compiler
   written in C and residing in a shared lib.

I'm just waiting for some ok WRT the platform patch, which I've pending
too.

leo

Reply via email to