Grupos de Google ya no admite nuevas publicaciones ni suscripciones de Usenet. El contenido anterior sigue siendo visible.

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

Visto 0 veces
Saltar al primer mensaje no leído

Patrick R . Michaud

no leída,
12 jul 2006, 21:47:1112/7/06
a 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 mensajes nuevos