Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #39669] No PIR Compiler Available for Embedded Parrot

4 views
Skip to first unread message

Chromatic

unread,
Jun 30, 2006, 11:06:44 AM6/30/06
to bugs-bi...@rt.perl.org
# New Ticket Created by chromatic
# Please include the string: [perl #39669]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=39669 >


I've been playing with embedding Parrot and trying to pass arbitrary PIR code
to the embedded interpreter. The easiest approach I've found so far is to
create a small eval.pbc file that takes one argument in argv as PIR code to
eval and execute.

(There should really be easier approaches, but I digress.)

Unfortunately, it appears that there is no PIR compiler available to embedded
Parrot. I'll check in a test to t/src/extend.t as soon as I get a bug number
here. My PIR code is:

.sub main :main
.param pmc argv
.local int argc

.local pmc compiler
compiler = compreg 'PIR'

.local string code
code = argv[1]

.local pmc new_sub
new_sub = compiler( code )

new_sub()
.end

-- c

Leopold Toetsch

unread,
Jun 30, 2006, 12:35:03 PM6/30/06
to perl6-i...@perl.org, bugs-bi...@netlabs.develooper.com

On Jun 30, 2006, at 17:06, chromatic (via RT) wrote:

>
> Unfortunately, it appears that there is no PIR compiler available to
> embedded
> Parrot.

The PIR compiler is registered within imcc_init(), which should
probably called automagically during Parrot init sequence. See also
compilers/imcc/main.c.

leo

Chromatic

unread,
Jun 30, 2006, 1:54:53 PM6/30/06
to perl6-i...@perl.org, Leopold Toetsch, bugs-bi...@netlabs.develooper.com
On Friday 30 June 2006 09:35, Leopold Toetsch wrote:

> The PIR compiler is registered within imcc_init(), which should
> probably called automagically during Parrot init sequence. See also
> compilers/imcc/main.c.

Okay, here's the patch I checked in as #13066. The IMCC headers need some
cleanup. Andy?

-- c

0 new messages