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

[perl #39807] [BUG] load_bytecode of .pir files fails (sometimes)

0 views
Skip to first unread message

Patrick R . Michaud

unread,
Jul 12, 2006, 9:47:11 PM7/12/06
to bugs-bi...@rt.perl.org
# New Ticket Created by Patrick R. Michaud
# Please include the string: [perl #39807]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39807 >


[I looked in the RT database and didn't find a ticket for
this (known) issue, so I'm submitting it here. Apologies for
any duplication.]

When load_bytecode is used on a .pir file, it sometimes causes
problems with the imcc compiler a bit later. Demonstration:

$ cat x.pir
.sub main :main
load_bytecode 'PGE.pbc'
load_bytecode 'dumper.pir'
load_bytecode 'PGE/Dumper.pir'

$P0 = compreg 'PGE::P5Regex'
$P1 = $P0('aabb*')
$P2 = $P1('fooaabbbar')

_dumper($P2)
.end
$ ./parrot x.pir
error:imcc:syntax error, unexpected $end
in file 'EVAL_1' line 72

Changing the .pir to .pbc causes things to magically work:

[pmichaud@orange trunk]$ cat y.pir
.sub main :main
load_bytecode 'PGE.pbc'
load_bytecode 'dumper.pbc'
load_bytecode 'PGE/Dumper.pbc'

$P0 = compreg 'PGE::P5Regex'
$P1 = $P0('aabb*')
$P2 = $P1('fooaabbbar')

_dumper($P2)
.end
$ ./parrot y.pir
"VAR1" => PMC 'PGE::Match' => "aabbb" @ 3
$

I'll add the above as tests to t/pmc/sub.t as soon
as I have the RT ticket number. :-)

Thanks,

Pm

0 new messages