Skip to content

Commit

Permalink
use the opcode 'iter' instead of a instantiation of 'Iterator'
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Weeks <tene@allalone.org>
  • Loading branch information
fperrad authored and tene committed Jul 25, 2009
1 parent 03a4f6d commit c547886
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/builtins/say.pir
Expand Up @@ -10,11 +10,11 @@ say.pir -- simple implementation of a say function

.sub 'say'
.param pmc args :slurpy
.local pmc iter
iter = new 'Iterator', args
.local pmc it
it = iter args
iter_loop:
unless iter goto iter_end
$P0 = shift iter
unless it goto iter_end
$P0 = shift it
print $P0
goto iter_loop
iter_end:
Expand Down

0 comments on commit c547886

Please sign in to comment.