Ticket #677: tt677_toolsdirs.48639.diff
File tt677_toolsdirs.48639.diff, 174.8 KB (added by jkeenan, 11 years ago) |
---|
-
docs/project/release_manager_guide.pod
84 84 85 85 =item c 86 86 87 Update release-related information in F<tools/ util/release.json>. This will be87 Update release-related information in F<tools/release/release.json>. This will be 88 88 used later when making release announcements. There are a few essential 89 89 fields that must be updated at each release: 90 90 … … 251 251 252 252 =item 9. 253 253 254 Compose the release announcement. Use F<tools/ util/crow.pir> to make254 Compose the release announcement. Use F<tools/release/crow.pir> to make 255 255 this part easier. You can specify the format of your announcements like so: 256 256 257 $ ./parrot tools/ util/crow.pir --type=text258 $ ./parrot tools/ util/crow.pir --type=html257 $ ./parrot tools/release/crow.pir --type=text 258 $ ./parrot tools/release/crow.pir --type=html 259 259 260 260 Take the screen output and paste it into the application you need. HTML 261 261 works well for use Perl and PerlMonks, and text for the rest. It is not a -
tools/build/addopstags.pl
1 #!perl2 3 # Copyright (C) 2004-2006, Parrot Foundation.4 # $Id$5 6 use strict;7 use warnings;8 9 =head1 NAME10 11 tools/build/addopstags.pl - add src/ops/*.ops to tags12 13 =head1 SYNOPSIS14 15 perl tools/build/addopstags.pl src/ops/*.ops16 17 =head1 DESCRIPTION18 19 Add src/ops/*.ops to tags file.20 21 =cut22 23 my %seen;24 my @tags;25 26 # Pull ops tags27 while (<>) {28 if (/\bop \s+ (\w+) \s* \(/x) {29 next if $seen{$1}++;30 31 # tag file excmd xflags32 push @tags, join( "\t", $1, $ARGV, qq{$.;"}, "f" ) . "\n";33 }34 }35 continue {36 close ARGV if eof; # reset $.37 }38 39 # Pull existing tags40 open my $T, '<', 'tags';41 push @tags, <$T>;42 close $T;43 44 # Spit 'em out sorted45 open $T, '>', 'tags';46 print $T sort @tags;47 close $T;48 49 # Local Variables:50 # mode: cperl51 # cperl-indent-level: 452 # fill-column: 10053 # End:54 # vim: expandtab shiftwidth=4: -
tools/build/headerizer.pl
1 #! perl2 # Copyright (C) 2001-2010, Parrot Foundation.3 # $Id$4 5 =head1 NAME6 7 tools/build/headerizer.pl - Generates the function header parts of .h8 files from .c files9 10 =head1 SYNOPSIS11 12 $ perl tools/build/headerizer.pl [object files]13 14 Generates C function declarations based on the function definitions in15 the C source code.16 17 =head1 DESCRIPTION18 19 The headerizer works off of directives in the source and header files.20 21 One source file's public declarations can only go into one header file.22 However, one header file can have declarations from multiple source files.23 In other words, headers-to-source is one-to-many.24 25 =over 426 27 =item C<HEADERIZER BEGIN:> F<source-filename> / C<HEADERIZER END:> F<source-filename>28 29 Marks the beginning and end of a block of declarations in a header file.30 31 # In file foo.h32 /* HEADERIZER BEGIN: src/foo.c */33 /* HEADERIZER END: src/foo.c */34 35 /* HEADERIZER BEGIN: src/bar.c */36 /* HEADERIZER END: src/bar.c */37 38 =item C<HEADERIZER HFILE:> F<header-filename>39 40 Tells the headerizer where the declarations for the functions should go41 42 # In file foo.c43 /* HEADERIZER HFILE: foo.h */44 45 # In file bar.c46 /* HEADERIZER HFILE: foo.h */47 48 =back49 50 =head1 COMMAND-LINE OPTIONS51 52 =over 453 54 =item C<--macro=X>55 56 Print a list of all functions that have macro X. For example, --macro=PARROT_EXPORT.57 58 =back59 60 =cut61 62 use strict;63 use warnings;64 65 use Getopt::Long;66 use lib qw( lib );67 use Parrot::Config;68 use Parrot::Headerizer;69 70 my $headerizer = Parrot::Headerizer->new;71 72 main();73 74 =head1 FUNCTIONS75 76 =head2 extract_function_declaration_and_update_source( $cfile_name )77 78 Extract all the function declarations from the C file specified by79 I<$cfile_name>, and update the comment blocks within.80 81 =cut82 83 sub extract_function_declarations_and_update_source {84 my $cfile_name = shift;85 86 open( my $fhin, '<', $cfile_name ) or die "Can't open $cfile_name: $!";87 my $text = join( '', <$fhin> );88 close $fhin;89 90 my @func_declarations = $headerizer->extract_function_declarations( $text );91 for my $decl ( @func_declarations ) {92 my $specs = $headerizer->function_components_from_declaration( $cfile_name, $decl );93 my $name = $specs->{name};94 95 my $heading = $headerizer->generate_documentation_signature($decl);96 97 $text =~ s/=item C<[^>]*\b$name\b[^>]*>\n+/$heading\n\n/sm or do {98 warn "$cfile_name: $name has no POD\n" unless $name =~ /^yy/; # lexer funcs don't have to have POD99 }100 }101 open( my $fhout, '>', $cfile_name ) or die "Can't create $cfile_name: $!";102 print {$fhout} $text;103 close $fhout;104 105 return @func_declarations;106 }107 108 109 sub attrs_from_args {110 my $func = shift;111 my @args = @_;112 113 my @attrs = ();114 my @mods = ();115 116 my $name = $func->{name};117 my $file = $func->{file};118 my $n = 0;119 for my $arg (@args) {120 ++$n;121 if ( $arg =~ m{ARG(?:MOD|OUT)(?:_NULLOK)?\((.+?)\)} ) {122 my $modified = $1;123 if ( $modified =~ s/.*\*/*/ ) {124 # We're OK125 }126 else {127 $modified =~ s/.* (\w+)$/$1/ or die qq{Unable to figure out the modified parm out of "$modified"};128 }129 push( @mods, "FUNC_MODIFIES($modified)" );130 }131 if ( $arg =~ m{(ARGIN|ARGOUT|ARGMOD|ARGFREE_NOTNULL|NOTNULL)\(} || $arg eq 'PARROT_INTERP' ) {132 push( @attrs, "__attribute__nonnull__($n)" );133 }134 if ( ( $arg =~ m{\*} ) && ( $arg !~ /\b(SHIM|((ARGIN|ARGOUT|ARGMOD)(_NULLOK)?)|ARGFREE(_NOTNULL)?)\b/ ) ) {135 if ( $name !~ /^yy/ ) { # Don't complain about the lexer auto-generated funcs136 $headerizer->squawk( $file, $name, qq{"$arg" isn't protected with an ARGIN, ARGOUT or ARGMOD (or a _NULLOK variant), or ARGFREE} );137 }138 }139 if ( ($arg =~ /\bconst\b/) && ($arg =~ /\*/) && ($arg !~ /\*\*/) && ($arg =~ /\b(ARG(MOD|OUT))\b/) ) {140 $headerizer->squawk( $file, $name, qq{"$arg" is const, but that $1 conflicts with const} );141 }142 }143 144 return (@attrs,@mods);145 }146 147 sub asserts_from_args {148 my @args = @_;149 my @asserts;150 151 for my $arg (@args) {152 if ( $arg =~ m{(ARGIN|ARGOUT|ARGMOD|ARGFREE_NOTNULL|NOTNULL)\((.+)\)} ) {153 my $var = $2;154 if($var =~ /\(*\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\)\s*\(/) {155 # argument is a function pointer156 $var = $1;157 }158 else {159 # try to isolate the variable's name;160 # strip off everything before the final space or asterisk.161 $var =~ s{.+[* ]([^* ]+)$}{$1};162 # strip off a trailing "[]", if any.163 $var =~ s{\[\]$}{};164 }165 push( @asserts, "PARROT_ASSERT_ARG($var)" );166 }167 if( $arg eq 'PARROT_INTERP' ) {168 push( @asserts, "PARROT_ASSERT_ARG(interp)" );169 }170 }171 172 return (@asserts);173 }174 175 sub make_function_decls {176 my @funcs = @_;177 178 my @decls;179 foreach my $func (@funcs) {180 my $multiline = 0;181 182 my $return = $func->{return_type};183 my $alt_void = ' ';184 185 # Splint can't handle /*@alt void@*/ on pointers, although this page186 # http://www.mail-archive.com/lclint-interest@virginia.edu/msg00139.html187 # seems to say that we can.188 if ( $func->{is_ignorable} && ($return !~ /\*/) ) {189 $alt_void = " /*\@alt void@*/\n";190 }191 192 my $decl = sprintf( "%s%s%s(", $return, $alt_void, $func->{name} );193 $decl = "static $decl" if $func->{is_static};194 195 my @args = @{ $func->{args} };196 my @attrs = attrs_from_args( $func, @args );197 198 for my $arg (@args) {199 if ( $arg =~ m{SHIM\((.+)\)} ) {200 $arg = $1;201 if ( $func->{is_static} || ( $arg =~ /\*/ ) ) {202 $arg = "SHIM($arg)";203 }204 else {205 $arg = "NULLOK($arg)";206 }207 }208 }209 210 my $argline = join( ", ", @args );211 if ( length( $decl . $argline ) <= 75 ) {212 $decl = "$decl$argline)";213 }214 else {215 if ( $args[0] =~ /^((SHIM|PARROT)_INTERP|Interp)\b/ ) {216 $decl .= ( shift @args );217 $decl .= "," if @args;218 }219 $argline = join( ",", map { "\n\t$_" } @args );220 $decl = "$decl$argline)";221 $multiline = 1;222 }223 224 my $attrs = join( "", map { "\n\t\t$_" } @attrs );225 if ($attrs) {226 $decl .= $attrs;227 $multiline = 1;228 }229 my @macros = @{ $func->{macros} };230 $multiline = 1 if @macros;231 232 $decl .= $multiline ? ";\n" : ";";233 $decl = join( "\n", @macros, $decl );234 $decl =~ s/\t/ /g;235 push( @decls, $decl );236 }237 238 foreach my $func (@funcs) {239 my @args = @{ $func->{args} };240 my @asserts = asserts_from_args( @args );241 242 my $assert = "#define ASSERT_ARGS_" . $func->{name};243 if(length($func->{name}) > 29) {244 $assert .= " \\\n ";245 }246 $assert .= " __attribute__unused__ int _ASSERT_ARGS_CHECK = (";247 if(@asserts) {248 $assert .= "\\\n ";249 $assert .= join(" \\\n , ", @asserts);250 }251 else {252 $assert .= "0";253 }254 $assert .= ")";255 push(@decls, $assert);256 }257 258 return @decls;259 }260 261 sub read_file {262 my $filename = shift;263 264 open my $fh, '<', $filename or die "couldn't read '$filename': $!";265 my $text = do { local $/ = undef; <$fh> };266 close $fh;267 268 return $text;269 }270 271 sub write_file {272 my $filename = shift;273 my $text = shift;274 275 open my $fh, '>', $filename or die "couldn't write '$filename': $!";276 print {$fh} $text;277 close $fh;278 }279 280 sub replace_headerized_declarations {281 my $source_code = shift;282 my $sourcefile = shift;283 my $hfile = shift;284 my @funcs = @_;285 286 # Allow a way to not headerize statics287 if ( $source_code =~ m{/\*\s*HEADERIZER NONE:\s*$sourcefile\s*\*/} ) {288 return $source_code;289 }290 291 @funcs = sort api_first_then_alpha @funcs;292 293 my @function_decls = make_function_decls(@funcs);294 295 my $function_decls = join( "\n", @function_decls );296 my $STARTMARKER = qr{/\* HEADERIZER BEGIN: $sourcefile \*/\n};297 my $ENDMARKER = qr{/\* HEADERIZER END: $sourcefile \*/\n?};298 my $DO_NOT_TOUCH = q{/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */};299 300 $source_code =~301 s{($STARTMARKER)(?:.*?)($ENDMARKER)}302 {$1$DO_NOT_TOUCH\n\n$function_decls\n$DO_NOT_TOUCH\n$2}s303 or die "Need begin/end HEADERIZER markers for $sourcefile in $hfile\n";304 305 return $source_code;306 }307 308 sub api_first_then_alpha {309 return ( ( $b->{is_api} || 0 ) <=> ( $a->{is_api} || 0 ) )310 || ( lc $a->{name} cmp lc $b->{name} );311 }312 313 sub main {314 my $macro_match;315 GetOptions(316 'macro=s' => \$macro_match,317 ) or exit(1);318 319 die 'No files specified.' unless @ARGV;320 my %ofiles;321 ++$ofiles{$_} for @ARGV;322 my @ofiles = sort keys %ofiles;323 for (@ofiles) {324 print "$_ is specified more than once.\n" if $ofiles{$_} > 1;325 }326 my %sourcefiles;327 my %sourcefiles_with_statics;328 my %api;329 330 # Walk the object files and find corresponding source (either .c or .pmc)331 for my $ofile (@ofiles) {332 next if $ofile =~ m/^\Qsrc$PConfig{slash}ops\E/;333 334 $ofile =~ s/\\/\//g;335 336 my $is_yacc = ($ofile =~ /\.y$/);337 if ( !$is_yacc ) {338 my $sfile = $ofile;339 $sfile =~ s/\Q$PConfig{o}\E$/.s/;340 next if -f $sfile;341 }342 343 my $cfile = $ofile;344 $cfile =~ s/\Q$PConfig{o}\E$/.c/ or $is_yacc345 or die "$cfile doesn't look like an object file";346 347 my $pmcfile = $ofile;348 $pmcfile =~ s/\Q$PConfig{o}\E$/.pmc/;349 350 my $from_pmc = -f $pmcfile && !$is_yacc;351 352 my $sourcefile = $from_pmc ? $pmcfile : $cfile;353 354 my $source_code = read_file( $sourcefile );355 die qq{can't find HEADERIZER HFILE directive in "$sourcefile"}356 unless $source_code =~357 m{ /\* \s+ HEADERIZER\ HFILE: \s+ ([^*]+?) \s+ \*/ }sx;358 359 my $hfile = $1;360 if ( ( $hfile ne 'none' ) && ( not -f $hfile ) ) {361 die qq{"$hfile" not found (referenced from "$sourcefile")};362 }363 364 my @decls;365 if ( $macro_match ) {366 @decls = $headerizer->extract_function_declarations( $source_code );367 }368 else {369 @decls = extract_function_declarations_and_update_source( $sourcefile );370 }371 372 for my $decl (@decls) {373 my $components = $headerizer->function_components_from_declaration( $sourcefile, $decl );374 push( @{ $sourcefiles{$hfile}->{$sourcefile} }, $components ) unless $hfile eq 'none';375 push( @{ $sourcefiles_with_statics{$sourcefile} }, $components ) if $components->{is_static};376 if ( $macro_match ) {377 if ( grep { $_ eq $macro_match } @{$components->{macros}} ) {378 push( @{ $api{$sourcefile} }, $components );379 }380 }381 }382 } # for @cfiles383 384 if ( $macro_match ) {385 my $nfuncs = 0;386 for my $cfile ( sort keys %api ) {387 my @funcs = sort { $a->{name} cmp $b->{name} } @{$api{$cfile}};388 print "$cfile\n";389 for my $func ( @funcs ) {390 print " $func->{name}\n";391 ++$nfuncs;392 }393 }394 my $s = $nfuncs == 1 ? '' : 's';395 print "$nfuncs $macro_match function$s\n";396 }397 else { # Normal headerization and updating398 # Update all the .h files399 for my $hfile ( sort keys %sourcefiles ) {400 my $sourcefiles = $sourcefiles{$hfile};401 402 my $header = read_file($hfile);403 404 for my $cfile ( sort keys %{$sourcefiles} ) {405 my @funcs = @{ $sourcefiles->{$cfile} };406 @funcs = grep { not $_->{is_static} } @funcs; # skip statics407 408 $header = replace_headerized_declarations( $header, $cfile, $hfile, @funcs );409 }410 411 write_file( $hfile, $header );412 }413 414 # Update all the .c files in place415 for my $cfile ( sort keys %sourcefiles_with_statics ) {416 my @funcs = @{ $sourcefiles_with_statics{$cfile} };417 @funcs = grep { $_->{is_static} } @funcs;418 419 my $source = read_file($cfile);420 $source = replace_headerized_declarations( $source, 'static', $cfile, @funcs );421 422 write_file( $cfile, $source );423 }424 print "Headerization complete.\n";425 }426 427 my %warnings = %{$headerizer->{warnings}};428 if ( keys %warnings ) {429 my $nwarnings = 0;430 my $nwarningfuncs = 0;431 my $nwarningfiles = 0;432 for my $file ( sort keys %warnings ) {433 ++$nwarningfiles;434 print "$file\n";435 my $funcs = $warnings{$file};436 for my $func ( sort keys %{$funcs} ) {437 ++$nwarningfuncs;438 for my $error ( @{ $funcs->{$func} } ) {439 print " $func: $error\n";440 ++$nwarnings;441 }442 }443 }444 445 print "$nwarnings warnings in $nwarningfuncs funcs in $nwarningfiles C files\n";446 }447 448 return;449 }450 451 # From earlier documentation:452 # * Generate docs from funcs453 # * Somehow handle static functions in the source file454 # * the .c files MUST have a /* HEADERIZER HFILE: foo/bar.h */ directive in them455 # * Support for multiple .c files pointing at the same .h file456 # * Does NOT remove all blocks in the .h file, so if a .c file457 # disappears, its block is "orphaned" and will remain there.458 459 # Local Variables:460 # mode: cperl461 # cperl-indent-level: 4462 # fill-column: 100463 # End:464 # vim: expandtab shiftwidth=4: -
tools/build/README
1 # $Id$ 2 README for tools/build/ 3 4 This directory is intended to hold programs, templates and configuration files 5 invoked by the default 'make' target ('make all'), with or without 6 command-line options, during the Parrot build process. 7 8 Programs, templates and configuration files invoked by 'make install' or 9 'make install-dev' should be placed in tools/release/. 10 11 Other things being equal, programs, templates and configuration files invoked 12 by all other 'make' targets (e.g., 'make headerizer') should be placed in 13 tools/dev/. -
tools/release/crow.pir
Property changes on: tools/build/README ___________________________________________________________________ Added: svn:mergeinfo Added: svn:eol-style + native Added: svn:keywords + Author Date Id Revision
1 #! ./parrot 2 # Copyright (C) 2007-2008, Parrot Foundation. 3 # $Id$ 4 5 =head1 TITLE 6 7 crow.pir -- Make noise about the new Parrot release 8 9 =head1 DESCRIPTION 10 11 This utility is used to help Release Managers format announcement messages. 12 It uses a *very* simple and fast templating system, described in the related 13 module, L<runtime/parrot/library/Crow.pir>. 14 15 =head1 SYNOPSIS 16 17 # see 18 % parrot tools/release/crow.pir --help 19 20 =cut 21 22 23 .sub 'main' :main 24 .param pmc args 25 26 load_bytecode 'Crow.pbc' 27 28 .local pmc exports, curr_namespace, test_namespace 29 curr_namespace = get_namespace 30 test_namespace = get_namespace ['Crow'] 31 exports = split ' ', 'get_news get_args process' 32 test_namespace.'export_to'(curr_namespace, exports) 33 34 .local pmc opts 35 opts = get_args(args) 36 37 unless null opts goto got_opts 38 opts = new 'Hash' 39 got_opts: 40 41 .local pmc templates 42 templates = 'get_json'('tools/release/templates.json') 43 44 .local string template, type 45 type = opts['type'] 46 if type != '' goto got_type 47 type = 'text' 48 49 got_type: 50 template = 'get_template'(templates, type) 51 52 .local pmc data 53 data = 'get_json'('tools/release/release.json') 54 55 .local string version 56 version = data['release.version'] 57 58 $S0 = concat type, '.news' 59 $I0 = templates[$S0] 60 if $I0 goto get_news 61 data['NEWS'] = '' 62 goto process 63 get_news: 64 $S0 = 'get_news'(version) 65 data['NEWS'] = $S0 66 67 68 process: 69 .local string result 70 result = process(template, data) 71 say result 72 .end 73 74 75 .sub 'get_json' 76 .param string filename 77 78 load_bytecode 'Config/JSON.pbc' 79 80 .local pmc exports, curr_namespace, test_namespace 81 curr_namespace = get_namespace 82 test_namespace = get_namespace [ 'Config';'JSON' ] 83 exports = split ' ', 'ReadConfig' 84 test_namespace.'export_to'(curr_namespace, exports) 85 86 .local pmc result 87 result = ReadConfig(filename) 88 89 .return (result) 90 .end 91 92 93 .sub 'get_template' 94 .param pmc templates 95 .param string type 96 97 $S0 = concat type, '.text' 98 $S1 = templates[$S0] 99 .return ($S1) 100 .end 101 102 103 # Local Variables: 104 # mode: pir 105 # fill-column: 100 106 # End: 107 # vim: expandtab shiftwidth=4 ft=pir: -
tools/release/templates.json
Property changes on: tools/release/crow.pir ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:mergeinfo Merged /branches/tt_696/tools/util/crow.pir:r39055-39086 Merged /branches/vtable_massacre/tools/util/crow.pir:r43827-43920 Merged /branches/gc-refactor/tools/util/crow.pir:r41010-41302 Merged /branches/pmc_freeze_with_pmcs/tools/util/crow.pir:r43520-43704 Merged /branches/fix_icc_failures/tools/util/crow.pir:r44593-44838 Merged /branches/rm_dynoplibs_make/tools/util/crow.pir:r44790-44875 Merged /branches/noalignptrs/tools/util/crow.pir:r43151-43489 Merged /branches/headercleanup/tools/util/crow.pir:r37946-38257 Merged /branches/no_pmc_install/tools/util/crow.pir:r45100-45105 Merged /branches/RELEASE_1_3_0/tools/util/crow.pir:r39592-39598 Merged /branches/auto_format_no_Config/tools/util/crow.pir:r42352-42410 Merged /branches/stringnull/tools/util/crow.pir:r45492-45618 Merged /branches/ns_func_cleanup/tools/util/crow.pir:r47026-47677 Merged /branches/dynop_mapping/tools/util/crow.pir:r47504-48410 Merged /branches/RELEASE_0_8_2/tools/util/crow.pir:r34004-34020 Merged /branches/tt_1449/tools/util/crow.pir:r44021-44101 Merged /branches/tt1452_configure_debug/tools/util/crow.pir:r47168-47317 Merged /branches/pmc_sans_unionval/tools/util/crow.pir:r40531-40725 Merged /branches/bsr_jsr_ret/tools/util/crow.pir:r40212-40267 Merged /branches/one_make/tools/util/crow.pir:r43277-43591 Merged /branches/tt1393_retcon/tools/util/crow.pir:r43652-43720 Merged /branches/opengl_dynamic_nci/tools/util/crow.pir:r43840-44139 Merged /branches/tt362/tools/util/crow.pir:r43955-44212 Merged /branches/platform_determine_earlier/tools/util/crow.pir:r42413-42432 Merged /branches/ucs4_encoding/tools/util/crow.pir:r46803-46997 Merged /branches/cfunctionsdocs/tools/util/crow.pir:r47551-47916 Merged /branches/pmc_freeze_cleanup/tools/util/crow.pir:r43031-43433 Merged /branches/remove-next_for_GC/tools/util/crow.pir:r41487-41507 Merged /branches/configtests/tools/util/crow.pir:r42236-42574 Merged /branches/auto_frames_refactor/tools/util/crow.pir:r41426-41455 Merged /branches/tt473_remove_memcpy_aligned/tools/util/crow.pir:r43163-43440 Merged /branches/op_pmcs/tools/util/crow.pir:r43820-44044 Merged /branches/pmc_func_cleanup/tools/util/crow.pir:r43978-44189 Merged /branches/kill_stacks/tools/util/crow.pir:r40284-40287 Merged /branches/remove_Parrot_ex_calc_handler_offset/tools/util/crow.pir:r43337-43339 Merged /branches/no_running_make_test/tools/util/crow.pir:r43474-43545 Merged /branches/gc_internals/tools/util/crow.pir:r39002-39024 Merged /branches/tt1726_pmc_pod/tools/util/crow.pir:r48343-48374 Merged /branches/removing_stm/tools/util/crow.pir:r35464-35502 Merged /branches/io_rewiring/tools/util/crow.pir:r39195-39460 Merged /branches/assert_args/tools/util/crow.pir:r34776-34857 Merged /branches/ops_massacre/tools/util/crow.pir:r46812-47047 Merged /branches/jit_h_files/tools/util/crow.pir:r34166-35215 Merged /branches/runcore_purge/tools/util/crow.pir:r45837-45948 Merged /branches/pbc_frozen_strings1/tools/util/crow.pir:r46081-46225 Merged /branches/convert_OSNAME/tools/util/crow.pir:r42258-42340 Merged /branches/gc_api/tools/util/crow.pir:r38521-38653 Merged /branches/tt528_vtinit/tools/util/crow.pir:r38444-38470 Merged /branches/library_files/tools/util/crow.pir:r41458-41848 Merged /branches/hash_faster/tools/util/crow.pir:r47841-47862 Merged /branches/parrot_call_dep/tools/util/crow.pir:r44134-44188 Added: svn:eol-style + native
1 { 2 "text.news" : true, 3 "text.text" : " 4 5 On behalf of the Parrot team, I'm proud to announce Parrot @release.version@ 6 \"@release.name@.\" Parrot (@web.root@) is a virtual machine aimed 7 at running all dynamic languages. 8 9 Parrot @release.version@ is available on Parrot's FTP site, or follow the 10 download instructions at @web.root@@web.source@. For those who would like to 11 develop on Parrot, or help develop Parrot itself, we recommend using Subversion 12 on the source code repository to get the latest and best Parrot code. 13 14 Parrot @release.version@ News: 15 @NEWS@ 16 17 Many thanks to all our contributors for making this possible, and our sponsors 18 for supporting this project. Our next scheduled release is @release.nextdate@. 19 20 Enjoy! 21 22 ", 23 24 "html.news" : true, 25 "html.text" : " 26 <p>On behalf of the Parrot team, I'm proud to announce Parrot @release.version@ 27 "@release.name@." <a href=\"@web.root@\">Parrot</a> 28 is a virtual machine aimed at running all dynamic languages.</p> 29 30 <p>Parrot @release.version@ is available on <a href=\"@ftp.path@\">Parrot's FTP 31 site</a>, or <a href=\"@web.root@@web.source@\">follow the download 32 instructions</a>. For those who would like to develop on Parrot, or help 33 develop Parrot itself, we recommend using <a 34 href=\"@subversion.root@\">Subversion</a> on <a href=\"@web.repository@\">our 35 source code repository</a> to get the latest and best Parrot code.</p> 36 37 <p>Parrot @release.version@ News:<br/> 38 <pre>@NEWS@</pre></p> 39 40 <p>Thanks to all our contributors for making this possible, and our sponsors 41 for supporting this project. Our next release is @release.nextdate@.</p> 42 43 <p>Enjoy!</p> 44 ", 45 46 "bugday.news" : false, 47 "bugday.text" : " 48 Bug Day 49 50 On @bugday.day@, @bugday.date@, please join us on IRC in #parrot 51 (irc.parrot.org) to work on closing out as many Trac tickets 52 (https://trac.parrot.org) tickets as possible in the parrot queue. This will 53 help us get ready for the next release of parrot: @release.version@, scheduled 54 for @release.day@, @release.date@. You'll find C, parrot assembly, perl, 55 documentation, and plenty of tasks to go around. Core developers will be 56 available most of the day (starting at around 10am GMT) to answer questions. 57 58 No experience with parrot necessary. 59 60 --From: @wiki.root@@wiki.bugday@-- 61 62 Check the list at: 63 64 https://trac.parrot.org/parrot/report/3 65 66 Which contains all the tickets I'd like to see resolved in @version@. To 67 see all the open tickets, use: 68 69 https://trac.parrot.org/parrot/report 70 71 If you've got something you're working on that you think you'll be 72 getting done before the release, please 73 - add a ticket for it (if necessary); 74 - set its milestone to this release. 75 76 Thanks in advance for your patches and commits. ^_^ 77 78 ... Speaking of patches, we should also get through as many of these 79 (accept or reject) as possible. 80 81 @web.root@@web.openpatches@ 82 " 83 } -
tools/release/release.json
Property changes on: tools/release/templates.json ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:mergeinfo Merged /branches/parrot_call_dep/tools/util/templates.json:r44134-44188 Merged /branches/tt_696/tools/util/templates.json:r39055-39086 Merged /branches/vtable_massacre/tools/util/templates.json:r43827-43920 Merged /branches/gc-refactor/tools/util/templates.json:r41010-41302 Merged /branches/pmc_freeze_with_pmcs/tools/util/templates.json:r43520-43704 Merged /branches/fix_icc_failures/tools/util/templates.json:r44593-44838 Merged /branches/rm_dynoplibs_make/tools/util/templates.json:r44790-44875 Merged /branches/noalignptrs/tools/util/templates.json:r43151-43489 Merged /branches/headercleanup/tools/util/templates.json:r37946-38257 Merged /branches/no_pmc_install/tools/util/templates.json:r45100-45105 Merged /branches/RELEASE_1_3_0/tools/util/templates.json:r39592-39598 Merged /branches/auto_format_no_Config/tools/util/templates.json:r42352-42410 Merged /branches/stringnull/tools/util/templates.json:r45492-45618 Merged /branches/ns_func_cleanup/tools/util/templates.json:r47026-47677 Merged /branches/dynop_mapping/tools/util/templates.json:r47504-48410 Merged /branches/RELEASE_0_8_2/tools/util/templates.json:r34004-34020 Merged /branches/tt_1449/tools/util/templates.json:r44021-44101 Merged /branches/tt1452_configure_debug/tools/util/templates.json:r47168-47317 Merged /branches/pmc_sans_unionval/tools/util/templates.json:r40531-40725 Merged /branches/bsr_jsr_ret/tools/util/templates.json:r40212-40267 Merged /branches/one_make/tools/util/templates.json:r43277-43591 Merged /branches/tt1393_retcon/tools/util/templates.json:r43652-43720 Merged /branches/opengl_dynamic_nci/tools/util/templates.json:r43840-44139 Merged /branches/tt362/tools/util/templates.json:r43955-44212 Merged /branches/platform_determine_earlier/tools/util/templates.json:r42413-42432 Merged /branches/ucs4_encoding/tools/util/templates.json:r46803-46997 Merged /branches/cfunctionsdocs/tools/util/templates.json:r47551-47916 Merged /branches/pmc_freeze_cleanup/tools/util/templates.json:r43031-43433 Merged /branches/remove-next_for_GC/tools/util/templates.json:r41487-41507 Merged /branches/configtests/tools/util/templates.json:r42236-42574 Merged /branches/auto_frames_refactor/tools/util/templates.json:r41426-41455 Merged /branches/tt473_remove_memcpy_aligned/tools/util/templates.json:r43163-43440 Merged /branches/op_pmcs/tools/util/templates.json:r43820-44044 Merged /branches/pmc_func_cleanup/tools/util/templates.json:r43978-44189 Merged /branches/kill_stacks/tools/util/templates.json:r40284-40287 Merged /branches/remove_Parrot_ex_calc_handler_offset/tools/util/templates.json:r43337-43339 Merged /branches/no_running_make_test/tools/util/templates.json:r43474-43545 Merged /branches/gc_internals/tools/util/templates.json:r39002-39024 Merged /branches/tt1726_pmc_pod/tools/util/templates.json:r48343-48374 Merged /branches/removing_stm/tools/util/templates.json:r35464-35502 Merged /branches/io_rewiring/tools/util/templates.json:r39195-39460 Merged /branches/assert_args/tools/util/templates.json:r34776-34857 Merged /branches/ops_massacre/tools/util/templates.json:r46812-47047 Merged /branches/jit_h_files/tools/util/templates.json:r34166-35215 Merged /branches/runcore_purge/tools/util/templates.json:r45837-45948 Merged /branches/pbc_frozen_strings1/tools/util/templates.json:r46081-46225 Merged /branches/convert_OSNAME/tools/util/templates.json:r42258-42340 Merged /branches/gc_api/tools/util/templates.json:r38521-38653 Merged /branches/tt528_vtinit/tools/util/templates.json:r38444-38470 Merged /branches/library_files/tools/util/templates.json:r41458-41848 Merged /branches/hash_faster/tools/util/templates.json:r47841-47862 Added: svn:eol-style + native
1 { 2 "release.version" : "2.7.0", 3 "release.name" : "Australian King", 4 "release.day" : "Tuesday", 5 "release.date" : "17 August 2010", 6 "release.nextdate" : "21 September 2010", 7 8 "web.root" : "http://parrot.org/", 9 "web.source" : "download", 10 "web.openpatches" : "openpatches.html", 11 "web.repository" : "https://svn.parrot.org/parrot/trunk/", 12 13 "bugday.day" : "Saturday", 14 "bugday.date" : "18 September 2010", 15 16 "wiki.root" : "https://trac.parrot.org/parrot/wiki/", 17 "wiki.bugday" : "bug_day_2010_09_18", 18 19 "ftp.path" : "ftp://ftp.parrot.org/pub/parrot/releases/devel/2.7.0/", 20 "subversion.root" : "http://subversion.apache.org/" 21 } -
tools/release/README
Property changes on: tools/release/release.json ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:mergeinfo Merged /branches/no_running_make_test/tools/util/release.json:r43474-43545 Merged /branches/gc_internals/tools/util/release.json:r39002-39024 Merged /branches/tt1726_pmc_pod/tools/util/release.json:r48343-48374 Merged /branches/removing_stm/tools/util/release.json:r35464-35502 Merged /branches/io_rewiring/tools/util/release.json:r39195-39460 Merged /branches/assert_args/tools/util/release.json:r34776-34857 Merged /branches/ops_massacre/tools/util/release.json:r46812-47047 Merged /branches/jit_h_files/tools/util/release.json:r34166-35215 Merged /branches/runcore_purge/tools/util/release.json:r45837-45948 Merged /branches/pbc_frozen_strings1/tools/util/release.json:r46081-46225 Merged /branches/convert_OSNAME/tools/util/release.json:r42258-42340 Merged /branches/gc_api/tools/util/release.json:r38521-38653 Merged /branches/tt528_vtinit/tools/util/release.json:r38444-38470 Merged /branches/library_files/tools/util/release.json:r41458-41848 Merged /branches/hash_faster/tools/util/release.json:r47841-47862 Merged /branches/parrot_call_dep/tools/util/release.json:r44134-44188 Merged /branches/vtable_massacre/tools/util/release.json:r43827-43920 Merged /branches/tt_696/tools/util/release.json:r39055-39086 Merged /branches/pmc_freeze_with_pmcs/tools/util/release.json:r43520-43704 Merged /branches/gc-refactor/tools/util/release.json:r41010-41302 Merged /branches/rm_dynoplibs_make/tools/util/release.json:r44790-44875 Merged /branches/fix_icc_failures/tools/util/release.json:r44593-44838 Merged /branches/headercleanup/tools/util/release.json:r37946-38257 Merged /branches/noalignptrs/tools/util/release.json:r43151-43489 Merged /branches/stringnull/tools/util/release.json:r45492-45618 Merged /branches/auto_format_no_Config/tools/util/release.json:r42352-42410 Merged /branches/RELEASE_1_3_0/tools/util/release.json:r39592-39598 Merged /branches/no_pmc_install/tools/util/release.json:r45100-45105 Merged /branches/ns_func_cleanup/tools/util/release.json:r47026-47677 Merged /branches/dynop_mapping/tools/util/release.json:r47504-48410 Merged /branches/RELEASE_0_8_2/tools/util/release.json:r34004-34020 Merged /branches/tt_1449/tools/util/release.json:r44021-44101 Merged /branches/tt1452_configure_debug/tools/util/release.json:r47168-47317 Merged /branches/one_make/tools/util/release.json:r43277-43591 Merged /branches/bsr_jsr_ret/tools/util/release.json:r40212-40267 Merged /branches/pmc_sans_unionval/tools/util/release.json:r40531-40725 Merged /branches/opengl_dynamic_nci/tools/util/release.json:r43840-44139 Merged /branches/tt1393_retcon/tools/util/release.json:r43652-43720 Merged /branches/tt362/tools/util/release.json:r43955-44212 Merged /branches/platform_determine_earlier/tools/util/release.json:r42413-42432 Merged /branches/cfunctionsdocs/tools/util/release.json:r47551-47916 Merged /branches/ucs4_encoding/tools/util/release.json:r46803-46997 Merged /branches/pmc_freeze_cleanup/tools/util/release.json:r43031-43433 Merged /branches/configtests/tools/util/release.json:r42236-42574 Merged /branches/remove-next_for_GC/tools/util/release.json:r41487-41507 Merged /branches/auto_frames_refactor/tools/util/release.json:r41426-41455 Merged /branches/tt473_remove_memcpy_aligned/tools/util/release.json:r43163-43440 Merged /branches/op_pmcs/tools/util/release.json:r43820-44044 Merged /branches/pmc_func_cleanup/tools/util/release.json:r43978-44189 Merged /branches/kill_stacks/tools/util/release.json:r40284-40287 Merged /branches/remove_Parrot_ex_calc_handler_offset/tools/util/release.json:r43337-43339 Added: svn:eol-style + native
1 # $Id$ 2 README for tools/release/ 3 4 This directory is intended to hold programs, templates and configuration files 5 useful during the release process. -
tools/release/gen_release_info.pl
Property changes on: tools/release/README ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
1 #! perl 2 # Copyright (C) 2008, Parrot Foundation. 3 # $Id$ 4 5 use strict; 6 use warnings; 7 8 =head1 NAME 9 10 tools/release/gen_release_info.pl - generate release info for graphs and charts 11 12 =head1 DESCRIPTION 13 14 This utility generates release information from subversion in csv format, 15 suitable for graphs, charts, and reports. 16 17 =cut 18 19 20 my $repo_url = 'https://svn.parrot.org/parrot/tags'; 21 22 ## create a release information data structure 23 my $r = { 24 map { $_->{number} => $_ } 25 map { m{^(RELEASE_)(.*)/} 26 ? { 27 tag => "$1$2", 28 number => sub{$a = shift; $a =~ y/_/./; $a }->($2), 29 } 30 : () 31 } 32 qx { svn ls $repo_url } 33 }; 34 35 ## gather interesting release-related information from the tag 36 map { 37 ## ask subversion for info about the tag 38 my $readme = $repo_url . '/' . $r->{$_}{tag}; 39 warn "retrieving info on $readme\n"; 40 my $info = qx{ LANG=C svn info $readme }; 41 42 ## pull the interesting items 43 $info =~ m{Author: (\S+)} and $r->{$_}{author} = $1; 44 $info =~ m{Rev: (\S+)} and $r->{$_}{revision} = $1; 45 $info =~ m{Date: (\S+)} and $r->{$_}{date} = $1; 46 } keys %{ $r }; 47 48 49 ## output info in csv format 50 print 51 map { "$_\n" } 52 map { my $n = $_; join ',' => 53 map { $r->{$n}{$_} || '' } 54 qw{ tag number author revision date } 55 } 56 sort keys %$r; 57 58 # Local Variables: 59 # mode: cperl 60 # cperl-indent-level: 4 61 # fill-column: 100 62 # End: 63 # vim: expandtab shiftwidth=4: -
tools/release/inc_ver.pir
Property changes on: tools/release/gen_release_info.pl ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:mergeinfo Merged /branches/noalignptrs/tools/util/gen_release_info.pl:r43151-43489 Merged /branches/headercleanup/tools/util/gen_release_info.pl:r37946-38257 Merged /branches/pmc_func_cleanup/tools/util/gen_release_info.pl:r43978-44189 Merged /branches/ns_func_cleanup/tools/util/gen_release_info.pl:r47026-47677 Merged /branches/kill_stacks/tools/util/gen_release_info.pl:r40284-40287 Merged /branches/dynop_mapping/tools/util/gen_release_info.pl:r47504-48410 Merged /branches/remove_Parrot_ex_calc_handler_offset/tools/util/gen_release_info.pl:r43337-43339 Merged /branches/tt_1449/tools/util/gen_release_info.pl:r44021-44101 Merged /branches/removing_stm/tools/util/gen_release_info.pl:r35464-35502 Merged /branches/tt1452_configure_debug/tools/util/gen_release_info.pl:r47168-47317 Merged /branches/io_rewiring/tools/util/gen_release_info.pl:r39195-39460 Merged /branches/assert_args/tools/util/gen_release_info.pl:r34776-34857 Merged /branches/one_make/tools/util/gen_release_info.pl:r43277-43591 Merged /branches/bsr_jsr_ret/tools/util/gen_release_info.pl:r40212-40267 Merged /branches/pmc_sans_unionval/tools/util/gen_release_info.pl:r40531-40725 Merged /branches/runcore_purge/tools/util/gen_release_info.pl:r45837-45948 Merged /branches/jit_h_files/tools/util/gen_release_info.pl:r34166-35215 Merged /branches/ops_massacre/tools/util/gen_release_info.pl:r46812-47047 Merged /branches/pbc_frozen_strings1/tools/util/gen_release_info.pl:r46081-46225 Merged /branches/tt362/tools/util/gen_release_info.pl:r43955-44212 Merged /branches/tt528_vtinit/tools/util/gen_release_info.pl:r38444-38470 Merged /branches/ucs4_encoding/tools/util/gen_release_info.pl:r46803-46997 Merged /branches/cfunctionsdocs/tools/util/gen_release_info.pl:r47551-47916 Merged /branches/pmc_freeze_cleanup/tools/util/gen_release_info.pl:r43031-43433 Merged /branches/hash_faster/tools/util/gen_release_info.pl:r47841-47862 Merged /branches/remove-next_for_GC/tools/util/gen_release_info.pl:r41487-41507 Merged /branches/configtests/tools/util/gen_release_info.pl:r42236-42574 Merged /branches/auto_frames_refactor/tools/util/gen_release_info.pl:r41426-41455 Merged /branches/vtable_massacre/tools/util/gen_release_info.pl:r43827-43920 Merged /branches/tt_696/tools/util/gen_release_info.pl:r39055-39086 Merged /branches/op_pmcs/tools/util/gen_release_info.pl:r43820-44044 Merged /branches/no_pmc_install/tools/util/gen_release_info.pl:r45100-45105 Merged /branches/RELEASE_1_3_0/tools/util/gen_release_info.pl:r39592-39598 Merged /branches/auto_format_no_Config/tools/util/gen_release_info.pl:r42352-42410 Merged /branches/stringnull/tools/util/gen_release_info.pl:r45492-45618 Merged /branches/RELEASE_0_8_2/tools/util/gen_release_info.pl:r34004-34020 Merged /branches/no_running_make_test/tools/util/gen_release_info.pl:r43474-43545 Merged /branches/gc_internals/tools/util/gen_release_info.pl:r39002-39024 Merged /branches/tt1726_pmc_pod/tools/util/gen_release_info.pl:r48343-48374 Merged /branches/opengl_dynamic_nci/tools/util/gen_release_info.pl:r43840-44139 Merged /branches/tt1393_retcon/tools/util/gen_release_info.pl:r43652-43720 Merged /branches/convert_OSNAME/tools/util/gen_release_info.pl:r42258-42340 Merged /branches/gc_api/tools/util/gen_release_info.pl:r38521-38653 Merged /branches/platform_determine_earlier/tools/util/gen_release_info.pl:r42413-42432 Merged /branches/library_files/tools/util/gen_release_info.pl:r41458-41848 Merged /branches/parrot_call_dep/tools/util/gen_release_info.pl:r44134-44188 Merged /branches/gc-refactor/tools/util/gen_release_info.pl:r41010-41302 Merged /branches/pmc_freeze_with_pmcs/tools/util/gen_release_info.pl:r43520-43704 Merged /branches/fix_icc_failures/tools/util/gen_release_info.pl:r44593-44838 Merged /branches/rm_dynoplibs_make/tools/util/gen_release_info.pl:r44790-44875 Merged /branches/tt473_remove_memcpy_aligned/tools/util/gen_release_info.pl:r43163-43440 Added: svn:eol-style + native
1 #!/usr/bin/env parrot 2 # Copyright (C) 2010, Parrot Foundation. 3 # $Id$ 4 5 .sub 'main' :main 6 .local string version_file_name 7 version_file_name = 'VERSION' 8 9 # read the version 10 $P0 = new 'FileHandle' 11 $P0.'open'( version_file_name, 'r' ) 12 $S0 = $P0.'readline'() 13 $P0.'close'() 14 15 print 'version: ' 16 print $S0 17 18 # split the version 19 $P1 = split '.', $S0 20 21 # increment version 22 $I0 = $P1[1] 23 inc $I0 24 if $I0 != 12 goto NOT_NILL 25 $I0 = $P1[0] 26 inc $I0 27 $P1[0] = $I0 28 $I0 = 0 29 NOT_NILL: 30 $P1[1] = $I0 31 32 # join the incremented version 33 $S0 = join '.', $P1 34 35 print 'new version: ' 36 print $S0 37 38 # write the new version to the version_file 39 $P0.'open'( version_file_name, 'w' ) 40 $P0.'print'( $S0 ) 41 $P0.'close'() 42 .end 43 44 # Local Variables: 45 # mode: pir 46 # fill-column: 100 47 # End: 48 # vim: expandtab shiftwidth=4 ft=pir: -
tools/util/perltidy.conf
Property changes on: tools/release/inc_ver.pir ___________________________________________________________________ Added: svn:eol_style + native Added: svn:keywords + Author Date Id Revision Added: svn:mergeinfo Merged /branches/opengl_dynamic_nci/tools/util/inc_ver.pir:r43840-44139 Merged /branches/tt1393_retcon/tools/util/inc_ver.pir:r43652-43720 Merged /branches/convert_OSNAME/tools/util/inc_ver.pir:r42258-42340 Merged /branches/gc_api/tools/util/inc_ver.pir:r38521-38653 Merged /branches/platform_determine_earlier/tools/util/inc_ver.pir:r42413-42432 Merged /branches/library_files/tools/util/inc_ver.pir:r41458-41848 Merged /branches/parrot_call_dep/tools/util/inc_ver.pir:r44134-44188 Merged /branches/gc-refactor/tools/util/inc_ver.pir:r41010-41302 Merged /branches/pmc_freeze_with_pmcs/tools/util/inc_ver.pir:r43520-43704 Merged /branches/fix_icc_failures/tools/util/inc_ver.pir:r44593-44838 Merged /branches/rm_dynoplibs_make/tools/util/inc_ver.pir:r44790-44875 Merged /branches/tt473_remove_memcpy_aligned/tools/util/inc_ver.pir:r43163-43440 Merged /branches/noalignptrs/tools/util/inc_ver.pir:r43151-43489 Merged /branches/headercleanup/tools/util/inc_ver.pir:r37946-38257 Merged /branches/pmc_func_cleanup/tools/util/inc_ver.pir:r43978-44189 Merged /branches/ns_func_cleanup/tools/util/inc_ver.pir:r47026-47677 Merged /branches/kill_stacks/tools/util/inc_ver.pir:r40284-40287 Merged /branches/dynop_mapping/tools/util/inc_ver.pir:r47504-48410 Merged /branches/remove_Parrot_ex_calc_handler_offset/tools/util/inc_ver.pir:r43337-43339 Merged /branches/tt_1449/tools/util/inc_ver.pir:r44021-44101 Merged /branches/removing_stm/tools/util/inc_ver.pir:r35464-35502 Merged /branches/tt1452_configure_debug/tools/util/inc_ver.pir:r47168-47317 Merged /branches/assert_args/tools/util/inc_ver.pir:r34776-34857 Merged /branches/io_rewiring/tools/util/inc_ver.pir:r39195-39460 Merged /branches/pmc_sans_unionval/tools/util/inc_ver.pir:r40531-40725 Merged /branches/bsr_jsr_ret/tools/util/inc_ver.pir:r40212-40267 Merged /branches/one_make/tools/util/inc_ver.pir:r43277-43591 Merged /branches/runcore_purge/tools/util/inc_ver.pir:r45837-45948 Merged /branches/jit_h_files/tools/util/inc_ver.pir:r34166-35215 Merged /branches/ops_massacre/tools/util/inc_ver.pir:r46812-47047 Merged /branches/pbc_frozen_strings1/tools/util/inc_ver.pir:r46081-46225 Merged /branches/tt362/tools/util/inc_ver.pir:r43955-44212 Merged /branches/tt528_vtinit/tools/util/inc_ver.pir:r38444-38470 Merged /branches/cfunctionsdocs/tools/util/inc_ver.pir:r47551-47916 Merged /branches/ucs4_encoding/tools/util/inc_ver.pir:r46803-46997 Merged /branches/pmc_freeze_cleanup/tools/util/inc_ver.pir:r43031-43433 Merged /branches/hash_faster/tools/util/inc_ver.pir:r47841-47862 Merged /branches/configtests/tools/util/inc_ver.pir:r42236-42574 Merged /branches/remove-next_for_GC/tools/util/inc_ver.pir:r41487-41507 Merged /branches/auto_frames_refactor/tools/util/inc_ver.pir:r41426-41455 Merged /branches/tt_696/tools/util/inc_ver.pir:r39055-39086 Merged /branches/vtable_massacre/tools/util/inc_ver.pir:r43827-43920 Merged /branches/op_pmcs/tools/util/inc_ver.pir:r43820-44044 Merged /branches/no_pmc_install/tools/util/inc_ver.pir:r45100-45105 Merged /branches/RELEASE_1_3_0/tools/util/inc_ver.pir:r39592-39598 Merged /branches/auto_format_no_Config/tools/util/inc_ver.pir:r42352-42410 Merged /branches/stringnull/tools/util/inc_ver.pir:r45492-45618 Merged /branches/RELEASE_0_8_2/tools/util/inc_ver.pir:r34004-34020 Merged /branches/no_running_make_test/tools/util/inc_ver.pir:r43474-43545 Merged /branches/gc_internals/tools/util/inc_ver.pir:r39002-39024 Merged /branches/tt1726_pmc_pod/tools/util/inc_ver.pir:r48343-48374 Added: svn:eol-style + native
1 # A declarative version of PDD07 for perl.2 3 # Must apply...4 5 -l=100 # Source line width is limited to 100 characters.6 -i=4 # must be indented four columns (no tabs)7 -ola # Labels (including case labels) must be outdented two columns8 -ci=4 # Long lines, when split, must use at least one extra level of indentation on the continued line.9 -ce # Cuddled elses are forbidden: i.e. avoid } else { .10 11 # Nice to haves...12 13 # Freeze new lines; some really short lines look good the way they14 # are, this should stop perltidy from merging them together15 -fnl -
tools/util/perlcritic-cage.conf
1 # A more stringent set of rules for cage cleaners2 3 [-CodeLayout::ProhibitParensWithBuiltins]4 [CodeLayout::ProhibitHardTabs]5 allow_leading_tabs = 06 7 [-CodeLayout::RequireTidyCode]8 9 [-ControlStructures::ProhibitPostfixControls]10 [-ControlStructures::ProhibitUnlessBlocks]11 12 [-Documentation::PodSpelling]13 [-Documentation::RequirePodAtEnd]14 [-Documentation::RequirePodSections]15 16 [-ErrorHandling::RequireCarping]17 18 [-InputOutput::ProhibitBacktickOperators]19 [-InputOutput::ProhibitInteractiveTest]20 [-InputOutput::RequireCheckedSyscalls]21 functions = :builtins22 exclude_functions = print23 24 [-Miscellanea::RequireRcsKeywords]25 26 [-Modules::RequireVersionVar]27 28 [-RegularExpressions::ProhibitEscapedMetacharacters]29 [-RegularExpressions::RequireDotMatchAnything]30 [-RegularExpressions::RequireExtendedFormatting]31 [-RegularExpressions::RequireLineBoundaryMatching]32 33 [-ValuesAndExpressions::ProhibitConstantPragma]34 [-ValuesAndExpressions::ProhibitEmptyQuotes]35 [-ValuesAndExpressions::ProhibitMagicNumbers]36 37 [-Variables::ProhibitPunctuationVars] -
tools/util/crow.pir
1 #! ./parrot2 # Copyright (C) 2007-2008, Parrot Foundation.3 # $Id$4 5 =head1 TITLE6 7 crow.pir -- Make noise about the new Parrot release8 9 =head1 DESCRIPTION10 11 This utility is used to help Release Managers format announcement messages.12 It uses a *very* simple and fast templating system, described in the related13 module, L<runtime/parrot/library/Crow.pir>.14 15 =head1 SYNOPSIS16 17 # see18 % parrot tools/util/crow.pir --help19 20 =cut21 22 23 .sub 'main' :main24 .param pmc args25 26 load_bytecode 'Crow.pbc'27 28 .local pmc exports, curr_namespace, test_namespace29 curr_namespace = get_namespace30 test_namespace = get_namespace ['Crow']31 exports = split ' ', 'get_news get_args process'32 test_namespace.'export_to'(curr_namespace, exports)33 34 .local pmc opts35 opts = get_args(args)36 37 unless null opts goto got_opts38 opts = new 'Hash'39 got_opts:40 41 .local pmc templates42 templates = 'get_json'('tools/util/templates.json')43 44 .local string template, type45 type = opts['type']46 if type != '' goto got_type47 type = 'text'48 49 got_type:50 template = 'get_template'(templates, type)51 52 .local pmc data53 data = 'get_json'('tools/util/release.json')54 55 .local string version56 version = data['release.version']57 58 $S0 = concat type, '.news'59 $I0 = templates[$S0]60 if $I0 goto get_news61 data['NEWS'] = ''62 goto process63 get_news:64 $S0 = 'get_news'(version)65 data['NEWS'] = $S066 67 68 process:69 .local string result70 result = process(template, data)71 say result72 .end73 74 75 .sub 'get_json'76 .param string filename77 78 load_bytecode 'Config/JSON.pbc'79 80 .local pmc exports, curr_namespace, test_namespace81 curr_namespace = get_namespace82 test_namespace = get_namespace [ 'Config';'JSON' ]83 exports = split ' ', 'ReadConfig'84 test_namespace.'export_to'(curr_namespace, exports)85 86 .local pmc result87 result = ReadConfig(filename)88 89 .return (result)90 .end91 92 93 .sub 'get_template'94 .param pmc templates95 .param string type96 97 $S0 = concat type, '.text'98 $S1 = templates[$S0]99 .return ($S1)100 .end101 102 103 # Local Variables:104 # mode: pir105 # fill-column: 100106 # End:107 # vim: expandtab shiftwidth=4 ft=pir: -
tools/util/dump_pbc.pl
1 #! perl2 3 # Copyright (C) 2008, Parrot Foundation.4 # $Id$5 6 =head1 NAME7 8 tools/util/dump_pbc.pl - Weave together PBC disassembly with PIR source9 10 =head1 SYNOPSIS11 12 perl tools/util/dump_pbc.pl foo.pbc13 14 =head1 DESCRIPTION15 16 dump_pbc.pl uses Parrot's F<pbc_disassemble> program to disassemble the opcodes17 in a PBC (Parrot ByteCode) file, then weaves the disassembly together with18 the original PIR source file(s). This makes it easier to see how the PIR19 syntactic sugar is desugared into raw Parrot opcodes.20 21 =head1 BUGS22 23 This program has only been tested for a few simple cases. Also, the name24 might suggest a different use than its actual purpose.25 26 While it is not a bug in F<dump_pbc.pl> per se, there is a line numbering27 bug for some PBC opcode sequences that will result in the disassembled28 opcodes appearing just before the source lines they represent, rather29 than just after. There does not appear to be consensus yet about where30 this bug actually resides.31 32 =cut33 34 use strict;35 use warnings;36 use Cwd;37 use FindBin;38 39 my ($PARROT_ROOT, $RUNTIME_DIR);40 BEGIN {41 $PARROT_ROOT = Cwd::abs_path("$FindBin::Bin/../..");42 $RUNTIME_DIR = "$PARROT_ROOT/runtime/parrot";43 }44 45 use lib "$PARROT_ROOT/lib";46 use Parrot::Config '%PConfig';47 48 my $DISASSEMBLER = "$PConfig{build_dir}$PConfig{slash}pbc_disassemble$PConfig{exe}";49 50 go(@ARGV);51 52 sub go {53 my $pbc = shift;54 55 # The following mess brought to you by Win32, where pipe open doesn't work,56 # and thus its greater security and cleaner error handling are unavailable.57 58 -f $pbc && -r _59 or die "PBC file '$pbc' does not exist or is not readable.\n";60 61 -f $DISASSEMBLER && -x _62 or die "Can't find disassembler '$DISASSEMBLER';"63 . "did you remember to make parrot first?\n";64 65 my @dis = `$DISASSEMBLER $pbc`;66 die "No disassembly; errors: $?, $!" unless @dis;67 68 my $cur_file = '';69 my $cur_line = -1;70 my %cache;71 72 foreach (@dis) {73 if (/^(?:# )?Current Source Filename (.*)/) {74 my $found = $1;75 $found =~ s/^'//;76 $found =~ s/'$//;77 if ($cur_file ne $found) {78 $cur_file = $found;79 $cache{$cur_file} ||= slurp_file($cur_file);80 $cur_line = -1;81 82 print "\n#### $cur_file\n";83 }84 }85 elsif (my ($info, $seq, $pc, $line, $code) = /^((\d+)-(\d+) (\d+): )(.*)/) {86 my $int_line = int $line;87 my $len_line = length $line;88 if ($cur_line != $int_line) {89 $cur_line = 0 if $cur_line == -1;90 print "\n";91 foreach my $i ($cur_line + 1 .. $int_line) {92 my $source_code = $cache{$cur_file}[$i-1];93 # next unless $source_code =~ /\S/;94 printf "# %*d: %s", $len_line, $i, $source_code;95 print "\n" if $source_code =~ /^\.end/;96 }97 $cur_line = $int_line;98 }99 100 print ' ' x ($len_line + 4), "$code\n";101 }102 }103 }104 105 sub slurp_file {106 my $file = shift;107 my $source;108 109 open $source, '<', $file110 or open $source, '<', "$PARROT_ROOT/$file"111 or open $source, '<', "$RUNTIME_DIR/$file"112 or die "Could not open source file '$file': $!";113 114 my @lines = <$source>;115 116 return \@lines;117 }118 119 120 # Local Variables:121 # mode: cperl122 # cperl-indent-level: 4123 # fill-column: 100124 # End:125 # vim: expandtab shiftwidth=4: -
tools/util/parrot-config.pir
1 #!/usr/bin/env parrot2 # $Id$3 4 =head1 NAME5 6 config.pir - Print a Parrot configuration item7 8 =head1 VERSION9 10 version 0.0111 12 =head1 SYNOPSIS13 14 ./parrot parrot-config.pir VERSION15 ./parrot parrot-config.pir ccflags16 ./parrot parrot-config.pir --dump17 18 =head1 DESCRIPTION19 20 Print out configuration items.21 22 =head1 AUTHOR23 24 Leopold Toetsch E<lt>lt@toetsch.atE<gt>.25 26 =head1 COPYRIGHT27 28 Copyright (C) 2004-2009, Parrot Foundation.29 30 =cut31 32 .sub _main :main33 .param pmc argv34 .local int argc35 argc = argv36 if argc < 2 goto usage37 .local pmc interp, conf_hash38 .local string key39 .include "iglobals.pasm"40 interp = getinterp41 conf_hash = interp[.IGLOBALS_CONFIG_HASH]42 .local int i43 i = 144 loop:45 key = argv[i]46 if key == '--help' goto usage47 if key == '--dump' goto dump48 $I0 = defined conf_hash[key]49 unless $I0 goto failkey50 dec argc51 if i < argc goto dumpsome52 $S0 = conf_hash[key]53 print $S054 inc i55 if i < argc goto loop56 print "\n"57 end58 dumpsome:59 key = argv[i]60 $I0 = defined conf_hash[key]61 unless $I0 goto failkey62 print key63 print " => '"64 $S1 = conf_hash[key]65 print $S166 say "'"67 inc i68 if i <= argc goto dumpsome69 end70 failkey:71 print " no such key: '"72 print key73 print "'\n"74 end75 dump:76 .local pmc iterator77 iterator = iter conf_hash78 iter_loop:79 unless iterator goto iter_end80 shift $S0, iterator81 print $S082 print " => '"83 $S1 = conf_hash[$S0]84 print $S185 say "'"86 goto iter_loop87 iter_end:88 end89 usage:90 $S0 = argv[0]91 $P0 = getinterp92 .include 'stdio.pasm'93 $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO)94 $P1.'print'($S0)95 $P1.'print'(" [ <config-key> [ <config-key> ... ] | --dump | --help ]\n")96 exit 197 .end98 99 # Local Variables:100 # mode: pir101 # fill-column: 100102 # End:103 # vim: expandtab shiftwidth=4 ft=pir: -
tools/util/perlcritic.conf
1 verbose = 32 3 # not all the profiles listed here are installed by default, even if you have4 # Perl::Critic. Shhhh.5 profile-strictness = quiet6 7 [BuiltinFunctions::ProhibitStringySplit]8 add_themes = parrot9 10 [CodeLayout::ProhibitDuplicateCoda]11 add_themes = parrot12 13 [CodeLayout::ProhibitHardTabs]14 allow_leading_tabs = 015 add_themes = parrot16 17 [CodeLayout::ProhibitTrailingWhitespace]18 add_themes = parrot19 20 [CodeLayout::RequireTidyCode]21 perltidyrc = tools/util/perltidy.conf22 add_themes = extra23 24 [CodeLayout::UseParrotCoda]25 add_themes = parrot26 27 [InputOutput::ProhibitBarewordFileHandles]28 add_themes = parrot29 30 [InputOutput::ProhibitTwoArgOpen]31 add_themes = parrot32 33 [NamingConventions::ProhibitAmbiguousNames]34 # remove abstract from the list of forbidden names35 forbid = bases close contract last left no record right second set36 add_themes = extra37 38 [Subroutines::ProhibitBuiltinHomonyms]39 add_themes = extra40 41 [Subroutines::ProhibitExplicitReturnUndef]42 add_themes = parrot43 44 [Subroutines::ProhibitSubroutinePrototypes]45 add_themes = parrot46 47 [Subroutines::RequireFinalReturn]48 add_themes = extra49 50 [TestingAndDebugging::MisplacedShebang]51 add_themes = parrot52 53 [TestingAndDebugging::ProhibitShebangWarningsArg]54 add_themes = parrot55 56 [TestingAndDebugging::RequirePortableShebang]57 add_themes = parrot58 59 [TestingAndDebugging::RequireUseStrict]60 add_themes = parrot61 62 [TestingAndDebugging::RequireUseWarnings]63 add_themes = parrot64 65 [ValuesAndExpressions::ProhibitInterpolationOfLiterals]66 add_themes = extra67 68 [Variables::ProhibitConditionalDeclarations]69 add_themes = parrot70 71 [Bangs::ProhibitFlagComments]72 add_themes = extra73 74 [Bangs::ProhibitRefProtoOrProto]75 add_themes = extra -
tools/util/update_copyright.pl
1 #! perl2 # $Id$3 4 # Copyright (C) 2008, Parrot Foundation.5 6 use strict;7 use warnings;8 use Fatal qw( open close );9 10 =head1 NAME11 12 F<tools/util/update_copyright.pl>13 14 =head1 DESCRIPTION15 16 Given a list of files as command line arguments, update the copyright17 notice to go from the earliest year noted to the current year.18 19 Edits the files in place. You should update the copyright on a modified20 file before you commit it back to the repository.21 22 =cut23 24 use lib 'lib';25 use Parrot::Test;26 27 # Accept a little fuzz in the original copyright notice..28 my $copyright_re = qr/29 Copyright \s+ \(C\) \s+30 (\d\d\d\d)\s*(?:-\s*\d\d\d\d)? \s* ,? \s*31 The \s+ Perl \s+ Foundation\.?32 /xi;33 34 my $year = (localtime())[5]+1900;35 36 # loop over all the files specified on the command line37 foreach my $file (@ARGV) {38 my $contents = Parrot::Test::slurp_file( $file );39 if ( $contents =~ $copyright_re) {40 my $old_year = $1;41 if ($old_year eq $year) {42 warn "$file already up to date.\n";43 next;44 }45 else {46 $contents =~ s/$copyright_re/Copyright (C) $old_year-$year, Parrot Foundation./;47 open my $ofh, '>', $file;48 print {$ofh} $contents;49 close $ofh;50 }51 }52 else {53 warn "$file doesn't have a valid copyright line.\n";54 }55 }56 57 58 # Local Variables:59 # mode: cperl60 # cperl-indent-level: 461 # fill-column: 10062 # End:63 # vim: expandtab shiftwidth=4: -
tools/util/ncidef2pasm.pl
1 #! perl2 3 # Copyright (C) 2003-2007, Parrot Foundation.4 # $Id$5 6 =head1 NAME7 8 tools/util/ncidef2asm.pl - Turn an NCI library definition file into PASM9 10 =head1 SYNOPSIS11 12 perl tools/util/ncidef2asm.pl path/to/from_file [ path/to/to_file ]13 14 =head1 DESCRIPTION15 16 This program takes an NCI library definition file and turns it into PASM.17 18 An NCI library definition file provides the information needed to19 generate a parrot wrapper for the named library (or libraries). Its20 format is simple, and looks like:21 22 [package]23 ncurses24 25 [lib]26 libform.so27 28 [defs]29 p new_field i i i i i i30 31 [lib]32 libncurses.so33 34 [defs]35 i is_term_resized i i36 37 Note that the assembly file is generated in the order you specify, so38 if there are library dependencies, make sure you have them in the39 correct order.40 41 =head2 package42 43 Declares the package that all subsequent sub PMCs will be put44 into. The name is a simple concatenation of the package name, double45 colon, and the routine name, with no preceding punctuation.46 47 =head2 lib48 49 The name of the library to be loaded. Should be as qualified as50 necessary for your platform--generally the full filename is required,51 though the directory generally isn't.52 53 You may load multiple libraries here, but only the last one loaded54 will be exposed to subsequent defs.55 56 =head2 defs57 58 This section holds the definitions of functions. Each function is59 assumed to be in the immediate preceding library. The definition of60 the function is:61 62 return_type name [param [param [param ...]]]63 64 The param and return_type parameters use the NCI standard, which for65 reference is:66 67 =over 468 69 =item p70 71 Parameter is a void pointer, taken from the PMC's data pointer. PMC is72 assumed to be an unmanagedstruct or child class.73 74 Taken from a P register75 76 =item c77 78 Parameter is a character.79 80 Taken from an I register81 82 =item s83 84 Parameter is a short85 86 Taken from an I register87 88 =item i89 90 Parameter is an int91 92 Taken from an I register93 94 =item l95 96 Parameter is a long97 98 Taken from an I register99 100 =item f101 102 Paramter is a float103 104 Taken from an N register.105 106 =item d107 108 Parameter is a double.109 110 Taken from an N register.111 112 =item t113 114 Paramter is a char *, presumably a C string115 116 Taken from an S register117 118 =item v119 120 Void. Only valid as a return type, noting that the function returns no data.121 122 =item I123 124 Interpreter pointer. The current interpreter pointer is passed in125 126 =item P127 128 PMC.129 130 =item 2131 132 Pointer to short.133 134 Taken from an I register.135 136 =item 3137 138 Pointer to int.139 140 Taken from an I register141 142 =item 4143 144 Pointer to long145 146 Taken from an I register147 148 =back149 150 =cut151 152 use strict;153 use warnings;154 155 my ( $from_file, $to_file ) = @ARGV;156 157 # If there is no destination file, strip off the extension of the158 # source file and add a .pasm to it159 if ( !defined $to_file ) {160 $to_file = $from_file;161 $to_file =~ s/\..*$//;162 $to_file .= ".pasm";163 }164 165 open my $INPUT, '<', "$from_file" or die "Can't open up $from_file, error $!";166 open my $OUTPUT, '>', "$to_file" or die "Can't open up $to_file, error $!";167 168 # To start, save all the registers, just in case169 print $OUTPUT "saveall\n";170 171 my @libs;172 my ( $cur_package, $line, $cur_section );173 174 # Our dispatch table175 my (%dispatch) = (176 package => \&package_line,177 lib => \&lib_line,178 defs => \&def_line,179 );180 181 while ( $line = <$INPUT> ) {182 183 # Throw away trailing newlines, comments, and whitespace. If the184 # line's empty, then off to the next line185 chomp $line;186 $line =~ s/#.*//;187 $line =~ s/\s*$//;188 next unless $line;189 190 # Is it a section line? If so, extract the section and set it.191 if ( $line =~ /\[(\w+)\]/ ) {192 $cur_section = $1;193 next;194 }195 196 # Everything else goes to the handler197 $dispatch{$cur_section}->($line);198 199 }200 201 # Put the registers back and end202 print $OUTPUT "restoreall\n";203 print $OUTPUT "end\n";204 close $OUTPUT;205 206 sub package_line {207 my $line = shift;208 209 # Trim leading and trailing spaces210 $line =~ s/^\s*//;211 $line =~ s/\s*$//;212 213 # Set the global current package214 $cur_package = $line;215 216 }217 218 sub lib_line {219 my $line = shift;220 print $OUTPUT "loadlib P1, '$line'\n";221 }222 223 sub def_line {224 my $line = shift;225 my ( $return_type, $name, @params ) = split ' ', $line;226 unshift @params, $return_type;227 my $signature = join( "", @params );228 print $OUTPUT "dlfunc P2, P1, '$name', '$signature'\n";229 print $OUTPUT "store_global '${cur_package}::${name}', P2\n";230 }231 232 # Local Variables:233 # mode: cperl234 # cperl-indent-level: 4235 # fill-column: 100236 # End:237 # vim: expandtab shiftwidth=4: -
tools/util/templates.json
1 {2 "text.news" : true,3 "text.text" : "4 5 On behalf of the Parrot team, I'm proud to announce Parrot @release.version@6 \"@release.name@.\" Parrot (@web.root@) is a virtual machine aimed7 at running all dynamic languages.8 9 Parrot @release.version@ is available on Parrot's FTP site, or follow the10 download instructions at @web.root@@web.source@. For those who would like to11 develop on Parrot, or help develop Parrot itself, we recommend using Subversion12 on the source code repository to get the latest and best Parrot code.13 14 Parrot @release.version@ News:15 @NEWS@16 17 Many thanks to all our contributors for making this possible, and our sponsors18 for supporting this project. Our next scheduled release is @release.nextdate@.19 20 Enjoy!21 22 ",23 24 "html.news" : true,25 "html.text" : "26 <p>On behalf of the Parrot team, I'm proud to announce Parrot @release.version@27 "@release.name@." <a href=\"@web.root@\">Parrot</a>28 is a virtual machine aimed at running all dynamic languages.</p>29 30 <p>Parrot @release.version@ is available on <a href=\"@ftp.path@\">Parrot's FTP31 site</a>, or <a href=\"@web.root@@web.source@\">follow the download32 instructions</a>. For those who would like to develop on Parrot, or help33 develop Parrot itself, we recommend using <a34 href=\"@subversion.root@\">Subversion</a> on <a href=\"@web.repository@\">our35 source code repository</a> to get the latest and best Parrot code.</p>36 37 <p>Parrot @release.version@ News:<br/>38 <pre>@NEWS@</pre></p>39 40 <p>Thanks to all our contributors for making this possible, and our sponsors41 for supporting this project. Our next release is @release.nextdate@.</p>42 43 <p>Enjoy!</p>44 ",45 46 "bugday.news" : false,47 "bugday.text" : "48 Bug Day49 50 On @bugday.day@, @bugday.date@, please join us on IRC in #parrot51 (irc.parrot.org) to work on closing out as many Trac tickets52 (https://trac.parrot.org) tickets as possible in the parrot queue. This will53 help us get ready for the next release of parrot: @release.version@, scheduled54 for @release.day@, @release.date@. You'll find C, parrot assembly, perl,55 documentation, and plenty of tasks to go around. Core developers will be56 available most of the day (starting at around 10am GMT) to answer questions.57 58 No experience with parrot necessary.59 60 --From: @wiki.root@@wiki.bugday@--61 62 Check the list at:63 64 https://trac.parrot.org/parrot/report/365 66 Which contains all the tickets I'd like to see resolved in @version@. To67 see all the open tickets, use:68 69 https://trac.parrot.org/parrot/report70 71 If you've got something you're working on that you think you'll be72 getting done before the release, please73 - add a ticket for it (if necessary);74 - set its milestone to this release.75 76 Thanks in advance for your patches and commits. ^_^77 78 ... Speaking of patches, we should also get through as many of these79 (accept or reject) as possible.80 81 @web.root@@web.openpatches@82 "83 } -
tools/util/release.json
1 {2 "release.version" : "2.7.0",3 "release.name" : "Australian King",4 "release.day" : "Tuesday",5 "release.date" : "17 August 2010",6 "release.nextdate" : "21 September 2010",7 8 "web.root" : "http://parrot.org/",9 "web.source" : "download",10 "web.openpatches" : "openpatches.html",11 "web.repository" : "https://svn.parrot.org/parrot/trunk/",12 13 "bugday.day" : "Saturday",14 "bugday.date" : "18 September 2010",15 16 "wiki.root" : "https://trac.parrot.org/parrot/wiki/",17 "wiki.bugday" : "bug_day_2010_09_18",18 19 "ftp.path" : "ftp://ftp.parrot.org/pub/parrot/releases/devel/2.7.0/",20 "subversion.root" : "http://subversion.apache.org/"21 } -
tools/util/pgegrep
1 #! parrot2 3 =head1 NAME4 5 pgegrep - A simple grep using PGE for matching6 7 =head1 SYNOPSIS8 9 B<pgegrep> [I<OPTIONS>] B<PATTERN> [I<FILE...>]10 11 =head1 DESCRIPTION12 13 pgegrep aims to be a small and easy to use program in replacement of the14 standard grep utility. Regex support is whatever PGE will allow. It15 searches through files line by line and tests if the given pattern matches.16 17 =head1 OPTIONS18 19 =over 420 21 =item -v22 23 =item --invert-match24 25 print lines not matching PATTERN26 27 =item -V28 29 =item --version30 31 print the version and exit32 33 =item --help34 35 show this help and exit36 37 =item -r38 39 =item --recursive40 41 recursively descend into directories42 43 =item -L44 45 =item --files-without-matches46 47 print a list of files that do not match PATTERN48 49 =item -l50 51 =item --files-with-matches52 53 print a list of files that do match PATTERN54 55 =item -a56 57 =item --text58 59 treat binary files as text.60 61 This uses a basic heuristic to discover if a file is binary or not. Files are62 read line by line, and it keeps processing "normally" until a control character63 is found, and then stops and goes onto the next file is that line matches.64 65 =item -n66 67 =item --line-number68 69 print the line number for each match70 71 =item -H72 73 =item --with-filename74 75 print the filename for each match76 77 =back78 79 =cut80 81 # Readability improved!82 .include 'hllmacros.pir'83 84 # for getstdin and friends85 .loadlib 'io_ops'86 87 .sub main :main88 .param pmc argv # the script name, then our options.89 .local string progname90 progname = shift argv91 load_bytecode 'Getopt/Obj.pbc'92 load_bytecode 'PGE.pbc'93 .local pmc getopts94 getopts = new [ 'Getopt';'Obj' ]95 getopts.'notOptStop'(1)96 push getopts, 'with-filename|H'97 push getopts, 'files-with-matches|l'98 push getopts, 'files-without-matches|L'99 push getopts, 'line-number|n'100 push getopts, 'text|a'101 push getopts, 'recursive|r'102 push getopts, 'invert-match|v'103 push getopts, 'version|V'104 push getopts, 'help'105 push_eh handler106 .local pmc opts107 opts = getopts.'get_options'(argv)108 $I0 = defined opts['help']109 .If($I0, {110 showhelp()111 })112 $I0 = defined opts['version']113 .If($I0, {114 showversion()115 })116 117 .local int argc118 argc = elements argv119 .Unless(argc>1, { showhelp() }) # need rule and at least one file120 121 .local string rule122 .local pmc p6rule_compile, matchsub123 rule = shift argv124 p6rule_compile = compreg 'PGE::Perl6Regex'125 matchsub = p6rule_compile(rule)126 .If(null matchsub, { die 'Unable to compile regex' })127 128 .local int i, filecount129 .local string filename130 .local pmc File, OS, files, handle131 files = new 'ResizableStringArray'132 files = argv133 filecount = files134 # define with-filename if there's more than one file135 .If(filecount >= 2, { opts['with-filename'] = 1 })136 $P0 = loadlib 'file'137 File = new 'File'138 $P0 = loadlib 'os'139 OS = new 'OS'140 # This must be here, or else it'll get filled with junk data we use stdin...141 i = 0142 143 .Unless(filecount, {144 # no args, use stdin145 stdindashhack:146 handle = getstdin147 filename = '(standard input)'148 goto stdinhack149 })150 .For(, i < filecount, inc i, {151 filename = files[i]152 .If(filename == '-', {153 goto stdindashhack154 })155 $I1 = File.'is_file'(filename)156 .IfElse($I1, {157 # Is a file158 handle = open filename, 'r'159 },{160 # Not a file, hopefully a directory161 $I1 = File.'is_dir'(filename)162 $I0 = defined opts['recursive']163 $I1 &= $I0164 .Unless($I1, {165 printerr "pgegrep: '"166 printerr filename167 printerr "': Operation not supported.\n"168 goto nextfor_0169 })170 $P0 = OS.'readdir'(filename)171 .Foreach($S0, $P0, {172 .If($S0 != '.', {173 .If($S0 != '..', {174 $S1 = filename . '/'175 $S0 = $S1 . $S0176 $P1 = new 'ResizableStringArray'177 $P1[0] = $S0178 $I0 = i + 1179 splice files, $P1, $I0, 0180 }) })181 })182 filecount = files183 goto nextfor_0184 })185 stdinhack:186 checkfile(handle, filename, matchsub, opts)187 close handle188 nextfor_0:189 })190 191 end192 handler:193 .local pmc exception, pmcmsg194 .local string message195 .get_results (exception)196 pmcmsg = getattribute exception, 'message'197 pop_eh198 message = pmcmsg199 message = "pgegrep: " . message200 die message201 .end202 203 .sub checkfile204 .param pmc handle205 .param string filename206 .param pmc matchsub207 .param pmc opts208 209 .local pmc match210 .local string line211 .local int lineno, linelen, matched212 lineno = 1213 matched = 0 # Only used for --files-without-matches214 line = readline handle215 linelen = length line216 217 .local pmc p6rule_compile, cntrlchar218 $S0 = '<+cntrl-[\t\r\n]>'219 p6rule_compile = compreg 'PGE::Perl6Regex'220 cntrlchar = p6rule_compile($S0)221 222 .For(, linelen, {223 line = readline handle224 linelen = length line225 inc lineno226 }, {227 match = matchsub(line)228 $I1 = istrue match229 match = cntrlchar(line)230 231 $I2 = istrue match232 $I0 = defined opts['files-without-matches']233 .If($I0, {234 .If($I1, { matched = 1 })235 goto next236 })237 $I0 = defined opts['files-with-matches']238 $I0 = $I0 && $I1239 .If($I0, {240 say filename241 .return()242 })243 244 $I0 = defined opts['invert-match']245 not $I0246 $I1 = xor $I1, $I0247 .Unless($I1, {248 $I0 = defined opts['text']249 $I0 = xor $I0, $I2250 .If($I0, {251 print 'Binary file '252 print filename253 say ' matches'254 .return()255 })256 $I0 = defined opts['with-filename']257 $I1 = defined opts['recursive']258 $I0 = $I0 || $I1259 .If($I0, {260 print filename261 print ':'262 })263 $I0 = defined opts['line-number']264 .If($I0, {265 print lineno266 print ':'267 })268 print line269 })270 #---------271 next:272 })273 $I0 = defined opts['files-without-matches']274 .If($I0, { say filename })275 .return()276 .end277 278 .sub showhelp279 print <<'HELP'280 Usage: pgegrep [OPTIONS] PATTERN [FILE...]281 Search for the Perl 6 Rule PATTERN in each file.282 283 -v --invert-match print lines not matching PATTERN284 -V --version print the version and exit285 --help show this help and exit286 -r --recursive recursively descend into directories287 -L --files-without-matches print a list of files that do not match PATTERN288 -l --files-with-matches print a list of files that do match PATTERN289 -a --text treat binary files as text290 -n --line-number print the line number for each match291 -H --with-filename print the filename for each match292 293 HELP294 end295 .end296 297 .sub showversion298 print <<'VERSION'299 pgegrep v0.0.1300 VERSION301 end302 .end303 304 # Local Variables:305 # mode: pir306 # fill-column: 100307 # End:308 # vim: expandtab shiftwidth=4 ft=pir: -
tools/util/gen_release_info.pl
1 #! perl2 # Copyright (C) 2008, Parrot Foundation.3 # $Id$4 5 use strict;6 use warnings;7 8 =head1 NAME9 10 tools/util/gen_release_info.pl - generate release info for graphs and charts11 12 =head1 DESCRIPTION13 14 This utility generates release information from subversion in csv format,15 suitable for graphs, charts, and reports.16 17 =cut18 19 20 my $repo_url = 'https://svn.parrot.org/parrot/tags';21 22 ## create a release information data structure23 my $r = {24 map { $_->{number} => $_ }25 map { m{^(RELEASE_)(.*)/}26 ? {27 tag => "$1$2",28 number => sub{$a = shift; $a =~ y/_/./; $a }->($2),29 }30 : ()31 }32 qx { svn ls $repo_url }33 };34 35 ## gather interesting release-related information from the tag36 map {37 ## ask subversion for info about the tag38 my $readme = $repo_url . '/' . $r->{$_}{tag};39 warn "retrieving info on $readme\n";40 my $info = qx{ LANG=C svn info $readme };41 42 ## pull the interesting items43 $info =~ m{Author: (\S+)} and $r->{$_}{author} = $1;44 $info =~ m{Rev: (\S+)} and $r->{$_}{revision} = $1;45 $info =~ m{Date: (\S+)} and $r->{$_}{date} = $1;46 } keys %{ $r };47 48 49 ## output info in csv format50 print51 map { "$_\n" }52 map { my $n = $_; join ',' =>53 map { $r->{$n}{$_} || '' }54 qw{ tag number author revision date }55 }56 sort keys %$r;57 58 # Local Variables:59 # mode: cperl60 # cperl-indent-level: 461 # fill-column: 10062 # End:63 # vim: expandtab shiftwidth=4: -
tools/util/inc_ver.pir
1 #!/usr/bin/env parrot2 # Copyright (C) 2010, Parrot Foundation.3 # $Id$4 5 .sub 'main' :main6 .local string version_file_name7 version_file_name = 'VERSION'8 9 # read the version10 $P0 = new 'FileHandle'11 $P0.'open'( version_file_name, 'r' )12 $S0 = $P0.'readline'()13 $P0.'close'()14 15 print 'version: '16 print $S017 18 # split the version19 $P1 = split '.', $S020 21 # increment version22 $I0 = $P1[1]23 inc $I024 if $I0 != 12 goto NOT_NILL25 $I0 = $P1[0]26 inc $I027 $P1[0] = $I028 $I0 = 029 NOT_NILL:30 $P1[1] = $I031 32 # join the incremented version33 $S0 = join '.', $P134 35 print 'new version: '36 print $S037 38 # write the new version to the version_file39 $P0.'open'( version_file_name, 'w' )40 $P0.'print'( $S0 )41 $P0.'close'()42 .end43 44 # Local Variables:45 # mode: pir46 # fill-column: 10047 # End:48 # vim: expandtab shiftwidth=4 ft=pir: -
tools/dev/perltidy.conf
1 # A declarative version of PDD07 for perl. 2 3 # Must apply... 4 5 -l=100 # Source line width is limited to 100 characters. 6 -i=4 # must be indented four columns (no tabs) 7 -ola # Labels (including case labels) must be outdented two columns 8 -ci=4 # Long lines, when split, must use at least one extra level of indentation on the continued line. 9 -ce # Cuddled elses are forbidden: i.e. avoid } else { . 10 11 # Nice to haves... 12 13 # Freeze new lines; some really short lines look good the way they 14 # are, this should stop perltidy from merging them together 15 -fnl -
tools/dev/update_copyright.pl
Property changes on: tools/dev/perltidy.conf ___________________________________________________________________ Added: svn:mergeinfo Merged /branches/opengl_dynamic_nci/tools/util/perltidy.conf:r43840-44139 Merged /branches/tt1393_retcon/tools/util/perltidy.conf:r43652-43720 Merged /branches/convert_OSNAME/tools/util/perltidy.conf:r42258-42340 Merged /branches/gc_api/tools/util/perltidy.conf:r38521-38653 Merged /branches/platform_determine_earlier/tools/util/perltidy.conf:r42413-42432 Merged /branches/library_files/tools/util/perltidy.conf:r41458-41848 Merged /branches/parrot_call_dep/tools/util/perltidy.conf:r44134-44188 Merged /branches/gc-refactor/tools/util/perltidy.conf:r41010-41302 Merged /branches/pmc_freeze_with_pmcs/tools/util/perltidy.conf:r43520-43704 Merged /branches/fix_icc_failures/tools/util/perltidy.conf:r44593-44838 Merged /branches/rm_dynoplibs_make/tools/util/perltidy.conf:r44790-44875 Merged /branches/tt473_remove_memcpy_aligned/tools/util/perltidy.conf:r43163-43440 Merged /branches/noalignptrs/tools/util/perltidy.conf:r43151-43489 Merged /branches/headercleanup/tools/util/perltidy.conf:r37946-38257 Merged /branches/pmc_func_cleanup/tools/util/perltidy.conf:r43978-44189 Merged /branches/ns_func_cleanup/tools/util/perltidy.conf:r47026-47677 Merged /branches/kill_stacks/tools/util/perltidy.conf:r40284-40287 Merged /branches/dynop_mapping/tools/util/perltidy.conf:r47504-48410 Merged /branches/remove_Parrot_ex_calc_handler_offset/tools/util/perltidy.conf:r43337-43339 Merged /branches/tt_1449/tools/util/perltidy.conf:r44021-44101 Merged /branches/removing_stm/tools/util/perltidy.conf:r35464-35502 Merged /branches/tt1452_configure_debug/tools/util/perltidy.conf:r47168-47317 Merged /branches/assert_args/tools/util/perltidy.conf:r34776-34857 Merged /branches/io_rewiring/tools/util/perltidy.conf:r39195-39460 Merged /branches/pmc_sans_unionval/tools/util/perltidy.conf:r40531-40725 Merged /branches/bsr_jsr_ret/tools/util/perltidy.conf:r40212-40267 Merged /branches/one_make/tools/util/perltidy.conf:r43277-43591 Merged /branches/runcore_purge/tools/util/perltidy.conf:r45837-45948 Merged /branches/jit_h_files/tools/util/perltidy.conf:r34166-35215 Merged /branches/ops_massacre/tools/util/perltidy.conf:r46812-47047 Merged /branches/pbc_frozen_strings1/tools/util/perltidy.conf:r46081-46225 Merged /branches/tt362/tools/util/perltidy.conf:r43955-44212 Merged /branches/tt528_vtinit/tools/util/perltidy.conf:r38444-38470 Merged /branches/cfunctionsdocs/tools/util/perltidy.conf:r47551-47916 Merged /branches/ucs4_encoding/tools/util/perltidy.conf:r46803-46997 Merged /branches/pmc_freeze_cleanup/tools/util/perltidy.conf:r43031-43433 Merged /branches/hash_faster/tools/util/perltidy.conf:r47841-47862 Merged /branches/configtests/tools/util/perltidy.conf:r42236-42574 Merged /branches/remove-next_for_GC/tools/util/perltidy.conf:r41487-41507 Merged /branches/auto_frames_refactor/tools/util/perltidy.conf:r41426-41455 Merged /branches/tt_696/tools/util/perltidy.conf:r39055-39086 Merged /branches/vtable_massacre/tools/util/perltidy.conf:r43827-43920 Merged /branches/op_pmcs/tools/util/perltidy.conf:r43820-44044 Merged /branches/no_pmc_install/tools/util/perltidy.conf:r45100-45105 Merged /branches/RELEASE_1_3_0/tools/util/perltidy.conf:r39592-39598 Merged /branches/auto_format_no_Config/tools/util/perltidy.conf:r42352-42410 Merged /branches/stringnull/tools/util/perltidy.conf:r45492-45618 Merged /branches/RELEASE_0_8_2/tools/util/perltidy.conf:r34004-34020 Merged /branches/no_running_make_test/tools/util/perltidy.conf:r43474-43545 Merged /branches/gc_internals/tools/util/perltidy.conf:r39002-39024 Merged /branches/tt1726_pmc_pod/tools/util/perltidy.conf:r48343-48374 Added: svn:eol-style + native Added: svn:keywords + Author Date Id Revision
1 #! perl 2 # $Id$ 3 4 # Copyright (C) 2008, Parrot Foundation. 5 6 use strict; 7 use warnings; 8 use Fatal qw( open close ); 9 10 =head1 NAME 11 12 F<tools/dev/update_copyright.pl> 13 14 =head1 DESCRIPTION 15 16 Given a list of files as command line arguments, update the copyright 17 notice to go from the earliest year noted to the current year. 18 19 Edits the files in place. You should update the copyright on a modified 20 file before you commit it back to the repository. 21 22 =cut 23 24 use lib 'lib'; 25 use Parrot::Test; 26 27 # Accept a little fuzz in the original copyright notice.. 28 my $copyright_re = qr/ 29 Copyright \s+ \(C\) \s+ 30 (\d\d\d\d)\s*(?:-\s*\d\d\d\d)? \s* ,? \s* 31 The \s+ Perl \s+ Foundation\.? 32 /xi; 33 34 my $year = (localtime())[5]+1900; 35 36 # loop over all the files specified on the command line 37 foreach my $file (@ARGV) { 38 my $contents = Parrot::Test::slurp_file( $file ); 39 if ( $contents =~ $copyright_re) { 40 my $old_year = $1; 41 if ($old_year eq $year) { 42 warn "$file already up to date.\n"; 43 next; 44 } 45 else { 46 $contents =~ s/$copyright_re/Copyright (C) $old_year-$year, Parrot Foundation./; 47 open my $ofh, '>', $file; 48 print {$ofh} $contents; 49 close $ofh; 50 } 51 } 52 else { 53 warn "$file doesn't have a valid copyright line.\n"; 54 } 55 } 56 57 58 # Local Variables: 59 # mode: cperl 60 # cperl-indent-level: 4 61 # fill-column: 100 62 # End: 63 # vim: expandtab shiftwidth=4: -
tools/dev/pgegrep
Property changes on: tools/dev/update_copyright.pl ___________________________________________________________________ Added: svn:mergeinfo Merged /branches/opengl_dynamic_nci/tools/util/update_copyright.pl:r43840-44139 Merged /branches/tt1393_retcon/tools/util/update_copyright.pl:r43652-43720 Merged /branches/convert_OSNAME/tools/util/update_copyright.pl:r42258-42340 Merged /branches/gc_api/tools/util/update_copyright.pl:r38521-38653 Merged /branches/platform_determine_earlier/tools/util/update_copyright.pl:r42413-42432 Merged /branches/library_files/tools/util/update_copyright.pl:r41458-41848 Merged /branches/parrot_call_dep/tools/util/update_copyright.pl:r44134-44188 Merged /branches/gc-refactor/tools/util/update_copyright.pl:r41010-41302 Merged /branches/pmc_freeze_with_pmcs/tools/util/update_copyright.pl:r43520-43704 Merged /branches/fix_icc_failures/tools/util/update_copyright.pl:r44593-44838 Merged /branches/rm_dynoplibs_make/tools/util/update_copyright.pl:r44790-44875 Merged /branches/tt473_remove_memcpy_aligned/tools/util/update_copyright.pl:r43163-43440 Merged /branches/noalignptrs/tools/util/update_copyright.pl:r43151-43489 Merged /branches/headercleanup/tools/util/update_copyright.pl:r37946-38257 Merged /branches/pmc_func_cleanup/tools/util/update_copyright.pl:r43978-44189 Merged /branches/ns_func_cleanup/tools/util/update_copyright.pl:r47026-47677 Merged /branches/kill_stacks/tools/util/update_copyright.pl:r40284-40287 Merged /branches/dynop_mapping/tools/util/update_copyright.pl:r47504-48410 Merged /branches/remove_Parrot_ex_calc_handler_offset/tools/util/update_copyright.pl:r43337-43339 Merged /branches/tt_1449/tools/util/update_copyright.pl:r44021-44101 Merged /branches/removing_stm/tools/util/update_copyright.pl:r35464-35502 Merged /branches/tt1452_configure_debug/tools/util/update_copyright.pl:r47168-47317 Merged /branches/assert_args/tools/util/update_copyright.pl:r34776-34857 Merged /branches/io_rewiring/tools/util/update_copyright.pl:r39195-39460 Merged /branches/pmc_sans_unionval/tools/util/update_copyright.pl:r40531-40725 Merged /branches/bsr_jsr_ret/tools/util/update_copyright.pl:r40212-40267 Merged /branches/one_make/tools/util/update_copyright.pl:r43277-43591 Merged /branches/runcore_purge/tools/util/update_copyright.pl:r45837-45948 Merged /branches/jit_h_files/tools/util/update_copyright.pl:r34166-35215 Merged /branches/ops_massacre/tools/util/update_copyright.pl:r46812-47047 Merged /branches/pbc_frozen_strings1/tools/util/update_copyright.pl:r46081-46225 Merged /branches/tt362/tools/util/update_copyright.pl:r43955-44212 Merged /branches/tt528_vtinit/tools/util/update_copyright.pl:r38444-38470 Merged /branches/cfunctionsdocs/tools/util/update_copyright.pl:r47551-47916 Merged /branches/ucs4_encoding/tools/util/update_copyright.pl:r46803-46997 Merged /branches/pmc_freeze_cleanup/tools/util/update_copyright.pl:r43031-43433 Merged /branches/hash_faster/tools/util/update_copyright.pl:r47841-47862 Merged /branches/configtests/tools/util/update_copyright.pl:r42236-42574 Merged /branches/remove-next_for_GC/tools/util/update_copyright.pl:r41487-41507 Merged /branches/auto_frames_refactor/tools/util/update_copyright.pl:r41426-41455 Merged /branches/tt_696/tools/util/update_copyright.pl:r39055-39086 Merged /branches/vtable_massacre/tools/util/update_copyright.pl:r43827-43920 Merged /branches/op_pmcs/tools/util/update_copyright.pl:r43820-44044 Merged /branches/no_pmc_install/tools/util/update_copyright.pl:r45100-45105 Merged /branches/RELEASE_1_3_0/tools/util/update_copyright.pl:r39592-39598 Merged /branches/auto_format_no_Config/tools/util/update_copyright.pl:r42352-42410 Merged /branches/stringnull/tools/util/update_copyright.pl:r45492-45618 Merged /branches/RELEASE_0_8_2/tools/util/update_copyright.pl:r34004-34020 Merged /branches/no_running_make_test/tools/util/update_copyright.pl:r43474-43545 Merged /branches/gc_internals/tools/util/update_copyright.pl:r39002-39024 Merged /branches/tt1726_pmc_pod/tools/util/update_copyright.pl:r48343-48374 Added: svn:eol-style + native Added: svn:keywords + Author Date Id Revision
1 #! parrot 2 3 =head1 NAME 4 5 pgegrep - A simple grep using PGE for matching 6 7 =head1 SYNOPSIS 8 9 B<pgegrep> [I<OPTIONS>] B<PATTERN> [I<FILE...>] 10 11 =head1 DESCRIPTION 12 13 pgegrep aims to be a small and easy to use program in replacement of the 14 standard grep utility. Regex support is whatever PGE will allow. It 15 searches through files line by line and tests if the given pattern matches. 16 17 =head1 OPTIONS 18 19 =over 4 20 21 =item -v 22 23 =item --invert-match 24 25 print lines not matching PATTERN 26 27 =item -V 28 29 =item --version 30 31 print the version and exit 32 33 =item --help 34 35 show this help and exit 36 37 =item -r 38 39 =item --recursive 40 41 recursively descend into directories 42 43 =item -L 44 45 =item --files-without-matches 46 47 print a list of files that do not match PATTERN 48 49 =item -l 50 51 =item --files-with-matches 52 53 print a list of files that do match PATTERN 54 55 =item -a 56 57 =item --text 58 59 treat binary files as text. 60 61 This uses a basic heuristic to discover if a file is binary or not. Files are 62 read line by line, and it keeps processing "normally" until a control character 63 is found, and then stops and goes onto the next file is that line matches. 64 65 =item -n 66 67 =item --line-number 68 69 print the line number for each match 70 71 =item -H 72 73 =item --with-filename 74 75 print the filename for each match 76 77 =back 78 79 =cut 80 81 # Readability improved! 82 .include 'hllmacros.pir' 83 84 # for getstdin and friends 85 .loadlib 'io_ops' 86 87 .sub main :main 88 .param pmc argv # the script name, then our options. 89 .local string progname 90 progname = shift argv 91 load_bytecode 'Getopt/Obj.pbc' 92 load_bytecode 'PGE.pbc' 93 .local pmc getopts 94 getopts = new [ 'Getopt';'Obj' ] 95 getopts.'notOptStop'(1) 96 push getopts, 'with-filename|H' 97 push getopts, 'files-with-matches|l' 98 push getopts, 'files-without-matches|L' 99 push getopts, 'line-number|n' 100 push getopts, 'text|a' 101 push getopts, 'recursive|r' 102 push getopts, 'invert-match|v' 103 push getopts, 'version|V' 104 push getopts, 'help' 105 push_eh handler 106 .local pmc opts 107 opts = getopts.'get_options'(argv) 108 $I0 = defined opts['help'] 109 .If($I0, { 110 showhelp() 111 }) 112 $I0 = defined opts['version'] 113 .If($I0, { 114 showversion() 115 }) 116 117 .local int argc 118 argc = elements argv 119 .Unless(argc>1, { showhelp() }) # need rule and at least one file 120 121 .local string rule 122 .local pmc p6rule_compile, matchsub 123 rule = shift argv 124 p6rule_compile = compreg 'PGE::Perl6Regex' 125 matchsub = p6rule_compile(rule) 126 .If(null matchsub, { die 'Unable to compile regex' }) 127 128 .local int i, filecount 129 .local string filename 130 .local pmc File, OS, files, handle 131 files = new 'ResizableStringArray' 132 files = argv 133 filecount = files 134 # define with-filename if there's more than one file 135 .If(filecount >= 2, { opts['with-filename'] = 1 }) 136 $P0 = loadlib 'file' 137 File = new 'File' 138 $P0 = loadlib 'os' 139 OS = new 'OS' 140 # This must be here, or else it'll get filled with junk data we use stdin... 141 i = 0 142 143 .Unless(filecount, { 144 # no args, use stdin 145 stdindashhack: 146 handle = getstdin 147 filename = '(standard input)' 148 goto stdinhack 149 }) 150 .For(, i < filecount, inc i, { 151 filename = files[i] 152 .If(filename == '-', { 153 goto stdindashhack 154 }) 155 $I1 = File.'is_file'(filename) 156 .IfElse($I1, { 157 # Is a file 158 handle = open filename, 'r' 159 },{ 160 # Not a file, hopefully a directory 161 $I1 = File.'is_dir'(filename) 162 $I0 = defined opts['recursive'] 163 $I1 &= $I0 164 .Unless($I1, { 165 printerr "pgegrep: '" 166 printerr filename 167 printerr "': Operation not supported.\n" 168 goto nextfor_0 169 }) 170 $P0 = OS.'readdir'(filename) 171 .Foreach($S0, $P0, { 172 .If($S0 != '.', { 173 .If($S0 != '..', { 174 $S1 = filename . '/' 175 $S0 = $S1 . $S0 176 $P1 = new 'ResizableStringArray' 177 $P1[0] = $S0 178 $I0 = i + 1 179 splice files, $P1, $I0, 0 180 }) }) 181 }) 182 filecount = files 183 goto nextfor_0 184 }) 185 stdinhack: 186 checkfile(handle, filename, matchsub, opts) 187 close handle 188 nextfor_0: 189 }) 190 191 end 192 handler: 193 .local pmc exception, pmcmsg 194 .local string message 195 .get_results (exception) 196 pmcmsg = getattribute exception, 'message' 197 pop_eh 198 message = pmcmsg 199 message = "pgegrep: " . message 200 die message 201 .end 202 203 .sub checkfile 204 .param pmc handle 205 .param string filename 206 .param pmc matchsub 207 .param pmc opts 208 209 .local pmc match 210 .local string line 211 .local int lineno, linelen, matched 212 lineno = 1 213 matched = 0 # Only used for --files-without-matches 214 line = readline handle 215 linelen = length line 216 217 .local pmc p6rule_compile, cntrlchar 218 $S0 = '<+cntrl-[\t\r\n]>' 219 p6rule_compile = compreg 'PGE::Perl6Regex' 220 cntrlchar = p6rule_compile($S0) 221 222 .For(, linelen, { 223 line = readline handle 224 linelen = length line 225 inc lineno 226 }, { 227 match = matchsub(line) 228 $I1 = istrue match 229 match = cntrlchar(line) 230 231 $I2 = istrue match 232 $I0 = defined opts['files-without-matches'] 233 .If($I0, { 234 .If($I1, { matched = 1 }) 235 goto next 236 }) 237 $I0 = defined opts['files-with-matches'] 238 $I0 = $I0 && $I1 239 .If($I0, { 240 say filename 241 .return() 242 }) 243 244 $I0 = defined opts['invert-match'] 245 not $I0 246 $I1 = xor $I1, $I0 247 .Unless($I1, { 248 $I0 = defined opts['text'] 249 $I0 = xor $I0, $I2 250 .If($I0, { 251 print 'Binary file ' 252 print filename 253 say ' matches' 254 .return() 255 }) 256 $I0 = defined opts['with-filename'] 257 $I1 = defined opts['recursive'] 258 $I0 = $I0 || $I1 259 .If($I0, { 260 print filename 261 print ':' 262 }) 263 $I0 = defined opts['line-number'] 264 .If($I0, { 265 print lineno 266 print ':' 267 }) 268 print line 269 }) 270 #--------- 271 next: 272 }) 273 $I0 = defined opts['files-without-matches'] 274 .If($I0, { say filename }) 275 .return() 276 .end 277 278 .sub showhelp 279 print <<'HELP' 280 Usage: pgegrep [OPTIONS] PATTERN [FILE...] 281 Search for the Perl 6 Rule PATTERN in each file. 282 283 -v --invert-match print lines not matching PATTERN 284 -V --version print the version and exit 285 --help show this help and exit 286 -r --recursive recursively descend into directories 287 -L --files-without-matches print a list of files that do not match PATTERN 288 -l --files-with-matches print a list of files that do match PATTERN 289 -a --text treat binary files as text 290 -n --line-number print the line number for each match 291 -H --with-filename print the filename for each match 292 293 HELP 294 end 295 .end 296 297 .sub showversion 298 print <<'VERSION' 299 pgegrep v0.0.1 300 VERSION 301 end 302 .end 303 304 # Local Variables: 305 # mode: pir 306 # fill-column: 100 307 # End: 308 # vim: expandtab shiftwidth=4 ft=pir: -
tools/dev/headerizer.pl
Property changes on: tools/dev/pgegrep ___________________________________________________________________ Added: svn:mergeinfo Merged /branches/RELEASE_0_8_2/tools/util/pgegrep:r34004-34020 Merged /branches/no_running_make_test/tools/util/pgegrep:r43474-43545 Merged /branches/gc_internals/tools/util/pgegrep:r39002-39024 Merged /branches/tt1726_pmc_pod/tools/util/pgegrep:r48343-48374 Merged /branches/opengl_dynamic_nci/tools/util/pgegrep:r43840-44139 Merged /branches/tt1393_retcon/tools/util/pgegrep:r43652-43720 Merged /branches/convert_OSNAME/tools/util/pgegrep:r42258-42340 Merged /branches/gc_api/tools/util/pgegrep:r38521-38653 Merged /branches/platform_determine_earlier/tools/util/pgegrep:r42413-42432 Merged /branches/library_files/tools/util/pgegrep:r41458-41848 Merged /branches/parrot_call_dep/tools/util/pgegrep:r44134-44188 Merged /branches/gc-refactor/tools/util/pgegrep:r41010-41302 Merged /branches/pmc_freeze_with_pmcs/tools/util/pgegrep:r43520-43704 Merged /branches/fix_icc_failures/tools/util/pgegrep:r44593-44838 Merged /branches/rm_dynoplibs_make/tools/util/pgegrep:r44790-44875 Merged /branches/tt473_remove_memcpy_aligned/tools/util/pgegrep:r43163-43440 Merged /branches/headercleanup/tools/util/pgegrep:r37946-38257 Merged /branches/noalignptrs/tools/util/pgegrep:r43151-43489 Merged /branches/pmc_func_cleanup/tools/util/pgegrep:r43978-44189 Merged /branches/ns_func_cleanup/tools/util/pgegrep:r47026-47677 Merged /branches/kill_stacks/tools/util/pgegrep:r40284-40287 Merged /branches/dynop_mapping/tools/util/pgegrep:r47504-48410 Merged /branches/remove_Parrot_ex_calc_handler_offset/tools/util/pgegrep:r43337-43339 Merged /branches/tt_1449/tools/util/pgegrep:r44021-44101 Merged /branches/removing_stm/tools/util/pgegrep:r35464-35502 Merged /branches/tt1452_configure_debug/tools/util/pgegrep:r47168-47317 Merged /branches/assert_args/tools/util/pgegrep:r34776-34857 Merged /branches/io_rewiring/tools/util/pgegrep:r39195-39460 Merged /branches/pmc_sans_unionval/tools/util/pgegrep:r40531-40725 Merged /branches/bsr_jsr_ret/tools/util/pgegrep:r40212-40267 Merged /branches/one_make/tools/util/pgegrep:r43277-43591 Merged /branches/ops_massacre/tools/util/pgegrep:r46812-47047 Merged /branches/jit_h_files/tools/util/pgegrep:r34166-35215 Merged /branches/runcore_purge/tools/util/pgegrep:r45837-45948 Merged /branches/pbc_frozen_strings1/tools/util/pgegrep:r46081-46225 Merged /branches/tt362/tools/util/pgegrep:r43955-44212 Merged /branches/tt528_vtinit/tools/util/pgegrep:r38444-38470 Merged /branches/cfunctionsdocs/tools/util/pgegrep:r47551-47916 Merged /branches/ucs4_encoding/tools/util/pgegrep:r46803-46997 Merged /branches/pmc_freeze_cleanup/tools/util/pgegrep:r43031-43433 Merged /branches/hash_faster/tools/util/pgegrep:r47841-47862 Merged /branches/configtests/tools/util/pgegrep:r42236-42574 Merged /branches/remove-next_for_GC/tools/util/pgegrep:r41487-41507 Merged /branches/auto_frames_refactor/tools/util/pgegrep:r41426-41455 Merged /branches/tt_696/tools/util/pgegrep:r39055-39086 Merged /branches/vtable_massacre/tools/util/pgegrep:r43827-43920 Merged /branches/op_pmcs/tools/util/pgegrep:r43820-44044 Merged /branches/no_pmc_install/tools/util/pgegrep:r45100-45105 Merged /branches/RELEASE_1_3_0/tools/util/pgegrep:r39592-39598 Merged /branches/auto_format_no_Config/tools/util/pgegrep:r42352-42410 Merged /branches/stringnull/tools/util/pgegrep:r45492-45618 Added: svn:eol-style + native Added: svn:executable + * Added: svn:keywords + Author Date Id Revision
1 #! perl 2 # Copyright (C) 2001-2010, Parrot Foundation. 3 # $Id$ 4 5 =head1 NAME 6 7 tools/dev/headerizer.pl - Generates the function header parts of .h 8 files from .c files 9 10 =head1 SYNOPSIS 11 12 $ perl tools/dev/headerizer.pl [object files] 13 14 Generates C function declarations based on the function definitions in 15 the C source code. 16 17 =head1 DESCRIPTION 18 19 The headerizer works off of directives in the source and header files. 20 21 One source file's public declarations can only go into one header file. 22 However, one header file can have declarations from multiple source files. 23 In other words, headers-to-source is one-to-many. 24 25 =over 4 26 27 =item C<HEADERIZER BEGIN:> F<source-filename> / C<HEADERIZER END:> F<source-filename> 28 29 Marks the beginning and end of a block of declarations in a header file. 30 31 # In file foo.h 32 /* HEADERIZER BEGIN: src/foo.c */ 33 /* HEADERIZER END: src/foo.c */ 34 35 /* HEADERIZER BEGIN: src/bar.c */ 36 /* HEADERIZER END: src/bar.c */ 37 38 =item C<HEADERIZER HFILE:> F<header-filename> 39 40 Tells the headerizer where the declarations for the functions should go 41 42 # In file foo.c 43 /* HEADERIZER HFILE: foo.h */ 44 45 # In file bar.c 46 /* HEADERIZER HFILE: foo.h */ 47 48 =back 49 50 =head1 COMMAND-LINE OPTIONS 51 52 =over 4 53 54 =item C<--macro=X> 55 56 Print a list of all functions that have macro X. For example, --macro=PARROT_EXPORT. 57 58 =back 59 60 =cut 61 62 use strict; 63 use warnings; 64 65 use Getopt::Long; 66 use lib qw( lib ); 67 use Parrot::Config; 68 use Parrot::Headerizer; 69 70 my $headerizer = Parrot::Headerizer->new; 71 72 main(); 73 74 =head1 FUNCTIONS 75 76 =head2 extract_function_declaration_and_update_source( $cfile_name ) 77 78 Extract all the function declarations from the C file specified by 79 I<$cfile_name>, and update the comment blocks within. 80 81 =cut 82 83 sub extract_function_declarations_and_update_source { 84 my $cfile_name = shift; 85 86 open( my $fhin, '<', $cfile_name ) or die "Can't open $cfile_name: $!"; 87 my $text = join( '', <$fhin> ); 88 close $fhin; 89 90 my @func_declarations = $headerizer->extract_function_declarations( $text ); 91 for my $decl ( @func_declarations ) { 92 my $specs = $headerizer->function_components_from_declaration( $cfile_name, $decl ); 93 my $name = $specs->{name}; 94 95 my $heading = $headerizer->generate_documentation_signature($decl); 96 97 $text =~ s/=item C<[^>]*\b$name\b[^>]*>\n+/$heading\n\n/sm or do { 98 warn "$cfile_name: $name has no POD\n" unless $name =~ /^yy/; # lexer funcs don't have to have POD 99 } 100 } 101 open( my $fhout, '>', $cfile_name ) or die "Can't create $cfile_name: $!"; 102 print {$fhout} $text; 103 close $fhout; 104 105 return @func_declarations; 106 } 107 108 109 sub attrs_from_args { 110 my $func = shift; 111 my @args = @_; 112 113 my @attrs = (); 114 my @mods = (); 115 116 my $name = $func->{name}; 117 my $file = $func->{file}; 118 my $n = 0; 119 for my $arg (@args) { 120 ++$n; 121 if ( $arg =~ m{ARG(?:MOD|OUT)(?:_NULLOK)?\((.+?)\)} ) { 122 my $modified = $1; 123 if ( $modified =~ s/.*\*/*/ ) { 124 # We're OK 125 } 126 else { 127 $modified =~ s/.* (\w+)$/$1/ or die qq{Unable to figure out the modified parm out of "$modified"}; 128 } 129 push( @mods, "FUNC_MODIFIES($modified)" ); 130 } 131 if ( $arg =~ m{(ARGIN|ARGOUT|ARGMOD|ARGFREE_NOTNULL|NOTNULL)\(} || $arg eq 'PARROT_INTERP' ) { 132 push( @attrs, "__attribute__nonnull__($n)" ); 133 } 134 if ( ( $arg =~ m{\*} ) && ( $arg !~ /\b(SHIM|((ARGIN|ARGOUT|ARGMOD)(_NULLOK)?)|ARGFREE(_NOTNULL)?)\b/ ) ) { 135 if ( $name !~ /^yy/ ) { # Don't complain about the lexer auto-generated funcs 136 $headerizer->squawk( $file, $name, qq{"$arg" isn't protected with an ARGIN, ARGOUT or ARGMOD (or a _NULLOK variant), or ARGFREE} ); 137 } 138 } 139 if ( ($arg =~ /\bconst\b/) && ($arg =~ /\*/) && ($arg !~ /\*\*/) && ($arg =~ /\b(ARG(MOD|OUT))\b/) ) { 140 $headerizer->squawk( $file, $name, qq{"$arg" is const, but that $1 conflicts with const} ); 141 } 142 } 143 144 return (@attrs,@mods); 145 } 146 147 sub asserts_from_args { 148 my @args = @_; 149 my @asserts; 150 151 for my $arg (@args) { 152 if ( $arg =~ m{(ARGIN|ARGOUT|ARGMOD|ARGFREE_NOTNULL|NOTNULL)\((.+)\)} ) { 153 my $var = $2; 154 if($var =~ /\(*\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\)\s*\(/) { 155 # argument is a function pointer 156 $var = $1; 157 } 158 else { 159 # try to isolate the variable's name; 160 # strip off everything before the final space or asterisk. 161 $var =~ s{.+[* ]([^* ]+)$}{$1}; 162 # strip off a trailing "[]", if any. 163 $var =~ s{\[\]$}{}; 164 } 165 push( @asserts, "PARROT_ASSERT_ARG($var)" ); 166 } 167 if( $arg eq 'PARROT_INTERP' ) { 168 push( @asserts, "PARROT_ASSERT_ARG(interp)" ); 169 } 170 } 171 172 return (@asserts); 173 } 174 175 sub make_function_decls { 176 my @funcs = @_; 177 178 my @decls; 179 foreach my $func (@funcs) { 180 my $multiline = 0; 181 182 my $return = $func->{return_type}; 183 my $alt_void = ' '; 184 185 # Splint can't handle /*@alt void@*/ on pointers, although this page 186 # http://www.mail-archive.com/lclint-interest@virginia.edu/msg00139.html 187 # seems to say that we can. 188 if ( $func->{is_ignorable} && ($return !~ /\*/) ) { 189 $alt_void = " /*\@alt void@*/\n"; 190 } 191 192 my $decl = sprintf( "%s%s%s(", $return, $alt_void, $func->{name} ); 193 $decl = "static $decl" if $func->{is_static}; 194 195 my @args = @{ $func->{args} }; 196 my @attrs = attrs_from_args( $func, @args ); 197 198 for my $arg (@args) { 199 if ( $arg =~ m{SHIM\((.+)\)} ) { 200 $arg = $1; 201 if ( $func->{is_static} || ( $arg =~ /\*/ ) ) { 202 $arg = "SHIM($arg)"; 203 } 204 else { 205 $arg = "NULLOK($arg)"; 206 } 207 } 208 } 209 210 my $argline = join( ", ", @args ); 211 if ( length( $decl . $argline ) <= 75 ) { 212 $decl = "$decl$argline)"; 213 } 214 else { 215 if ( $args[0] =~ /^((SHIM|PARROT)_INTERP|Interp)\b/ ) { 216 $decl .= ( shift @args ); 217 $decl .= "," if @args; 218 } 219 $argline = join( ",", map { "\n\t$_" } @args ); 220 $decl = "$decl$argline)"; 221 $multiline = 1; 222 } 223 224 my $attrs = join( "", map { "\n\t\t$_" } @attrs ); 225 if ($attrs) { 226 $decl .= $attrs; 227 $multiline = 1; 228 } 229 my @macros = @{ $func->{macros} }; 230 $multiline = 1 if @macros; 231 232 $decl .= $multiline ? ";\n" : ";"; 233 $decl = join( "\n", @macros, $decl ); 234 $decl =~ s/\t/ /g; 235 push( @decls, $decl ); 236 } 237 238 foreach my $func (@funcs) { 239 my @args = @{ $func->{args} }; 240 my @asserts = asserts_from_args( @args ); 241 242 my $assert = "#define ASSERT_ARGS_" . $func->{name}; 243 if(length($func->{name}) > 29) { 244 $assert .= " \\\n "; 245 } 246 $assert .= " __attribute__unused__ int _ASSERT_ARGS_CHECK = ("; 247 if(@asserts) { 248 $assert .= "\\\n "; 249 $assert .= join(" \\\n , ", @asserts); 250 } 251 else { 252 $assert .= "0"; 253 } 254 $assert .= ")"; 255 push(@decls, $assert); 256 } 257 258 return @decls; 259 } 260 261 sub read_file { 262 my $filename = shift; 263 264 open my $fh, '<', $filename or die "couldn't read '$filename': $!"; 265 my $text = do { local $/ = undef; <$fh> }; 266 close $fh; 267 268 return $text; 269 } 270 271 sub write_file { 272 my $filename = shift; 273 my $text = shift; 274 275 open my $fh, '>', $filename or die "couldn't write '$filename': $!"; 276 print {$fh} $text; 277 close $fh; 278 } 279 280 sub replace_headerized_declarations { 281 my $source_code = shift; 282 my $sourcefile = shift; 283 my $hfile = shift; 284 my @funcs = @_; 285 286 # Allow a way to not headerize statics 287 if ( $source_code =~ m{/\*\s*HEADERIZER NONE:\s*$sourcefile\s*\*/} ) { 288 return $source_code; 289 } 290 291 @funcs = sort api_first_then_alpha @funcs; 292 293 my @function_decls = make_function_decls(@funcs); 294 295 my $function_decls = join( "\n", @function_decls ); 296 my $STARTMARKER = qr{/\* HEADERIZER BEGIN: $sourcefile \*/\n}; 297 my $ENDMARKER = qr{/\* HEADERIZER END: $sourcefile \*/\n?}; 298 my $DO_NOT_TOUCH = q{/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */}; 299 300 $source_code =~ 301 s{($STARTMARKER)(?:.*?)($ENDMARKER)} 302 {$1$DO_NOT_TOUCH\n\n$function_decls\n$DO_NOT_TOUCH\n$2}s 303 or die "Need begin/end HEADERIZER markers for $sourcefile in $hfile\n"; 304 305 return $source_code; 306 } 307 308 sub api_first_then_alpha { 309 return ( ( $b->{is_api} || 0 ) <=> ( $a->{is_api} || 0 ) ) 310 || ( lc $a->{name} cmp lc $b->{name} ); 311 } 312 313 sub main { 314 my $macro_match; 315 GetOptions( 316 'macro=s' => \$macro_match, 317 ) or exit(1); 318 319 die 'No files specified.' unless @ARGV; 320 my %ofiles; 321 ++$ofiles{$_} for @ARGV; 322 my @ofiles = sort keys %ofiles; 323 for (@ofiles) { 324 print "$_ is specified more than once.\n" if $ofiles{$_} > 1; 325 } 326 my %sourcefiles; 327 my %sourcefiles_with_statics; 328 my %api; 329 330 # Walk the object files and find corresponding source (either .c or .pmc) 331 for my $ofile (@ofiles) { 332 next if $ofile =~ m/^\Qsrc$PConfig{slash}ops\E/; 333 334 $ofile =~ s/\\/\//g; 335 336 my $is_yacc = ($ofile =~ /\.y$/); 337 if ( !$is_yacc ) { 338 my $sfile = $ofile; 339 $sfile =~ s/\Q$PConfig{o}\E$/.s/; 340 next if -f $sfile; 341 } 342 343 my $cfile = $ofile; 344 $cfile =~ s/\Q$PConfig{o}\E$/.c/ or $is_yacc 345 or die "$cfile doesn't look like an object file"; 346 347 my $pmcfile = $ofile; 348 $pmcfile =~ s/\Q$PConfig{o}\E$/.pmc/; 349 350 my $from_pmc = -f $pmcfile && !$is_yacc; 351 352 my $sourcefile = $from_pmc ? $pmcfile : $cfile; 353 354 my $source_code = read_file( $sourcefile ); 355 die qq{can't find HEADERIZER HFILE directive in "$sourcefile"} 356 unless $source_code =~ 357 m{ /\* \s+ HEADERIZER\ HFILE: \s+ ([^*]+?) \s+ \*/ }sx; 358 359 my $hfile = $1; 360 if ( ( $hfile ne 'none' ) && ( not -f $hfile ) ) { 361 die qq{"$hfile" not found (referenced from "$sourcefile")}; 362 } 363 364 my @decls; 365 if ( $macro_match ) { 366 @decls = $headerizer->extract_function_declarations( $source_code ); 367 } 368 else { 369 @decls = extract_function_declarations_and_update_source( $sourcefile ); 370 } 371 372 for my $decl (@decls) { 373 my $components = $headerizer->function_components_from_declaration( $sourcefile, $decl ); 374 push( @{ $sourcefiles{$hfile}->{$sourcefile} }, $components ) unless $hfile eq 'none'; 375 push( @{ $sourcefiles_with_statics{$sourcefile} }, $components ) if $components->{is_static}; 376 if ( $macro_match ) { 377 if ( grep { $_ eq $macro_match } @{$components->{macros}} ) { 378 push( @{ $api{$sourcefile} }, $components ); 379 } 380 } 381 } 382 } # for @cfiles 383 384 if ( $macro_match ) { 385 my $nfuncs = 0; 386 for my $cfile ( sort keys %api ) { 387 my @funcs = sort { $a->{name} cmp $b->{name} } @{$api{$cfile}}; 388 print "$cfile\n"; 389 for my $func ( @funcs ) { 390 print " $func->{name}\n"; 391 ++$nfuncs; 392 } 393 } 394 my $s = $nfuncs == 1 ? '' : 's'; 395 print "$nfuncs $macro_match function$s\n"; 396 } 397 else { # Normal headerization and updating 398 # Update all the .h files 399 for my $hfile ( sort keys %sourcefiles ) { 400 my $sourcefiles = $sourcefiles{$hfile}; 401 402 my $header = read_file($hfile); 403 404 for my $cfile ( sort keys %{$sourcefiles} ) { 405 my @funcs = @{ $sourcefiles->{$cfile} }; 406 @funcs = grep { not $_->{is_static} } @funcs; # skip statics 407 408 $header = replace_headerized_declarations( $header, $cfile, $hfile, @funcs ); 409 } 410 411 write_file( $hfile, $header ); 412 } 413 414 # Update all the .c files in place 415 for my $cfile ( sort keys %sourcefiles_with_statics ) { 416 my @funcs = @{ $sourcefiles_with_statics{$cfile} }; 417 @funcs = grep { $_->{is_static} } @funcs; 418 419 my $source = read_file($cfile); 420 $source = replace_headerized_declarations( $source, 'static', $cfile, @funcs ); 421 422 write_file( $cfile, $source ); 423 } 424 print "Headerization complete.\n"; 425 } 426 427 my %warnings = %{$headerizer->{warnings}}; 428 if ( keys %warnings ) { 429 my $nwarnings = 0; 430 my $nwarningfuncs = 0; 431 my $nwarningfiles = 0; 432 for my $file ( sort keys %warnings ) { 433 ++$nwarningfiles; 434 print "$file\n"; 435 my $funcs = $warnings{$file}; 436 for my $func ( sort keys %{$funcs} ) { 437 ++$nwarningfuncs; 438 for my $error ( @{ $funcs->{$func} } ) { 439 print " $func: $error\n"; 440 ++$nwarnings; 441 } 442 } 443 } 444 445 print "$nwarnings warnings in $nwarningfuncs funcs in $nwarningfiles C files\n"; 446 } 447 448 return; 449 } 450 451 # From earlier documentation: 452 # * Generate docs from funcs 453 # * Somehow handle static functions in the source file 454 # * the .c files MUST have a /* HEADERIZER HFILE: foo/bar.h */ directive in them 455 # * Support for multiple .c files pointing at the same .h file 456 # * Does NOT remove all blocks in the .h file, so if a .c file 457 # disappears, its block is "orphaned" and will remain there. 458 459 # Local Variables: 460 # mode: cperl 461 # cperl-indent-level: 4 462 # fill-column: 100 463 # End: 464 # vim: expandtab shiftwidth=4: -
tools/dev/dump_pbc.pl
Property changes on: tools/dev/headerizer.pl ___________________________________________________________________ Added: svn:mergeinfo Merged /branches/pbc_frozen_strings1/tools/build/headerizer.pl:r46081-46225 Merged /branches/convert_OSNAME/tools/build/headerizer.pl:r42258-42340 Merged /branches/gc_api/tools/build/headerizer.pl:r38521-38653 Merged /branches/tt528_vtinit/tools/build/headerizer.pl:r38444-38470 Merged /branches/library_files/tools/build/headerizer.pl:r41458-41848 Merged /branches/hash_faster/tools/build/headerizer.pl:r47841-47862 Merged /branches/parrot_call_dep/tools/build/headerizer.pl:r44134-44188 Merged /branches/tt_696/tools/build/headerizer.pl:r39055-39086 Merged /branches/vtable_massacre/tools/build/headerizer.pl:r43827-43920 Merged /branches/gc-refactor/tools/build/headerizer.pl:r41010-41302 Merged /branches/pmc_freeze_with_pmcs/tools/build/headerizer.pl:r43520-43704 Merged /branches/fix_icc_failures/tools/build/headerizer.pl:r44593-44838 Merged /branches/rm_dynoplibs_make/tools/build/headerizer.pl:r44790-44875 Merged /branches/noalignptrs/tools/build/headerizer.pl:r43151-43489 Merged /branches/headercleanup/tools/build/headerizer.pl:r37946-38257 Merged /branches/stringnull/tools/build/headerizer.pl:r45492-45618 Merged /branches/auto_format_no_Config/tools/build/headerizer.pl:r42352-42410 Merged /branches/RELEASE_1_3_0/tools/build/headerizer.pl:r39592-39598 Merged /branches/no_pmc_install/tools/build/headerizer.pl:r45100-45105 Merged /branches/ns_func_cleanup/tools/build/headerizer.pl:r47026-47677 Merged /branches/dynop_mapping/tools/build/headerizer.pl:r47504-48410 Merged /branches/RELEASE_0_8_2/tools/build/headerizer.pl:r34004-34020 Merged /branches/tt_1449/tools/build/headerizer.pl:r44021-44101 Merged /branches/tt1452_configure_debug/tools/build/headerizer.pl:r47168-47317 Merged /branches/pmc_sans_unionval/tools/build/headerizer.pl:r40531-40725 Merged /branches/bsr_jsr_ret/tools/build/headerizer.pl:r40212-40267 Merged /branches/one_make/tools/build/headerizer.pl:r43277-43591 Merged /branches/tt1393_retcon/tools/build/headerizer.pl:r43652-43720 Merged /branches/opengl_dynamic_nci/tools/build/headerizer.pl:r43840-44139 Merged /branches/tt362/tools/build/headerizer.pl:r43955-44212 Merged /branches/platform_determine_earlier/tools/build/headerizer.pl:r42413-42432 Merged /branches/cfunctionsdocs/tools/build/headerizer.pl:r47551-47916 Merged /branches/ucs4_encoding/tools/build/headerizer.pl:r46803-46997 Merged /branches/pmc_freeze_cleanup/tools/build/headerizer.pl:r43031-43433 Merged /branches/configtests/tools/build/headerizer.pl:r42236-42574 Merged /branches/remove-next_for_GC/tools/build/headerizer.pl:r41487-41507 Merged /branches/auto_frames_refactor/tools/build/headerizer.pl:r41426-41455 Merged /branches/tt473_remove_memcpy_aligned/tools/build/headerizer.pl:r43163-43440 Merged /branches/op_pmcs/tools/build/headerizer.pl:r43820-44044 Merged /branches/pmc_func_cleanup/tools/build/headerizer.pl:r43978-44189 Merged /branches/kill_stacks/tools/build/headerizer.pl:r40284-40287 Merged /branches/remove_Parrot_ex_calc_handler_offset/tools/build/headerizer.pl:r43337-43339 Merged /branches/no_running_make_test/tools/build/headerizer.pl:r43474-43545 Merged /branches/gc_internals/tools/build/headerizer.pl:r39002-39024 Merged /branches/tt1726_pmc_pod/tools/build/headerizer.pl:r48343-48374 Merged /branches/removing_stm/tools/build/headerizer.pl:r35464-35502 Merged /branches/io_rewiring/tools/build/headerizer.pl:r39195-39460 Merged /branches/assert_args/tools/build/headerizer.pl:r34776-34857 Merged /branches/ops_massacre/tools/build/headerizer.pl:r46812-47047 Merged /branches/jit_h_files/tools/build/headerizer.pl:r34166-35215 Merged /branches/runcore_purge/tools/build/headerizer.pl:r45837-45948 Added: svn:eol-style + native Added: svn:keywords + Author Date Id Revision
1 #! perl 2 3 # Copyright (C) 2008, Parrot Foundation. 4 # $Id$ 5 6 =head1 NAME 7 8 tools/dev/dump_pbc.pl - Weave together PBC disassembly with PIR source 9 10 =head1 SYNOPSIS 11 12 perl tools/dev/dump_pbc.pl foo.pbc 13 14 =head1 DESCRIPTION 15 16 dump_pbc.pl uses Parrot's F<pbc_disassemble> program to disassemble the opcodes 17 in a PBC (Parrot ByteCode) file, then weaves the disassembly together with 18 the original PIR source file(s). This makes it easier to see how the PIR 19 syntactic sugar is desugared into raw Parrot opcodes. 20 21 =head1 BUGS 22 23 This program has only been tested for a few simple cases. Also, the name 24 might suggest a different use than its actual purpose. 25 26 While it is not a bug in F<dump_pbc.pl> per se, there is a line numbering 27 bug for some PBC opcode sequences that will result in the disassembled 28 opcodes appearing just before the source lines they represent, rather 29 than just after. There does not appear to be consensus yet about where 30 this bug actually resides. 31 32 =cut 33 34 use strict; 35 use warnings; 36 use Cwd; 37 use FindBin; 38 39 my ($PARROT_ROOT, $RUNTIME_DIR); 40 BEGIN { 41 $PARROT_ROOT = Cwd::abs_path("$FindBin::Bin/../.."); 42 $RUNTIME_DIR = "$PARROT_ROOT/runtime/parrot"; 43 } 44 45 use lib "$PARROT_ROOT/lib"; 46 use Parrot::Config '%PConfig'; 47 48 my $DISASSEMBLER = "$PConfig{build_dir}$PConfig{slash}pbc_disassemble$PConfig{exe}"; 49 50 go(@ARGV); 51 52 sub go { 53 my $pbc = shift; 54 55 # The following mess brought to you by Win32, where pipe open doesn't work, 56 # and thus its greater security and cleaner error handling are unavailable. 57 58 -f $pbc && -r _ 59 or die "PBC file '$pbc' does not exist or is not readable.\n"; 60 61 -f $DISASSEMBLER && -x _ 62 or die "Can't find disassembler '$DISASSEMBLER';" 63 . "did you remember to make parrot first?\n"; 64 65 my @dis = `$DISASSEMBLER $pbc`; 66 die "No disassembly; errors: $?, $!" unless @dis; 67 68 my $cur_file = ''; 69 my $cur_line = -1; 70 my %cache; 71 72 foreach (@dis) { 73 if (/^(?:# )?Current Source Filename (.*)/) { 74 my $found = $1; 75 $found =~ s/^'//; 76 $found =~ s/'$//; 77 if ($cur_file ne $found) { 78 $cur_file = $found; 79 $cache{$cur_file} ||= slurp_file($cur_file); 80 $cur_line = -1; 81 82 print "\n#### $cur_file\n"; 83 } 84 } 85 elsif (my ($info, $seq, $pc, $line, $code) = /^((\d+)-(\d+) (\d+): )(.*)/) { 86 my $int_line = int $line; 87 my $len_line = length $line; 88 if ($cur_line != $int_line) { 89 $cur_line = 0 if $cur_line == -1; 90 print "\n"; 91 foreach my $i ($cur_line + 1 .. $int_line) { 92 my $source_code = $cache{$cur_file}[$i-1]; 93 # next unless $source_code =~ /\S/; 94 printf "# %*d: %s", $len_line, $i, $source_code; 95 print "\n" if $source_code =~ /^\.end/; 96 } 97 $cur_line = $int_line; 98 } 99 100 print ' ' x ($len_line + 4), "$code\n"; 101 } 102 } 103 } 104 105 sub slurp_file { 106 my $file = shift; 107 my $source; 108 109 open $source, '<', $file 110 or open $source, '<', "$PARROT_ROOT/$file" 111 or open $source, '<', "$RUNTIME_DIR/$file" 112 or die "Could not open source file '$file': $!"; 113 114 my @lines = <$source>; 115 116 return \@lines; 117 } 118 119 120 # Local Variables: 121 # mode: cperl 122 # cperl-indent-level: 4 123 # fill-column: 100 124 # End: 125 # vim: expandtab shiftwidth=4: -
tools/dev/ncidef2pasm.pl
Property changes on: tools/dev/dump_pbc.pl ___________________________________________________________________ Added: svn:mergeinfo Merged /branches/tt_696/tools/util/dump_pbc.pl:r39055-39086 Merged /branches/vtable_massacre/tools/util/dump_pbc.pl:r43827-43920 Merged /branches/op_pmcs/tools/util/dump_pbc.pl:r43820-44044 Merged /branches/no_pmc_install/tools/util/dump_pbc.pl:r45100-45105 Merged /branches/RELEASE_1_3_0/tools/util/dump_pbc.pl:r39592-39598 Merged /branches/auto_format_no_Config/tools/util/dump_pbc.pl:r42352-42410 Merged /branches/stringnull/tools/util/dump_pbc.pl:r45492-45618 Merged /branches/RELEASE_0_8_2/tools/util/dump_pbc.pl:r34004-34020 Merged /branches/no_running_make_test/tools/util/dump_pbc.pl:r43474-43545 Merged /branches/gc_internals/tools/util/dump_pbc.pl:r39002-39024 Merged /branches/tt1726_pmc_pod/tools/util/dump_pbc.pl:r48343-48374 Merged /branches/opengl_dynamic_nci/tools/util/dump_pbc.pl:r43840-44139 Merged /branches/tt1393_retcon/tools/util/dump_pbc.pl:r43652-43720 Merged /branches/convert_OSNAME/tools/util/dump_pbc.pl:r42258-42340 Merged /branches/gc_api/tools/util/dump_pbc.pl:r38521-38653 Merged /branches/platform_determine_earlier/tools/util/dump_pbc.pl:r42413-42432 Merged /branches/library_files/tools/util/dump_pbc.pl:r41458-41848 Merged /branches/parrot_call_dep/tools/util/dump_pbc.pl:r44134-44188 Merged /branches/pmc_freeze_with_pmcs/tools/util/dump_pbc.pl:r43520-43704 Merged /branches/gc-refactor/tools/util/dump_pbc.pl:r41010-41302 Merged /branches/rm_dynoplibs_make/tools/util/dump_pbc.pl:r44790-44875 Merged /branches/fix_icc_failures/tools/util/dump_pbc.pl:r44593-44838 Merged /branches/tt473_remove_memcpy_aligned/tools/util/dump_pbc.pl:r43163-43440 Merged /branches/headercleanup/tools/util/dump_pbc.pl:r37946-38257 Merged /branches/noalignptrs/tools/util/dump_pbc.pl:r43151-43489 Merged /branches/pmc_func_cleanup/tools/util/dump_pbc.pl:r43978-44189 Merged /branches/ns_func_cleanup/tools/util/dump_pbc.pl:r47026-47677 Merged /branches/kill_stacks/tools/util/dump_pbc.pl:r40284-40287 Merged /branches/dynop_mapping/tools/util/dump_pbc.pl:r47504-48410 Merged /branches/remove_Parrot_ex_calc_handler_offset/tools/util/dump_pbc.pl:r43337-43339 Merged /branches/tt_1449/tools/util/dump_pbc.pl:r44021-44101 Merged /branches/removing_stm/tools/util/dump_pbc.pl:r35464-35502 Merged /branches/tt1452_configure_debug/tools/util/dump_pbc.pl:r47168-47317 Merged /branches/io_rewiring/tools/util/dump_pbc.pl:r39195-39460 Merged /branches/assert_args/tools/util/dump_pbc.pl:r34776-34857 Merged /branches/one_make/tools/util/dump_pbc.pl:r43277-43591 Merged /branches/bsr_jsr_ret/tools/util/dump_pbc.pl:r40212-40267 Merged /branches/pmc_sans_unionval/tools/util/dump_pbc.pl:r40531-40725 Merged /branches/ops_massacre/tools/util/dump_pbc.pl:r46812-47047 Merged /branches/jit_h_files/tools/util/dump_pbc.pl:r34166-35215 Merged /branches/runcore_purge/tools/util/dump_pbc.pl:r45837-45948 Merged /branches/pbc_frozen_strings1/tools/util/dump_pbc.pl:r46081-46225 Merged /branches/tt362/tools/util/dump_pbc.pl:r43955-44212 Merged /branches/tt528_vtinit/tools/util/dump_pbc.pl:r38444-38470 Merged /branches/cfunctionsdocs/tools/util/dump_pbc.pl:r47551-47916 Merged /branches/ucs4_encoding/tools/util/dump_pbc.pl:r46803-46997 Merged /branches/pmc_freeze_cleanup/tools/util/dump_pbc.pl:r43031-43433 Merged /branches/hash_faster/tools/util/dump_pbc.pl:r47841-47862 Merged /branches/configtests/tools/util/dump_pbc.pl:r42236-42574 Merged /branches/remove-next_for_GC/tools/util/dump_pbc.pl:r41487-41507 Merged /branches/auto_frames_refactor/tools/util/dump_pbc.pl:r41426-41455 Added: svn:eol-style + native Added: svn:executable + * Added: svn:keywords + Author Date Id Revision
1 #! perl 2 3 # Copyright (C) 2003-2007, Parrot Foundation. 4 # $Id$ 5 6 =head1 NAME 7 8 tools/dev/ncidef2asm.pl - Turn an NCI library definition file into PASM 9 10 =head1 SYNOPSIS 11 12 perl tools/dev/ncidef2asm.pl path/to/from_file [ path/to/to_file ] 13 14 =head1 DESCRIPTION 15 16 This program takes an NCI library definition file and turns it into PASM. 17 18 An NCI library definition file provides the information needed to 19 generate a parrot wrapper for the named library (or libraries). Its 20 format is simple, and looks like: 21 22 [package] 23 ncurses 24 25 [lib] 26 libform.so 27 28 [defs] 29 p new_field i i i i i i 30 31 [lib] 32 libncurses.so 33 34 [defs] 35 i is_term_resized i i 36 37 Note that the assembly file is generated in the order you specify, so 38 if there are library dependencies, make sure you have them in the 39 correct order. 40 41 =head2 package 42 43 Declares the package that all subsequent sub PMCs will be put 44 into. The name is a simple concatenation of the package name, double 45 colon, and the routine name, with no preceding punctuation. 46 47 =head2 lib 48 49 The name of the library to be loaded. Should be as qualified as 50 necessary for your platform--generally the full filename is required, 51 though the directory generally isn't. 52 53 You may load multiple libraries here, but only the last one loaded 54 will be exposed to subsequent defs. 55 56 =head2 defs 57 58 This section holds the definitions of functions. Each function is 59 assumed to be in the immediate preceding library. The definition of 60 the function is: 61 62 return_type name [param [param [param ...]]] 63 64 The param and return_type parameters use the NCI standard, which for 65 reference is: 66 67 =over 4 68 69 =item p 70 71 Parameter is a void pointer, taken from the PMC's data pointer. PMC is 72 assumed to be an unmanagedstruct or child class. 73 74 Taken from a P register 75 76 =item c 77 78 Parameter is a character. 79 80 Taken from an I register 81 82 =item s 83 84 Parameter is a short 85 86 Taken from an I register 87 88 =item i 89 90 Parameter is an int 91 92 Taken from an I register 93 94 =item l 95 96 Parameter is a long 97 98 Taken from an I register 99 100 =item f 101 102 Paramter is a float 103 104 Taken from an N register. 105 106 =item d 107 108 Parameter is a double. 109 110 Taken from an N register. 111 112 =item t 113 114 Paramter is a char *, presumably a C string 115 116 Taken from an S register 117 118 =item v 119 120 Void. Only valid as a return type, noting that the function returns no data. 121 122 =item I 123 124 Interpreter pointer. The current interpreter pointer is passed in 125 126 =item P 127 128 PMC. 129 130 =item 2 131 132 Pointer to short. 133 134 Taken from an I register. 135 136 =item 3 137 138 Pointer to int. 139 140 Taken from an I register 141 142 =item 4 143 144 Pointer to long 145 146 Taken from an I register 147 148 =back 149 150 =cut 151 152 use strict; 153 use warnings; 154 155 my ( $from_file, $to_file ) = @ARGV; 156 157 # If there is no destination file, strip off the extension of the 158 # source file and add a .pasm to it 159 if ( !defined $to_file ) { 160 $to_file = $from_file; 161 $to_file =~ s/\..*$//; 162 $to_file .= ".pasm"; 163 } 164 165 open my $INPUT, '<', "$from_file" or die "Can't open up $from_file, error $!"; 166 open my $OUTPUT, '>', "$to_file" or die "Can't open up $to_file, error $!"; 167 168 # To start, save all the registers, just in case 169 print $OUTPUT "saveall\n"; 170 171 my @libs; 172 my ( $cur_package, $line, $cur_section ); 173 174 # Our dispatch table 175 my (%dispatch) = ( 176 package => \&package_line, 177 lib => \&lib_line, 178 defs => \&def_line, 179 ); 180 181 while ( $line = <$INPUT> ) { 182 183 # Throw away trailing newlines, comments, and whitespace. If the 184 # line's empty, then off to the next line 185 chomp $line; 186 $line =~ s/#.*//; 187 $line =~ s/\s*$//; 188 next unless $line; 189 190 # Is it a section line? If so, extract the section and set it. 191 if ( $line =~ /\[(\w+)\]/ ) { 192 $cur_section = $1; 193 next; 194 } 195 196 # Everything else goes to the handler 197 $dispatch{$cur_section}->($line); 198 199 } 200 201 # Put the registers back and end 202 print $OUTPUT "restoreall\n"; 203 print $OUTPUT "end\n"; 204 close $OUTPUT; 205 206 sub package_line { 207 my $line = shift; 208 209 # Trim leading and trailing spaces 210 $line =~ s/^\s*//; 211 $line =~ s/\s*$//; 212 213 # Set the global current package 214 $cur_package = $line; 215 216 } 217 218 sub lib_line { 219 my $line = shift; 220 print $OUTPUT "loadlib P1, '$line'\n"; 221 } 222 223 sub def_line { 224 my $line = shift; 225 my ( $return_type, $name, @params ) = split ' ', $line; 226 unshift @params, $return_type; 227 my $signature = join( "", @params ); 228 print $OUTPUT "dlfunc P2, P1, '$name', '$signature'\n"; 229 print $OUTPUT "store_global '${cur_package}::${name}', P2\n"; 230 } 231 232 # Local Variables: 233 # mode: cperl 234 # cperl-indent-level: 4 235 # fill-column: 100 236 # End: 237 # vim: expandtab shiftwidth=4: -
tools/dev/perlcritic-cage.conf
Property changes on: tools/dev/ncidef2pasm.pl ___________________________________________________________________ Added: svn:mergeinfo Merged /branches/parrot_call_dep/tools/util/ncidef2pasm.pl:r44134-44188 Merged /branches/tt_696/tools/util/ncidef2pasm.pl:r39055-39086 Merged /branches/vtable_massacre/tools/util/ncidef2pasm.pl:r43827-43920 Merged /branches/gc-refactor/tools/util/ncidef2pasm.pl:r41010-41302 Merged /branches/pmc_freeze_with_pmcs/tools/util/ncidef2pasm.pl:r43520-43704 Merged /branches/fix_icc_failures/tools/util/ncidef2pasm.pl:r44593-44838 Merged /branches/rm_dynoplibs_make/tools/util/ncidef2pasm.pl:r44790-44875 Merged /branches/noalignptrs/tools/util/ncidef2pasm.pl:r43151-43489 Merged /branches/headercleanup/tools/util/ncidef2pasm.pl:r37946-38257 Merged /branches/no_pmc_install/tools/util/ncidef2pasm.pl:r45100-45105 Merged /branches/RELEASE_1_3_0/tools/util/ncidef2pasm.pl:r39592-39598 Merged /branches/auto_format_no_Config/tools/util/ncidef2pasm.pl:r42352-42410 Merged /branches/stringnull/tools/util/ncidef2pasm.pl:r45492-45618 Merged /branches/ns_func_cleanup/tools/util/ncidef2pasm.pl:r47026-47677 Merged /branches/dynop_mapping/tools/util/ncidef2pasm.pl:r47504-48410 Merged /branches/RELEASE_0_8_2/tools/util/ncidef2pasm.pl:r34004-34020 Merged /branches/tt_1449/tools/util/ncidef2pasm.pl:r44021-44101 Merged /branches/tt1452_configure_debug/tools/util/ncidef2pasm.pl:r47168-47317 Merged /branches/pmc_sans_unionval/tools/util/ncidef2pasm.pl:r40531-40725 Merged /branches/bsr_jsr_ret/tools/util/ncidef2pasm.pl:r40212-40267 Merged /branches/one_make/tools/util/ncidef2pasm.pl:r43277-43591 Merged /branches/tt1393_retcon/tools/util/ncidef2pasm.pl:r43652-43720 Merged /branches/opengl_dynamic_nci/tools/util/ncidef2pasm.pl:r43840-44139 Merged /branches/tt362/tools/util/ncidef2pasm.pl:r43955-44212 Merged /branches/platform_determine_earlier/tools/util/ncidef2pasm.pl:r42413-42432 Merged /branches/ucs4_encoding/tools/util/ncidef2pasm.pl:r46803-46997 Merged /branches/cfunctionsdocs/tools/util/ncidef2pasm.pl:r47551-47916 Merged /branches/pmc_freeze_cleanup/tools/util/ncidef2pasm.pl:r43031-43433 Merged /branches/remove-next_for_GC/tools/util/ncidef2pasm.pl:r41487-41507 Merged /branches/configtests/tools/util/ncidef2pasm.pl:r42236-42574 Merged /branches/auto_frames_refactor/tools/util/ncidef2pasm.pl:r41426-41455 Merged /branches/tt473_remove_memcpy_aligned/tools/util/ncidef2pasm.pl:r43163-43440 Merged /branches/op_pmcs/tools/util/ncidef2pasm.pl:r43820-44044 Merged /branches/pmc_func_cleanup/tools/util/ncidef2pasm.pl:r43978-44189 Merged /branches/kill_stacks/tools/util/ncidef2pasm.pl:r40284-40287 Merged /branches/remove_Parrot_ex_calc_handler_offset/tools/util/ncidef2pasm.pl:r43337-43339 Merged /branches/no_running_make_test/tools/util/ncidef2pasm.pl:r43474-43545 Merged /branches/gc_internals/tools/util/ncidef2pasm.pl:r39002-39024 Merged /branches/tt1726_pmc_pod/tools/util/ncidef2pasm.pl:r48343-48374 Merged /branches/removing_stm/tools/util/ncidef2pasm.pl:r35464-35502 Merged /branches/io_rewiring/tools/util/ncidef2pasm.pl:r39195-39460 Merged /branches/assert_args/tools/util/ncidef2pasm.pl:r34776-34857 Merged /branches/ops_massacre/tools/util/ncidef2pasm.pl:r46812-47047 Merged /branches/jit_h_files/tools/util/ncidef2pasm.pl:r34166-35215 Merged /branches/runcore_purge/tools/util/ncidef2pasm.pl:r45837-45948 Merged /branches/pbc_frozen_strings1/tools/util/ncidef2pasm.pl:r46081-46225 Merged /branches/convert_OSNAME/tools/util/ncidef2pasm.pl:r42258-42340 Merged /branches/gc_api/tools/util/ncidef2pasm.pl:r38521-38653 Merged /branches/tt528_vtinit/tools/util/ncidef2pasm.pl:r38444-38470 Merged /branches/library_files/tools/util/ncidef2pasm.pl:r41458-41848 Merged /branches/hash_faster/tools/util/ncidef2pasm.pl:r47841-47862 Added: svn:eol-style + native Added: svn:keywords + Author Date Id Revision Added: cvs2svn:cvs-rev + 1.1
1 # A more stringent set of rules for cage cleaners 2 3 [-CodeLayout::ProhibitParensWithBuiltins] 4 [CodeLayout::ProhibitHardTabs] 5 allow_leading_tabs = 0 6 7 [-CodeLayout::RequireTidyCode] 8 9 [-ControlStructures::ProhibitPostfixControls] 10 [-ControlStructures::ProhibitUnlessBlocks] 11 12 [-Documentation::PodSpelling] 13 [-Documentation::RequirePodAtEnd] 14 [-Documentation::RequirePodSections] 15 16 [-ErrorHandling::RequireCarping] 17 18 [-InputOutput::ProhibitBacktickOperators] 19 [-InputOutput::ProhibitInteractiveTest] 20 [-InputOutput::RequireCheckedSyscalls] 21 functions = :builtins 22 exclude_functions = print 23 24 [-Miscellanea::RequireRcsKeywords] 25 26 [-Modules::RequireVersionVar] 27 28 [-RegularExpressions::ProhibitEscapedMetacharacters] 29 [-RegularExpressions::RequireDotMatchAnything] 30 [-RegularExpressions::RequireExtendedFormatting] 31 [-RegularExpressions::RequireLineBoundaryMatching] 32 33 [-ValuesAndExpressions::ProhibitConstantPragma] 34 [-ValuesAndExpressions::ProhibitEmptyQuotes] 35 [-ValuesAndExpressions::ProhibitMagicNumbers] 36 37 [-Variables::ProhibitPunctuationVars] -
tools/dev/perlcritic.conf
Property changes on: tools/dev/perlcritic-cage.conf ___________________________________________________________________ Added: svn:mergeinfo Merged /branches/io_rewiring/tools/util/perlcritic-cage.conf:r39195-39460 Merged /branches/ops_massacre/tools/util/perlcritic-cage.conf:r46812-47047 Merged /branches/runcore_purge/tools/util/perlcritic-cage.conf:r45837-45948 Merged /branches/pbc_frozen_strings1/tools/util/perlcritic-cage.conf:r46081-46225 Merged /branches/convert_OSNAME/tools/util/perlcritic-cage.conf:r42258-42340 Merged /branches/gc_api/tools/util/perlcritic-cage.conf:r38521-38653 Merged /branches/tt528_vtinit/tools/util/perlcritic-cage.conf:r38444-38470 Merged /branches/library_files/tools/util/perlcritic-cage.conf:r41458-41848 Merged /branches/hash_faster/tools/util/perlcritic-cage.conf:r47841-47862 Merged /branches/parrot_call_dep/tools/util/perlcritic-cage.conf:r44134-44188 Merged /branches/tt_696/tools/util/perlcritic-cage.conf:r39055-39086 Merged /branches/vtable_massacre/tools/util/perlcritic-cage.conf:r43827-43920 Merged /branches/pmc_freeze_with_pmcs/tools/util/perlcritic-cage.conf:r43520-43704 Merged /branches/gc-refactor/tools/util/perlcritic-cage.conf:r41010-41302 Merged /branches/fix_icc_failures/tools/util/perlcritic-cage.conf:r44593-44838 Merged /branches/rm_dynoplibs_make/tools/util/perlcritic-cage.conf:r44790-44875 Merged /branches/noalignptrs/tools/util/perlcritic-cage.conf:r43151-43489 Merged /branches/stringnull/tools/util/perlcritic-cage.conf:r45492-45618 Merged /branches/auto_format_no_Config/tools/util/perlcritic-cage.conf:r42352-42410 Merged /branches/RELEASE_1_3_0/tools/util/perlcritic-cage.conf:r39592-39598 Merged /branches/no_pmc_install/tools/util/perlcritic-cage.conf:r45100-45105 Merged /branches/ns_func_cleanup/tools/util/perlcritic-cage.conf:r47026-47677 Merged /branches/dynop_mapping/tools/util/perlcritic-cage.conf:r47504-48410 Merged /branches/tt_1449/tools/util/perlcritic-cage.conf:r44021-44101 Merged /branches/tt1452_configure_debug/tools/util/perlcritic-cage.conf:r47168-47317 Merged /branches/bsr_jsr_ret/tools/util/perlcritic-cage.conf:r40212-40267 Merged /branches/one_make/tools/util/perlcritic-cage.conf:r43277-43591 Merged /branches/pmc_sans_unionval/tools/util/perlcritic-cage.conf:r40531-40725 Merged /branches/tt1393_retcon/tools/util/perlcritic-cage.conf:r43652-43720 Merged /branches/opengl_dynamic_nci/tools/util/perlcritic-cage.conf:r43840-44139 Merged /branches/tt362/tools/util/perlcritic-cage.conf:r43955-44212 Merged /branches/platform_determine_earlier/tools/util/perlcritic-cage.conf:r42413-42432 Merged /branches/cfunctionsdocs/tools/util/perlcritic-cage.conf:r47551-47916 Merged /branches/pmc_freeze_cleanup/tools/util/perlcritic-cage.conf:r43031-43433 Merged /branches/remove-next_for_GC/tools/util/perlcritic-cage.conf:r41487-41507 Merged /branches/configtests/tools/util/perlcritic-cage.conf:r42236-42574 Merged /branches/auto_frames_refactor/tools/util/perlcritic-cage.conf:r41426-41455 Merged /branches/tt473_remove_memcpy_aligned/tools/util/perlcritic-cage.conf:r43163-43440 Merged /branches/op_pmcs/tools/util/perlcritic-cage.conf:r43820-44044 Merged /branches/pmc_func_cleanup/tools/util/perlcritic-cage.conf:r43978-44189 Merged /branches/kill_stacks/tools/util/perlcritic-cage.conf:r40284-40287 Merged /branches/remove_Parrot_ex_calc_handler_offset/tools/util/perlcritic-cage.conf:r43337-43339 Merged /branches/no_running_make_test/tools/util/perlcritic-cage.conf:r43474-43545 Merged /branches/gc_internals/tools/util/perlcritic-cage.conf:r39002-39024 Merged /branches/tt1726_pmc_pod/tools/util/perlcritic-cage.conf:r48343-48374 Merged /branches/removing_stm/tools/util/perlcritic-cage.conf:r35464-35502 Added: svn:eol-style + native Added: svn:keywords + Author Date Id Revision
1 verbose = 3 2 3 # not all the profiles listed here are installed by default, even if you have 4 # Perl::Critic. Shhhh. 5 profile-strictness = quiet 6 7 [BuiltinFunctions::ProhibitStringySplit] 8 add_themes = parrot 9 10 [CodeLayout::ProhibitDuplicateCoda] 11 add_themes = parrot 12 13 [CodeLayout::ProhibitHardTabs] 14 allow_leading_tabs = 0 15 add_themes = parrot 16 17 [CodeLayout::ProhibitTrailingWhitespace] 18 add_themes = parrot 19 20 [CodeLayout::RequireTidyCode] 21 perltidyrc = tools/dev/perltidy.conf 22 add_themes = extra 23 24 [CodeLayout::UseParrotCoda] 25 add_themes = parrot 26 27 [InputOutput::ProhibitBarewordFileHandles] 28 add_themes = parrot 29 30 [InputOutput::ProhibitTwoArgOpen] 31 add_themes = parrot 32 33 [NamingConventions::ProhibitAmbiguousNames] 34 # remove abstract from the list of forbidden names 35 forbid = bases close contract last left no record right second set 36 add_themes = extra 37 38 [Subroutines::ProhibitBuiltinHomonyms] 39 add_themes = extra 40 41 [Subroutines::ProhibitExplicitReturnUndef] 42 add_themes = parrot 43 44 [Subroutines::ProhibitSubroutinePrototypes] 45 add_themes = parrot 46 47 [Subroutines::RequireFinalReturn] 48 add_themes = extra 49 50 [TestingAndDebugging::MisplacedShebang] 51 add_themes = parrot 52 53 [TestingAndDebugging::ProhibitShebangWarningsArg] 54 add_themes = parrot 55 56 [TestingAndDebugging::RequirePortableShebang] 57 add_themes = parrot 58 59 [TestingAndDebugging::RequireUseStrict] 60 add_themes = parrot 61 62 [TestingAndDebugging::RequireUseWarnings] 63 add_themes = parrot 64 65 [ValuesAndExpressions::ProhibitInterpolationOfLiterals] 66 add_themes = extra 67 68 [Variables::ProhibitConditionalDeclarations] 69 add_themes = parrot 70 71 [Bangs::ProhibitFlagComments] 72 add_themes = extra 73 74 [Bangs::ProhibitRefProtoOrProto] 75 add_themes = extra -
tools/dev/README
Property changes on: tools/dev/perlcritic.conf ___________________________________________________________________ Added: svn:mergeinfo Merged /branches/tt1452_configure_debug/tools/util/perlcritic.conf:r47168-47317 Merged /branches/io_rewiring/tools/util/perlcritic.conf:r39195-39460 Merged /branches/assert_args/tools/util/perlcritic.conf:r34776-34857 Merged /branches/one_make/tools/util/perlcritic.conf:r43277-43591 Merged /branches/bsr_jsr_ret/tools/util/perlcritic.conf:r40212-40267 Merged /branches/pmc_sans_unionval/tools/util/perlcritic.conf:r40531-40725 Merged /branches/ops_massacre/tools/util/perlcritic.conf:r46812-47047 Merged /branches/jit_h_files/tools/util/perlcritic.conf:r34166-35215 Merged /branches/runcore_purge/tools/util/perlcritic.conf:r45837-45948 Merged /branches/pbc_frozen_strings1/tools/util/perlcritic.conf:r46081-46225 Merged /branches/tt362/tools/util/perlcritic.conf:r43955-44212 Merged /branches/tt528_vtinit/tools/util/perlcritic.conf:r38444-38470 Merged /branches/cfunctionsdocs/tools/util/perlcritic.conf:r47551-47916 Merged /branches/ucs4_encoding/tools/util/perlcritic.conf:r46803-46997 Merged /branches/pmc_freeze_cleanup/tools/util/perlcritic.conf:r43031-43433 Merged /branches/hash_faster/tools/util/perlcritic.conf:r47841-47862 Merged /branches/remove-next_for_GC/tools/util/perlcritic.conf:r41487-41507 Merged /branches/configtests/tools/util/perlcritic.conf:r42236-42574 Merged /branches/auto_frames_refactor/tools/util/perlcritic.conf:r41426-41455 Merged /branches/vtable_massacre/tools/util/perlcritic.conf:r43827-43920 Merged /branches/tt_696/tools/util/perlcritic.conf:r39055-39086 Merged /branches/op_pmcs/tools/util/perlcritic.conf:r43820-44044 Merged /branches/stringnull/tools/util/perlcritic.conf:r45492-45618 Merged /branches/auto_format_no_Config/tools/util/perlcritic.conf:r42352-42410 Merged /branches/RELEASE_1_3_0/tools/util/perlcritic.conf:r39592-39598 Merged /branches/no_pmc_install/tools/util/perlcritic.conf:r45100-45105 Merged /branches/RELEASE_0_8_2/tools/util/perlcritic.conf:r34004-34020 Merged /branches/tt1726_pmc_pod/tools/util/perlcritic.conf:r48343-48374 Merged /branches/gc_internals/tools/util/perlcritic.conf:r39002-39024 Merged /branches/no_running_make_test/tools/util/perlcritic.conf:r43474-43545 Merged /branches/tt1393_retcon/tools/util/perlcritic.conf:r43652-43720 Merged /branches/opengl_dynamic_nci/tools/util/perlcritic.conf:r43840-44139 Merged /branches/convert_OSNAME/tools/util/perlcritic.conf:r42258-42340 Merged /branches/gc_api/tools/util/perlcritic.conf:r38521-38653 Merged /branches/platform_determine_earlier/tools/util/perlcritic.conf:r42413-42432 Merged /branches/library_files/tools/util/perlcritic.conf:r41458-41848 Merged /branches/parrot_call_dep/tools/util/perlcritic.conf:r44134-44188 Merged /branches/gc-refactor/tools/util/perlcritic.conf:r41010-41302 Merged /branches/pmc_freeze_with_pmcs/tools/util/perlcritic.conf:r43520-43704 Merged /branches/fix_icc_failures/tools/util/perlcritic.conf:r44593-44838 Merged /branches/rm_dynoplibs_make/tools/util/perlcritic.conf:r44790-44875 Merged /branches/tt473_remove_memcpy_aligned/tools/util/perlcritic.conf:r43163-43440 Merged /branches/noalignptrs/tools/util/perlcritic.conf:r43151-43489 Merged /branches/headercleanup/tools/util/perlcritic.conf:r37946-38257 Merged /branches/pmc_func_cleanup/tools/util/perlcritic.conf:r43978-44189 Merged /branches/ns_func_cleanup/tools/util/perlcritic.conf:r47026-47677 Merged /branches/kill_stacks/tools/util/perlcritic.conf:r40284-40287 Merged /branches/dynop_mapping/tools/util/perlcritic.conf:r47504-48410 Merged /branches/remove_Parrot_ex_calc_handler_offset/tools/util/perlcritic.conf:r43337-43339 Merged /branches/tt_1449/tools/util/perlcritic.conf:r44021-44101 Merged /branches/removing_stm/tools/util/perlcritic.conf:r35464-35502 Added: svn:eol-style + native Added: svn:keywords + Author Date Id Revision
1 # $Id$ 2 README for tools/dev/ 3 4 This directory is intended to hold programs, templates and configuration files 5 found useful by Parrot developed other than those (a) invoked by the default 6 'make' target ('make all'), with or without command-line options, during the 7 Parrot build process; or (b) invoked by 'make install' or 'make install-dev'. -
tools/dev/addopstags.pl
Property changes on: tools/dev/README ___________________________________________________________________ Added: svn:mergeinfo Added: svn:eol-style + native Added: svn:keywords + Author Date Id Revision
1 #!perl 2 3 # Copyright (C) 2004-2006, Parrot Foundation. 4 # $Id$ 5 6 use strict; 7 use warnings; 8 9 =head1 NAME 10 11 tools/dev/addopstags.pl - add src/ops/*.ops to tags 12 13 =head1 SYNOPSIS 14 15 perl tools/dev/addopstags.pl src/ops/*.ops 16 17 =head1 DESCRIPTION 18 19 Add src/ops/*.ops to tags file. 20 21 =cut 22 23 my %seen; 24 my @tags; 25 26 # Pull ops tags 27 while (<>) { 28 if (/\bop \s+ (\w+) \s* \(/x) { 29 next if $seen{$1}++; 30 31 # tag file excmd xflags 32 push @tags, join( "\t", $1, $ARGV, qq{$.;"}, "f" ) . "\n"; 33 } 34 } 35 continue { 36 close ARGV if eof; # reset $. 37 } 38 39 # Pull existing tags 40 open my $T, '<', 'tags'; 41 push @tags, <$T>; 42 close $T; 43 44 # Spit 'em out sorted 45 open $T, '>', 'tags'; 46 print $T sort @tags; 47 close $T; 48 49 # Local Variables: 50 # mode: cperl 51 # cperl-indent-level: 4 52 # fill-column: 100 53 # End: 54 # vim: expandtab shiftwidth=4: -
tools/dev/parrot-config.pir
Property changes on: tools/dev/addopstags.pl ___________________________________________________________________ Added: svn:mergeinfo Merged /branches/tt1452_configure_debug/tools/build/addopstags.pl:r47168-47317 Merged /branches/one_make/tools/build/addopstags.pl:r43277-43591 Merged /branches/bsr_jsr_ret/tools/build/addopstags.pl:r40212-40267 Merged /branches/pmc_sans_unionval/tools/build/addopstags.pl:r40531-40725 Merged /branches/opengl_dynamic_nci/tools/build/addopstags.pl:r43840-44139 Merged /branches/tt1393_retcon/tools/build/addopstags.pl:r43652-43720 Merged /branches/tt362/tools/build/addopstags.pl:r43955-44212 Merged /branches/platform_determine_earlier/tools/build/addopstags.pl:r42413-42432 Merged /branches/cfunctionsdocs/tools/build/addopstags.pl:r47551-47916 Merged /branches/ucs4_encoding/tools/build/addopstags.pl:r46803-46997 Merged /branches/pmc_freeze_cleanup/tools/build/addopstags.pl:r43031-43433 Merged /branches/configtests/tools/build/addopstags.pl:r42236-42574 Merged /branches/remove-next_for_GC/tools/build/addopstags.pl:r41487-41507 Merged /branches/auto_frames_refactor/tools/build/addopstags.pl:r41426-41455 Merged /branches/tt473_remove_memcpy_aligned/tools/build/addopstags.pl:r43163-43440 Merged /branches/op_pmcs/tools/build/addopstags.pl:r43820-44044 Merged /branches/pmc_func_cleanup/tools/build/addopstags.pl:r43978-44189 Merged /branches/kill_stacks/tools/build/addopstags.pl:r40284-40287 Merged /branches/remove_Parrot_ex_calc_handler_offset/tools/build/addopstags.pl:r43337-43339 Merged /branches/tt1726_pmc_pod/tools/build/addopstags.pl:r48343-48374 Merged /branches/gc_internals/tools/build/addopstags.pl:r39002-39024 Merged /branches/no_running_make_test/tools/build/addopstags.pl:r43474-43545 Merged /branches/removing_stm/tools/build/addopstags.pl:r35464-35502 Merged /branches/assert_args/tools/build/addopstags.pl:r34776-34857 Merged /branches/io_rewiring/tools/build/addopstags.pl:r39195-39460 Merged /branches/runcore_purge/tools/build/addopstags.pl:r45837-45948 Merged /branches/jit_h_files/tools/build/addopstags.pl:r34166-35215 Merged /branches/ops_massacre/tools/build/addopstags.pl:r46812-47047 Merged /branches/pbc_frozen_strings1/tools/build/addopstags.pl:r46081-46225 Merged /branches/gc_api/tools/build/addopstags.pl:r38521-38653 Merged /branches/convert_OSNAME/tools/build/addopstags.pl:r42258-42340 Merged /branches/tt528_vtinit/tools/build/addopstags.pl:r38444-38470 Merged /branches/library_files/tools/build/addopstags.pl:r41458-41848 Merged /branches/hash_faster/tools/build/addopstags.pl:r47841-47862 Merged /branches/parrot_call_dep/tools/build/addopstags.pl:r44134-44188 Merged /branches/tt_696/tools/build/addopstags.pl:r39055-39086 Merged /branches/vtable_massacre/tools/build/addopstags.pl:r43827-43920 Merged /branches/gc-refactor/tools/build/addopstags.pl:r41010-41302 Merged /branches/pmc_freeze_with_pmcs/tools/build/addopstags.pl:r43520-43704 Merged /branches/fix_icc_failures/tools/build/addopstags.pl:r44593-44838 Merged /branches/rm_dynoplibs_make/tools/build/addopstags.pl:r44790-44875 Merged /branches/noalignptrs/tools/build/addopstags.pl:r43151-43489 Merged /branches/headercleanup/tools/build/addopstags.pl:r37946-38257 Merged /branches/no_pmc_install/tools/build/addopstags.pl:r45100-45105 Merged /branches/RELEASE_1_3_0/tools/build/addopstags.pl:r39592-39598 Merged /branches/auto_format_no_Config/tools/build/addopstags.pl:r42352-42410 Merged /branches/stringnull/tools/build/addopstags.pl:r45492-45618 Merged /branches/ns_func_cleanup/tools/build/addopstags.pl:r47026-47677 Merged /branches/dynop_mapping/tools/build/addopstags.pl:r47504-48410 Merged /branches/RELEASE_0_8_2/tools/build/addopstags.pl:r34004-34020 Merged /branches/tt_1449/tools/build/addopstags.pl:r44021-44101 Added: svn:eol-style + native Added: svn:keywords + Author Date Id Revision Added: cvs2svn:cvs-rev + 1.1
1 #!/usr/bin/env parrot 2 # $Id$ 3 4 =head1 NAME 5 6 config.pir - Print a Parrot configuration item 7 8 =head1 VERSION 9 10 version 0.01 11 12 =head1 SYNOPSIS 13 14 ./parrot parrot-config.pir VERSION 15 ./parrot parrot-config.pir ccflags 16 ./parrot parrot-config.pir --dump 17 18 =head1 DESCRIPTION 19 20 Print out configuration items. 21 22 =head1 AUTHOR 23 24 Leopold Toetsch E<lt>lt@toetsch.atE<gt>. 25 26 =head1 COPYRIGHT 27 28 Copyright (C) 2004-2009, Parrot Foundation. 29 30 =cut 31 32 .sub _main :main 33 .param pmc argv 34 .local int argc 35 argc = argv 36 if argc < 2 goto usage 37 .local pmc interp, conf_hash 38 .local string key 39 .include "iglobals.pasm" 40 interp = getinterp 41 conf_hash = interp[.IGLOBALS_CONFIG_HASH] 42 .local int i 43 i = 1 44 loop: 45 key = argv[i] 46 if key == '--help' goto usage 47 if key == '--dump' goto dump 48 $I0 = defined conf_hash[key] 49 unless $I0 goto failkey 50 dec argc 51 if i < argc goto dumpsome 52 $S0 = conf_hash[key] 53 print $S0 54 inc i 55 if i < argc goto loop 56 print "\n" 57 end 58 dumpsome: 59 key = argv[i] 60 $I0 = defined conf_hash[key] 61 unless $I0 goto failkey 62 print key 63 print " => '" 64 $S1 = conf_hash[key] 65 print $S1 66 say "'" 67 inc i 68 if i <= argc goto dumpsome 69 end 70 failkey: 71 print " no such key: '" 72 print key 73 print "'\n" 74 end 75 dump: 76 .local pmc iterator 77 iterator = iter conf_hash 78 iter_loop: 79 unless iterator goto iter_end 80 shift $S0, iterator 81 print $S0 82 print " => '" 83 $S1 = conf_hash[$S0] 84 print $S1 85 say "'" 86 goto iter_loop 87 iter_end: 88 end 89 usage: 90 $S0 = argv[0] 91 $P0 = getinterp 92 .include 'stdio.pasm' 93 $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO) 94 $P1.'print'($S0) 95 $P1.'print'(" [ <config-key> [ <config-key> ... ] | --dump | --help ]\n") 96 exit 1 97 .end 98 99 # Local Variables: 100 # mode: pir 101 # fill-column: 100 102 # End: 103 # vim: expandtab shiftwidth=4 ft=pir: -
lib/Parrot/Docs/Section/Tools.pm
Property changes on: tools/dev/parrot-config.pir ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: cvs2svn:cvs-rev + 1.2 Added: svn:mergeinfo Merged /branches/gc-refactor/tools/util/parrot-config.pir:r41010-41302 Merged /branches/pmc_freeze_with_pmcs/tools/util/parrot-config.pir:r43520-43704 Merged /branches/fix_icc_failures/tools/util/parrot-config.pir:r44593-44838 Merged /branches/rm_dynoplibs_make/tools/util/parrot-config.pir:r44790-44875 Merged /branches/tt473_remove_memcpy_aligned/tools/util/parrot-config.pir:r43163-43440 Merged /branches/noalignptrs/tools/util/parrot-config.pir:r43151-43489 Merged /branches/headercleanup/tools/util/parrot-config.pir:r37946-38257 Merged /branches/pmc_func_cleanup/tools/util/parrot-config.pir:r43978-44189 Merged /branches/ns_func_cleanup/tools/util/parrot-config.pir:r47026-47677 Merged /branches/kill_stacks/tools/util/parrot-config.pir:r40284-40287 Merged /branches/dynop_mapping/tools/util/parrot-config.pir:r47504-48410 Merged /branches/remove_Parrot_ex_calc_handler_offset/tools/util/parrot-config.pir:r43337-43339 Merged /branches/tt_1449/tools/util/parrot-config.pir:r44021-44101 Merged /branches/removing_stm/tools/util/parrot-config.pir:r35464-35502 Merged /branches/tt1452_configure_debug/tools/util/parrot-config.pir:r47168-47317 Merged /branches/assert_args/tools/util/parrot-config.pir:r34776-34857 Merged /branches/io_rewiring/tools/util/parrot-config.pir:r39195-39460 Merged /branches/pmc_sans_unionval/tools/util/parrot-config.pir:r40531-40725 Merged /branches/bsr_jsr_ret/tools/util/parrot-config.pir:r40212-40267 Merged /branches/one_make/tools/util/parrot-config.pir:r43277-43591 Merged /branches/runcore_purge/tools/util/parrot-config.pir:r45837-45948 Merged /branches/jit_h_files/tools/util/parrot-config.pir:r34166-35215 Merged /branches/ops_massacre/tools/util/parrot-config.pir:r46812-47047 Merged /branches/pbc_frozen_strings1/tools/util/parrot-config.pir:r46081-46225 Merged /branches/tt362/tools/util/parrot-config.pir:r43955-44212 Merged /branches/tt528_vtinit/tools/util/parrot-config.pir:r38444-38470 Merged /branches/ucs4_encoding/tools/util/parrot-config.pir:r46803-46997 Merged /branches/cfunctionsdocs/tools/util/parrot-config.pir:r47551-47916 Merged /branches/pmc_freeze_cleanup/tools/util/parrot-config.pir:r43031-43433 Merged /branches/hash_faster/tools/util/parrot-config.pir:r47841-47862 Merged /branches/remove-next_for_GC/tools/util/parrot-config.pir:r41487-41507 Merged /branches/configtests/tools/util/parrot-config.pir:r42236-42574 Merged /branches/auto_frames_refactor/tools/util/parrot-config.pir:r41426-41455 Merged /branches/tt_696/tools/util/parrot-config.pir:r39055-39086 Merged /branches/vtable_massacre/tools/util/parrot-config.pir:r43827-43920 Merged /branches/op_pmcs/tools/util/parrot-config.pir:r43820-44044 Merged /branches/no_pmc_install/tools/util/parrot-config.pir:r45100-45105 Merged /branches/RELEASE_1_3_0/tools/util/parrot-config.pir:r39592-39598 Merged /branches/auto_format_no_Config/tools/util/parrot-config.pir:r42352-42410 Merged /branches/stringnull/tools/util/parrot-config.pir:r45492-45618 Merged /branches/RELEASE_0_8_2/tools/util/parrot-config.pir:r34004-34020 Merged /branches/no_running_make_test/tools/util/parrot-config.pir:r43474-43545 Merged /branches/gc_internals/tools/util/parrot-config.pir:r39002-39024 Merged /branches/tt1726_pmc_pod/tools/util/parrot-config.pir:r48343-48374 Merged /branches/opengl_dynamic_nci/tools/util/parrot-config.pir:r43840-44139 Merged /branches/tt1393_retcon/tools/util/parrot-config.pir:r43652-43720 Merged /branches/convert_OSNAME/tools/util/parrot-config.pir:r42258-42340 Merged /branches/gc_api/tools/util/parrot-config.pir:r38521-38653 Merged /branches/platform_determine_earlier/tools/util/parrot-config.pir:r42413-42432 Merged /branches/library_files/tools/util/parrot-config.pir:r41458-41848 Merged /branches/parrot_call_dep/tools/util/parrot-config.pir:r44134-44188 Added: svn:eol-style + native Added: svn:executable + ON
85 85 $self->new_item( '', 'tools/dev/list_unjitted.pl' ), 86 86 $self->new_item( '', 'tools/dev/gen_class.pl' ), 87 87 $self->new_item( '', 'tools/dev/nm.pl' ), 88 $self->new_item( '', 'tools/ util/ncidef2pasm.pl' ),88 $self->new_item( '', 'tools/dev/ncidef2pasm.pl' ), 89 89 $self->new_item( '', 'tools/dev/pbc_header.pl' ), 90 90 ), 91 91 $self->new_group( -
MANIFEST
1 1 # ex: set ro: 2 2 # $Id$ 3 3 # 4 # generated by tools/dev/mk_manifest_and_skip.pl Tue Aug 24 15:05:332010 UT4 # generated by tools/dev/mk_manifest_and_skip.pl Tue Aug 24 23:10:21 2010 UT 5 5 # 6 6 # See below for documentation on the format of this file. 7 7 # … … 2090 2090 t/tools/pmc2cutils/08-pmc-pm.t [test] 2091 2091 t/tools/pmc2cutils/README []doc 2092 2092 t/tools/testdata [test] 2093 tools/build/ addopstags.pl []2093 tools/build/README []doc 2094 2094 tools/build/c2str.pl [] 2095 2095 tools/build/fixup_gen_file.pl [] 2096 2096 tools/build/h2inc.pl [] 2097 tools/build/headerizer.pl []2098 2097 tools/build/ops2c.pl [devel] 2099 2098 tools/build/parrot_config_c.pl [] 2100 2099 tools/build/pbcversion_h.pl [] … … 2102 2101 tools/build/vtable_extend.pl [] 2103 2102 tools/build/vtable_h.pl [] 2104 2103 tools/dev/.gdbinit [] 2104 tools/dev/README []doc 2105 tools/dev/addopstags.pl [] 2105 2106 tools/dev/as2c.pl [] 2106 2107 tools/dev/bench_op.pir [] 2107 2108 tools/dev/branch_status.pl [] 2108 2109 tools/dev/checkdepend.pl [] 2109 2110 tools/dev/create_language.pl [devel] 2110 2111 tools/dev/debian_docs.sh [] 2112 tools/dev/dump_pbc.pl [] 2111 2113 tools/dev/faces.pl [] 2112 2114 tools/dev/fetch_languages.pl [] 2113 2115 tools/dev/gen_charset_tables.pl [] 2114 2116 tools/dev/gen_class.pl [] 2115 2117 tools/dev/gen_makefile.pl [devel] 2116 2118 tools/dev/gen_valgrind_suppressions.pl [] 2119 tools/dev/headerizer.pl [] 2117 2120 tools/dev/install_dev_files.pl [] 2118 2121 tools/dev/install_doc_files.pl [] 2119 2122 tools/dev/install_files.pl [] … … 2131 2134 tools/dev/mk_rpm_manifests.pl [] 2132 2135 tools/dev/nci_test_gen.pl [] 2133 2136 tools/dev/nci_thunk_gen.pir [] 2137 tools/dev/ncidef2pasm.pl [] 2134 2138 tools/dev/nm.pl [] 2135 2139 tools/dev/nopaste.pl [] 2136 2140 tools/dev/ops_not_tested.pl [] 2141 tools/dev/parrot-config.pir [] 2137 2142 tools/dev/parrot-fuzzer [] 2138 2143 tools/dev/parrot.supp [] 2139 2144 tools/dev/parrot_api.pl [] … … 2142 2147 tools/dev/parrotbench.pl [] 2143 2148 tools/dev/pbc_header.pl [] 2144 2149 tools/dev/pbc_to_exe.pir [devel] 2150 tools/dev/perlcritic-cage.conf [] 2151 tools/dev/perlcritic.conf [] 2152 tools/dev/perltidy.conf [] 2153 tools/dev/pgegrep [] 2145 2154 tools/dev/pmcrenumber.pl [] 2146 2155 tools/dev/pmctree.pl [] 2147 2156 tools/dev/pprof2cg.pl [devel] … … 2149 2158 tools/dev/search-ops.pl [] 2150 2159 tools/dev/svnclobber.pl [] 2151 2160 tools/dev/symlink.pl [] 2161 tools/dev/update_copyright.pl [] 2152 2162 tools/dev/vgp [] 2153 2163 tools/dev/vgp_darwin [] 2154 2164 tools/dev/vms-patch [] … … 2159 2169 tools/docs/write_docs.pl [] 2160 2170 tools/install/smoke.pl [] 2161 2171 tools/install/smoke_languages.pl [] 2162 tools/util/crow.pir [] 2163 tools/util/dump_pbc.pl [] 2164 tools/util/gen_release_info.pl [] 2165 tools/util/inc_ver.pir [] 2166 tools/util/ncidef2pasm.pl [] 2167 tools/util/parrot-config.pir [] 2168 tools/util/perlcritic-cage.conf [] 2169 tools/util/perlcritic.conf [] 2170 tools/util/perltidy.conf [] 2171 tools/util/pgegrep [] 2172 tools/util/release.json [] 2173 tools/util/templates.json [] 2174 tools/util/update_copyright.pl [] 2172 tools/release/README []doc 2173 tools/release/crow.pir [] 2174 tools/release/gen_release_info.pl [] 2175 tools/release/inc_ver.pir [] 2176 tools/release/release.json [] 2177 tools/release/templates.json [] 2175 2178 # Local variables: 2176 2179 # mode: text 2177 2180 # buffer-read-only: t -
ports/debian/rules
42 42 dh_testdir 43 43 $(MAKE) installable LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}`pwd`/blib/lib 44 44 pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" docs/running.pod debian/parrot.1 45 pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" tools/ util/parrot-config.pir debian/parrot_config.145 pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" tools/dev/parrot-config.pir debian/parrot_config.1 46 46 pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/pbc_dump.c debian/pbc_dump.1 47 47 pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/pbc_disassemble.c debian/pbc_disassemble.1 48 48 pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/parrot_debugger.c debian/parrot_debugger.1 -
t/tools/dump_pbc.t
4 4 5 5 =head1 NAME 6 6 7 t/tools/dumb_pbc.t - test the script tools/ utils/dump_pbc.pl7 t/tools/dumb_pbc.t - test the script tools/dev/dump_pbc.pl 8 8 9 9 =head1 SYNOPSIS 10 10 … … 34 34 35 35 my $PARROT = ".$PConfig{slash}$PConfig{test_prog}"; 36 36 system( "$PARROT --output $pbc_fn $pir_fn" ); 37 my $cmd = File::Spec->catfile( qw{. tools utildump_pbc.pl} );37 my $cmd = File::Spec->catfile( qw{. tools dev dump_pbc.pl} ); 38 38 my $out = `$PConfig{perl} $cmd $pbc_fn`; 39 39 40 40 like( $out, $snippet, $desc ); -
t/tools/pgegrep.t
4 4 5 5 =head1 NAME 6 6 7 t/tools/pgegrep.t - test the script tools/ utils/pgegrep7 t/tools/pgegrep.t - test the script tools/dev/pgegrep 8 8 9 9 =head1 SYNOPSIS 10 10 … … 34 34 my ($options, $snippet, $desc) = @_; 35 35 36 36 my $PARROT = ".$PConfig{slash}$PConfig{test_prog}"; 37 my $pgegrep = File::Spec->catfile( qw{. tools utilpgegrep} );37 my $pgegrep = File::Spec->catfile( qw{. tools dev pgegrep} ); 38 38 my $out = `$PARROT $pgegrep $options`; 39 39 40 40 like( $out, $snippet, $desc ); -
t/codingstd/perlcritic.t
22 22 violations. 23 23 24 24 This test uses a standard perlcriticrc file, located in 25 F<tools/ utils/perlcritic.conf>25 F<tools/dev/perlcritic.conf> 26 26 27 27 If you wish to run a specific policy, the easiest way to do so is to 28 28 temporarily add a custom theme to the configuration file and then specify … … 62 62 'theme=s' => \$theme 63 63 ); 64 64 65 my $config = File::Spec->catfile( $PConfig{build_dir}, qw{tools utilperlcritic.conf} );65 my $config = File::Spec->catfile( $PConfig{build_dir}, qw{tools dev perlcritic.conf} ); 66 66 67 67 Test::Perl::Critic->import( 68 68 -profile => $config, -
config/gen/makefiles/root.in
47 47 # where we're building parrot from (needed for pbc_to_exe) 48 48 BUILD_DIR = @build_dir@ 49 49 50 # directory for build tools 50 # directory for build tools: 51 # programs, templates, configuration files invoked by 'make all' 52 # (with or without command-line options) 51 53 BUILD_TOOLS_DIR = tools/build 54 # directory for developers' tools 55 # programs, templates, configuration files NOT invoked by 'make all' 56 DEV_TOOLS_DIR = tools/dev 52 57 53 58 # directory for header files 54 59 INC_DIR = @inc@ … … 116 121 NONGEN_HEADERS = @TEMP_nongen_headers@ 117 122 118 123 # The headerizer 119 HEADERIZER = $(PERL) $( BUILD_TOOLS_DIR)/headerizer.pl124 HEADERIZER = $(PERL) $(DEV_TOOLS_DIR)/headerizer.pl 120 125 121 126 include src/dynpmc/Defines.mak 122 127 include src/dynoplibs/Defines.mak … … 841 846 @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC) 842 847 #IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 843 848 844 $(PBC_TO_EXE) : tools/dev/pbc_to_exe.pir runtime/parrot/library/config.pir $(PARROT) $(DYNEXT_DIR)/os$(LOAD_EXT) $(DYNEXT_DIR)/file$(LOAD_EXT)845 $(PARROT) -o pbc_to_exe.pbc tools/dev/pbc_to_exe.pir849 $(PBC_TO_EXE) : $(DEV_TOOLS_DIR)/pbc_to_exe.pir runtime/parrot/library/config.pir $(PARROT) $(DYNEXT_DIR)/os$(LOAD_EXT) $(DYNEXT_DIR)/file$(LOAD_EXT) 850 $(PARROT) -o pbc_to_exe.pbc $(DEV_TOOLS_DIR)/pbc_to_exe.pir 846 851 $(PARROT) pbc_to_exe.pbc pbc_to_exe.pbc 847 852 848 parrot_nci_thunk_gen.pbc : tools/dev/nci_thunk_gen.pir $(DATA_JSON_LIB_PBCS) $(PARROT)849 $(PARROT) -o parrot_nci_thunk_gen.pbc tools/dev/nci_thunk_gen.pir853 parrot_nci_thunk_gen.pbc : $(DEV_TOOLS_DIR)/nci_thunk_gen.pir $(DATA_JSON_LIB_PBCS) $(PARROT) 854 $(PARROT) -o parrot_nci_thunk_gen.pbc $(DEV_TOOLS_DIR)/nci_thunk_gen.pir 850 855 851 856 $(NCI_THUNK_GEN) : parrot_nci_thunk_gen.pbc $(PBC_TO_EXE) 852 857 $(PBC_TO_EXE) parrot_nci_thunk_gen.pbc … … 857 862 $(PROVE) : parrot-prove.pbc $(PARROT) $(PBC_TO_EXE) 858 863 $(PBC_TO_EXE) parrot-prove.pbc 859 864 860 $(PARROT_CONFIG) : tools/util/parrot-config.pir $(PARROT) $(PBC_TO_EXE)861 $(PARROT) -o parrot_config.pbc tools/util/parrot-config.pir865 $(PARROT_CONFIG) : $(DEV_TOOLS_DIR)/parrot-config.pir $(PARROT) $(PBC_TO_EXE) 866 $(PARROT) -o parrot_config.pbc $(DEV_TOOLS_DIR)/parrot-config.pir 862 867 $(PARROT) pbc_to_exe.pbc parrot_config.pbc 863 868 864 869 $(MINIPARROT) : src/main$(O) $(GEN_HEADERS) $(LIBPARROT) \ … … 935 940 $(IMCC_O_FILES) 936 941 937 942 lib_deps_object : $(O_FILES) 938 $(PERL) tools/dev/lib_deps.pl object $(O_FILES)943 $(PERL) $(DEV_TOOLS_DIR)/lib_deps.pl object $(O_FILES) 939 944 940 945 lib_deps_source : $(GENERAL_H_FILES) 941 $(PERL) tools/dev/lib_deps.pl source all_source946 $(PERL) $(DEV_TOOLS_DIR)/lib_deps.pl source all_source 942 947 943 948 lib_deps : lib_deps_object lib_deps_source 944 949 … … 968 973 969 974 970 975 $(INSTALLABLECONFIG) : src/install_config$(O) $(PARROT_CONFIG) $(PBC_TO_EXE) 971 $(PARROT) -o parrot_config.pbc tools/util/parrot-config.pir976 $(PARROT) -o parrot_config.pbc $(DEV_TOOLS_DIR)/parrot-config.pir 972 977 $(PBC_TO_EXE) parrot_config.pbc --install 973 978 974 979 $(INSTALLABLEPBCTOEXE) : $(PBC_TO_EXE) src/install_config$(O) … … 1996 2001 # Require .svn to exist first 1997 2002 # Otherwise it'll remove every last file 1998 2003 svnclobber : .svn 1999 $(PERL) tools/dev/svnclobber.pl2004 $(PERL) $(DEV_TOOLS_DIR)/svnclobber.pl 2000 2005 2001 2006 reconfig : realclean 2002 2007 $(PERL) Configure.pl $(CONFIG_ARGS) 2003 2008 2004 2009 manitest : 2005 $(PERL) tools/dev/manicheck.pl2010 $(PERL) $(DEV_TOOLS_DIR)/manicheck.pl 2006 2011 2007 2012 opsrenumber : 2008 $(PERL) tools/dev/opsrenumber.pl $(OPS_FILES)2013 $(PERL) $(DEV_TOOLS_DIR)/opsrenumber.pl $(OPS_FILES) 2009 2014 2010 2015 pmcrenumber : 2011 $(PERL) tools/dev/pmcrenumber.pl src/pmc/pmc.num2016 $(PERL) $(DEV_TOOLS_DIR)/pmcrenumber.pl src/pmc/pmc.num 2012 2017 2013 2018 ############################################################################### 2014 2019 # … … 2360 2365 install-dev: install 2361 2366 2362 2367 install-bin: installable 2363 $(PERL) tools/dev/install_files.pl \2368 $(PERL) $(DEV_TOOLS_DIR)/install_files.pl \ 2364 2369 --buildprefix=$(BUILDPREFIX) \ 2365 2370 --prefix=$(PREFIX) \ 2366 2371 --exec-prefix=$(EXEC_PREFIX) \ … … 2374 2379 MANIFEST MANIFEST.generated 2375 2380 2376 2381 install-dev-only: installable 2377 $(PERL) tools/dev/install_dev_files.pl \2382 $(PERL) $(DEV_TOOLS_DIR)/install_dev_files.pl \ 2378 2383 --buildprefix=$(BUILDPREFIX) \ 2379 2384 --prefix=$(PREFIX) \ 2380 2385 --exec-prefix=$(EXEC_PREFIX) \ … … 2389 2394 MANIFEST MANIFEST.generated 2390 2395 2391 2396 install-doc: 2392 $(PERL) tools/dev/install_doc_files.pl \2397 $(PERL) $(DEV_TOOLS_DIR)/install_doc_files.pl \ 2393 2398 --buildprefix=$(BUILDPREFIX) \ 2394 2399 --prefix=$(PREFIX) \ 2395 2400 --docdir=$(DOC_DIR) \ … … 2418 2423 rm parrot-$(VERSION) 2419 2424 2420 2425 win32-inno-installer : world installable 2421 $(PERL) tools/dev/mk_inno.pl2426 $(PERL) $(DEV_TOOLS_DIR)/mk_inno.pl 2422 2427 $(INNO_SETUP) parrot.iss 2423 2428 2424 2429 ############################################################################### … … 2512 2517 --languages=c,perl --langmap=c:+.h,c:+.pmc,c:+.ops \ 2513 2518 -I NOTNULL,NULLOK,ARGIN,ARGMOD,ARGOUT,ARGINOUT,ARGIN_NULLOK,ARGOUT_NULLOK,ARGMOD_NULLOK,ARGFREE,ARGFREE_NOTNULL \ 2514 2519 . 2515 $(PERL) $( BUILD_TOOLS_DIR)/addopstags.pl $(OPS_FILES)2520 $(PERL) $(DEV_TOOLS_DIR)/addopstags.pl $(OPS_FILES) 2516 2521 2517 2522 tags.vi.dummy: 2518 2523 … … 2524 2529 CRITIC_FILES = 'lib/Parrot' 2525 2530 2526 2531 perlcritic: 2527 perlcritic --profile tools/util/perlcritic.conf $(CRITIC_FILES)2532 perlcritic --profile $(DEV_TOOLS_DIR)/perlcritic.conf $(CRITIC_FILES) 2528 2533 2529 2534 # Andy's extra-cranky Perl::Critic checking for cage cleaners 2530 2535 cagecritic: 2531 2536 @perl -MPerl::Critic::Bangs -e'$$min=q{1.04};die qq{You need Bangs $$min} unless $$Perl::Critic::Bangs::VERSION ge $$min' 2532 perlcritic -1 --profile tools/util/perlcritic-cage.conf $(CRITIC_FILES)2537 perlcritic -1 --profile $(DEV_TOOLS_DIR)/perlcritic-cage.conf $(CRITIC_FILES) 2533 2538 2534 2539 # This target will eventually create all the headers automatically. If you 2535 2540 # are having problems with linkage in Win32 (or elsewhere), because something