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,
}
);