Skip to content

Commit

Permalink
Use getinterp instead of new ParrotInterpreter to improve performance.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed May 6, 2009
1 parent ee7d456 commit a40974a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/builtins/control.pir
Expand Up @@ -328,7 +328,7 @@ on error.
# We want to make the lexicals known to the Perl 6 compiler. (One day
# PCT maybe will provide a way to tell any language about these.)
.local pmc blocks, block_info, interp, sub, my_caller
interp = new 'ParrotInterpreter'
interp = getinterp
$P0 = get_hll_global ['PAST'], 'Block'
block_info = $P0.'new'()
my_caller = interp["sub"; 1]
Expand Down Expand Up @@ -440,7 +440,7 @@ on error.

# Is our caller a wrapping? If so, call inner.
.local pmc caller, inner
$P0 = new 'ParrotInterpreter'
$P0 = getinterp
caller = $P0['sub'; 1]
search_loop:
inner = getprop '$!wrap_inner', caller
Expand Down Expand Up @@ -468,7 +468,7 @@ on error.
.sub 'callsame'
# Is our caller a wrapping? If so, find what we need to call.
.local pmc caller, inner
$P0 = new 'ParrotInterpreter'
$P0 = getinterp
caller = $P0['sub'; 1]
search_loop:
inner = getprop '$!wrap_inner', caller
Expand Down
2 changes: 1 addition & 1 deletion src/classes/Junction.pir
Expand Up @@ -409,7 +409,7 @@ a property.
.param pmc pos_args :slurpy
.param pmc name_args :slurpy :named
.local pmc pi, sub
pi = new 'ParrotInterpreter'
pi = getinterp
sub = pi['sub']
sub = getprop 'sub', sub
.tailcall '!DISPATCH_JUNCTION'(sub, pos_args :flat, name_args :flat :named)
Expand Down

0 comments on commit a40974a

Please sign in to comment.