[svn:parrot] r44414 - in trunk: lib/Parrot/Pmc2c t/pmc

chromatic at svn.parrot.org chromatic at svn.parrot.org
Tue Feb 23 22:19:04 UTC 2010


Author: chromatic
Date: Tue Feb 23 22:19:03 2010
New Revision: 44414
URL: https://trac.parrot.org/parrot/changeset/44414

Log:
[lib] Removed "MMD must obviously take care of this!" from i_* VTABLE entries,
especially as the core types *don't* use MMD with them.  This fixes TT #784.

Modified:
   trunk/lib/Parrot/Pmc2c/PMC.pm
   trunk/t/pmc/multidispatch.t

Modified: trunk/lib/Parrot/Pmc2c/PMC.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PMC.pm	Tue Feb 23 21:31:40 2010	(r44413)
+++ trunk/lib/Parrot/Pmc2c/PMC.pm	Tue Feb 23 22:19:03 2010	(r44414)
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2008, Parrot Foundation.
+# Copyright (C) 2004-2010, Parrot Foundation.
 # $Id$
 #
 
@@ -340,7 +340,6 @@
     my ( $self, $methodname ) = @_;
 
     return 1 if ($methodname =~ m/^
-                (?:i_)?
                 (?:add|subtract|multiply|divide|floor_divide|modulus)
                 (?:_int|_float)?
               $/x);

Modified: trunk/t/pmc/multidispatch.t
==============================================================================
--- trunk/t/pmc/multidispatch.t	Tue Feb 23 21:31:40 2010	(r44413)
+++ trunk/t/pmc/multidispatch.t	Tue Feb 23 22:19:03 2010	(r44414)
@@ -1,5 +1,5 @@
 #! perl
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
 # $Id$
 
 use strict;
@@ -9,7 +9,7 @@
 use Test::More;
 use Parrot::Test::Util 'create_tempfile';
 
-use Parrot::Test tests => 45;
+use Parrot::Test tests => 46;
 
 =head1 NAME
 
@@ -1493,6 +1493,29 @@
 77.788.899.9
 OUTPUT
 
+pir_output_is( <<'CODE', <<'OUTPUT', 'Integer subclass and MMD - TT #784' );
+.sub main :main
+    .local pmc int_c
+    int_c = get_class "Integer"
+
+    .local pmc sub_c
+    sub_c = subclass int_c, "MyInt"
+
+    $P1 = new 'Integer'
+    $P1 = 4
+    $P1 -= 3
+    say $P1
+
+    $P1 = new 'MyInt'
+    $P1 = 4
+    $P1 -= 3
+    say $P1
+.end
+CODE
+1
+1
+OUTPUT
+
 # Local Variables:
 #   mode: cperl
 #   cperl-indent-level: 4


More information about the parrot-commits mailing list