Skip to content

@jnthn /gist:792205
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
.include "except_types.pasm"
.sub 'foo'
$P0 = box 1
.return ($P0)
.end
.sub 'bar'
new $P424, ['ExceptionHandler'], .CONTROL_RETURN
set_addr $P424, control_423
push_eh $P424
$P0 = box 1
.return ($P0)
control_423:
.local pmc exception
.get_results (exception)
getattribute $P428, exception, "payload"
.return ($P428)
.end
.sub 'test' :main
$N1 = time
say $N1
$I0 = 0
loop_1:
if $I0 > 10000000 goto loop_1_end
'foo'()
inc $I0
goto loop_1
loop_1_end:
$N1 = time
say $N1
$I0 = 0
loop_2:
if $I0 > 10000000 goto loop_2_end
'bar'()
inc $I0
goto loop_2
loop_2_end:
$N1 = time
say $N1
.end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.