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

cotto at svn.parrot.org cotto at svn.parrot.org
Sat Jun 20 20:58:31 UTC 2009


Author: cotto
Date: Sat Jun 20 20:58:30 2009
New Revision: 39680
URL: https://trac.parrot.org/parrot/changeset/39680

Log:
[pmc2c] simplify code to assume that if a PMC has parents, default will be the first (if it's there at all)

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

Modified: trunk/lib/Parrot/Pmc2c/PMCEmitter.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PMCEmitter.pm	Sat Jun 20 20:58:25 2009	(r39679)
+++ trunk/lib/Parrot/Pmc2c/PMCEmitter.pm	Sat Jun 20 20:58:30 2009	(r39680)
@@ -920,13 +920,9 @@
     }
 
     foreach my $parent_name ( @other_parents) {
-        if ($parent_name eq 'default') {
-            $get_vtable .= "    vt = Parrot_default_get_vtable(interp);\n";
-        }
-        else {
-            $get_vtable .= "    Parrot_${parent_name}_update_vtable(vt);\n";
-        }
+        $get_vtable .= "    Parrot_${parent_name}_update_vtable(vt);\n";
     }
+
     $get_vtable .= "    Parrot_${classname}_update_vtable(vt);\n";
 
     $cout .= <<"EOC";
@@ -951,13 +947,9 @@
     }
 
     foreach my $parent_name ( @other_parents ) {
-        if ($parent_name eq 'default') {
-            $get_extra_vtable .= "    vt = Parrot_default_ro_get_vtable(interp);\n";
-        }
-        else {
-            $get_extra_vtable .= "    Parrot_${parent_name}_ro_update_vtable(vt);\n";
-        }
+        $get_extra_vtable .= "    Parrot_${parent_name}_ro_update_vtable(vt);\n";
     }
+
     $get_extra_vtable .= "    Parrot_${classname}_ro_update_vtable(vt);\n";
 
     $cout .= <<"EOC";


More information about the parrot-commits mailing list