[svn:parrot] r44835 - in branches/fix_hll_mmd: lib/Parrot/Pmc2c t/pmc
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Wed Mar 10 00:19:22 UTC 2010
Author: chromatic
Date: Wed Mar 10 00:19:21 2010
New Revision: 44835
URL: https://trac.parrot.org/parrot/changeset/44835
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:
branches/fix_hll_mmd/lib/Parrot/Pmc2c/PMC.pm
branches/fix_hll_mmd/t/pmc/multidispatch.t
Modified: branches/fix_hll_mmd/lib/Parrot/Pmc2c/PMC.pm
==============================================================================
--- branches/fix_hll_mmd/lib/Parrot/Pmc2c/PMC.pm Wed Mar 10 00:19:16 2010 (r44834)
+++ branches/fix_hll_mmd/lib/Parrot/Pmc2c/PMC.pm Wed Mar 10 00:19:21 2010 (r44835)
@@ -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: branches/fix_hll_mmd/t/pmc/multidispatch.t
==============================================================================
--- branches/fix_hll_mmd/t/pmc/multidispatch.t Wed Mar 10 00:19:16 2010 (r44834)
+++ branches/fix_hll_mmd/t/pmc/multidispatch.t Wed Mar 10 00:19:21 2010 (r44835)
@@ -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