Ticket #577: no-line-directives.patch
File no-line-directives.patch, 5.2 KB (added by bsdz, 13 years ago) |
---|
-
config/gen/makefiles/root.in
618 618 $(PERL) $(BUILD_TOOLS_DIR)/c2str.pl --all 619 619 620 620 # classes PMC build utils and rules 621 PMC2CD := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --dump 622 PMC2CC := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --c 623 PMC2CV := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --vtable 621 PMC2CD := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --dump @no_lines_flag@ 622 PMC2CC := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --c @no_lines_flag@ 623 PMC2CV := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --vtable @no_lines_flag@ 624 624 625 625 .pmc.dump : # suffix rule (limited support) 626 626 $(PMC2CD) $< … … 995 995 996 996 $(INC_DIR)/oplib/ops.h lib/Parrot/OpLib/core.pm : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2pm.pl \ 997 997 lib/Parrot/OpsFile.pm lib/Parrot/Op.pm $(OPS_DIR)/ops.num $(OPS_DIR)/ops.skip 998 $(PERL) $(BUILD_TOOLS_DIR)/ops2pm.pl $(OPS_FILES)998 $(PERL) $(BUILD_TOOLS_DIR)/ops2pm.pl @no_lines_flag@ $(OPS_FILES) 999 999 1000 1000 ############################################################################### 1001 1001 # … … 1237 1237 lib/Parrot/OpsFile.pm lib/Parrot/Op.pm $(INC_DIR)/config.h \ 1238 1238 lib/Parrot/OpLib/core.pm lib/Parrot/OpTrans/C.pm \ 1239 1239 $(SRC_DIR)/pmc/pmc_continuation.h 1240 $(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl C --core 1240 $(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl C --core @no_lines_flag@ 1241 1241 1242 1242 $(OPS_DIR)/core_ops_switch$(O) : $(GENERAL_H_FILES) $(OPS_DIR)/core_ops_switch.c \ 1243 1243 $(SRC_DIR)/pmc/pmc_parrotlibrary.h … … 1248 1248 lib/Parrot/OpsFile.pm lib/Parrot/Op.pm $(INC_DIR)/config.h \ 1249 1249 lib/Parrot/OpLib/core.pm lib/Parrot/OpTrans/CSwitch.pm \ 1250 1250 lib/Parrot/OpTrans/CPrederef.pm 1251 $(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl CSwitch --core 1251 $(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl CSwitch --core @no_lines_flag@ 1252 1252 1253 1253 @TEMP_cg_c@ 1254 1254 -
config/init/defaults.pm
239 239 # Extra flags needed for libnci_test.so 240 240 ncilib_link_extra => '', 241 241 242 # Flag determines if pmc2c.pl and ops2c.pl also 243 # generate #line directives. These can confuse 244 # debugging internals. 245 no_lines_flag => $conf->options->get('no-line-directives') ? '--no-lines' : '', 242 246 ); 243 247 244 248 # add profiling if needed -
Configure.pl
297 297 298 298 --define=inet_aton 299 299 300 =item C<--no-line-directives> 301 302 Disables the creation of C #line directives when generating C from PMCs and 303 ops. Useful when debugging internals. 304 300 305 =back 301 306 302 307 =head2 Parrot Options -
lib/Parrot/Configure/Options/Conf.pm
79 79 --lex=(lexer) Use the given lexical analyzer generator 80 80 --make=(make tool) Use the given make utility 81 81 --yacc=(parser) Use the given parser generator 82 83 --no-line-directives Disable creation of C #line directives 82 84 83 85 --define=inet_aton Quick hack to use inet_aton instead of inet_pton 84 86 -
lib/Parrot/Configure/Options/Conf/Shared.pm
52 52 maintainer 53 53 mandir 54 54 nomanicheck 55 no-line-directives 55 56 oldincludedir 56 57 opcode 57 58 ops -
lib/Parrot/Pmc2c/Emitter.pm
4 4 use strict; 5 5 use warnings; 6 6 use Parrot::Pmc2c::UtilFunctions qw(count_newlines spew escape_filename); 7 use Parrot::Pmc2c::Pmc2cMain; 7 8 use overload '""' => \&stringify; 8 9 use overload 'bool' => \&boolify; 9 10 … … 129 130 else { 130 131 $line = $self->{current_line} if $line == -1; 131 132 my $filename_escaped = escape_filename($filename); 132 $data .= "#line $line \"$filename_escaped\"\n"; 133 if (!$Parrot::Pmc2c::Pmc2cMain::OPTIONS->{nolines}) { 134 $data .= "#line $line \"$filename_escaped\"\n"; 135 } 133 136 $data .= $it->{data}; 134 137 } 135 138 $self->{output} .= $data; -
lib/Parrot/Pmc2c/Pmc2cMain.pm
20 20 use Parrot::Pmc2c::PMC::Null (); 21 21 use Parrot::Pmc2c::PMC::Object (); 22 22 23 # put the options in a package var so it can be accessed from 24 # Parrot::Pmc2c::Emitter. 25 our $OPTIONS; 26 23 27 $SIG{'__WARN__'} = sub { use Carp; warn $_[0]; Carp::confess; }; 24 28 25 29 =head1 NAME … … 94 98 $allargsref->{opt}{$opt} = 0; 95 99 } 96 100 } 101 102 $OPTIONS = $allargsref->{opt}; 97 103 98 104 return bless( $allargsref, $class ); 99 105 }