Oops!  My message above went to the wrong ticket, see RT#55782 for
that case.

As for RT#54116 (this ticket) -- I do not get a segfault when 
running r27472 on my system (kubuntu 8.04, x86).  Nor do I get
a segfault on the current head (r28833).

However, if someone wants to generate standalone PIR, do
the following.  First, generate the PIR:

    $ ./parrot perl6.pbc --target=pir t/00-parrot/05-var.t >05-var.pir

Then, modify the 05-var.pir file to replace the first 9 lines with
a load_bytecode 'perl6.pbc' opcode.  It should look something like

    .namespace
    .sub "_block10"
        load_bytecode 'perl6.pbc'
        new $P15, "Perl6Str"
        assign $P15, "1..12"
        "say"($P15)
        ...

I've attached my copy of the generated PIR from r27472 to this
message.  As mentioned before, it doesn't segfault.

Pm

.namespace 
.sub "_block10" 
    load_bytecode 'perl6.pbc'
    new $P15, "Perl6Str"
    assign $P15, "1..12"
    "say"($P15)
    new $P16, "Perl6Str"
    assign $P16, "ok 1"
    new $P17, "Undef"
    .lex "$o1", $P17
    copy $P17, $P16
    find_lex $P18, "$o1"
    unless_null $P18, vivify_128
    new $P18, "Undef"
  vivify_128:
    "say"($P18)
    new $P19, "Undef"
    .lex "$o2", $P19
    new $P20, "Perl6Str"
    assign $P20, "ok 2"
    find_lex $P21, "$o2"
    unless_null $P21, vivify_129
    new $P21, "Undef"
    store_lex "$o2", $P21
  vivify_129:
    copy $P21, $P20
    find_lex $P22, "$o2"
    unless_null $P22, vivify_130
    new $P22, "Undef"
  vivify_130:
    "say"($P22)
    new $P23, "Int"
    assign $P23, 3
    new $P24, "Undef"
    .lex "$a", $P24
    copy $P24, $P23
    new $P25, "Perl6Str"
    assign $P25, "ok "
    "print"($P25)
    find_lex $P26, "$a"
    unless_null $P26, vivify_131
    new $P26, "Undef"
  vivify_131:
    "say"($P26)
    new $P27, "Undef"
    .lex "$b", $P27
    new $P28, "Int"
    assign $P28, 4
    find_lex $P29, "$b"
    unless_null $P29, vivify_132
    new $P29, "Undef"
    store_lex "$b", $P29
  vivify_132:
    copy $P29, $P28
    new $P30, "Perl6Str"
    assign $P30, "ok "
    "print"($P30)
    find_lex $P31, "$b"
    unless_null $P31, vivify_133
    new $P31, "Undef"
  vivify_133:
    "say"($P31)
    new $P32, "Int"
    assign $P32, 5
    get_global $P33, "$x"
    unless_null $P33, vivify_134
    new $P33, "Undef"
    set_global "$x", $P33
  vivify_134:
    copy $P33, $P32
    new $P34, "Perl6Str"
    assign $P34, "ok "
    get_global $P35, "$x"
    unless_null $P35, vivify_135
    new $P35, "Undef"
  vivify_135:
    "say"($P34, $P35)
    get_global $P47, "_block36"
    newclosure $P47, $P47
    $P47()
    get_global $P50, "$x"
    unless_null $P50, vivify_138
    new $P50, "Undef"
  vivify_138:
    new $P51, "Int"
    assign $P51, 2
    $P52 = "infix:+"($P50, $P51)
    new $P53, "Int"
    assign $P53, 7
    $P49 = "infix:=="($P52, $P53)
  chain_end_139:
    if $P49, if_48
    goto if_48_end
  if_48:
    get_global $P65, "_block54"
    newclosure $P65, $P65
    $P64 = $P65()
  if_48_end:
    get_global $P88, "_block66"
    newclosure $P88, $P88
    $P88()
    new $P89, "Int"
    assign $P89, 9
    find_lex $P90, "$b"
    unless_null $P90, vivify_145
    new $P90, "Undef"
    store_lex "$b", $P90
  vivify_145:
    copy $P90, $P89
    new $P93, "Perl6Str"
    assign $P93, "ok "
    find_lex $P94, "$b"
    unless_null $P94, vivify_146
    new $P94, "Undef"
  vivify_146:
    n_concat $P95, $P93, $P94
    new $P96, "Perl6Str"
    assign $P96, "ok 9"
    $P92 = "infix:eq"($P95, $P96)
  chain_end_147:
    if $P92, if_91
    goto if_91_end
  if_91:
    new $P97, "Perl6Str"
    assign $P97, "ok 9"
    $P98 = "say"($P97)
  if_91_end:
    new $P101, "Perl6Str"
    assign $P101, "ok $b"
    new $P102, "Perl6Str"
    assign $P102, "ok 9"
    $P100 = "infix:ne"($P101, $P102)
  chain_end_148:
    if $P100, if_99
    goto if_99_end
  if_99:
    new $P103, "Perl6Str"
    assign $P103, "ok 10"
    $P104 = "say"($P103)
  if_99_end:
    new $P105, "Perl6Str"
    assign $P105, "0x0b"
    find_lex $P106, "$b"
    unless_null $P106, vivify_149
    new $P106, "Undef"
    store_lex "$b", $P106
  vivify_149:
    copy $P106, $P105
    new $P109, "Perl6Str"
    assign $P109, "ok "
    find_lex $P110, "$b"
    unless_null $P110, vivify_150
    new $P110, "Undef"
  vivify_150:
    n_concat $P111, $P109, $P110
    new $P112, "Perl6Str"
    assign $P112, "ok 0x0b"
    $P108 = "infix:eq"($P111, $P112)
  chain_end_151:
    if $P108, if_107
    goto if_107_end
  if_107:
    new $P113, "Perl6Str"
    assign $P113, "ok 11"
    $P114 = "say"($P113)
  if_107_end:
    new $P115, "Perl6Str"
    assign $P115, "not ok 12"
    get_global $P116, "$x"
    unless_null $P116, vivify_152
    new $P116, "Undef"
    set_global "$x", $P116
  vivify_152:
    copy $P116, $P115
    get_global $P125, "_block117"
    newclosure $P125, $P125
    $P125()
    get_global $P126, "$x"
    unless_null $P126, vivify_155
    new $P126, "Undef"
  vivify_155:
    $P127 = "say"($P126)
    .return ($P127)
