Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix failing tests after kill_current_object merge, kid51++

three are fixed by updating to non-ancient calling conventions
(self as first invocant). The fourth was in PASM, and is now gone
  • Loading branch information...
commit e7d7c16493269bf2610f666f27fb5a1d8ba952dd 1 parent 2af81f0
@moritz moritz authored
View
4 MANIFEST
@@ -476,10 +476,6 @@ examples/benchmarks/oo3.pir [examples]
examples/benchmarks/oo3.pl [examples]
examples/benchmarks/oo3.py [examples]
examples/benchmarks/oo3.rb [examples]
-examples/benchmarks/oo4.pasm [examples]
-examples/benchmarks/oo4.pl [examples]
-examples/benchmarks/oo4.py [examples]
-examples/benchmarks/oo4.rb [examples]
examples/benchmarks/oo5.pir [examples]
examples/benchmarks/oo5.pl [examples]
examples/benchmarks/oo5.py [examples]
View
6 examples/benchmarks/oo1.pir
@@ -52,13 +52,13 @@ loop:
.sub 'init' :vtable
.include "interpinfo.pasm"
- interpinfo $P2, .INTERPINFO_CURRENT_OBJECT
+ .param pmc self
new $P10, 'Integer'
set $P10, 10
- setattribute $P2, ".i", $P10
+ setattribute self, ".i", $P10
$P10 = new 'Integer'
$P10 = 20
- setattribute $P2, ".j", $P10
+ setattribute self, ".j", $P10
.return ()
.end
View
6 examples/benchmarks/oo2.pir
@@ -38,13 +38,13 @@ loop:
.sub 'init' :vtable
.include "interpinfo.pasm"
- interpinfo $P2, .INTERPINFO_CURRENT_OBJECT
+ .param pmc self
$P10 = new 'Integer'
$P10 = 10
- setattribute $P2, ".i", $P10
+ setattribute self, ".i", $P10
$P10 = new 'Integer'
$P10 = 20
- setattribute $P2, ".j", $P10
+ setattribute self, ".j", $P10
.return ()
.end
View
6 examples/benchmarks/oo3.pir
@@ -26,14 +26,14 @@ loop:
.sub init :vtable
.include "interpinfo.pasm"
- interpinfo $P2, .INTERPINFO_CURRENT_OBJECT
+ .param pmc self
$P10 = new 'Integer'
$P10 = 10
- setattribute $P2, ".i", $P10
+ setattribute self, ".i", $P10
inc $I0
$P10 = new 'Integer'
$P10 = 20
- setattribute $P2, ".j", $P10
+ setattribute self, ".j", $P10
.return ()
.end
View
43 examples/benchmarks/oo4.pasm
@@ -1,43 +0,0 @@
-# Copyright (C) 2004-2009, Parrot Foundation.
-
-.namespace [ "Foo" ]
-
-.pcc_sub :main main:
- newclass P1, "Foo"
- addattribute P1, ".i"
- addattribute P1, ".j"
-
- set I10, 1
- set I11, 500000
- new P3, "Foo"
-loop:
- new P4, 'Integer'
- set P4, I10
- setattribute P3, ".i", P4
- new P4, 'Integer'
- set P4, I10
- setattribute P3, ".j", P4
- inc I10
- le I10, I11, loop
-
- getattribute P2, P3, ".i"
- print P2
- print "\n"
- end
-
-.pcc_sub __init:
-.include "interpinfo.pasm"
- interpinfo P2, .INTERPINFO_CURRENT_OBJECT
- new P10, 'Integer'
- set P10, 10
- setattribute P2, ".i", P10
- new P10, 'Integer'
- set P10, 20
- setattribute P2, ".j", P10
- returncc
-
-# Local Variables:
-# mode: pir
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4 ft=pir:
View
29 examples/benchmarks/oo4.pl
@@ -1,29 +0,0 @@
-#! perl
-
-# Copyright (C) 2004-2006, Parrot Foundation.
-
-use strict;
-use warnings;
-
-my $o = new Foo();
-for my $i ( 1 .. 500000 ) {
- $o->[0] = $i;
- $o->[1] = $i;
-}
-print $o->[0], "\n";
-
-package Foo;
-
-sub new {
- my $self = ref $_[0] ? ref shift : shift;
- return bless [ 10, 20 ], $self;
-}
-
-1;
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
View
14 examples/benchmarks/oo4.py
@@ -1,14 +0,0 @@
-# Copyright (C) 2004-2011, Parrot Foundation.
-class Foo:
- def __init__(self):
- self.i = 10
- self.j = 20
-
-class main:
- o = Foo()
- for i in range(1,500001):
- o.i = i
- o.j = i
- print o.i
-
-
View
19 examples/benchmarks/oo4.rb
@@ -1,19 +0,0 @@
-#! ruby
-
-class Foo
- attr_accessor :i, :j
-
- def initialize()
- @i = 10
- @j = 20
- end
-end
-
-o = Foo.new
-for i in 1..500000
- o.i = i
- o.j = i
-end
-puts o.i
-
-
View
1  t/benchmark/benchmarks.t
@@ -151,7 +151,6 @@ FixedPMCArray:\s\d+\.\d+s\n
q{oo1.pir} => qq(10\n),
q{oo2.pir} => qq(10\n),
q{oo3.pir} => qq(10\n),
- q{oo4.pasm} => qq(500000\n),
q{oo5.pir} => qq(10\n),
q{oo6.pir} => qq(500000\n),
q{oofib.pir} => qr/^fib\(24\)\s=\s46368\s\d+\.\d+s$/x,
Please sign in to comment.
Something went wrong with that request. Please try again.