develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34416 - in trunk/lib/Parrot/Pmc2c: . PMC

From:
petdance
Date:
December 27, 2008 00:04
Subject:
[svn:parrot] r34416 - in trunk/lib/Parrot/Pmc2c: . PMC
Message ID:
20081227080450.4C66CCBA12@x12.develooper.com
Author: petdance
Date: Sat Dec 27 00:04:49 2008
New Revision: 34416

Modified:
   trunk/lib/Parrot/Pmc2c/MethodEmitter.pm
   trunk/lib/Parrot/Pmc2c/PMC/RO.pm

Log:
Working on SHIMming out unused args in PMCs that throw exceptions

Modified: trunk/lib/Parrot/Pmc2c/MethodEmitter.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/MethodEmitter.pm	(original)
+++ trunk/lib/Parrot/Pmc2c/MethodEmitter.pm	Sat Dec 27 00:04:49 2008
@@ -119,7 +119,7 @@
     }
 
     return <<"EOC";
-$decorators$export$extern$ret${newl}Parrot_${pmcname}${ro}_$meth(PARROT_INTERP, PMC *$pmcvar$args)$semi
+$decorators$export$extern$ret${newl}Parrot_${pmcname}_$meth(PARROT_INTERP, PMC *$pmcvar$args)$semi
 EOC
 }
 

Modified: trunk/lib/Parrot/Pmc2c/PMC/RO.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PMC/RO.pm	(original)
+++ trunk/lib/Parrot/Pmc2c/PMC/RO.pm	Sat Dec 27 00:04:49 2008
@@ -97,12 +97,15 @@
             $self->add_method($ro_method);
         }
         elsif ( $parent->vtable_method_does_write($vt_method_name) ) {
+            my @parameters = split( /\s*,\s*/, $vt_method->parameters );
+            @parameters = map { "SHIM($_)" } @parameters;
+
             my $ro_method = Parrot::Pmc2c::Method->new(
                 {
                     name        => $vt_method_name,
                     parent_name => $parent->name,
                     return_type => $vt_method->return_type,
-                    parameters  => $vt_method->parameters,
+                    parameters  => join( ', ', @parameters ),
                     type        => Parrot::Pmc2c::Method::VTABLE,
                 }
             );



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About