.end


.namespace 
.sub "_block117"  :outer("_block10")
    .param pmc param_118 :optional
    .param int has_param_118 :opt_flag
    if has_param_118, optparam_153
    new $P119, "Undef"
    set param_118, $P119
  optparam_153:
    .lex "$_", param_118
    .lex "$/", $P120
    $P121 = getinterp
    $P121 = $P121['lexpad';1]
    if null $P121 goto no_match_to_copy
    $P121 = $P121['$/']
    store_lex '$/', $P121
  no_match_to_copy:
    .lex "$!", $P122
    new $P123, "Perl6Str"
    assign $P123, "ok 12"
    get_global $P124, "$x"
    unless_null $P124, vivify_154
    new $P124, "Undef"
    set_global "$x", $P124
  vivify_154:
    copy $P124, $P123
    .return ($P124)
.end


.namespace 
.sub "_block66"  :outer("_block10")
    .param pmc param_67 :optional
    .param int has_param_67 :opt_flag
    if has_param_67, optparam_141
    new $P68, "Undef"
    set param_67, $P68
  optparam_141:
    .lex "$_", param_67
    .lex "$/", $P69
    $P70 = getinterp
    $P70 = $P70['lexpad';1]
    if null $P70 goto no_match_to_copy
    $P70 = $P70['$/']
    store_lex '$/', $P70
  no_match_to_copy:
    .lex "$!", $P71
    new $P72, "Int"
    assign $P72, 999
    new $P73, "Undef"
    .lex "$x", $P73
    copy $P73, $P72
    get_global $P87, "_block74"
    newclosure $P87, $P87
    $P86 = $P87()
    .return ($P86)
.end


.namespace 
.sub "_block74"  :outer("_block66")
    .param pmc param_75 :optional
    .param int has_param_75 :opt_flag
    if has_param_75, optparam_142
    new $P76, "Undef"
    set param_75, $P76
  optparam_142:
    .lex "$_", param_75
    .lex "$/", $P77
    $P78 = getinterp
    $P78 = $P78['lexpad';1]
    if null $P78 goto no_match_to_copy
    $P78 = $P78['$/']
    store_lex '$/', $P78
  no_match_to_copy:
    .lex "$!", $P79
    get_global $P80, "$x"
    unless_null $P80, vivify_143
    new $P80, "Undef"
  vivify_143:
    new $P81, "Perl6Str"
    assign $P81, "ok "
    get_global $P82, "$x"
    unless_null $P82, vivify_144
    new $P82, "Undef"
  vivify_144:
    new $P83, "Int"
    assign $P83, 3
    $P84 = "infix:+"($P82, $P83)
    $P85 = "say"($P81, $P84)
    .return ($P85)
.end


.namespace 
.sub "_block54"  :outer("_block10")
    .lex "$_", $P55
    .lex "$/", $P56
    $P57 = getinterp
    $P57 = $P57['lexpad';1]
    if null $P57 goto no_match_to_copy
    $P57 = $P57['$/']
    store_lex '$/', $P57
  no_match_to_copy:
    .lex "$!", $P58
    new $P59, "Perl6Str"
    assign $P59, "ok "
    get_global $P60, "$x"
    unless_null $P60, vivify_140
    new $P60, "Undef"
  vivify_140:
    new $P61, "Int"
    assign $P61, 2
    $P62 = "infix:+"($P60, $P61)
    $P63 = "say"($P59, $P62)
    .return ($P63)
.end


.namespace 
.sub "_block36"  :outer("_block10")
    .param pmc param_37 :optional
    .param int has_param_37 :opt_flag
    if has_param_37, optparam_136
    new $P38, "Undef"
    set param_37, $P38
  optparam_136:
    .lex "$_", param_37
    .lex "$/", $P39
    $P40 = getinterp
    $P40 = $P40['lexpad';1]
    if null $P40 goto no_match_to_copy
    $P40 = $P40['$/']
    store_lex '$/', $P40
  no_match_to_copy:
    .lex "$!", $P41
    new $P42, "Int"
    assign $P42, 6
    new $P43, "Undef"
    .lex "$x", $P43
    copy $P43, $P42
    new $P44, "Perl6Str"
    assign $P44, "ok "
    find_lex $P45, "$x"
    unless_null $P45, vivify_137
    new $P45, "Undef"
  vivify_137:
    $P46 = "say"($P44, $P45)
    .return ($P46)
.end

Reply via email to