Index: docs/project/release_manager_guide.pod =================================================================== --- docs/project/release_manager_guide.pod (.../trunk) (revision 48639) +++ docs/project/release_manager_guide.pod (.../branches/tt677_toolsdirs) (revision 48648) @@ -84,7 +84,7 @@ =item c -Update release-related information in F. This will be +Update release-related information in F. This will be used later when making release announcements. There are a few essential fields that must be updated at each release: @@ -251,11 +251,11 @@ =item 9. -Compose the release announcement. Use F to make +Compose the release announcement. Use F to make this part easier. You can specify the format of your announcements like so: - $ ./parrot tools/util/crow.pir --type=text - $ ./parrot tools/util/crow.pir --type=html + $ ./parrot tools/release/crow.pir --type=text + $ ./parrot tools/release/crow.pir --type=html Take the screen output and paste it into the application you need. HTML works well for use Perl and PerlMonks, and text for the rest. It is not a Index: tools/build/addopstags.pl =================================================================== --- tools/build/addopstags.pl (.../trunk) (revision 48639) +++ tools/build/addopstags.pl (.../branches/tt677_toolsdirs) (revision 48648) @@ -1,54 +0,0 @@ -#!perl - -# Copyright (C) 2004-2006, Parrot Foundation. -# $Id$ - -use strict; -use warnings; - -=head1 NAME - -tools/build/addopstags.pl - add src/ops/*.ops to tags - -=head1 SYNOPSIS - - perl tools/build/addopstags.pl src/ops/*.ops - -=head1 DESCRIPTION - -Add src/ops/*.ops to tags file. - -=cut - -my %seen; -my @tags; - -# Pull ops tags -while (<>) { - if (/\bop \s+ (\w+) \s* \(/x) { - next if $seen{$1}++; - - # tag file excmd xflags - push @tags, join( "\t", $1, $ARGV, qq{$.;"}, "f" ) . "\n"; - } -} -continue { - close ARGV if eof; # reset $. -} - -# Pull existing tags -open my $T, '<', 'tags'; -push @tags, <$T>; -close $T; - -# Spit 'em out sorted -open $T, '>', 'tags'; -print $T sort @tags; -close $T; - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: Index: tools/build/headerizer.pl =================================================================== --- tools/build/headerizer.pl (.../trunk) (revision 48639) +++ tools/build/headerizer.pl (.../branches/tt677_toolsdirs) (revision 48648) @@ -1,464 +0,0 @@ -#! perl -# Copyright (C) 2001-2010, Parrot Foundation. -# $Id$ - -=head1 NAME - -tools/build/headerizer.pl - Generates the function header parts of .h -files from .c files - -=head1 SYNOPSIS - - $ perl tools/build/headerizer.pl [object files] - -Generates C function declarations based on the function definitions in -the C source code. - -=head1 DESCRIPTION - -The headerizer works off of directives in the source and header files. - -One source file's public declarations can only go into one header file. -However, one header file can have declarations from multiple source files. -In other words, headers-to-source is one-to-many. - -=over 4 - -=item C F / C F - -Marks the beginning and end of a block of declarations in a header file. - - # In file foo.h - /* HEADERIZER BEGIN: src/foo.c */ - /* HEADERIZER END: src/foo.c */ - - /* HEADERIZER BEGIN: src/bar.c */ - /* HEADERIZER END: src/bar.c */ - -=item C F - -Tells the headerizer where the declarations for the functions should go - - # In file foo.c - /* HEADERIZER HFILE: foo.h */ - - # In file bar.c - /* HEADERIZER HFILE: foo.h */ - -=back - -=head1 COMMAND-LINE OPTIONS - -=over 4 - -=item C<--macro=X> - -Print a list of all functions that have macro X. For example, --macro=PARROT_EXPORT. - -=back - -=cut - -use strict; -use warnings; - -use Getopt::Long; -use lib qw( lib ); -use Parrot::Config; -use Parrot::Headerizer; - -my $headerizer = Parrot::Headerizer->new; - -main(); - -=head1 FUNCTIONS - -=head2 extract_function_declaration_and_update_source( $cfile_name ) - -Extract all the function declarations from the C file specified by -I<$cfile_name>, and update the comment blocks within. - -=cut - -sub extract_function_declarations_and_update_source { - my $cfile_name = shift; - - open( my $fhin, '<', $cfile_name ) or die "Can't open $cfile_name: $!"; - my $text = join( '', <$fhin> ); - close $fhin; - - my @func_declarations = $headerizer->extract_function_declarations( $text ); - for my $decl ( @func_declarations ) { - my $specs = $headerizer->function_components_from_declaration( $cfile_name, $decl ); - my $name = $specs->{name}; - - my $heading = $headerizer->generate_documentation_signature($decl); - - $text =~ s/=item C<[^>]*\b$name\b[^>]*>\n+/$heading\n\n/sm or do { - warn "$cfile_name: $name has no POD\n" unless $name =~ /^yy/; # lexer funcs don't have to have POD - } - } - open( my $fhout, '>', $cfile_name ) or die "Can't create $cfile_name: $!"; - print {$fhout} $text; - close $fhout; - - return @func_declarations; -} - - -sub attrs_from_args { - my $func = shift; - my @args = @_; - - my @attrs = (); - my @mods = (); - - my $name = $func->{name}; - my $file = $func->{file}; - my $n = 0; - for my $arg (@args) { - ++$n; - if ( $arg =~ m{ARG(?:MOD|OUT)(?:_NULLOK)?\((.+?)\)} ) { - my $modified = $1; - if ( $modified =~ s/.*\*/*/ ) { - # We're OK - } - else { - $modified =~ s/.* (\w+)$/$1/ or die qq{Unable to figure out the modified parm out of "$modified"}; - } - push( @mods, "FUNC_MODIFIES($modified)" ); - } - if ( $arg =~ m{(ARGIN|ARGOUT|ARGMOD|ARGFREE_NOTNULL|NOTNULL)\(} || $arg eq 'PARROT_INTERP' ) { - push( @attrs, "__attribute__nonnull__($n)" ); - } - if ( ( $arg =~ m{\*} ) && ( $arg !~ /\b(SHIM|((ARGIN|ARGOUT|ARGMOD)(_NULLOK)?)|ARGFREE(_NOTNULL)?)\b/ ) ) { - if ( $name !~ /^yy/ ) { # Don't complain about the lexer auto-generated funcs - $headerizer->squawk( $file, $name, qq{"$arg" isn't protected with an ARGIN, ARGOUT or ARGMOD (or a _NULLOK variant), or ARGFREE} ); - } - } - if ( ($arg =~ /\bconst\b/) && ($arg =~ /\*/) && ($arg !~ /\*\*/) && ($arg =~ /\b(ARG(MOD|OUT))\b/) ) { - $headerizer->squawk( $file, $name, qq{"$arg" is const, but that $1 conflicts with const} ); - } - } - - return (@attrs,@mods); -} - -sub asserts_from_args { - my @args = @_; - my @asserts; - - for my $arg (@args) { - if ( $arg =~ m{(ARGIN|ARGOUT|ARGMOD|ARGFREE_NOTNULL|NOTNULL)\((.+)\)} ) { - my $var = $2; - if($var =~ /\(*\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\)\s*\(/) { - # argument is a function pointer - $var = $1; - } - else { - # try to isolate the variable's name; - # strip off everything before the final space or asterisk. - $var =~ s{.+[* ]([^* ]+)$}{$1}; - # strip off a trailing "[]", if any. - $var =~ s{\[\]$}{}; - } - push( @asserts, "PARROT_ASSERT_ARG($var)" ); - } - if( $arg eq 'PARROT_INTERP' ) { - push( @asserts, "PARROT_ASSERT_ARG(interp)" ); - } - } - - return (@asserts); -} - -sub make_function_decls { - my @funcs = @_; - - my @decls; - foreach my $func (@funcs) { - my $multiline = 0; - - my $return = $func->{return_type}; - my $alt_void = ' '; - - # Splint can't handle /*@alt void@*/ on pointers, although this page - # http://www.mail-archive.com/lclint-interest@virginia.edu/msg00139.html - # seems to say that we can. - if ( $func->{is_ignorable} && ($return !~ /\*/) ) { - $alt_void = " /*\@alt void@*/\n"; - } - - my $decl = sprintf( "%s%s%s(", $return, $alt_void, $func->{name} ); - $decl = "static $decl" if $func->{is_static}; - - my @args = @{ $func->{args} }; - my @attrs = attrs_from_args( $func, @args ); - - for my $arg (@args) { - if ( $arg =~ m{SHIM\((.+)\)} ) { - $arg = $1; - if ( $func->{is_static} || ( $arg =~ /\*/ ) ) { - $arg = "SHIM($arg)"; - } - else { - $arg = "NULLOK($arg)"; - } - } - } - - my $argline = join( ", ", @args ); - if ( length( $decl . $argline ) <= 75 ) { - $decl = "$decl$argline)"; - } - else { - if ( $args[0] =~ /^((SHIM|PARROT)_INTERP|Interp)\b/ ) { - $decl .= ( shift @args ); - $decl .= "," if @args; - } - $argline = join( ",", map { "\n\t$_" } @args ); - $decl = "$decl$argline)"; - $multiline = 1; - } - - my $attrs = join( "", map { "\n\t\t$_" } @attrs ); - if ($attrs) { - $decl .= $attrs; - $multiline = 1; - } - my @macros = @{ $func->{macros} }; - $multiline = 1 if @macros; - - $decl .= $multiline ? ";\n" : ";"; - $decl = join( "\n", @macros, $decl ); - $decl =~ s/\t/ /g; - push( @decls, $decl ); - } - - foreach my $func (@funcs) { - my @args = @{ $func->{args} }; - my @asserts = asserts_from_args( @args ); - - my $assert = "#define ASSERT_ARGS_" . $func->{name}; - if(length($func->{name}) > 29) { - $assert .= " \\\n "; - } - $assert .= " __attribute__unused__ int _ASSERT_ARGS_CHECK = ("; - if(@asserts) { - $assert .= "\\\n "; - $assert .= join(" \\\n , ", @asserts); - } - else { - $assert .= "0"; - } - $assert .= ")"; - push(@decls, $assert); - } - - return @decls; -} - -sub read_file { - my $filename = shift; - - open my $fh, '<', $filename or die "couldn't read '$filename': $!"; - my $text = do { local $/ = undef; <$fh> }; - close $fh; - - return $text; -} - -sub write_file { - my $filename = shift; - my $text = shift; - - open my $fh, '>', $filename or die "couldn't write '$filename': $!"; - print {$fh} $text; - close $fh; -} - -sub replace_headerized_declarations { - my $source_code = shift; - my $sourcefile = shift; - my $hfile = shift; - my @funcs = @_; - - # Allow a way to not headerize statics - if ( $source_code =~ m{/\*\s*HEADERIZER NONE:\s*$sourcefile\s*\*/} ) { - return $source_code; - } - - @funcs = sort api_first_then_alpha @funcs; - - my @function_decls = make_function_decls(@funcs); - - my $function_decls = join( "\n", @function_decls ); - my $STARTMARKER = qr{/\* HEADERIZER BEGIN: $sourcefile \*/\n}; - my $ENDMARKER = qr{/\* HEADERIZER END: $sourcefile \*/\n?}; - my $DO_NOT_TOUCH = q{/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */}; - - $source_code =~ - s{($STARTMARKER)(?:.*?)($ENDMARKER)} - {$1$DO_NOT_TOUCH\n\n$function_decls\n$DO_NOT_TOUCH\n$2}s - or die "Need begin/end HEADERIZER markers for $sourcefile in $hfile\n"; - - return $source_code; -} - -sub api_first_then_alpha { - return ( ( $b->{is_api} || 0 ) <=> ( $a->{is_api} || 0 ) ) - || ( lc $a->{name} cmp lc $b->{name} ); -} - -sub main { - my $macro_match; - GetOptions( - 'macro=s' => \$macro_match, - ) or exit(1); - - die 'No files specified.' unless @ARGV; - my %ofiles; - ++$ofiles{$_} for @ARGV; - my @ofiles = sort keys %ofiles; - for (@ofiles) { - print "$_ is specified more than once.\n" if $ofiles{$_} > 1; - } - my %sourcefiles; - my %sourcefiles_with_statics; - my %api; - - # Walk the object files and find corresponding source (either .c or .pmc) - for my $ofile (@ofiles) { - next if $ofile =~ m/^\Qsrc$PConfig{slash}ops\E/; - - $ofile =~ s/\\/\//g; - - my $is_yacc = ($ofile =~ /\.y$/); - if ( !$is_yacc ) { - my $sfile = $ofile; - $sfile =~ s/\Q$PConfig{o}\E$/.s/; - next if -f $sfile; - } - - my $cfile = $ofile; - $cfile =~ s/\Q$PConfig{o}\E$/.c/ or $is_yacc - or die "$cfile doesn't look like an object file"; - - my $pmcfile = $ofile; - $pmcfile =~ s/\Q$PConfig{o}\E$/.pmc/; - - my $from_pmc = -f $pmcfile && !$is_yacc; - - my $sourcefile = $from_pmc ? $pmcfile : $cfile; - - my $source_code = read_file( $sourcefile ); - die qq{can't find HEADERIZER HFILE directive in "$sourcefile"} - unless $source_code =~ - m{ /\* \s+ HEADERIZER\ HFILE: \s+ ([^*]+?) \s+ \*/ }sx; - - my $hfile = $1; - if ( ( $hfile ne 'none' ) && ( not -f $hfile ) ) { - die qq{"$hfile" not found (referenced from "$sourcefile")}; - } - - my @decls; - if ( $macro_match ) { - @decls = $headerizer->extract_function_declarations( $source_code ); - } - else { - @decls = extract_function_declarations_and_update_source( $sourcefile ); - } - - for my $decl (@decls) { - my $components = $headerizer->function_components_from_declaration( $sourcefile, $decl ); - push( @{ $sourcefiles{$hfile}->{$sourcefile} }, $components ) unless $hfile eq 'none'; - push( @{ $sourcefiles_with_statics{$sourcefile} }, $components ) if $components->{is_static}; - if ( $macro_match ) { - if ( grep { $_ eq $macro_match } @{$components->{macros}} ) { - push( @{ $api{$sourcefile} }, $components ); - } - } - } - } # for @cfiles - - if ( $macro_match ) { - my $nfuncs = 0; - for my $cfile ( sort keys %api ) { - my @funcs = sort { $a->{name} cmp $b->{name} } @{$api{$cfile}}; - print "$cfile\n"; - for my $func ( @funcs ) { - print " $func->{name}\n"; - ++$nfuncs; - } - } - my $s = $nfuncs == 1 ? '' : 's'; - print "$nfuncs $macro_match function$s\n"; - } - else { # Normal headerization and updating - # Update all the .h files - for my $hfile ( sort keys %sourcefiles ) { - my $sourcefiles = $sourcefiles{$hfile}; - - my $header = read_file($hfile); - - for my $cfile ( sort keys %{$sourcefiles} ) { - my @funcs = @{ $sourcefiles->{$cfile} }; - @funcs = grep { not $_->{is_static} } @funcs; # skip statics - - $header = replace_headerized_declarations( $header, $cfile, $hfile, @funcs ); - } - - write_file( $hfile, $header ); - } - - # Update all the .c files in place - for my $cfile ( sort keys %sourcefiles_with_statics ) { - my @funcs = @{ $sourcefiles_with_statics{$cfile} }; - @funcs = grep { $_->{is_static} } @funcs; - - my $source = read_file($cfile); - $source = replace_headerized_declarations( $source, 'static', $cfile, @funcs ); - - write_file( $cfile, $source ); - } - print "Headerization complete.\n"; - } - - my %warnings = %{$headerizer->{warnings}}; - if ( keys %warnings ) { - my $nwarnings = 0; - my $nwarningfuncs = 0; - my $nwarningfiles = 0; - for my $file ( sort keys %warnings ) { - ++$nwarningfiles; - print "$file\n"; - my $funcs = $warnings{$file}; - for my $func ( sort keys %{$funcs} ) { - ++$nwarningfuncs; - for my $error ( @{ $funcs->{$func} } ) { - print " $func: $error\n"; - ++$nwarnings; - } - } - } - - print "$nwarnings warnings in $nwarningfuncs funcs in $nwarningfiles C files\n"; - } - - return; -} - -# From earlier documentation: -# * Generate docs from funcs -# * Somehow handle static functions in the source file -# * the .c files MUST have a /* HEADERIZER HFILE: foo/bar.h */ directive in them -# * Support for multiple .c files pointing at the same .h file -# * Does NOT remove all blocks in the .h file, so if a .c file -# disappears, its block is "orphaned" and will remain there. - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: Index: tools/build/README =================================================================== --- tools/build/README (.../trunk) (revision 0) +++ tools/build/README (.../branches/tt677_toolsdirs) (revision 48648) @@ -0,0 +1,13 @@ +# $Id$ +README for tools/build/ + +This directory is intended to hold programs, templates and configuration files +invoked by the default 'make' target ('make all'), with or without +command-line options, during the Parrot build process. + +Programs, templates and configuration files invoked by 'make install' or +'make install-dev' should be placed in tools/release/. + +Other things being equal, programs, templates and configuration files invoked +by all other 'make' targets (e.g., 'make headerizer') should be placed in +tools/dev/. Property changes on: tools/build/README ___________________________________________________________________ Added: svn:mergeinfo Added: svn:eol-style + native Added: svn:keywords + Author Date Id Revision Index: tools/release/crow.pir =================================================================== --- tools/release/crow.pir (.../trunk) (revision 0) +++ tools/release/crow.pir (.../branches/tt677_toolsdirs) (revision 48648) @@ -0,0 +1,107 @@ +#! ./parrot +# Copyright (C) 2007-2008, Parrot Foundation. +# $Id$ + +=head1 TITLE + +crow.pir -- Make noise about the new Parrot release + +=head1 DESCRIPTION + +This utility is used to help Release Managers format announcement messages. +It uses a *very* simple and fast templating system, described in the related +module, L. + +=head1 SYNOPSIS + + # see + % parrot tools/release/crow.pir --help + +=cut + + +.sub 'main' :main + .param pmc args + + load_bytecode 'Crow.pbc' + + .local pmc exports, curr_namespace, test_namespace + curr_namespace = get_namespace + test_namespace = get_namespace ['Crow'] + exports = split ' ', 'get_news get_args process' + test_namespace.'export_to'(curr_namespace, exports) + + .local pmc opts + opts = get_args(args) + + unless null opts goto got_opts + opts = new 'Hash' + got_opts: + + .local pmc templates + templates = 'get_json'('tools/release/templates.json') + + .local string template, type + type = opts['type'] + if type != '' goto got_type + type = 'text' + +got_type: + template = 'get_template'(templates, type) + + .local pmc data + data = 'get_json'('tools/release/release.json') + + .local string version + version = data['release.version'] + + $S0 = concat type, '.news' + $I0 = templates[$S0] + if $I0 goto get_news + data['NEWS'] = '' + goto process + get_news: + $S0 = 'get_news'(version) + data['NEWS'] = $S0 + + + process: + .local string result + result = process(template, data) + say result +.end + + +.sub 'get_json' + .param string filename + + load_bytecode 'Config/JSON.pbc' + + .local pmc exports, curr_namespace, test_namespace + curr_namespace = get_namespace + test_namespace = get_namespace [ 'Config';'JSON' ] + exports = split ' ', 'ReadConfig' + test_namespace.'export_to'(curr_namespace, exports) + + .local pmc result + result = ReadConfig(filename) + + .return (result) +.end + + +.sub 'get_template' + .param pmc templates + .param string type + + $S0 = concat type, '.text' + $S1 = templates[$S0] + .return ($S1) +.end + + +# Local Variables: +# mode: pir +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4 ft=pir: 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 Index: tools/release/templates.json =================================================================== --- tools/release/templates.json (.../trunk) (revision 0) +++ tools/release/templates.json (.../branches/tt677_toolsdirs) (revision 48648) @@ -0,0 +1,83 @@ +{ + "text.news" : true, + "text.text" : " + +On behalf of the Parrot team, I'm proud to announce Parrot @release.version@ +\"@release.name@.\" Parrot (@web.root@) is a virtual machine aimed +at running all dynamic languages. + +Parrot @release.version@ is available on Parrot's FTP site, or follow the +download instructions at @web.root@@web.source@. For those who would like to +develop on Parrot, or help develop Parrot itself, we recommend using Subversion +on the source code repository to get the latest and best Parrot code. + +Parrot @release.version@ News: +@NEWS@ + +Many thanks to all our contributors for making this possible, and our sponsors +for supporting this project. Our next scheduled release is @release.nextdate@. + +Enjoy! + +", + + "html.news" : true, + "html.text" : " +

