The following program segfaults Parrot:
.sub main
$P0 = new .Key
push $P0, "test"
push $P0, "test"
print "not reached"
.end
Which sucks. :-(
The following program segfaults Parrot:
.sub main
$P0 = new .Key
push $P0, "test"
push $P0, "test"
print "not reached"
.end
Which sucks. :-(
I don't see a segfault in r15040 on x86 GNU/Linux, but it seems to be
using push_string(). Same error on r15009. What are you running?
-- Bob
------------------------------------------------------------------------
rogers@rgrjr> cat jw.pir
.sub main :main
$P0 = new .Key
push $P0, "test"
push $P0, "test"
print "not reached"
.end
rogers@rgrjr> ./parrot jw.pir
push_string() not implemented in class 'Key'
current instr.: 'main' pc 3 (jw.pir:4)
rogers@rgrjr>
.sub main
$P0 = new .Key
$P1 = new .String
$P1 = "test"
push $P0, $P1
$P2 = new .String
$P2 = "test"
push $P0, $P2
print "not reached"
.end
That is, you can only push another key onto a key. I discovered this by
accident when implementing :vtable, and filed a ticket to make sure it
wasn't forgotten. Turns out it was easy to deal with, so as of r15043
the issue is resolved. Sorry for the noise on-list.
Jonathan