Skip to content

Instantly share code, notes, and snippets.

@perl6
Created October 14, 2009 14:11
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 perl6/210101 to your computer and use it in GitHub Desktop.
Save perl6/210101 to your computer and use it in GitHub Desktop.
$ ./perl6 --target=pir x
.HLL "perl6"
.namespace []
.sub "_block11" :main :anon :subid("10_1255529479")
.param pmc param_52 :slurpy
.annotate "line", 0
.const 'Sub' $P54 = "14_1255529479"
capture_lex $P54
.annotate 'file', 'x'
find_name $P13, "!UNIT_START"
.annotate "line", 1
.const 'Sub' $P15 = "11_1255529479"
.lex "@_", param_52
.tailcall $P13($P15, param_52)
.annotate "line", 0
.return ()
.end
.HLL "perl6"
.namespace []
.sub "" :load :init :subid("post15") :outer("10_1255529479")
.annotate "line", 0
.const 'Sub' $P12 = "10_1255529479"
.local pmc block
set block, $P12
$P0 = compreg "perl6"
unless null $P0 goto have_perl6
load_bytecode "perl6.pbc"
have_perl6:
.end
.HLL "perl6"
.namespace []
.sub "_block14" :anon :subid("11_1255529479")
.annotate "line", 1
.const 'Sub' $P20 = "12_1255529479"
capture_lex $P20
get_namespace $P16
.lex "$?PACKAGE", $P16
.include "interpinfo.pasm"
$P17 = root_new ["parrot";"Perl6Scalar"]
.lex "$_", $P17
$P18 = root_new ["parrot";"Perl6Scalar"]
.lex "$/", $P18
$P19 = root_new ["parrot";"Perl6Scalar"]
.lex "$!", $P19
.const 'Sub' $P20 = "12_1255529479"
capture_lex $P20
.return ($P20)
.end
.HLL "perl6"
.namespace []
.sub "foo" :subid("12_1255529479") :outer("11_1255529479")
.param pmc param_23
.param pmc param_24
.annotate "line", 1
.const 'Sub' $P42 = "13_1255529479"
capture_lex $P42
new $P22, 'ExceptionHandler'
set_addr $P22, control_21
$P22."handle_types"(58)
push_eh $P22
.lex "$a", param_23
.lex "$b", param_24
$P25 = root_new ["parrot";"Perl6Scalar"]
.lex "$_", $P25
$P26 = root_new ["parrot";"Perl6Scalar"]
.lex "$/", $P26
$P27 = root_new ["parrot";"Perl6Scalar"]
.lex "$!", $P27
"!SIGNATURE_BIND"()
$P28 = "..."()
.return ($P28)
control_21:
.local pmc exception
.get_results (exception)
exception = getattribute exception, "payload"
$P31 = interpinfo .INTERPINFO_CURRENT_SUB
$P31 = getprop '$!real_self', $P31
$P31 = $P31.'of'()
$P0 = $P31
$P32 = $P31."ACCEPTS"(exception)
if $P32, if_30
$I0 = isa exception, 'Failure'
$P35 = box $I0
if $P35, if_34
$P36 = "!make_type_fail_message"("Return value", exception, $P0)
$P37 = "die"($P36)
set $P33, $P37
goto if_34_end
if_34:
.return (exception)
if_34_end:
set $P29, $P33
goto if_30_end
if_30:
.return (exception)
if_30_end:
.end
.HLL "perl6"
.namespace []
.sub "" :load :init :subid("post16") :outer("12_1255529479")
.annotate "line", 1
.const 'Sub' $P20 = "12_1255529479"
.local pmc block
set block, $P20
"!fixup_routine_type"(block, "Sub")
$P38 = allocate_signature 2
.local pmc signature
set signature, $P38
null $P0
get_hll_global $P39, "Any"
set_signature_elem signature, 0, "$a", 128, $P39, $P0, $P0, $P0
get_hll_global $P40, "Any"
.const 'Sub' $P42 = "13_1255529479"
capture_lex $P42
set_signature_elem signature, 1, "$b", 128, $P40, $P42, $P0, $P0
setprop block, "$!signature", signature
.end
.HLL "perl6"
.namespace []
.sub "_block41" :anon :subid("13_1255529479") :outer("12_1255529479")
.param pmc param_43 :optional
.param int has_param_43 :opt_flag
.annotate "line", 1
.local pmc outerlex
getinterp $P0
set outerlex, $P0["outer";"lexpad";1]
if has_param_43, optparam_18
set $P44, outerlex["$_"]
set param_43, $P44
optparam_18:
.lex "$_", param_43
set $P45, outerlex["$/"]
.lex "$/", $P45
set $P46, outerlex["$!"]
.lex "$!", $P46
find_lex $P48, "$a"
find_lex $P49, "$b"
$P47 = "infix:=="($P48, $P49)
chain_end_19:
.return ($P47)
.end
.HLL "perl6"
.namespace []
.sub "" :load :init :subid("post17") :outer("13_1255529479")
.annotate "line", 1
.const 'Sub' $P42 = "13_1255529479"
.local pmc block
set block, $P42
"!fixup_routine_type"(block, "Block")
$P50 = allocate_signature 1
.local pmc signature
set signature, $P50
null $P0
get_hll_global $P51, "Object"
set_signature_elem signature, 0, "$_", 2176, $P51, $P0, $P0, $P0
setprop block, "$!signature", signature
.end
.HLL "perl6"
.namespace []
.sub "_block53" :load :anon :subid("14_1255529479") :outer("10_1255529479")
.annotate "line", 0
.include "interpinfo.pasm"
$P0 = interpinfo .INTERPINFO_CURRENT_SUB
$P0 = $P0."get_outer"()
$P0()
.return ()
.end
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment