Skip to content

Instantly share code, notes, and snippets.

@masak
Created October 6, 2010 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masak/613105 to your computer and use it in GitHub Desktop.
Save masak/613105 to your computer and use it in GitHub Desktop.
$ perl6 --target=PIR
> for 1, 2, 3 { sub foo {}; .say }
.loadlib 'perl6_ops'
.HLL "perl6"
.namespace []
.sub "_block74" :anon :subid("67_1286358902.24592")
.param pmc param_134 :slurpy
.annotate 'line', 0
.const 'Sub' $P79 = "68_1286358902.24592"
capture_lex $P79
.annotate 'line', 1
.local pmc true
true = get_hll_global 'True'
.lex "__CANDIDATE_LIST__", $P76
get_hll_global $P77, "!UNIT_START"
.const 'Sub' $P79 = "68_1286358902.24592"
capture_lex $P79
.lex "@_", param_134
$P135 = $P77($P79, param_134)
.return ($P135)
.const 'Sub' $P140 = "74_1286358902.24592"
.return ($P140)
.end
.HLL "perl6"
.namespace []
.sub "_block78" :anon :subid("68_1286358902.24592") :outer("67_1286358902.24592")
.param pmc param_87 :optional
.param int has_param_87 :opt_flag
.annotate 'line', 1
.const 'Sub' $P95 = "69_1286358902.24592"
capture_lex $P95
.local pmc true
true = get_hll_global 'True'
.lex "__CANDIDATE_LIST__", $P80
find_lex_skip_current $P81, "$_"
$P82 = new ['Perl6Scalar'], $P81
setprop $P82, "rw", true
.lex "$_", $P82
find_lex_skip_current $P83, "$/"
$P84 = new ['Perl6Scalar'], $P83
setprop $P84, "rw", true
.lex "$/", $P84
find_lex_skip_current $P85, "$!"
$P86 = new ['Perl6Scalar'], $P85
setprop $P86, "rw", true
.lex "$!", $P86
if has_param_87, optparam_76
new $P88, "Integer"
assign $P88, 0
set param_87, $P88
optparam_76:
.lex "$MAIN", param_87
$P0 = find_dynamic_lex "$*CTXSAVE"
if null $P0 goto ctxsave_done
$I0 = can $P0, "ctxsave"
unless $I0 goto ctxsave_done
$P0."ctxsave"()
ctxsave_done:
$P0 = get_hll_global "@!recapture"
recapture_loop:
unless $P0 goto recapture_loop_end
$P1 = shift $P0
fixup_outer_ctx $P1
goto recapture_loop
recapture_loop_end:
new $P89, "Int"
assign $P89, 1
new $P90, "Int"
assign $P90, 2
new $P91, "Int"
assign $P91, 3
$P92 = "&infix:<,>"($P89, $P90, $P91)
$P93 = "&flat"($P92)
.const 'Sub' $P95 = "69_1286358902.24592"
capture_lex $P95
get_hll_global $P129, "Block"
.const 'Sub' $P130 = "72_1286358902.24592"
$P131 = $P95."!get_closure"($P129, $P130, 0)
$P132 = $P93."map"($P131)
$P133 = "&eager"($P132)
.return ($P133)
.end
.HLL "perl6"
.namespace []
.sub "" :load :init :subid("post75") :outer("68_1286358902.24592")
.annotate 'line', 1
.const 'Sub' $P79 = "68_1286358902.24592"
.local pmc block
set block, $P79
$P0 = find_name "!UNIT_OUTER"
unless null $P0 goto have_perl6
load_language "perl6"
have_perl6:
"!UNIT_OUTER"(block)
.end
.HLL "perl6"
.namespace []
.sub "_block94" :anon :subid("69_1286358902.24592") :outer("68_1286358902.24592")
.param pmc param_120 :call_sig
.annotate 'line', 1
.const 'Sub' $P123 = "72_1286358902.24592"
capture_lex $P123
.const 'Sub' $P101 = "70_1286358902.24592"
capture_lex $P101
.local pmc true
true = get_hll_global 'True'
.lex "__CANDIDATE_LIST__", $P96
find_lex_skip_current $P97, "$/"
$P98 = new ['Perl6Scalar'], $P97
setprop $P98, "rw", true
.lex "$/", $P98
find_lex_skip_current $P99, "$!"
$P100 = new ['Perl6Scalar'], $P99
setprop $P100, "rw", true
.lex "$!", $P100
.local pmc code_65
.const 'Sub' $P101 = "70_1286358902.24592"
capture_lex $P101
get_hll_global $P115, "Sub"
.const 'Sub' $P116 = "71_1286358902.24592"
$P117 = $P101."!get_closure"($P115, $P116, 0)
set code_65, $P117
.lex "&foo", code_65
find_lex_skip_current $P118, "$_"
$P119 = new ['Perl6Scalar'], $P118
setprop $P119, "rw", true
.lex "$_", $P119
.lex "call_sig", param_120
find_lex $P121, "call_sig"
bind_llsig $P121
find_lex $P125, "$_"
$P126 = $P125."say"()
.return ($P126)
.end
.HLL "perl6"
.namespace []
.sub "" :load :init :subid("post77") :outer("69_1286358902.24592")
.annotate 'line', 1
.const 'Sub' $P95 = "69_1286358902.24592"
.local pmc block
set block, $P95
.const 'Sub' $P127 = "69_1286358902.24592"
.const 'Sub' $P128 = "72_1286358902.24592"
setprop $P127, "$!lazysig", $P128
.end
.HLL "perl6"
.namespace []
.include "except_types.pasm"
.sub "foo" :anon :subid("70_1286358902.24592") :outer("69_1286358902.24592")
.param pmc param_108 :call_sig
.annotate 'line', 1
.const 'Sub' $P111 = "71_1286358902.24592"
capture_lex $P111
new $P103, ['ExceptionHandler'], .CONTROL_RETURN
set_addr $P103, control_102
push_eh $P103
.local pmc true
true = get_hll_global 'True'
.lex "__CANDIDATE_LIST__", $P104
$P105 = new ['Perl6Scalar']
setprop $P105, "rw", true
.lex "$_", $P105
$P106 = new ['Perl6Scalar']
setprop $P106, "rw", true
.lex "$/", $P106
$P107 = new ['Perl6Scalar']
setprop $P107, "rw", true
.lex "$!", $P107
.lex "call_sig", param_108
find_lex $P109, "call_sig"
bind_llsig $P109
get_hll_global $P113, "Nil"
.return ($P113)
control_102:
.local pmc exception
.get_results (exception)
getattribute $P114, exception, "payload"
.return ($P114)
.end
.HLL "perl6"
.namespace []
.sub "_block110" :anon :subid("71_1286358902.24592") :outer("70_1286358902.24592")
.annotate 'line', 1
$P112 = allocate_llsig 0
.local pmc signature_64
set signature_64, $P112
null $P0
null $S0
.local pmc signature
set signature, signature_64
.return (signature)
.end
.HLL "perl6"
.namespace []
.sub "_block122" :anon :subid("72_1286358902.24592") :outer("69_1286358902.24592")
.annotate 'line', 1
$P124 = allocate_llsig 0
.local pmc signature_66
set signature_66, $P124
null $P0
null $S0
.local pmc signature
set signature, signature_66
.return (signature)
.end
.HLL "perl6"
.namespace []
.sub "_block136" :load :init :anon :subid("73_1286358902.24592")
.annotate 'line', 1
$P138 = "!fire_phasers"("CHECK")
.return ($P138)
.end
.HLL "perl6"
.namespace []
.sub "_block139" :load :anon :subid("74_1286358902.24592")
.annotate 'line', 1
.const 'Sub' $P141 = "67_1286358902.24592"
$P142 = "!UNIT_START"($P141)
.return ($P142)
.end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment