Browse files

Add some sanity fo BenchTools.pm and rewrite parrot/001/02.pir so tha…

…t older Parrots can parse it
  • Loading branch information...
1 parent 239f16a commit a4167b2b93b86015a46e36803f3b294bdc0bcda6 Jonathan Leto committed Dec 6, 2009
Showing with 5 additions and 3 deletions.
  1. +2 −1 lib/BenchTools.pm
  2. +3 −2 parrot/001/02.pir
View
3 lib/BenchTools.pm
@@ -13,6 +13,8 @@ use Benchmark::Stopwatch::Pause;
use Exporter qw{import};
use Memoize;
+
+# why the hell are we exporting D?
our @EXPORT = qw{
D
root_dir
@@ -127,7 +129,6 @@ sub build_runs {
system(config()->{language}->{$lang}->{post_run})
if defined config()->{language}->{$lang}->{post_run};
-D {PROBS => \@probs};
grep{defined} @benchee, @probs;
View
5 parrot/001/02.pir
@@ -1,7 +1,7 @@
# Euler Problem #1 in PIR
# Jonathan "Duke" Leto <jonathan@leto.net>
-.sub 'main' :main
+.sub main
.local pmc sum, max, m, i
i = new 'Integer'
sum = new 'Integer'
@@ -24,5 +24,6 @@ found:
if i > max goto done
goto loop
done:
- say sum
+ print sum
+ print "\n"
.end

0 comments on commit a4167b2

Please sign in to comment.