Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit a4167b2b93b86015a46e36803f3b294bdc0bcda6 1 parent 239f16a
Jonathan Leto authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.