On behalf of the Parrot team, I'm proud to announce Parrot @release.version@ +"@release.name@." Parrot +is a virtual machine aimed at running all dynamic languages.

+ +

Parrot @release.version@ is available on Parrot's FTP +site, or follow the download +instructions. For those who would like to develop on Parrot, or help +develop Parrot itself, we recommend using Subversion on our +source code repository to get the latest and best Parrot code.

+ +

Parrot @release.version@ News:
+

@NEWS@

+ +

Thanks to all our contributors for making this possible, and our sponsors +for supporting this project. Our next release is @release.nextdate@.

+ +

Enjoy!

+", + + "bugday.news" : false, + "bugday.text" : " +Bug Day + +On @bugday.day@, @bugday.date@, please join us on IRC in #parrot +(irc.parrot.org) to work on closing out as many Trac tickets +(https://trac.parrot.org) tickets as possible in the parrot queue. This will +help us get ready for the next release of parrot: @release.version@, scheduled +for @release.day@, @release.date@. You'll find C, parrot assembly, perl, +documentation, and plenty of tasks to go around. Core developers will be +available most of the day (starting at around 10am GMT) to answer questions. + +No experience with parrot necessary. + +--From: @wiki.root@@wiki.bugday@-- + +Check the list at: + +https://trac.parrot.org/parrot/report/3 + +Which contains all the tickets I'd like to see resolved in @version@. To +see all the open tickets, use: + +https://trac.parrot.org/parrot/report + +If you've got something you're working on that you think you'll be +getting done before the release, please +- add a ticket for it (if necessary); +- set its milestone to this release. + +Thanks in advance for your patches and commits. ^_^ + +... Speaking of patches, we should also get through as many of these +(accept or reject) as possible. + +@web.root@@web.openpatches@ +" +} 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 Index: tools/release/release.json =================================================================== --- tools/release/release.json (.../trunk) (revision 0) +++ tools/release/release.json (.../branches/tt677_toolsdirs) (revision 48648) @@ -0,0 +1,21 @@ +{ + "release.version" : "2.7.0", + "release.name" : "Australian King", + "release.day" : "Tuesday", + "release.date" : "17 August 2010", + "release.nextdate" : "21 September 2010", + + "web.root" : "http://parrot.org/", + "web.source" : "download", + "web.openpatches" : "openpatches.html", + "web.repository" : "https://svn.parrot.org/parrot/trunk/", + + "bugday.day" : "Saturday", + "bugday.date" : "18 September 2010", + + "wiki.root" : "https://trac.parrot.org/parrot/wiki/", + "wiki.bugday" : "bug_day_2010_09_18", + + "ftp.path" : "ftp://ftp.parrot.org/pub/parrot/releases/devel/2.7.0/", + "subversion.root" : "http://subversion.apache.org/" +} 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 Index: tools/release/README =================================================================== --- tools/release/README (.../trunk) (revision 0) +++ tools/release/README (.../branches/tt677_toolsdirs) (revision 48648) @@ -0,0 +1,5 @@ +# $Id$ +README for tools/release/ + +This directory is intended to hold programs, templates and configuration files +useful during the release process. Property changes on: tools/release/README ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Index: tools/release/gen_release_info.pl =================================================================== --- tools/release/gen_release_info.pl (.../trunk) (revision 0) +++ tools/release/gen_release_info.pl (.../branches/tt677_toolsdirs) (revision 48648) @@ -0,0 +1,63 @@ +#! perl +# Copyright (C) 2008, Parrot Foundation. +# $Id$ + +use strict; +use warnings; + +=head1 NAME + +tools/release/gen_release_info.pl - generate release info for graphs and charts + +=head1 DESCRIPTION + +This utility generates release information from subversion in csv format, +suitable for graphs, charts, and reports. + +=cut + + +my $repo_url = 'https://svn.parrot.org/parrot/tags'; + +## create a release information data structure +my $r = { + map { $_->{number} => $_ } + map { m{^(RELEASE_)(.*)/} + ? { + tag => "$1$2", + number => sub{$a = shift; $a =~ y/_/./; $a }->($2), + } + : () + } + qx { svn ls $repo_url } +}; + +## gather interesting release-related information from the tag +map { + ## ask subversion for info about the tag + my $readme = $repo_url . '/' . $r->{$_}{tag}; + warn "retrieving info on $readme\n"; + my $info = qx{ LANG=C svn info $readme }; + + ## pull the interesting items + $info =~ m{Author: (\S+)} and $r->{$_}{author} = $1; + $info =~ m{Rev: (\S+)} and $r->{$_}{revision} = $1; + $info =~ m{Date: (\S+)} and $r->{$_}{date} = $1; +} keys %{ $r }; + + +## output info in csv format +print + map { "$_\n" } + map { my $n = $_; join ',' => + map { $r->{$n}{$_} || '' } + qw{ tag number author revision date } + } + sort keys %$r; + +# Local Variables: +# mode: cperl +# cperl-indent-level: 4 +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4: 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 Index: tools/release/inc_ver.pir =================================================================== --- tools/release/inc_ver.pir (.../trunk) (revision 0) +++ tools/release/inc_ver.pir (.../branches/tt677_toolsdirs) (revision 48648) @@ -0,0 +1,48 @@ +#!/usr/bin/env parrot +# Copyright (C) 2010, Parrot Foundation. +# $Id$ + +.sub 'main' :main + .local string version_file_name + version_file_name = 'VERSION' + + # read the version + $P0 = new 'FileHandle' + $P0.'open'( version_file_name, 'r' ) + $S0 = $P0.'readline'() + $P0.'close'() + + print 'version: ' + print $S0 + + # split the version + $P1 = split '.', $S0 + + # increment version + $I0 = $P1[1] + inc $I0 + if $I0 != 12 goto NOT_NILL + $I0 = $P1[0] + inc $I0 + $P1[0] = $I0 + $I0 = 0 +NOT_NILL: + $P1[1] = $I0 + + # join the incremented version + $S0 = join '.', $P1 + + print 'new version: ' + print $S0 + + # write the new version to the version_file + $P0.'open'( version_file_name, 'w' ) + $P0.'print'( $S0 ) + $P0.'close'() +.end + +# Local Variables: +# mode: pir +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4 ft=pir: 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 Index: tools/util/perltidy.conf =================================================================== --- tools/util/perltidy.conf (.../trunk) (revision 48639) +++ tools/util/perltidy.conf (.../branches/tt677_toolsdirs) (revision 48648) @@ -1,15 +0,0 @@ -# A declarative version of PDD07 for perl. - -# Must apply... - --l=100 # Source line width is limited to 100 characters. --i=4 # must be indented four columns (no tabs) --ola # Labels (including case labels) must be outdented two columns --ci=4 # Long lines, when split, must use at least one extra level of indentation on the continued line. --ce # Cuddled elses are forbidden: i.e. avoid } else { . - -# Nice to haves... - -# Freeze new lines; some really short lines look good the way they -# are, this should stop perltidy from merging them together --fnl Index: tools/util/perlcritic-cage.conf =================================================================== --- tools/util/perlcritic-cage.conf (.../trunk) (revision 48639) +++ tools/util/perlcritic-cage.conf (.../branches/tt677_toolsdirs) (revision 48648) @@ -1,37 +0,0 @@ -# A more stringent set of rules for cage cleaners - -[-CodeLayout::ProhibitParensWithBuiltins] -[CodeLayout::ProhibitHardTabs] -allow_leading_tabs = 0 - -[-CodeLayout::RequireTidyCode] - -[-ControlStructures::ProhibitPostfixControls] -[-ControlStructures::ProhibitUnlessBlocks] - -[-Documentation::PodSpelling] -[-Documentation::RequirePodAtEnd] -[-Documentation::RequirePodSections] - -[-ErrorHandling::RequireCarping] - -[-InputOutput::ProhibitBacktickOperators] -[-InputOutput::ProhibitInteractiveTest] -[-InputOutput::RequireCheckedSyscalls] -functions = :builtins -exclude_functions = print - -[-Miscellanea::RequireRcsKeywords] - -[-Modules::RequireVersionVar] - -[-RegularExpressions::ProhibitEscapedMetacharacters] -[-RegularExpressions::RequireDotMatchAnything] -[-RegularExpressions::RequireExtendedFormatting] -[-RegularExpressions::RequireLineBoundaryMatching] - -[-ValuesAndExpressions::ProhibitConstantPragma] -[-ValuesAndExpressions::ProhibitEmptyQuotes] -[-ValuesAndExpressions::ProhibitMagicNumbers] - -[-Variables::ProhibitPunctuationVars] Index: tools/util/crow.pir =================================================================== --- tools/util/crow.pir (.../trunk) (revision 48639) +++ tools/util/crow.pir (.../branches/tt677_toolsdirs) (revision 48648) @@ -1,107 +0,0 @@ -#! ./parrot -# Copyright (C) 2007-2008, Parrot Foundation. -# $Id$ - -=head1 TITLE - -crow.pir -- Make noise about the new Parrot release - -=head1 DESCRIPTION - -This utility is used to help Release Managers format announcement messages. -It uses a *very* simple and fast templating system, described in the related -module, L. - -=head1 SYNOPSIS - - # see - % parrot tools/util/crow.pir --help - -=cut - - -.sub 'main' :main - .param pmc args - - load_bytecode 'Crow.pbc' - - .local pmc exports, curr_namespace, test_namespace - curr_namespace = get_namespace - test_namespace = get_namespace ['Crow'] - exports = split ' ', 'get_news get_args process' - test_namespace.'export_to'(curr_namespace, exports) - - .local pmc opts - opts = get_args(args) - - unless null opts goto got_opts - opts = new 'Hash' - got_opts: - - .local pmc templates - templates = 'get_json'('tools/util/templates.json') - - .local string template, type - type = opts['type'] - if type != '' goto got_type - type = 'text' - -got_type: - template = 'get_template'(templates, type) - - .local pmc data - data = 'get_json'('tools/util/release.json') - - .local string version - version = data['release.version'] - - $S0 = concat type, '.news' - $I0 = templates[$S0] - if $I0 goto get_news - data['NEWS'] = '' - goto process - get_news: - $S0 = 'get_news'(version) - data['NEWS'] = $S0 - - - process: - .local string result - result = process(template, data) - say result -.end - - -.sub 'get_json' - .param string filename - - load_bytecode 'Config/JSON.pbc' - - .local pmc exports, curr_namespace, test_namespace - curr_namespace = get_namespace - test_namespace = get_namespace [ 'Config';'JSON' ] - exports = split ' ', 'ReadConfig' - test_namespace.'export_to'(curr_namespace, exports) - - .local pmc result - result = ReadConfig(filename) - - .return (result) -.end - - -.sub 'get_template' - .param pmc templates - .param string type - - $S0 = concat type, '.text' - $S1 = templates[$S0] - .return ($S1) -.end - - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: Index: tools/util/dump_pbc.pl =================================================================== --- tools/util/dump_pbc.pl (.../trunk) (revision 48639) +++ tools/util/dump_pbc.pl (.../branches/tt677_toolsdirs) (revision 48648) @@ -1,125 +0,0 @@ -#! perl - -# Copyright (C) 2008, Parrot Foundation. -# $Id$ - -=head1 NAME - -tools/util/dump_pbc.pl - Weave together PBC disassembly with PIR source - -=head1 SYNOPSIS - - perl tools/util/dump_pbc.pl foo.pbc - -=head1 DESCRIPTION - -dump_pbc.pl uses Parrot's F program to disassemble the opcodes -in a PBC (Parrot ByteCode) file, then weaves the disassembly together with -the original PIR source file(s). This makes it easier to see how the PIR -syntactic sugar is desugared into raw Parrot opcodes. - -=head1 BUGS - -This program has only been tested for a few simple cases. Also, the name -might suggest a different use than its actual purpose. - -While it is not a bug in F per se, there is a line numbering -bug for some PBC opcode sequences that will result in the disassembled -opcodes appearing just before the source lines they represent, rather -than just after. There does not appear to be consensus yet about where -this bug actually resides. - -=cut - -use strict; -use warnings; -use Cwd; -use FindBin; - -my ($PARROT_ROOT, $RUNTIME_DIR); -BEGIN { - $PARROT_ROOT = Cwd::abs_path("$FindBin::Bin/../.."); - $RUNTIME_DIR = "$PARROT_ROOT/runtime/parrot"; -} - -use lib "$PARROT_ROOT/lib"; -use Parrot::Config '%PConfig'; - -my $DISASSEMBLER = "$PConfig{build_dir}$PConfig{slash}pbc_disassemble$PConfig{exe}"; - -go(@ARGV); - -sub go { - my $pbc = shift; - - # The following mess brought to you by Win32, where pipe open doesn't work, - # and thus its greater security and cleaner error handling are unavailable. - - -f $pbc && -r _ - or die "PBC file '$pbc' does not exist or is not readable.\n"; - - -f $DISASSEMBLER && -x _ - or die "Can't find disassembler '$DISASSEMBLER';" - . "did you remember to make parrot first?\n"; - - my @dis = `$DISASSEMBLER $pbc`; - die "No disassembly; errors: $?, $!" unless @dis; - - my $cur_file = ''; - my $cur_line = -1; - my %cache; - - foreach (@dis) { - if (/^(?:# )?Current Source Filename (.*)/) { - my $found = $1; - $found =~ s/^'//; - $found =~ s/'$//; - if ($cur_file ne $found) { - $cur_file = $found; - $cache{$cur_file} ||= slurp_file($cur_file); - $cur_line = -1; - - print "\n#### $cur_file\n"; - } - } - elsif (my ($info, $seq, $pc, $line, $code) = /^((\d+)-(\d+) (\d+): )(.*)/) { - my $int_line = int $line; - my $len_line = length $line; - if ($cur_line != $int_line) { - $cur_line = 0 if $cur_line == -1; - print "\n"; - foreach my $i ($cur_line + 1 .. $int_line) { - my $source_code = $cache{$cur_file}[$i-1]; - # next unless $source_code =~ /\S/; - printf "# %*d: %s", $len_line, $i, $source_code; - print "\n" if $source_code =~ /^\.end/; - } - $cur_line = $int_line; - } - - print ' ' x ($len_line + 4), "$code\n"; - } - } -} - -sub slurp_file { - my $file = shift; - my $source; - - open $source, '<', $file - or open $source, '<', "$PARROT_ROOT/$file" - or open $source, '<', "$RUNTIME_DIR/$file" - or die "Could not open source file '$file': $!"; - - my @lines = <$source>; - - return \@lines; -} - - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: Index: tools/util/parrot-config.pir =================================================================== --- tools/util/parrot-config.pir (.../trunk) (revision 48639) +++ tools/util/parrot-config.pir (.../branches/tt677_toolsdirs) (revision 48648) @@ -1,103 +0,0 @@ -#!/usr/bin/env parrot -# $Id$ - -=head1 NAME - -config.pir - Print a Parrot configuration item - -=head1 VERSION - -version 0.01 - -=head1 SYNOPSIS - - ./parrot parrot-config.pir VERSION - ./parrot parrot-config.pir ccflags - ./parrot parrot-config.pir --dump - -=head1 DESCRIPTION - -Print out configuration items. - -=head1 AUTHOR - -Leopold Toetsch Elt@toetsch.atE. - -=head1 COPYRIGHT - -Copyright (C) 2004-2009, Parrot Foundation. - -=cut - -.sub _main :main - .param pmc argv - .local int argc - argc = argv - if argc < 2 goto usage - .local pmc interp, conf_hash - .local string key - .include "iglobals.pasm" - interp = getinterp - conf_hash = interp[.IGLOBALS_CONFIG_HASH] - .local int i - i = 1 -loop: - key = argv[i] - if key == '--help' goto usage - if key == '--dump' goto dump - $I0 = defined conf_hash[key] - unless $I0 goto failkey - dec argc - if i < argc goto dumpsome - $S0 = conf_hash[key] - print $S0 - inc i - if i < argc goto loop - print "\n" - end -dumpsome: - key = argv[i] - $I0 = defined conf_hash[key] - unless $I0 goto failkey - print key - print " => '" - $S1 = conf_hash[key] - print $S1 - say "'" - inc i - if i <= argc goto dumpsome - end -failkey: - print " no such key: '" - print key - print "'\n" - end -dump: - .local pmc iterator - iterator = iter conf_hash -iter_loop: - unless iterator goto iter_end - shift $S0, iterator - print $S0 - print " => '" - $S1 = conf_hash[$S0] - print $S1 - say "'" - goto iter_loop -iter_end: - end -usage: - $S0 = argv[0] - $P0 = getinterp - .include 'stdio.pasm' - $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO) - $P1.'print'($S0) - $P1.'print'(" [ [ ... ] | --dump | --help ]\n") - exit 1 -.end - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: Index: tools/util/perlcritic.conf =================================================================== --- tools/util/perlcritic.conf (.../trunk) (revision 48639) +++ tools/util/perlcritic.conf (.../branches/tt677_toolsdirs) (revision 48648) @@ -1,75 +0,0 @@ -verbose = 3 - -# not all the profiles listed here are installed by default, even if you have -# Perl::Critic. Shhhh. -profile-strictness = quiet - -[BuiltinFunctions::ProhibitStringySplit] -add_themes = parrot - -[CodeLayout::ProhibitDuplicateCoda] -add_themes = parrot - -[CodeLayout::ProhibitHardTabs] -allow_leading_tabs = 0 -add_themes = parrot - -[CodeLayout::ProhibitTrailingWhitespace] -add_themes = parrot - -[CodeLayout::RequireTidyCode] -perltidyrc = tools/util/perltidy.conf -add_themes = extra - -[CodeLayout::UseParrotCoda] -add_themes = parrot - -[InputOutput::ProhibitBarewordFileHandles] -add_themes = parrot - -[InputOutput::ProhibitTwoArgOpen] -add_themes = parrot - -[NamingConventions::ProhibitAmbiguousNames] -# remove abstract from the list of forbidden names -forbid = bases close contract last left no record right second set -add_themes = extra - -[Subroutines::ProhibitBuiltinHomonyms] -add_themes = extra - -[Subroutines::ProhibitExplicitReturnUndef] -add_themes = parrot - -[Subroutines::ProhibitSubroutinePrototypes] -add_themes = parrot - -[Subroutines::RequireFinalReturn] -add_themes = extra - -[TestingAndDebugging::MisplacedShebang] -add_themes = parrot - -[TestingAndDebugging::ProhibitShebangWarningsArg] -add_themes = parrot - -[TestingAndDebugging::RequirePortableShebang] -add_themes = parrot - -[TestingAndDebugging::RequireUseStrict] -add_themes = parrot - -[TestingAndDebugging::RequireUseWarnings] -add_themes = parrot - -[ValuesAndExpressions::ProhibitInterpolationOfLiterals] -add_themes = extra - -[Variables::ProhibitConditionalDeclarations] -add_themes = parrot - -[Bangs::ProhibitFlagComments] -add_themes = extra - -[Bangs::ProhibitRefProtoOrProto] -add_themes = extra Index: tools/util/update_copyright.pl =================================================================== --- tools/util/update_copyright.pl (.../trunk) (revision 48639) +++ tools/util/update_copyright.pl (.../branches/tt677_toolsdirs) (revision 48648) @@ -1,63 +0,0 @@ -#! perl -# $Id$ - -# Copyright (C) 2008, Parrot Foundation. - -use strict; -use warnings; -use Fatal qw( open close ); - -=head1 NAME - -F - -=head1 DESCRIPTION - -Given a list of files as command line arguments, update the copyright -notice to go from the earliest year noted to the current year. - -Edits the files in place. You should update the copyright on a modified -file before you commit it back to the repository. - -=cut - -use lib 'lib'; -use Parrot::Test; - -# Accept a little fuzz in the original copyright notice.. -my $copyright_re = qr/ - Copyright \s+ \(C\) \s+ - (\d\d\d\d)\s*(?:-\s*\d\d\d\d)? \s* ,? \s* - The \s+ Perl \s+ Foundation\.? -/xi; - -my $year = (localtime())[5]+1900; - -# loop over all the files specified on the command line -foreach my $file (@ARGV) { - my $contents = Parrot::Test::slurp_file( $file ); - if ( $contents =~ $copyright_re) { - my $old_year = $1; - if ($old_year eq $year) { - warn "$file already up to date.\n"; - next; - } - else { - $contents =~ s/$copyright_re/Copyright (C) $old_year-$year, Parrot Foundation./; - open my $ofh, '>', $file; - print {$ofh} $contents; - close $ofh; - } - } - else { - warn "$file doesn't have a valid copyright line.\n"; - } -} - - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: Index: tools/util/ncidef2pasm.pl =================================================================== --- tools/util/ncidef2pasm.pl (.../trunk) (revision 48639) +++ tools/util/ncidef2pasm.pl (.../branches/tt677_toolsdirs) (revision 48648) @@ -1,237 +0,0 @@ -#! perl - -# Copyright (C) 2003-2007, Parrot Foundation. -# $Id$ - -=head1 NAME - -tools/util/ncidef2asm.pl - Turn an NCI library definition file into PASM - -=head1 SYNOPSIS - - perl tools/util/ncidef2asm.pl path/to/from_file [ path/to/to_file ] - -=head1 DESCRIPTION - -This program takes an NCI library definition file and turns it into PASM. - -An NCI library definition file provides the information needed to -generate a parrot wrapper for the named library (or libraries). Its -format is simple, and looks like: - - [package] - ncurses - - [lib] - libform.so - - [defs] - p new_field i i i i i i - - [lib] - libncurses.so - - [defs] - i is_term_resized i i - -Note that the assembly file is generated in the order you specify, so -if there are library dependencies, make sure you have them in the -correct order. - -=head2 package - -Declares the package that all subsequent sub PMCs will be put -into. The name is a simple concatenation of the package name, double -colon, and the routine name, with no preceding punctuation. - -=head2 lib - -The name of the library to be loaded. Should be as qualified as -necessary for your platform--generally the full filename is required, -though the directory generally isn't. - -You may load multiple libraries here, but only the last one loaded -will be exposed to subsequent defs. - -=head2 defs - -This section holds the definitions of functions. Each function is -assumed to be in the immediate preceding library. The definition of -the function is: - - return_type name [param [param [param ...]]] - -The param and return_type parameters use the NCI standard, which for -reference is: - -=over 4 - -=item p - -Parameter is a void pointer, taken from the PMC's data pointer. PMC is -assumed to be an unmanagedstruct or child class. - -Taken from a P register - -=item c - -Parameter is a character. - -Taken from an I register - -=item s - -Parameter is a short - -Taken from an I register - -=item i - -Parameter is an int - -Taken from an I register - -=item l - -Parameter is a long - -Taken from an I register - -=item f - -Paramter is a float - -Taken from an N register. - -=item d - -Parameter is a double. - -Taken from an N register. - -=item t - -Paramter is a char *, presumably a C string - -Taken from an S register - -=item v - -Void. Only valid as a return type, noting that the function returns no data. - -=item I - -Interpreter pointer. The current interpreter pointer is passed in - -=item P - -PMC. - -=item 2 - -Pointer to short. - -Taken from an I register. - -=item 3 - -Pointer to int. - -Taken from an I register - -=item 4 - -Pointer to long - -Taken from an I register - -=back - -=cut - -use strict; -use warnings; - -my ( $from_file, $to_file ) = @ARGV; - -# If there is no destination file, strip off the extension of the -# source file and add a .pasm to it -if ( !defined $to_file ) { - $to_file = $from_file; - $to_file =~ s/\..*$//; - $to_file .= ".pasm"; -} - -open my $INPUT, '<', "$from_file" or die "Can't open up $from_file, error $!"; -open my $OUTPUT, '>', "$to_file" or die "Can't open up $to_file, error $!"; - -# To start, save all the registers, just in case -print $OUTPUT "saveall\n"; - -my @libs; -my ( $cur_package, $line, $cur_section ); - -# Our dispatch table -my (%dispatch) = ( - package => \&package_line, - lib => \&lib_line, - defs => \&def_line, -); - -while ( $line = <$INPUT> ) { - - # Throw away trailing newlines, comments, and whitespace. If the - # line's empty, then off to the next line - chomp $line; - $line =~ s/#.*//; - $line =~ s/\s*$//; - next unless $line; - - # Is it a section line? If so, extract the section and set it. - if ( $line =~ /\[(\w+)\]/ ) { - $cur_section = $1; - next; - } - - # Everything else goes to the handler - $dispatch{$cur_section}->($line); - -} - -# Put the registers back and end -print $OUTPUT "restoreall\n"; -print $OUTPUT "end\n"; -close $OUTPUT; - -sub package_line { - my $line = shift; - - # Trim leading and trailing spaces - $line =~ s/^\s*//; - $line =~ s/\s*$//; - - # Set the global current package - $cur_package = $line; - -} - -sub lib_line { - my $line = shift; - print $OUTPUT "loadlib P1, '$line'\n"; -} - -sub def_line { - my $line = shift; - my ( $return_type, $name, @params ) = split ' ', $line; - unshift @params, $return_type; - my $signature = join( "", @params ); - print $OUTPUT "dlfunc P2, P1, '$name', '$signature'\n"; - print $OUTPUT "store_global '${cur_package}::${name}', P2\n"; -} - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: Index: tools/util/templates.json =================================================================== --- tools/util/templates.json (.../trunk) (revision 48639) +++ tools/util/templates.json (.../branches/tt677_toolsdirs) (revision 48648) @@ -1,83 +0,0 @@ -{ - "text.news" : true, - "text.text" : " - -On behalf of the Parrot team, I'm proud to announce Parrot @release.version@ -\"@release.name@.\" Parrot (@web.root@) is a virtual machine aimed -at running all dynamic languages. - -Parrot @release.version@ is available on Parrot's FTP site, or follow the -download instructions at @web.root@@web.source@. For those who would like to -develop on Parrot, or help develop Parrot itself, we recommend using Subversion -on the source code repository to get the latest and best Parrot code. - -Parrot @release.version@ News: -@NEWS@ - -Many thanks to all our contributors for making this possible, and our sponsors -for supporting this project. Our next scheduled release is @release.nextdate@. - -Enjoy! - -", - - "html.news" : true, - "html.text" : " -

