Patch prepared by Alan Rocker at Hackathon Toronto (Apr 28 2007).
Index: tools/build/pmc2c.pl
===================================================================
--- tools/build/pmc2c.pl (revision 18351)
+++ tools/build/pmc2c.pl (working copy)
@@ -20,7 +20,6 @@
"dump" => \$action{dump},
"c|gen-c" => \$action{gen_c},
"tree" => \$action{tree},
- "no-body" => \$opt{nobody},
"no-lines" => \$opt{nolines},
"debug+" => \$opt{debug},
"verbose+" => \$opt{verbose},
@@ -115,10 +114,7 @@
Omit source line info
-=item C<--no-body>
-Emit an empty body in the dump. This may be useful for debugging.
-
=item C<--include=/path/to/pmc>
Specify include path where to find PMCs.
@@ -331,11 +327,9 @@
=cut
-__END__
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4:
-# %opt = map { $_ => 0 } qw(nobody nolines debug verbose);
Index: lib/Parrot/Pmc2c/Utils.pm
===================================================================
--- lib/Parrot/Pmc2c/Utils.pm (revision 18351)
+++ lib/Parrot/Pmc2c/Utils.pm (working copy)
@@ -80,7 +80,7 @@
unshift @{ $allargsref->{include} },
( ".", "$FindBin::Bin/../..", "$FindBin::Bin/../../src/pmc/" );
- foreach my $opt qw(nobody nolines debug verbose) {
+ foreach my $opt qw(nolines debug verbose) {
if ( !defined $allargsref->{opt}{$opt} ) {
$allargsref->{opt}{$opt} = 0;
}
@@ -669,7 +669,6 @@
my ( $flag, $type, $methodname, $parameters ) = ( $2, $3, $4, $5 );
my $attrs = parse_method_attrs($6);
my ( $methodblock, $remainder_part ) = extract_balanced($classblock);
- $methodblock = "" if $opt->{nobody};
my $method_hash = {
meth => $methodname,
@@ -686,7 +685,7 @@
$flags_ref->{need_fia_header} = 1;
}
- if ( $methodblock and $methodblock =~ /PCCINVOKE/ ) {
+ if ( $methodblock =~ /PCCINVOKE/ ) {
$flags_ref->{need_fia_header} = 1;
}