Author: jkeenan Date: Sat Apr 28 12:47:02 2007 New Revision: 18352 Modified: trunk/lib/Parrot/Pmc2c/Utils.pm trunk/tools/build/pmc2c.pl
Log: Eliminate the 'no-body' option from tools/build/pmc2c.pl and the corresponding 'nobody' code from lib/Parrot/Pmc2c/Utils.pm. Cf. http://rt.perl.org/rt3/Ticket/Display.html?id=42072. Patch contributed by Alan Rocker at Hackathon Toronto (Apr 28 2007). Modified: trunk/lib/Parrot/Pmc2c/Utils.pm ============================================================================== --- trunk/lib/Parrot/Pmc2c/Utils.pm (original) +++ trunk/lib/Parrot/Pmc2c/Utils.pm Sat Apr 28 12:47:02 2007 @@ -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; } Modified: trunk/tools/build/pmc2c.pl ============================================================================== --- trunk/tools/build/pmc2c.pl (original) +++ trunk/tools/build/pmc2c.pl Sat Apr 28 12:47:02 2007 @@ -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,9 +114,6 @@ 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> @@ -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);