On behalf of the Parrot team, I'm proud to announce Parrot @release.version@ -"@release.name@." Parrot -is a virtual machine aimed at running all dynamic languages.

- -

Parrot @release.version@ is available on Parrot's FTP -site, or follow the download -instructions. For those who would like to develop on Parrot, or help -develop Parrot itself, we recommend using Subversion on our -source code repository to get the latest and best Parrot code.

- -

Parrot @release.version@ News:
-

@NEWS@

- -

Thanks to all our contributors for making this possible, and our sponsors -for supporting this project. Our next release is @release.nextdate@.

- -

Enjoy!

-", - - "bugday.news" : false, - "bugday.text" : " -Bug Day - -On @bugday.day@, @bugday.date@, please join us on IRC in #parrot -(irc.parrot.org) to work on closing out as many Trac tickets -(https://trac.parrot.org) tickets as possible in the parrot queue. This will -help us get ready for the next release of parrot: @release.version@, scheduled -for @release.day@, @release.date@. You'll find C, parrot assembly, perl, -documentation, and plenty of tasks to go around. Core developers will be -available most of the day (starting at around 10am GMT) to answer questions. - -No experience with parrot necessary. - ---From: @wiki.root@@wiki.bugday@-- - -Check the list at: - -https://trac.parrot.org/parrot/report/3 - -Which contains all the tickets I'd like to see resolved in @version@. To -see all the open tickets, use: - -https://trac.parrot.org/parrot/report - -If you've got something you're working on that you think you'll be -getting done before the release, please -- add a ticket for it (if necessary); -- set its milestone to this release. - -Thanks in advance for your patches and commits. ^_^ - -... Speaking of patches, we should also get through as many of these -(accept or reject) as possible. - -@web.root@@web.openpatches@ -" -} Index: tools/util/release.json =================================================================== --- tools/util/release.json (.../trunk) (revision 48639) +++ tools/util/release.json (.../branches/tt677_toolsdirs) (revision 48648) @@ -1,21 +0,0 @@ -{ - "release.version" : "2.7.0", - "release.name" : "Australian King", - "release.day" : "Tuesday", - "release.date" : "17 August 2010", - "release.nextdate" : "21 September 2010", - - "web.root" : "http://parrot.org/", - "web.source" : "download", - "web.openpatches" : "openpatches.html", - "web.repository" : "https://svn.parrot.org/parrot/trunk/", - - "bugday.day" : "Saturday", - "bugday.date" : "18 September 2010", - - "wiki.root" : "https://trac.parrot.org/parrot/wiki/", - "wiki.bugday" : "bug_day_2010_09_18", - - "ftp.path" : "ftp://ftp.parrot.org/pub/parrot/releases/devel/2.7.0/", - "subversion.root" : "http://subversion.apache.org/" -} Index: tools/util/pgegrep =================================================================== --- tools/util/pgegrep (.../trunk) (revision 48639) +++ tools/util/pgegrep (.../branches/tt677_toolsdirs) (revision 48648) @@ -1,308 +0,0 @@ -#! parrot - -=head1 NAME - -pgegrep - A simple grep using PGE for matching - -=head1 SYNOPSIS - -B [I] B [I] - -=head1 DESCRIPTION - -pgegrep aims to be a small and easy to use program in replacement of the -standard grep utility. Regex support is whatever PGE will allow. It -searches through files line by line and tests if the given pattern matches. - -=head1 OPTIONS - -=over 4 - -=item -v - -=item --invert-match - -print lines not matching PATTERN - -=item -V - -=item --version - -print the version and exit - -=item --help - -show this help and exit - -=item -r - -=item --recursive - -recursively descend into directories - -=item -L - -=item --files-without-matches - -print a list of files that do not match PATTERN - -=item -l - -=item --files-with-matches - -print a list of files that do match PATTERN - -=item -a - -=item --text - -treat binary files as text. - -This uses a basic heuristic to discover if a file is binary or not. Files are -read line by line, and it keeps processing "normally" until a control character -is found, and then stops and goes onto the next file is that line matches. - -=item -n - -=item --line-number - -print the line number for each match - -=item -H - -=item --with-filename - -print the filename for each match - -=back - -=cut - -# Readability improved! -.include 'hllmacros.pir' - -# for getstdin and friends -.loadlib 'io_ops' - -.sub main :main - .param pmc argv # the script name, then our options. - .local string progname - progname = shift argv - load_bytecode 'Getopt/Obj.pbc' - load_bytecode 'PGE.pbc' - .local pmc getopts - getopts = new [ 'Getopt';'Obj' ] - getopts.'notOptStop'(1) - push getopts, 'with-filename|H' - push getopts, 'files-with-matches|l' - push getopts, 'files-without-matches|L' - push getopts, 'line-number|n' - push getopts, 'text|a' - push getopts, 'recursive|r' - push getopts, 'invert-match|v' - push getopts, 'version|V' - push getopts, 'help' - push_eh handler - .local pmc opts - opts = getopts.'get_options'(argv) - $I0 = defined opts['help'] - .If($I0, { - showhelp() - }) - $I0 = defined opts['version'] - .If($I0, { - showversion() - }) - - .local int argc - argc = elements argv - .Unless(argc>1, { showhelp() }) # need rule and at least one file - - .local string rule - .local pmc p6rule_compile, matchsub - rule = shift argv - p6rule_compile = compreg 'PGE::Perl6Regex' - matchsub = p6rule_compile(rule) - .If(null matchsub, { die 'Unable to compile regex' }) - - .local int i, filecount - .local string filename - .local pmc File, OS, files, handle - files = new 'ResizableStringArray' - files = argv - filecount = files - # define with-filename if there's more than one file - .If(filecount >= 2, { opts['with-filename'] = 1 }) - $P0 = loadlib 'file' - File = new 'File' - $P0 = loadlib 'os' - OS = new 'OS' - # This must be here, or else it'll get filled with junk data we use stdin... - i = 0 - - .Unless(filecount, { - # no args, use stdin - stdindashhack: - handle = getstdin - filename = '(standard input)' - goto stdinhack - }) - .For(, i < filecount, inc i, { - filename = files[i] - .If(filename == '-', { - goto stdindashhack - }) - $I1 = File.'is_file'(filename) - .IfElse($I1, { - # Is a file - handle = open filename, 'r' - },{ - # Not a file, hopefully a directory - $I1 = File.'is_dir'(filename) - $I0 = defined opts['recursive'] - $I1 &= $I0 - .Unless($I1, { - printerr "pgegrep: '" - printerr filename - printerr "': Operation not supported.\n" - goto nextfor_0 - }) - $P0 = OS.'readdir'(filename) - .Foreach($S0, $P0, { - .If($S0 != '.', { - .If($S0 != '..', { - $S1 = filename . '/' - $S0 = $S1 . $S0 - $P1 = new 'ResizableStringArray' - $P1[0] = $S0 - $I0 = i + 1 - splice files, $P1, $I0, 0 - }) }) - }) - filecount = files - goto nextfor_0 - }) - stdinhack: - checkfile(handle, filename, matchsub, opts) - close handle - nextfor_0: - }) - - end -handler: - .local pmc exception, pmcmsg - .local string message - .get_results (exception) - pmcmsg = getattribute exception, 'message' - pop_eh - message = pmcmsg - message = "pgegrep: " . message - die message -.end - -.sub checkfile - .param pmc handle - .param string filename - .param pmc matchsub - .param pmc opts - - .local pmc match - .local string line - .local int lineno, linelen, matched - lineno = 1 - matched = 0 # Only used for --files-without-matches - line = readline handle - linelen = length line - - .local pmc p6rule_compile, cntrlchar - $S0 = '<+cntrl-[\t\r\n]>' - p6rule_compile = compreg 'PGE::Perl6Regex' - cntrlchar = p6rule_compile($S0) - - .For(, linelen, { - line = readline handle - linelen = length line - inc lineno - }, { - match = matchsub(line) - $I1 = istrue match - match = cntrlchar(line) - - $I2 = istrue match - $I0 = defined opts['files-without-matches'] - .If($I0, { - .If($I1, { matched = 1 }) - goto next - }) - $I0 = defined opts['files-with-matches'] - $I0 = $I0 && $I1 - .If($I0, { - say filename - .return() - }) - - $I0 = defined opts['invert-match'] - not $I0 - $I1 = xor $I1, $I0 - .Unless($I1, { - $I0 = defined opts['text'] - $I0 = xor $I0, $I2 - .If($I0, { - print 'Binary file ' - print filename - say ' matches' - .return() - }) - $I0 = defined opts['with-filename'] - $I1 = defined opts['recursive'] - $I0 = $I0 || $I1 - .If($I0, { - print filename - print ':' - }) - $I0 = defined opts['line-number'] - .If($I0, { - print lineno - print ':' - }) - print line - }) - #--------- - next: - }) - $I0 = defined opts['files-without-matches'] - .If($I0, { say filename }) - .return() -.end - -.sub showhelp - print <<'HELP' -Usage: pgegrep [OPTIONS] PATTERN [FILE...] -Search for the Perl 6 Rule PATTERN in each file. - - -v --invert-match print lines not matching PATTERN - -V --version print the version and exit - --help show this help and exit - -r --recursive recursively descend into directories - -L --files-without-matches print a list of files that do not match PATTERN - -l --files-with-matches print a list of files that do match PATTERN - -a --text treat binary files as text - -n --line-number print the line number for each match - -H --with-filename print the filename for each match - -HELP - end -.end - -.sub showversion - print <<'VERSION' -pgegrep v0.0.1 -VERSION - end -.end - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: Index: tools/util/gen_release_info.pl =================================================================== --- tools/util/gen_release_info.pl (.../trunk) (revision 48639) +++ tools/util/gen_release_info.pl (.../branches/tt677_toolsdirs) (revision 48648) @@ -1,63 +0,0 @@ -#! perl -# Copyright (C) 2008, Parrot Foundation. -# $Id$ - -use strict; -use warnings; - -=head1 NAME - -tools/util/gen_release_info.pl - generate release info for graphs and charts - -=head1 DESCRIPTION - -This utility generates release information from subversion in csv format, -suitable for graphs, charts, and reports. - -=cut - - -my $repo_url = 'https://svn.parrot.org/parrot/tags'; - -## create a release information data structure -my $r = { - map { $_->{number} => $_ } - map { m{^(RELEASE_)(.*)/} - ? { - tag => "$1$2", - number => sub{$a = shift; $a =~ y/_/./; $a }->($2), - } - : () - } - qx { svn ls $repo_url } -}; - -## gather interesting release-related information from the tag -map { - ## ask subversion for info about the tag - my $readme = $repo_url . '/' . $r->{$_}{tag}; - warn "retrieving info on $readme\n"; - my $info = qx{ LANG=C svn info $readme }; - - ## pull the interesting items - $info =~ m{Author: (\S+)} and $r->{$_}{author} = $1; - $info =~ m{Rev: (\S+)} and $r->{$_}{revision} = $1; - $info =~ m{Date: (\S+)} and $r->{$_}{date} = $1; -} keys %{ $r }; - - -## output info in csv format -print - map { "$_\n" } - map { my $n = $_; join ',' => - map { $r->{$n}{$_} || '' } - qw{ tag number author revision date } - } - sort keys %$r; - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: Index: tools/util/inc_ver.pir =================================================================== --- tools/util/inc_ver.pir (.../trunk) (revision 48639) +++ tools/util/inc_ver.pir (.../branches/tt677_toolsdirs) (revision 48648) @@ -1,48 +0,0 @@ -#!/usr/bin/env parrot -# Copyright (C) 2010, Parrot Foundation. -# $Id$ - -.sub 'main' :main - .local string version_file_name - version_file_name = 'VERSION' - - # read the version - $P0 = new 'FileHandle' - $P0.'open'( version_file_name, 'r' ) - $S0 = $P0.'readline'() - $P0.'close'() - - print 'version: ' - print $S0 - - # split the version - $P1 = split '.', $S0 - - # increment version - $I0 = $P1[1] - inc $I0 - if $I0 != 12 goto NOT_NILL - $I0 = $P1[0] - inc $I0 - $P1[0] = $I0 - $I0 = 0 -NOT_NILL: - $P1[1] = $I0 - - # join the incremented version - $S0 = join '.', $P1 - - print 'new version: ' - print $S0 - - # write the new version to the version_file - $P0.'open'( version_file_name, 'w' ) - $P0.'print'( $S0 ) - $P0.'close'() -.end - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: Index: tools/dev/perltidy.conf =================================================================== --- tools/dev/perltidy.conf (.../trunk) (revision 0) +++ tools/dev/perltidy.conf (.../branches/tt677_toolsdirs) (revision 48648) @@ -0,0 +1,15 @@ +# A declarative version of PDD07 for perl. + +# Must apply... + +-l=100 # Source line width is limited to 100 characters. +-i=4 # must be indented four columns (no tabs) +-ola # Labels (including case labels) must be outdented two columns +-ci=4 # Long lines, when split, must use at least one extra level of indentation on the continued line. +-ce # Cuddled elses are forbidden: i.e. avoid } else { . + +# Nice to haves... + +# Freeze new lines; some really short lines look good the way they +# are, this should stop perltidy from merging them together +-fnl 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 Index: tools/dev/update_copyright.pl =================================================================== --- tools/dev/update_copyright.pl (.../trunk) (revision 0) +++ tools/dev/update_copyright.pl (.../branches/tt677_toolsdirs) (revision 48648) @@ -0,0 +1,63 @@ +#! perl +# $Id$ + +# Copyright (C) 2008, Parrot Foundation. + +use strict; +use warnings; +use Fatal qw( open close ); + +=head1 NAME + +F + +=head1 DESCRIPTION + +Given a list of files as command line arguments, update the copyright +notice to go from the earliest year noted to the current year. + +Edits the files in place. You should update the copyright on a modified +file before you commit it back to the repository. + +=cut + +use lib 'lib'; +use Parrot::Test; + +# Accept a little fuzz in the original copyright notice.. +my $copyright_re = qr/ + Copyright \s+ \(C\) \s+ + (\d\d\d\d)\s*(?:-\s*\d\d\d\d)? \s* ,? \s* + The \s+ Perl \s+ Foundation\.? +/xi; + +my $year = (localtime())[5]+1900; + +# loop over all the files specified on the command line +foreach my $file (@ARGV) { + my $contents = Parrot::Test::slurp_file( $file ); + if ( $contents =~ $copyright_re) { + my $old_year = $1; + if ($old_year eq $year) { + warn "$file already up to date.\n"; + next; + } + else { + $contents =~ s/$copyright_re/Copyright (C) $old_year-$year, Parrot Foundation./; + open my $ofh, '>', $file; + print {$ofh} $contents; + close $ofh; + } + } + else { + warn "$file doesn't have a valid copyright line.\n"; + } +} + + +# Local Variables: +# mode: cperl +# cperl-indent-level: 4 +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4: 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 Index: tools/dev/pgegrep =================================================================== --- tools/dev/pgegrep (.../trunk) (revision 0) +++ tools/dev/pgegrep (.../branches/tt677_toolsdirs) (revision 48648) @@ -0,0 +1,308 @@ +#! parrot + +=head1 NAME + +pgegrep - A simple grep using PGE for matching + +=head1 SYNOPSIS + +B [I] B [I] + +=head1 DESCRIPTION + +pgegrep aims to be a small and easy to use program in replacement of the +standard grep utility. Regex support is whatever PGE will allow. It +searches through files line by line and tests if the given pattern matches. + +=head1 OPTIONS + +=over 4 + +=item -v + +=item --invert-match + +print lines not matching PATTERN + +=item -V + +=item --version + +print the version and exit + +=item --help + +show this help and exit + +=item -r + +=item --recursive + +recursively descend into directories + +=item -L + +=item --files-without-matches + +print a list of files that do not match PATTERN + +=item -l + +=item --files-with-matches + +print a list of files that do match PATTERN + +=item -a + +=item --text + +treat binary files as text. + +This uses a basic heuristic to discover if a file is binary or not. Files are +read line by line, and it keeps processing "normally" until a control character +is found, and then stops and goes onto the next file is that line matches. + +=item -n + +=item --line-number + +print the line number for each match + +=item -H + +=item --with-filename + +print the filename for each match + +=back + +=cut + +# Readability improved! +.include 'hllmacros.pir' + +# for getstdin and friends +.loadlib 'io_ops' + +.sub main :main + .param pmc argv # the script name, then our options. + .local string progname + progname = shift argv + load_bytecode 'Getopt/Obj.pbc' + load_bytecode 'PGE.pbc' + .local pmc getopts + getopts = new [ 'Getopt';'Obj' ] + getopts.'notOptStop'(1) + push getopts, 'with-filename|H' + push getopts, 'files-with-matches|l' + push getopts, 'files-without-matches|L' + push getopts, 'line-number|n' + push getopts, 'text|a' + push getopts, 'recursive|r' + push getopts, 'invert-match|v' + push getopts, 'version|V' + push getopts, 'help' + push_eh handler + .local pmc opts + opts = getopts.'get_options'(argv) + $I0 = defined opts['help'] + .If($I0, { + showhelp() + }) + $I0 = defined opts['version'] + .If($I0, { + showversion() + }) + + .local int argc + argc = elements argv + .Unless(argc>1, { showhelp() }) # need rule and at least one file + + .local string rule + .local pmc p6rule_compile, matchsub + rule = shift argv + p6rule_compile = compreg 'PGE::Perl6Regex' + matchsub = p6rule_compile(rule) + .If(null matchsub, { die 'Unable to compile regex' }) + + .local int i, filecount + .local string filename + .local pmc File, OS, files, handle + files = new 'ResizableStringArray' + files = argv + filecount = files + # define with-filename if there's more than one file + .If(filecount >= 2, { opts['with-filename'] = 1 }) + $P0 = loadlib 'file' + File = new 'File' + $P0 = loadlib 'os' + OS = new 'OS' + # This must be here, or else it'll get filled with junk data we use stdin... + i = 0 + + .Unless(filecount, { + # no args, use stdin + stdindashhack: + handle = getstdin + filename = '(standard input)' + goto stdinhack + }) + .For(, i < filecount, inc i, { + filename = files[i] + .If(filename == '-', { + goto stdindashhack + }) + $I1 = File.'is_file'(filename) + .IfElse($I1, { + # Is a file + handle = open filename, 'r' + },{ + # Not a file, hopefully a directory + $I1 = File.'is_dir'(filename) + $I0 = defined opts['recursive'] + $I1 &= $I0 + .Unless($I1, { + printerr "pgegrep: '" + printerr filename + printerr "': Operation not supported.\n" + goto nextfor_0 + }) + $P0 = OS.'readdir'(filename) + .Foreach($S0, $P0, { + .If($S0 != '.', { + .If($S0 != '..', { + $S1 = filename . '/' + $S0 = $S1 . $S0 + $P1 = new 'ResizableStringArray' + $P1[0] = $S0 + $I0 = i + 1 + splice files, $P1, $I0, 0 + }) }) + }) + filecount = files + goto nextfor_0 + }) + stdinhack: + checkfile(handle, filename, matchsub, opts) + close handle + nextfor_0: + }) + + end +handler: + .local pmc exception, pmcmsg + .local string message + .get_results (exception) + pmcmsg = getattribute exception, 'message' + pop_eh + message = pmcmsg + message = "pgegrep: " . message + die message +.end + +.sub checkfile + .param pmc handle + .param string filename + .param pmc matchsub + .param pmc opts + + .local pmc match + .local string line + .local int lineno, linelen, matched + lineno = 1 + matched = 0 # Only used for --files-without-matches + line = readline handle + linelen = length line + + .local pmc p6rule_compile, cntrlchar + $S0 = '<+cntrl-[\t\r\n]>' + p6rule_compile = compreg 'PGE::Perl6Regex' + cntrlchar = p6rule_compile($S0) + + .For(, linelen, { + line = readline handle + linelen = length line + inc lineno + }, { + match = matchsub(line) + $I1 = istrue match + match = cntrlchar(line) + + $I2 = istrue match + $I0 = defined opts['files-without-matches'] + .If($I0, { + .If($I1, { matched = 1 }) + goto next + }) + $I0 = defined opts['files-with-matches'] + $I0 = $I0 && $I1 + .If($I0, { + say filename + .return() + }) + + $I0 = defined opts['invert-match'] + not $I0 + $I1 = xor $I1, $I0 + .Unless($I1, { + $I0 = defined opts['text'] + $I0 = xor $I0, $I2 + .If($I0, { + print 'Binary file ' + print filename + say ' matches' + .return() + }) + $I0 = defined opts['with-filename'] + $I1 = defined opts['recursive'] + $I0 = $I0 || $I1 + .If($I0, { + print filename + print ':' + }) + $I0 = defined opts['line-number'] + .If($I0, { + print lineno + print ':' + }) + print line + }) + #--------- + next: + }) + $I0 = defined opts['files-without-matches'] + .If($I0, { say filename }) + .return() +.end + +.sub showhelp + print <<'HELP' +Usage: pgegrep [OPTIONS] PATTERN [FILE...] +Search for the Perl 6 Rule PATTERN in each file. + + -v --invert-match print lines not matching PATTERN + -V --version print the version and exit + --help show this help and exit + -r --recursive recursively descend into directories + -L --files-without-matches print a list of files that do not match PATTERN + -l --files-with-matches print a list of files that do match PATTERN + -a --text treat binary files as text + -n --line-number print the line number for each match + -H --with-filename print the filename for each match + +HELP + end +.end + +.sub showversion + print <<'VERSION' +pgegrep v0.0.1 +VERSION + end +.end + +# Local Variables: +# mode: pir +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4 ft=pir: 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 Index: tools/dev/headerizer.pl =================================================================== --- tools/dev/headerizer.pl (.../trunk) (revision 0) +++ tools/dev/headerizer.pl (.../branches/tt677_toolsdirs) (revision 48648) @@ -0,0 +1,464 @@ +#! perl +# Copyright (C) 2001-2010, Parrot Foundation. +# $Id$ + +=head1 NAME + +tools/dev/headerizer.pl - Generates the function header parts of .h +files from .c files + +=head1 SYNOPSIS + + $ perl tools/dev/headerizer.pl [object files] + +Generates C function declarations based on the function definitions in +the C source code. + +=head1 DESCRIPTION + +The headerizer works off of directives in the source and header files. + +One source file's public declarations can only go into one header file. +However, one header file can have declarations from multiple source files. +In other words, headers-to-source is one-to-many. + +=over 4 + +=item C F / C F + +Marks the beginning and end of a block of declarations in a header file. + + # In file foo.h + /* HEADERIZER BEGIN: src/foo.c */ + /* HEADERIZER END: src/foo.c */ + + /* HEADERIZER BEGIN: src/bar.c */ + /* HEADERIZER END: src/bar.c */ + +=item C F + +Tells the headerizer where the declarations for the functions should go + + # In file foo.c + /* HEADERIZER HFILE: foo.h */ + + # In file bar.c + /* HEADERIZER HFILE: foo.h */ + +=back + +=head1 COMMAND-LINE OPTIONS + +=over 4 + +=item C<--macro=X> + +Print a list of all functions that have macro X. For example, --macro=PARROT_EXPORT. + +=back + +=cut + +use strict; +use warnings; + +use Getopt::Long; +use lib qw( lib ); +use Parrot::Config; +use Parrot::Headerizer; + +my $headerizer = Parrot::Headerizer->new; + +main(); + +=head1 FUNCTIONS + +=head2 extract_function_declaration_and_update_source( $cfile_name ) + +Extract all the function declarations from the C file specified by +I<$cfile_name>, and update the comment blocks within. + +=cut + +sub extract_function_declarations_and_update_source { + my $cfile_name = shift; + + open( my $fhin, '<', $cfile_name ) or die "Can't open $cfile_name: $!"; + my $text = join( '', <$fhin> ); + close $fhin; + + my @func_declarations = $headerizer->extract_function_declarations( $text ); + for my $decl ( @func_declarations ) { + my $specs = $headerizer->function_components_from_declaration( $cfile_name, $decl ); + my $name = $specs->{name}; + + my $heading = $headerizer->generate_documentation_signature($decl); + + $text =~ s/=item C<[^>]*\b$name\b[^>]*>\n+/$heading\n\n/sm or do { + warn "$cfile_name: $name has no POD\n" unless $name =~ /^yy/; # lexer funcs don't have to have POD + } + } + open( my $fhout, '>', $cfile_name ) or die "Can't create $cfile_name: $!"; + print {$fhout} $text; + close $fhout; + + return @func_declarations; +} + + +sub attrs_from_args { + my $func = shift; + my @args = @_; + + my @attrs = (); + my @mods = (); + + my $name = $func->{name}; + my $file = $func->{file}; + my $n = 0; + for my $arg (@args) { + ++$n; + if ( $arg =~ m{ARG(?:MOD|OUT)(?:_NULLOK)?\((.+?)\)} ) { + my $modified = $1; + if ( $modified =~ s/.*\*/*/ ) { + # We're OK + } + else { + $modified =~ s/.* (\w+)$/$1/ or die qq{Unable to figure out the modified parm out of "$modified"}; + } + push( @mods, "FUNC_MODIFIES($modified)" ); + } + if ( $arg =~ m{(ARGIN|ARGOUT|ARGMOD|ARGFREE_NOTNULL|NOTNULL)\(} || $arg eq 'PARROT_INTERP' ) { + push( @attrs, "__attribute__nonnull__($n)" ); + } + if ( ( $arg =~ m{\*} ) && ( $arg !~ /\b(SHIM|((ARGIN|ARGOUT|ARGMOD)(_NULLOK)?)|ARGFREE(_NOTNULL)?)\b/ ) ) { + if ( $name !~ /^yy/ ) { # Don't complain about the lexer auto-generated funcs + $headerizer->squawk( $file, $name, qq{"$arg" isn't protected with an ARGIN, ARGOUT or ARGMOD (or a _NULLOK variant), or ARGFREE} ); + } + } + if ( ($arg =~ /\bconst\b/) && ($arg =~ /\*/) && ($arg !~ /\*\*/) && ($arg =~ /\b(ARG(MOD|OUT))\b/) ) { + $headerizer->squawk( $file, $name, qq{"$arg" is const, but that $1 conflicts with const} ); + } + } + + return (@attrs,@mods); +} + +sub asserts_from_args { + my @args = @_; + my @asserts; + + for my $arg (@args) { + if ( $arg =~ m{(ARGIN|ARGOUT|ARGMOD|ARGFREE_NOTNULL|NOTNULL)\((.+)\)} ) { + my $var = $2; + if($var =~ /\(*\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\)\s*\(/) { + # argument is a function pointer + $var = $1; + } + else { + # try to isolate the variable's name; + # strip off everything before the final space or asterisk. + $var =~ s{.+[* ]([^* ]+)$}{$1}; + # strip off a trailing "[]", if any. + $var =~ s{\[\]$}{}; + } + push( @asserts, "PARROT_ASSERT_ARG($var)" ); + } + if( $arg eq 'PARROT_INTERP' ) { + push( @asserts, "PARROT_ASSERT_ARG(interp)" ); + } + } + + return (@asserts); +} + +sub make_function_decls { + my @funcs = @_; + + my @decls; + foreach my $func (@funcs) { + my $multiline = 0; + + my $return = $func->{return_type}; + my $alt_void = ' '; + + # Splint can't handle /*@alt void@*/ on pointers, although this page + # http://www.mail-archive.com/lclint-interest@virginia.edu/msg00139.html + # seems to say that we can. + if ( $func->{is_ignorable} && ($return !~ /\*/) ) { + $alt_void = " /*\@alt void@*/\n"; + } + + my $decl = sprintf( "%s%s%s(", $return, $alt_void, $func->{name} ); + $decl = "static $decl" if $func->{is_static}; + + my @args = @{ $func->{args} }; + my @attrs = attrs_from_args( $func, @args ); + + for my $arg (@args) { + if ( $arg =~ m{SHIM\((.+)\)} ) { + $arg = $1; + if ( $func->{is_static} || ( $arg =~ /\*/ ) ) { + $arg = "SHIM($arg)"; + } + else { + $arg = "NULLOK($arg)"; + } + } + } + + my $argline = join( ", ", @args ); + if ( length( $decl . $argline ) <= 75 ) { + $decl = "$decl$argline)"; + } + else { + if ( $args[0] =~ /^((SHIM|PARROT)_INTERP|Interp)\b/ ) { + $decl .= ( shift @args ); + $decl .= "," if @args; + } + $argline = join( ",", map { "\n\t$_" } @args ); + $decl = "$decl$argline)"; + $multiline = 1; + } + + my $attrs = join( "", map { "\n\t\t$_" } @attrs ); + if ($attrs) { + $decl .= $attrs; + $multiline = 1; + } + my @macros = @{ $func->{macros} }; + $multiline = 1 if @macros; + + $decl .= $multiline ? ";\n" : ";"; + $decl = join( "\n", @macros, $decl ); + $decl =~ s/\t/ /g; + push( @decls, $decl ); + } + + foreach my $func (@funcs) { + my @args = @{ $func->{args} }; + my @asserts = asserts_from_args( @args ); + + my $assert = "#define ASSERT_ARGS_" . $func->{name}; + if(length($func->{name}) > 29) { + $assert .= " \\\n "; + } + $assert .= " __attribute__unused__ int _ASSERT_ARGS_CHECK = ("; + if(@asserts) { + $assert .= "\\\n "; + $assert .= join(" \\\n , ", @asserts); + } + else { + $assert .= "0"; + } + $assert .= ")"; + push(@decls, $assert); + } + + return @decls; +} + +sub read_file { + my $filename = shift; + + open my $fh, '<', $filename or die "couldn't read '$filename': $!"; + my $text = do { local $/ = undef; <$fh> }; + close $fh; + + return $text; +} + +sub write_file { + my $filename = shift; + my $text = shift; + + open my $fh, '>', $filename or die "couldn't write '$filename': $!"; + print {$fh} $text; + close $fh; +} + +sub replace_headerized_declarations { + my $source_code = shift; + my $sourcefile = shift; + my $hfile = shift; + my @funcs = @_; + + # Allow a way to not headerize statics + if ( $source_code =~ m{/\*\s*HEADERIZER NONE:\s*$sourcefile\s*\*/} ) { + return $source_code; + } + + @funcs = sort api_first_then_alpha @funcs; + + my @function_decls = make_function_decls(@funcs); + + my $function_decls = join( "\n", @function_decls ); + my $STARTMARKER = qr{/\* HEADERIZER BEGIN: $sourcefile \*/\n}; + my $ENDMARKER = qr{/\* HEADERIZER END: $sourcefile \*/\n?}; + my $DO_NOT_TOUCH = q{/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */}; + + $source_code =~ + s{($STARTMARKER)(?:.*?)($ENDMARKER)} + {$1$DO_NOT_TOUCH\n\n$function_decls\n$DO_NOT_TOUCH\n$2}s + or die "Need begin/end HEADERIZER markers for $sourcefile in $hfile\n"; + + return $source_code; +} + +sub api_first_then_alpha { + return ( ( $b->{is_api} || 0 ) <=> ( $a->{is_api} || 0 ) ) + || ( lc $a->{name} cmp lc $b->{name} ); +} + +sub main { + my $macro_match; + GetOptions( + 'macro=s' => \$macro_match, + ) or exit(1); + + die 'No files specified.' unless @ARGV; + my %ofiles; + ++$ofiles{$_} for @ARGV; + my @ofiles = sort keys %ofiles; + for (@ofiles) { + print "$_ is specified more than once.\n" if $ofiles{$_} > 1; + } + my %sourcefiles; + my %sourcefiles_with_statics; + my %api; + + # Walk the object files and find corresponding source (either .c or .pmc) + for my $ofile (@ofiles) { + next if $ofile =~ m/^\Qsrc$PConfig{slash}ops\E/; + + $ofile =~ s/\\/\//g; + + my $is_yacc = ($ofile =~ /\.y$/); + if ( !$is_yacc ) { + my $sfile = $ofile; + $sfile =~ s/\Q$PConfig{o}\E$/.s/; + next if -f $sfile; + } + + my $cfile = $ofile; + $cfile =~ s/\Q$PConfig{o}\E$/.c/ or $is_yacc + or die "$cfile doesn't look like an object file"; + + my $pmcfile = $ofile; + $pmcfile =~ s/\Q$PConfig{o}\E$/.pmc/; + + my $from_pmc = -f $pmcfile && !$is_yacc; + + my $sourcefile = $from_pmc ? $pmcfile : $cfile; + + my $source_code = read_file( $sourcefile ); + die qq{can't find HEADERIZER HFILE directive in "$sourcefile"} + unless $source_code =~ + m{ /\* \s+ HEADERIZER\ HFILE: \s+ ([^*]+?) \s+ \*/ }sx; + + my $hfile = $1; + if ( ( $hfile ne 'none' ) && ( not -f $hfile ) ) { + die qq{"$hfile" not found (referenced from "$sourcefile")}; + } + + my @decls; + if ( $macro_match ) { + @decls = $headerizer->extract_function_declarations( $source_code ); + } + else { + @decls = extract_function_declarations_and_update_source( $sourcefile ); + } + + for my $decl (@decls) { + my $components = $headerizer->function_components_from_declaration( $sourcefile, $decl ); + push( @{ $sourcefiles{$hfile}->{$sourcefile} }, $components ) unless $hfile eq 'none'; + push( @{ $sourcefiles_with_statics{$sourcefile} }, $components ) if $components->{is_static}; + if ( $macro_match ) { + if ( grep { $_ eq $macro_match } @{$components->{macros}} ) { + push( @{ $api{$sourcefile} }, $components ); + } + } + } + } # for @cfiles + + if ( $macro_match ) { + my $nfuncs = 0; + for my $cfile ( sort keys %api ) { + my @funcs = sort { $a->{name} cmp $b->{name} } @{$api{$cfile}}; + print "$cfile\n"; + for my $func ( @funcs ) { + print " $func->{name}\n"; + ++$nfuncs; + } + } + my $s = $nfuncs == 1 ? '' : 's'; + print "$nfuncs $macro_match function$s\n"; + } + else { # Normal headerization and updating + # Update all the .h files + for my $hfile ( sort keys %sourcefiles ) { + my $sourcefiles = $sourcefiles{$hfile}; + + my $header = read_file($hfile); + + for my $cfile ( sort keys %{$sourcefiles} ) { + my @funcs = @{ $sourcefiles->{$cfile} }; + @funcs = grep { not $_->{is_static} } @funcs; # skip statics + + $header = replace_headerized_declarations( $header, $cfile, $hfile, @funcs ); + } + + write_file( $hfile, $header ); + } + + # Update all the .c files in place + for my $cfile ( sort keys %sourcefiles_with_statics ) { + my @funcs = @{ $sourcefiles_with_statics{$cfile} }; + @funcs = grep { $_->{is_static} } @funcs; + + my $source = read_file($cfile); + $source = replace_headerized_declarations( $source, 'static', $cfile, @funcs ); + + write_file( $cfile, $source ); + } + print "Headerization complete.\n"; + } + + my %warnings = %{$headerizer->{warnings}}; + if ( keys %warnings ) { + my $nwarnings = 0; + my $nwarningfuncs = 0; + my $nwarningfiles = 0; + for my $file ( sort keys %warnings ) { + ++$nwarningfiles; + print "$file\n"; + my $funcs = $warnings{$file}; + for my $func ( sort keys %{$funcs} ) { + ++$nwarningfuncs; + for my $error ( @{ $funcs->{$func} } ) { + print " $func: $error\n"; + ++$nwarnings; + } + } + } + + print "$nwarnings warnings in $nwarningfuncs funcs in $nwarningfiles C files\n"; + } + + return; +} + +# From earlier documentation: +# * Generate docs from funcs +# * Somehow handle static functions in the source file +# * the .c files MUST have a /* HEADERIZER HFILE: foo/bar.h */ directive in them +# * Support for multiple .c files pointing at the same .h file +# * Does NOT remove all blocks in the .h file, so if a .c file +# disappears, its block is "orphaned" and will remain there. + +# Local Variables: +# mode: cperl +# cperl-indent-level: 4 +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4: 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 Index: tools/dev/dump_pbc.pl =================================================================== --- tools/dev/dump_pbc.pl (.../trunk) (revision 0) +++ tools/dev/dump_pbc.pl (.../branches/tt677_toolsdirs) (revision 48648) @@ -0,0 +1,125 @@ +#! perl + +# Copyright (C) 2008, Parrot Foundation. +# $Id$ + +=head1 NAME + +tools/dev/dump_pbc.pl - Weave together PBC disassembly with PIR source + +=head1 SYNOPSIS + + perl tools/dev/dump_pbc.pl foo.pbc + +=head1 DESCRIPTION + +dump_pbc.pl uses Parrot's F program to disassemble the opcodes +in a PBC (Parrot ByteCode) file, then weaves the disassembly together with +the original PIR source file(s). This makes it easier to see how the PIR +syntactic sugar is desugared into raw Parrot opcodes. + +=head1 BUGS + +This program has only been tested for a few simple cases. Also, the name +might suggest a different use than its actual purpose. + +While it is not a bug in F per se, there is a line numbering +bug for some PBC opcode sequences that will result in the disassembled +opcodes appearing just before the source lines they represent, rather +than just after. There does not appear to be consensus yet about where +this bug actually resides. + +=cut + +use strict; +use warnings; +use Cwd; +use FindBin; + +my ($PARROT_ROOT, $RUNTIME_DIR); +BEGIN { + $PARROT_ROOT = Cwd::abs_path("$FindBin::Bin/../.."); + $RUNTIME_DIR = "$PARROT_ROOT/runtime/parrot"; +} + +use lib "$PARROT_ROOT/lib"; +use Parrot::Config '%PConfig'; + +my $DISASSEMBLER = "$PConfig{build_dir}$PConfig{slash}pbc_disassemble$PConfig{exe}"; + +go(@ARGV); + +sub go { + my $pbc = shift; + + # The following mess brought to you by Win32, where pipe open doesn't work, + # and thus its greater security and cleaner error handling are unavailable. + + -f $pbc && -r _ + or die "PBC file '$pbc' does not exist or is not readable.\n"; + + -f $DISASSEMBLER && -x _ + or die "Can't find disassembler '$DISASSEMBLER';" + . "did you remember to make parrot first?\n"; + + my @dis = `$DISASSEMBLER $pbc`; + die "No disassembly; errors: $?, $!" unless @dis; + + my $cur_file = ''; + my $cur_line = -1; + my %cache; + + foreach (@dis) { + if (/^(?:# )?Current Source Filename (.*)/) { + my $found = $1; + $found =~ s/^'//; + $found =~ s/'$//; + if ($cur_file ne $found) { + $cur_file = $found; + $cache{$cur_file} ||= slurp_file($cur_file); + $cur_line = -1; + + print "\n#### $cur_file\n"; + } + } + elsif (my ($info, $seq, $pc, $line, $code) = /^((\d+)-(\d+) (\d+): )(.*)/) { + my $int_line = int $line; + my $len_line = length $line; + if ($cur_line != $int_line) { + $cur_line = 0 if $cur_line == -1; + print "\n"; + foreach my $i ($cur_line + 1 .. $int_line) { + my $source_code = $cache{$cur_file}[$i-1]; + # next unless $source_code =~ /\S/; + printf "# %*d: %s", $len_line, $i, $source_code; + print "\n" if $source_code =~ /^\.end/; + } + $cur_line = $int_line; + } + + print ' ' x ($len_line + 4), "$code\n"; + } + } +} + +sub slurp_file { + my $file = shift; + my $source; + + open $source, '<', $file + or open $source, '<', "$PARROT_ROOT/$file" + or open $source, '<', "$RUNTIME_DIR/$file" + or die "Could not open source file '$file': $!"; + + my @lines = <$source>; + + return \@lines; +} + + +# Local Variables: +# mode: cperl +# cperl-indent-level: 4 +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4: 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 Index: tools/dev/ncidef2pasm.pl =================================================================== --- tools/dev/ncidef2pasm.pl (.../trunk) (revision 0) +++ tools/dev/ncidef2pasm.pl (.../branches/tt677_toolsdirs) (revision 48648) @@ -0,0 +1,237 @@ +#! perl + +# Copyright (C) 2003-2007, Parrot Foundation. +# $Id$ + +=head1 NAME + +tools/dev/ncidef2asm.pl - Turn an NCI library definition file into PASM + +=head1 SYNOPSIS + + perl tools/dev/ncidef2asm.pl path/to/from_file [ path/to/to_file ] + +=head1 DESCRIPTION + +This program takes an NCI library definition file and turns it into PASM. + +An NCI library definition file provides the information needed to +generate a parrot wrapper for the named library (or libraries). Its +format is simple, and looks like: + + [package] + ncurses + + [lib] + libform.so + + [defs] + p new_field i i i i i i + + [lib] + libncurses.so + + [defs] + i is_term_resized i i + +Note that the assembly file is generated in the order you specify, so +if there are library dependencies, make sure you have them in the +correct order. + +=head2 package + +Declares the package that all subsequent sub PMCs will be put +into. The name is a simple concatenation of the package name, double +colon, and the routine name, with no preceding punctuation. + +=head2 lib + +The name of the library to be loaded. Should be as qualified as +necessary for your platform--generally the full filename is required, +though the directory generally isn't. + +You may load multiple libraries here, but only the last one loaded +will be exposed to subsequent defs. + +=head2 defs + +This section holds the definitions of functions. Each function is +assumed to be in the immediate preceding library. The definition of +the function is: + + return_type name [param [param [param ...]]] + +The param and return_type parameters use the NCI standard, which for +reference is: + +=over 4 + +=item p + +Parameter is a void pointer, taken from the PMC's data pointer. PMC is +assumed to be an unmanagedstruct or child class. + +Taken from a P register + +=item c + +Parameter is a character. + +Taken from an I register + +=item s + +Parameter is a short + +Taken from an I register + +=item i + +Parameter is an int + +Taken from an I register + +=item l + +Parameter is a long + +Taken from an I register + +=item f + +Paramter is a float + +Taken from an N register. + +=item d + +Parameter is a double. + +Taken from an N register. + +=item t + +Paramter is a char *, presumably a C string + +Taken from an S register + +=item v + +Void. Only valid as a return type, noting that the function returns no data. + +=item I + +Interpreter pointer. The current interpreter pointer is passed in + +=item P + +PMC. + +=item 2 + +Pointer to short. + +Taken from an I register. + +=item 3 + +Pointer to int. + +Taken from an I register + +=item 4 + +Pointer to long + +Taken from an I register + +=back + +=cut + +use strict; +use warnings; + +my ( $from_file, $to_file ) = @ARGV; + +# If there is no destination file, strip off the extension of the +# source file and add a .pasm to it +if ( !defined $to_file ) { + $to_file = $from_file; + $to_file =~ s/\..*$//; + $to_file .= ".pasm"; +} + +open my $INPUT, '<', "$from_file" or die "Can't open up $from_file, error $!"; +open my $OUTPUT, '>', "$to_file" or die "Can't open up $to_file, error $!"; + +# To start, save all the registers, just in case +print $OUTPUT "saveall\n"; + +my @libs; +my ( $cur_package, $line, $cur_section ); + +# Our dispatch table +my (%dispatch) = ( + package => \&package_line, + lib => \&lib_line, + defs => \&def_line, +); + +while ( $line = <$INPUT> ) { + + # Throw away trailing newlines, comments, and whitespace. If the + # line's empty, then off to the next line + chomp $line; + $line =~ s/#.*//; + $line =~ s/\s*$//; + next unless $line; + + # Is it a section line? If so, extract the section and set it. + if ( $line =~ /\[(\w+)\]/ ) { + $cur_section = $1; + next; + } + + # Everything else goes to the handler + $dispatch{$cur_section}->($line); + +} + +# Put the registers back and end +print $OUTPUT "restoreall\n"; +print $OUTPUT "end\n"; +close $OUTPUT; + +sub package_line { + my $line = shift; + + # Trim leading and trailing spaces + $line =~ s/^\s*//; + $line =~ s/\s*$//; + + # Set the global current package + $cur_package = $line; + +} + +sub lib_line { + my $line = shift; + print $OUTPUT "loadlib P1, '$line'\n"; +} + +sub def_line { + my $line = shift; + my ( $return_type, $name, @params ) = split ' ', $line; + unshift @params, $return_type; + my $signature = join( "", @params ); + print $OUTPUT "dlfunc P2, P1, '$name', '$signature'\n"; + print $OUTPUT "store_global '${cur_package}::${name}', P2\n"; +} + +# Local Variables: +# mode: cperl +# cperl-indent-level: 4 +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4: 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 Index: tools/dev/perlcritic-cage.conf =================================================================== --- tools/dev/perlcritic-cage.conf (.../trunk) (revision 0) +++ tools/dev/perlcritic-cage.conf (.../branches/tt677_toolsdirs) (revision 48648) @@ -0,0 +1,37 @@ +# A more stringent set of rules for cage cleaners + +[-CodeLayout::ProhibitParensWithBuiltins] +[CodeLayout::ProhibitHardTabs] +allow_leading_tabs = 0 + +[-CodeLayout::RequireTidyCode] + +[-ControlStructures::ProhibitPostfixControls] +[-ControlStructures::ProhibitUnlessBlocks] + +[-Documentation::PodSpelling] +[-Documentation::RequirePodAtEnd] +[-Documentation::RequirePodSections] + +[-ErrorHandling::RequireCarping] + +[-InputOutput::ProhibitBacktickOperators] +[-InputOutput::ProhibitInteractiveTest] +[-InputOutput::RequireCheckedSyscalls] +functions = :builtins +exclude_functions = print + +[-Miscellanea::RequireRcsKeywords] + +[-Modules::RequireVersionVar] + +[-RegularExpressions::ProhibitEscapedMetacharacters] +[-RegularExpressions::RequireDotMatchAnything] +[-RegularExpressions::RequireExtendedFormatting] +[-RegularExpressions::RequireLineBoundaryMatching] + +[-ValuesAndExpressions::ProhibitConstantPragma] +[-ValuesAndExpressions::ProhibitEmptyQuotes] +[-ValuesAndExpressions::ProhibitMagicNumbers] + +[-Variables::ProhibitPunctuationVars] 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 Index: tools/dev/perlcritic.conf =================================================================== --- tools/dev/perlcritic.conf (.../trunk) (revision 0) +++ tools/dev/perlcritic.conf (.../branches/tt677_toolsdirs) (revision 48648) @@ -0,0 +1,75 @@ +verbose = 3 + +# not all the profiles listed here are installed by default, even if you have +# Perl::Critic. Shhhh. +profile-strictness = quiet + +[BuiltinFunctions::ProhibitStringySplit] +add_themes = parrot + +[CodeLayout::ProhibitDuplicateCoda] +add_themes = parrot + +[CodeLayout::ProhibitHardTabs] +allow_leading_tabs = 0 +add_themes = parrot + +[CodeLayout::ProhibitTrailingWhitespace] +add_themes = parrot + +[CodeLayout::RequireTidyCode] +perltidyrc = tools/dev/perltidy.conf +add_themes = extra + +[CodeLayout::UseParrotCoda] +add_themes = parrot + +[InputOutput::ProhibitBarewordFileHandles] +add_themes = parrot + +[InputOutput::ProhibitTwoArgOpen] +add_themes = parrot + +[NamingConventions::ProhibitAmbiguousNames] +# remove abstract from the list of forbidden names +forbid = bases close contract last left no record right second set +add_themes = extra + +[Subroutines::ProhibitBuiltinHomonyms] +add_themes = extra + +[Subroutines::ProhibitExplicitReturnUndef] +add_themes = parrot + +[Subroutines::ProhibitSubroutinePrototypes] +add_themes = parrot + +[Subroutines::RequireFinalReturn] +add_themes = extra + +[TestingAndDebugging::MisplacedShebang] +add_themes = parrot + +[TestingAndDebugging::ProhibitShebangWarningsArg] +add_themes = parrot + +[TestingAndDebugging::RequirePortableShebang] +add_themes = parrot + +[TestingAndDebugging::RequireUseStrict] +add_themes = parrot + +[TestingAndDebugging::RequireUseWarnings] +add_themes = parrot + +[ValuesAndExpressions::ProhibitInterpolationOfLiterals] +add_themes = extra + +[Variables::ProhibitConditionalDeclarations] +add_themes = parrot + +[Bangs::ProhibitFlagComments] +add_themes = extra + +[Bangs::ProhibitRefProtoOrProto] +add_themes = extra 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 Index: tools/dev/README =================================================================== --- tools/dev/README (.../trunk) (revision 0) +++ tools/dev/README (.../branches/tt677_toolsdirs) (revision 48648) @@ -0,0 +1,7 @@ +# $Id$ +README for tools/dev/ + +This directory is intended to hold programs, templates and configuration files +found useful by Parrot developed other than those (a) invoked by the default +'make' target ('make all'), with or without command-line options, during the +Parrot build process; or (b) invoked by 'make install' or 'make install-dev'. Property changes on: tools/dev/README ___________________________________________________________________ Added: svn:mergeinfo Added: svn:eol-style + native Added: svn:keywords + Author Date Id Revision Index: tools/dev/addopstags.pl =================================================================== --- tools/dev/addopstags.pl (.../trunk) (revision 0) +++ tools/dev/addopstags.pl (.../branches/tt677_toolsdirs) (revision 48648) @@ -0,0 +1,54 @@ +#!perl + +# Copyright (C) 2004-2006, Parrot Foundation. +# $Id$ + +use strict; +use warnings; + +=head1 NAME + +tools/dev/addopstags.pl - add src/ops/*.ops to tags + +=head1 SYNOPSIS + + perl tools/dev/addopstags.pl src/ops/*.ops + +=head1 DESCRIPTION + +Add src/ops/*.ops to tags file. + +=cut + +my %seen; +my @tags; + +# Pull ops tags +while (<>) { + if (/\bop \s+ (\w+) \s* \(/x) { + next if $seen{$1}++; + + # tag file excmd xflags + push @tags, join( "\t", $1, $ARGV, qq{$.;"}, "f" ) . "\n"; + } +} +continue { + close ARGV if eof; # reset $. +} + +# Pull existing tags +open my $T, '<', 'tags'; +push @tags, <$T>; +close $T; + +# Spit 'em out sorted +open $T, '>', 'tags'; +print $T sort @tags; +close $T; + +# Local Variables: +# mode: cperl +# cperl-indent-level: 4 +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4: 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 Index: tools/dev/parrot-config.pir =================================================================== --- tools/dev/parrot-config.pir (.../trunk) (revision 0) +++ tools/dev/parrot-config.pir (.../branches/tt677_toolsdirs) (revision 48648) @@ -0,0 +1,103 @@ +#!/usr/bin/env parrot +# $Id$ + +=head1 NAME + +config.pir - Print a Parrot configuration item + +=head1 VERSION + +version 0.01 + +=head1 SYNOPSIS + + ./parrot parrot-config.pir VERSION + ./parrot parrot-config.pir ccflags + ./parrot parrot-config.pir --dump + +=head1 DESCRIPTION + +Print out configuration items. + +=head1 AUTHOR + +Leopold Toetsch Elt@toetsch.atE. + +=head1 COPYRIGHT + +Copyright (C) 2004-2009, Parrot Foundation. + +=cut + +.sub _main :main + .param pmc argv + .local int argc + argc = argv + if argc < 2 goto usage + .local pmc interp, conf_hash + .local string key + .include "iglobals.pasm" + interp = getinterp + conf_hash = interp[.IGLOBALS_CONFIG_HASH] + .local int i + i = 1 +loop: + key = argv[i] + if key == '--help' goto usage + if key == '--dump' goto dump + $I0 = defined conf_hash[key] + unless $I0 goto failkey + dec argc + if i < argc goto dumpsome + $S0 = conf_hash[key] + print $S0 + inc i + if i < argc goto loop + print "\n" + end +dumpsome: + key = argv[i] + $I0 = defined conf_hash[key] + unless $I0 goto failkey + print key + print " => '" + $S1 = conf_hash[key] + print $S1 + say "'" + inc i + if i <= argc goto dumpsome + end +failkey: + print " no such key: '" + print key + print "'\n" + end +dump: + .local pmc iterator + iterator = iter conf_hash +iter_loop: + unless iterator goto iter_end + shift $S0, iterator + print $S0 + print " => '" + $S1 = conf_hash[$S0] + print $S1 + say "'" + goto iter_loop +iter_end: + end +usage: + $S0 = argv[0] + $P0 = getinterp + .include 'stdio.pasm' + $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO) + $P1.'print'($S0) + $P1.'print'(" [ [ ... ] | --dump | --help ]\n") + exit 1 +.end + +# Local Variables: +# mode: pir +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4 ft=pir: 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 Index: lib/Parrot/Docs/Section/Tools.pm =================================================================== --- lib/Parrot/Docs/Section/Tools.pm (.../trunk) (revision 48639) +++ lib/Parrot/Docs/Section/Tools.pm (.../branches/tt677_toolsdirs) (revision 48648) @@ -85,7 +85,7 @@ $self->new_item( '', 'tools/dev/list_unjitted.pl' ), $self->new_item( '', 'tools/dev/gen_class.pl' ), $self->new_item( '', 'tools/dev/nm.pl' ), - $self->new_item( '', 'tools/util/ncidef2pasm.pl' ), + $self->new_item( '', 'tools/dev/ncidef2pasm.pl' ), $self->new_item( '', 'tools/dev/pbc_header.pl' ), ), $self->new_group( Index: MANIFEST =================================================================== --- MANIFEST (.../trunk) (revision 48639) +++ MANIFEST (.../branches/tt677_toolsdirs) (revision 48648) @@ -1,7 +1,7 @@ # ex: set ro: # $Id$ # -# generated by tools/dev/mk_manifest_and_skip.pl Tue Aug 24 15:05:33 2010 UT +# generated by tools/dev/mk_manifest_and_skip.pl Tue Aug 24 23:10:21 2010 UT # # See below for documentation on the format of this file. # @@ -2090,11 +2090,10 @@ t/tools/pmc2cutils/08-pmc-pm.t [test] t/tools/pmc2cutils/README []doc t/tools/testdata [test] -tools/build/addopstags.pl [] +tools/build/README []doc tools/build/c2str.pl [] tools/build/fixup_gen_file.pl [] tools/build/h2inc.pl [] -tools/build/headerizer.pl [] tools/build/ops2c.pl [devel] tools/build/parrot_config_c.pl [] tools/build/pbcversion_h.pl [] @@ -2102,18 +2101,22 @@ tools/build/vtable_extend.pl [] tools/build/vtable_h.pl [] tools/dev/.gdbinit [] +tools/dev/README []doc +tools/dev/addopstags.pl [] tools/dev/as2c.pl [] tools/dev/bench_op.pir [] tools/dev/branch_status.pl [] tools/dev/checkdepend.pl [] tools/dev/create_language.pl [devel] tools/dev/debian_docs.sh [] +tools/dev/dump_pbc.pl [] tools/dev/faces.pl [] tools/dev/fetch_languages.pl [] tools/dev/gen_charset_tables.pl [] tools/dev/gen_class.pl [] tools/dev/gen_makefile.pl [devel] tools/dev/gen_valgrind_suppressions.pl [] +tools/dev/headerizer.pl [] tools/dev/install_dev_files.pl [] tools/dev/install_doc_files.pl [] tools/dev/install_files.pl [] @@ -2131,9 +2134,11 @@ tools/dev/mk_rpm_manifests.pl [] tools/dev/nci_test_gen.pl [] tools/dev/nci_thunk_gen.pir [] +tools/dev/ncidef2pasm.pl [] tools/dev/nm.pl [] tools/dev/nopaste.pl [] tools/dev/ops_not_tested.pl [] +tools/dev/parrot-config.pir [] tools/dev/parrot-fuzzer [] tools/dev/parrot.supp [] tools/dev/parrot_api.pl [] @@ -2142,6 +2147,10 @@ tools/dev/parrotbench.pl [] tools/dev/pbc_header.pl [] tools/dev/pbc_to_exe.pir [devel] +tools/dev/perlcritic-cage.conf [] +tools/dev/perlcritic.conf [] +tools/dev/perltidy.conf [] +tools/dev/pgegrep [] tools/dev/pmcrenumber.pl [] tools/dev/pmctree.pl [] tools/dev/pprof2cg.pl [devel] @@ -2149,6 +2158,7 @@ tools/dev/search-ops.pl [] tools/dev/svnclobber.pl [] tools/dev/symlink.pl [] +tools/dev/update_copyright.pl [] tools/dev/vgp [] tools/dev/vgp_darwin [] tools/dev/vms-patch [] @@ -2159,19 +2169,12 @@ tools/docs/write_docs.pl [] tools/install/smoke.pl [] tools/install/smoke_languages.pl [] -tools/util/crow.pir [] -tools/util/dump_pbc.pl [] -tools/util/gen_release_info.pl [] -tools/util/inc_ver.pir [] -tools/util/ncidef2pasm.pl [] -tools/util/parrot-config.pir [] -tools/util/perlcritic-cage.conf [] -tools/util/perlcritic.conf [] -tools/util/perltidy.conf [] -tools/util/pgegrep [] -tools/util/release.json [] -tools/util/templates.json [] -tools/util/update_copyright.pl [] +tools/release/README []doc +tools/release/crow.pir [] +tools/release/gen_release_info.pl [] +tools/release/inc_ver.pir [] +tools/release/release.json [] +tools/release/templates.json [] # Local variables: # mode: text # buffer-read-only: t Index: ports/debian/rules =================================================================== --- ports/debian/rules (.../trunk) (revision 48639) +++ ports/debian/rules (.../branches/tt677_toolsdirs) (revision 48648) @@ -42,7 +42,7 @@ dh_testdir $(MAKE) installable LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}`pwd`/blib/lib pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" docs/running.pod debian/parrot.1 - pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" tools/util/parrot-config.pir debian/parrot_config.1 + pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" tools/dev/parrot-config.pir debian/parrot_config.1 pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/pbc_dump.c debian/pbc_dump.1 pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/pbc_disassemble.c debian/pbc_disassemble.1 pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/parrot_debugger.c debian/parrot_debugger.1 Index: t/tools/dump_pbc.t =================================================================== --- t/tools/dump_pbc.t (.../trunk) (revision 48639) +++ t/tools/dump_pbc.t (.../branches/tt677_toolsdirs) (revision 48648) @@ -4,7 +4,7 @@ =head1 NAME -t/tools/dumb_pbc.t - test the script tools/utils/dump_pbc.pl +t/tools/dumb_pbc.t - test the script tools/dev/dump_pbc.pl =head1 SYNOPSIS @@ -34,7 +34,7 @@ my $PARROT = ".$PConfig{slash}$PConfig{test_prog}"; system( "$PARROT --output $pbc_fn $pir_fn" ); - my $cmd = File::Spec->catfile( qw{. tools util dump_pbc.pl} ); + my $cmd = File::Spec->catfile( qw{. tools dev dump_pbc.pl} ); my $out = `$PConfig{perl} $cmd $pbc_fn`; like( $out, $snippet, $desc ); Index: t/tools/pgegrep.t =================================================================== --- t/tools/pgegrep.t (.../trunk) (revision 48639) +++ t/tools/pgegrep.t (.../branches/tt677_toolsdirs) (revision 48648) @@ -4,7 +4,7 @@ =head1 NAME -t/tools/pgegrep.t - test the script tools/utils/pgegrep +t/tools/pgegrep.t - test the script tools/dev/pgegrep =head1 SYNOPSIS @@ -34,7 +34,7 @@ my ($options, $snippet, $desc) = @_; my $PARROT = ".$PConfig{slash}$PConfig{test_prog}"; - my $pgegrep = File::Spec->catfile( qw{. tools util pgegrep} ); + my $pgegrep = File::Spec->catfile( qw{. tools dev pgegrep} ); my $out = `$PARROT $pgegrep $options`; like( $out, $snippet, $desc ); Index: t/codingstd/perlcritic.t =================================================================== --- t/codingstd/perlcritic.t (.../trunk) (revision 48639) +++ t/codingstd/perlcritic.t (.../branches/tt677_toolsdirs) (revision 48648) @@ -22,7 +22,7 @@ violations. This test uses a standard perlcriticrc file, located in -F +F If you wish to run a specific policy, the easiest way to do so is to temporarily add a custom theme to the configuration file and then specify @@ -62,7 +62,7 @@ 'theme=s' => \$theme ); -my $config = File::Spec->catfile( $PConfig{build_dir}, qw{tools util perlcritic.conf} ); +my $config = File::Spec->catfile( $PConfig{build_dir}, qw{tools dev perlcritic.conf} ); Test::Perl::Critic->import( -profile => $config, Index: config/gen/makefiles/root.in =================================================================== --- config/gen/makefiles/root.in (.../trunk) (revision 48639) +++ config/gen/makefiles/root.in (.../branches/tt677_toolsdirs) (revision 48648) @@ -47,8 +47,13 @@ # where we're building parrot from (needed for pbc_to_exe) BUILD_DIR = @build_dir@ -# directory for build tools +# directory for build tools: +# programs, templates, configuration files invoked by 'make all' +# (with or without command-line options) BUILD_TOOLS_DIR = tools/build +# directory for developers' tools +# programs, templates, configuration files NOT invoked by 'make all' +DEV_TOOLS_DIR = tools/dev # directory for header files INC_DIR = @inc@ @@ -116,7 +121,7 @@ NONGEN_HEADERS = @TEMP_nongen_headers@ # The headerizer -HEADERIZER = $(PERL) $(BUILD_TOOLS_DIR)/headerizer.pl +HEADERIZER = $(PERL) $(DEV_TOOLS_DIR)/headerizer.pl include src/dynpmc/Defines.mak include src/dynoplibs/Defines.mak @@ -841,12 +846,12 @@ @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC) #IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 -$(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) - $(PARROT) -o pbc_to_exe.pbc tools/dev/pbc_to_exe.pir +$(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) + $(PARROT) -o pbc_to_exe.pbc $(DEV_TOOLS_DIR)/pbc_to_exe.pir $(PARROT) pbc_to_exe.pbc pbc_to_exe.pbc -parrot_nci_thunk_gen.pbc : tools/dev/nci_thunk_gen.pir $(DATA_JSON_LIB_PBCS) $(PARROT) - $(PARROT) -o parrot_nci_thunk_gen.pbc tools/dev/nci_thunk_gen.pir +parrot_nci_thunk_gen.pbc : $(DEV_TOOLS_DIR)/nci_thunk_gen.pir $(DATA_JSON_LIB_PBCS) $(PARROT) + $(PARROT) -o parrot_nci_thunk_gen.pbc $(DEV_TOOLS_DIR)/nci_thunk_gen.pir $(NCI_THUNK_GEN) : parrot_nci_thunk_gen.pbc $(PBC_TO_EXE) $(PBC_TO_EXE) parrot_nci_thunk_gen.pbc @@ -857,8 +862,8 @@ $(PROVE) : parrot-prove.pbc $(PARROT) $(PBC_TO_EXE) $(PBC_TO_EXE) parrot-prove.pbc -$(PARROT_CONFIG) : tools/util/parrot-config.pir $(PARROT) $(PBC_TO_EXE) - $(PARROT) -o parrot_config.pbc tools/util/parrot-config.pir +$(PARROT_CONFIG) : $(DEV_TOOLS_DIR)/parrot-config.pir $(PARROT) $(PBC_TO_EXE) + $(PARROT) -o parrot_config.pbc $(DEV_TOOLS_DIR)/parrot-config.pir $(PARROT) pbc_to_exe.pbc parrot_config.pbc $(MINIPARROT) : src/main$(O) $(GEN_HEADERS) $(LIBPARROT) \ @@ -935,10 +940,10 @@ $(IMCC_O_FILES) lib_deps_object : $(O_FILES) - $(PERL) tools/dev/lib_deps.pl object $(O_FILES) + $(PERL) $(DEV_TOOLS_DIR)/lib_deps.pl object $(O_FILES) lib_deps_source : $(GENERAL_H_FILES) - $(PERL) tools/dev/lib_deps.pl source all_source + $(PERL) $(DEV_TOOLS_DIR)/lib_deps.pl source all_source lib_deps : lib_deps_object lib_deps_source @@ -968,7 +973,7 @@ $(INSTALLABLECONFIG) : src/install_config$(O) $(PARROT_CONFIG) $(PBC_TO_EXE) - $(PARROT) -o parrot_config.pbc tools/util/parrot-config.pir + $(PARROT) -o parrot_config.pbc $(DEV_TOOLS_DIR)/parrot-config.pir $(PBC_TO_EXE) parrot_config.pbc --install $(INSTALLABLEPBCTOEXE) : $(PBC_TO_EXE) src/install_config$(O) @@ -1996,19 +2001,19 @@ # Require .svn to exist first # Otherwise it'll remove every last file svnclobber : .svn - $(PERL) tools/dev/svnclobber.pl + $(PERL) $(DEV_TOOLS_DIR)/svnclobber.pl reconfig : realclean $(PERL) Configure.pl $(CONFIG_ARGS) manitest : - $(PERL) tools/dev/manicheck.pl + $(PERL) $(DEV_TOOLS_DIR)/manicheck.pl opsrenumber : - $(PERL) tools/dev/opsrenumber.pl $(OPS_FILES) + $(PERL) $(DEV_TOOLS_DIR)/opsrenumber.pl $(OPS_FILES) pmcrenumber : - $(PERL) tools/dev/pmcrenumber.pl src/pmc/pmc.num + $(PERL) $(DEV_TOOLS_DIR)/pmcrenumber.pl src/pmc/pmc.num ############################################################################### # @@ -2360,7 +2365,7 @@ install-dev: install install-bin: installable - $(PERL) tools/dev/install_files.pl \ + $(PERL) $(DEV_TOOLS_DIR)/install_files.pl \ --buildprefix=$(BUILDPREFIX) \ --prefix=$(PREFIX) \ --exec-prefix=$(EXEC_PREFIX) \ @@ -2374,7 +2379,7 @@ MANIFEST MANIFEST.generated install-dev-only: installable - $(PERL) tools/dev/install_dev_files.pl \ + $(PERL) $(DEV_TOOLS_DIR)/install_dev_files.pl \ --buildprefix=$(BUILDPREFIX) \ --prefix=$(PREFIX) \ --exec-prefix=$(EXEC_PREFIX) \ @@ -2389,7 +2394,7 @@ MANIFEST MANIFEST.generated install-doc: - $(PERL) tools/dev/install_doc_files.pl \ + $(PERL) $(DEV_TOOLS_DIR)/install_doc_files.pl \ --buildprefix=$(BUILDPREFIX) \ --prefix=$(PREFIX) \ --docdir=$(DOC_DIR) \ @@ -2418,7 +2423,7 @@ rm parrot-$(VERSION) win32-inno-installer : world installable - $(PERL) tools/dev/mk_inno.pl + $(PERL) $(DEV_TOOLS_DIR)/mk_inno.pl $(INNO_SETUP) parrot.iss ############################################################################### @@ -2512,7 +2517,7 @@ --languages=c,perl --langmap=c:+.h,c:+.pmc,c:+.ops \ -I NOTNULL,NULLOK,ARGIN,ARGMOD,ARGOUT,ARGINOUT,ARGIN_NULLOK,ARGOUT_NULLOK,ARGMOD_NULLOK,ARGFREE,ARGFREE_NOTNULL \ . - $(PERL) $(BUILD_TOOLS_DIR)/addopstags.pl $(OPS_FILES) + $(PERL) $(DEV_TOOLS_DIR)/addopstags.pl $(OPS_FILES) tags.vi.dummy: @@ -2524,12 +2529,12 @@ CRITIC_FILES = 'lib/Parrot' perlcritic: - perlcritic --profile tools/util/perlcritic.conf $(CRITIC_FILES) + perlcritic --profile $(DEV_TOOLS_DIR)/perlcritic.conf $(CRITIC_FILES) # Andy's extra-cranky Perl::Critic checking for cage cleaners cagecritic: @perl -MPerl::Critic::Bangs -e'$$min=q{1.04};die qq{You need Bangs $$min} unless $$Perl::Critic::Bangs::VERSION ge $$min' - perlcritic -1 --profile tools/util/perlcritic-cage.conf $(CRITIC_FILES) + perlcritic -1 --profile $(DEV_TOOLS_DIR)/perlcritic-cage.conf $(CRITIC_FILES) # This target will eventually create all the headers automatically. If you # are having problems with linkage in Win32 (or elsewhere), because something