[svn:parrot] r39770 - trunk/lib/Parrot/Pmc2c

cotto at svn.parrot.org cotto at svn.parrot.org
Thu Jun 25 16:08:30 UTC 2009


Author: cotto
Date: Thu Jun 25 16:08:26 2009
New Revision: 39770
URL: https://trac.parrot.org/parrot/changeset/39770

Log:
[pmc2c] reverse the order in which direct parents are used
This is the way pmc2c used to work, which Lua depends on.

Modified:
   trunk/lib/Parrot/Pmc2c/PMCEmitter.pm

Modified: trunk/lib/Parrot/Pmc2c/PMCEmitter.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PMCEmitter.pm	Thu Jun 25 11:30:29 2009	(r39769)
+++ trunk/lib/Parrot/Pmc2c/PMCEmitter.pm	Thu Jun 25 16:08:26 2009	(r39770)
@@ -828,7 +828,7 @@
     my $export = $self->is_dynamic ? 'PARROT_DYNEXT_EXPORT ' : 'PARROT_EXPORT';
 
     if ($classname ne 'default') {
-        for my $dp (@{ $self->direct_parents}) {
+        for my $dp (reverse @{ $self->direct_parents}) {
             $get_mro .= "    mro = Parrot_${dp}_get_mro(interp, mro);\n"
             unless $dp eq 'default';
         }
@@ -869,7 +869,7 @@
     my $export = $self->is_dynamic ? 'PARROT_DYNEXT_EXPORT ' : 'PARROT_EXPORT';
 
     if ($classname ne 'default') {
-        for my $dp (@{ $self->direct_parents}) {
+        for my $dp (reverse @{ $self->direct_parents}) {
             $get_isa .= "    isa = Parrot_${dp}_get_isa(interp, isa);\n"
             unless $dp eq 'default';
         }
@@ -905,7 +905,7 @@
 
     my $cout      = "";
     my $classname = $self->name;
-    my @other_parents = @{ $self->direct_parents };
+    my @other_parents = reverse @{ $self->direct_parents };
     my $first_parent = shift @other_parents;
 
     my $get_vtable = '';


More information about the parrot-commits mailing list