Steve Fink <[EMAIL PROTECTED]> wrote:

[ passing arguments to compilers ]

> ... So why does the compile op exist?

Your concerns are all valid. The compiler interface needs extension as
well as some cleanup. This is true for compilers written in C (loadable
as shared libs) and for compilers written in PASM/PIR.

The explicit call of Parrot_runops... in C<compile> was a short-term
hack to get a compiler implemented as a Parrot_Sub running. I think that
removing that stuff and always calling ->invoke already should do it.

You can subclass the internal Compiler PMC, overload __invoke, and pass
in whatever is needed.

The C<compile> opcode itself isn't more then wrapping a function or
method call, a visuable distinction that something different is
happening here. OTOH it's not really needed. It's just C<invoke> - or
could/should be.

leo

Reply via email to