[svn:parrot] r38470 - in branches/tt528_vtinit: . config/gen/makefiles config/gen/platform/darwin docs/book include/parrot src src/gc src/interp src/pmc src/runcore t/src tools/dev

cotto at svn.parrot.org cotto at svn.parrot.org
Mon May 4 22:40:09 UTC 2009


Author: cotto
Date: Mon May  4 22:40:07 2009
New Revision: 38470
URL: https://trac.parrot.org/parrot/changeset/38470

Log:
bringing vtinit branch up-to-date with trunk

Deleted:
   branches/tt528_vtinit/config/gen/platform/darwin/dl.c
Modified:
   branches/tt528_vtinit/   (props changed)
   branches/tt528_vtinit/CREDITS
   branches/tt528_vtinit/MANIFEST
   branches/tt528_vtinit/MANIFEST.generated
   branches/tt528_vtinit/config/gen/makefiles/pirc.in
   branches/tt528_vtinit/config/gen/makefiles/root.in
   branches/tt528_vtinit/docs/book/ch02_getting_started.pod
   branches/tt528_vtinit/include/parrot/runcore_trace.h   (props changed)
   branches/tt528_vtinit/src/debug.c
   branches/tt528_vtinit/src/gc/generational_ms.c   (props changed)
   branches/tt528_vtinit/src/gc/incremental_ms.c   (props changed)
   branches/tt528_vtinit/src/interp/inter_create.c   (props changed)
   branches/tt528_vtinit/src/packfile.c
   branches/tt528_vtinit/src/pmc/default.pmc
   branches/tt528_vtinit/src/pmc/exception.pmc
   branches/tt528_vtinit/src/pmc/orderedhash.pmc
   branches/tt528_vtinit/src/runcore/cores.c   (props changed)
   branches/tt528_vtinit/src/runcore/trace.c   (props changed)
   branches/tt528_vtinit/t/src/embed.t   (props changed)
   branches/tt528_vtinit/tools/dev/fetch_languages.pl
   branches/tt528_vtinit/tools/dev/install_files.pl
   branches/tt528_vtinit/tools/dev/mk_gitignore.pl   (props changed)

Modified: branches/tt528_vtinit/CREDITS
==============================================================================
--- branches/tt528_vtinit/CREDITS	Mon May  4 22:06:35 2009	(r38469)
+++ branches/tt528_vtinit/CREDITS	Mon May  4 22:40:07 2009	(r38470)
@@ -8,8 +8,8 @@
     works.  It is sorted by name and formatted to allow easy
     grepping and beautification by scripts.
     The fields are: name (N), email (E), web-address (W),
-    description (D), subversion username (U) and snail-mail
-    address (S).
+    description (D), main username (U), alias usernames (A)
+    and snail-mail address (S).
 
         Thanks,
 
@@ -345,6 +345,7 @@
 S: Chemnitz, Germany
 
 N: François Perrad
+A: Francois Perrad
 E: francois.perrad at gadz.org
 W: http://fperrad.googlepages.com/home
 U: fperrad
@@ -679,6 +680,7 @@
 N: Mitchell N Charity
 
 N: Moritz A Lenz
+A: Moritz Lenz
 E: moritz at faui2k3.org
 U: moritz
 D: Test infrastructure for languages/perl6/ and Perl 6 in general
@@ -945,6 +947,7 @@
 
 N: Will "Coke" Coleda
 U: coke
+A: wcoleda
 E: will at coleda.com
 D: Tcl language (partcl), APL, website, various languages/ upkeep, misc.
 

Modified: branches/tt528_vtinit/MANIFEST
==============================================================================
--- branches/tt528_vtinit/MANIFEST	Mon May  4 22:06:35 2009	(r38469)
+++ branches/tt528_vtinit/MANIFEST	Mon May  4 22:40:07 2009	(r38470)
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Sun Apr 26 13:23:00 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Fri May  1 20:06:19 2009 UT
 #
 # See tools/dev/install_files.pl for documentation on the
 # format of this file.
@@ -338,7 +338,6 @@
 config/gen/platform/ansi/time.c                             []
 config/gen/platform/cygwin/math.c                           []
 config/gen/platform/darwin/begin.c                          []
-config/gen/platform/darwin/dl.c                             []
 config/gen/platform/darwin/memalign.c                       []
 config/gen/platform/generic/dl.c                            []
 config/gen/platform/generic/dl.h                            []

Modified: branches/tt528_vtinit/MANIFEST.generated
==============================================================================
--- branches/tt528_vtinit/MANIFEST.generated	Mon May  4 22:06:35 2009	(r38469)
+++ branches/tt528_vtinit/MANIFEST.generated	Mon May  4 22:40:07 2009	(r38470)
@@ -69,8 +69,6 @@
 lib/Parrot/Pmc2c/PCCMETHOD_BITS.pm                [devel]lib
 lib/Parrot/PMC.pm                                 [devel]lib
 parrot.pc                                         [main]pkgconfig
-pirc.exe                                          [main]bin
-pirc                                              [main]bin
 runtime/parrot/dynext/digest_group.bundle         [library]
 runtime/parrot/dynext/digest_group.dll            [library]
 runtime/parrot/dynext/digest_group.dylib          [library]

Modified: branches/tt528_vtinit/config/gen/makefiles/pirc.in
==============================================================================
--- branches/tt528_vtinit/config/gen/makefiles/pirc.in	Mon May  4 22:06:35 2009	(r38469)
+++ branches/tt528_vtinit/config/gen/makefiles/pirc.in	Mon May  4 22:40:07 2009	(r38470)
@@ -6,18 +6,14 @@
 # Setup some commands
 PERL          := @perl@
 RM_F          := @rm_f@
-PARROT        := ../../parrot at exe@
-TOOL_DIR      := ../..
-CC            := @cc@
 CP            := @cp@
-BUILD         := $(PERL) @build_dir@/tools/build/dynpmc.pl
-O             := @o@
-EXE           := @exe@
+PARROT        := ../../parrot at exe@
 BUILD_DIR     := @build_dir@
 RECONFIGURE   := $(PERL) @build_dir@/tools/dev/reconfigure.pl
 
-LIBPARROT     := @libparrot@
-
+CC            := @cc@
+O             := @o@
+EXE           := @exe@
 CC_INC        := -I../../include
 C_LIBS        := @libs@
 CC_SHARED     := @cc_shared@

Modified: branches/tt528_vtinit/config/gen/makefiles/root.in
==============================================================================
--- branches/tt528_vtinit/config/gen/makefiles/root.in	Mon May  4 22:06:35 2009	(r38469)
+++ branches/tt528_vtinit/config/gen/makefiles/root.in	Mon May  4 22:40:07 2009	(r38470)
@@ -2069,6 +2069,7 @@
 # added to splint target to simplify experimentation,
 # ex: make SPLINTFLAGS_TEST='-posixstrictlib +posixlib' splint
 SPLINTFLAGS_TEST := \
+    +partial \
 
 splint : $(PARROT)
 	$(MKPATH) $(SPLINT_TMP)
@@ -2077,21 +2078,8 @@
 
 splint-andy :
 	$(MKPATH) $(SPLINT_TMP)
-	splint $(CC_INC) @cc_hasjit@ "-Isrc/pmc" "-Icompilers/ast" $(SPLINTFLAGS) $(SPLINTFLAGS_TEST) \
-    compilers/imcc/cfg.c \
-    compilers/imcc/debug.c \
-    compilers/imcc/imc.c \
-    compilers/imcc/imclexer.c \
-    compilers/imcc/imcparser.c \
-    compilers/imcc/instructions.c \
-    compilers/imcc/main.c \
-    compilers/imcc/optimizer.c \
-    compilers/imcc/parser_util.c \
-    compilers/imcc/pbc.c \
-    compilers/imcc/pcc.c \
-    compilers/imcc/reg_alloc.c \
-    compilers/imcc/sets.c \
-    compilers/imcc/symreg.c \
+	splint $(CC_INC) @cc_hasjit@ -DNDEBUG "-Isrc/pmc" "-Icompilers/ast" $(SPLINTFLAGS) $(SPLINTFLAGS_TEST) \
+	src/string/*.c \
     | grep -v 'Source code error generation point'
 
 COVER_FLAGS := -fprofile-arcs -ftest-coverage

Deleted: branches/tt528_vtinit/config/gen/platform/darwin/dl.c
==============================================================================
--- branches/tt528_vtinit/config/gen/platform/darwin/dl.c	Mon May  4 22:40:07 2009	(r38469)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,279 +0,0 @@
-/*
- * Copyright (C) 2004-2006, Parrot Foundation.
- * $Id$
- */
-
-/*
-
-=head1 NAME
-
-dl.c
-
-=head1 DESCRIPTION
-
-The dl* functions showed up in OS X 10.3, but they are just a
-wrapper around the native dyld and NSModule API, so we'll use
-the base API directly. This gives us wider compatibility, and
-more control over the behavior.
-
-=head2 Functions
-
-=over 4
-
-=cut
-
-*/
-
-#import <mach-o/dyld.h>
-
-#define PARROT_DLOPEN_FLAGS RTLD_LAZY
-
-/*
-
-=item C<static const char * scan_paths(const char *filename, const char
-*libpath)>
-
-Simple routine to walk a colon separated list of directories in a string
-and check for a file in each one, returning the first match.
-Note that this returns a static buffer, and so is not thread-safe.
-
-=cut
-
-*/
-
-static const char *
-scan_paths(const char *filename, const char *libpath)
-{
-    static char buf[PATH_MAX];
-    struct stat st;
-    char *path_list;
-    char *path_list_start;
-    const char *path;
-
-    if (!libpath)
-        return NULL;
-
-    path_list_start = path_list = strdup(libpath);
-
-    path = strsep(&path_list, ":");
-
-    while (path) {
-        snprintf(buf, PATH_MAX, "%s/%s", path, filename);
-        if (stat(buf, &st) == 0) {
-            free(path_list_start);
-            return buf;
-        }
-        path = strsep(&path_list, ":");
-    }
-    free(path_list_start);
-    return NULL;
-}
-
-/*
-
-=item C<static const char * get_lib(const char *filename)>
-
-Try to expand a filename input into a full file system path following
-the behavior described in dyld(1). First looks for the file in
-DYLD_LIBRARY_PATH, the DYLD_FALLBACK_LIBRARY_PATH, and lastly uses the
-default of /usr/local/lib:/lib:/usr/lib. If the filename cannot be
-expanded, the original value passed to the function is returned.
-
-=cut
-
-*/
-
-static const char *
-get_lib(const char *filename)
-{
-    const char *rv;
-    char *libpath = getenv("DYLD_LIBRARY_PATH");
-    char fallback[PATH_MAX] = "/usr/local/lib:/lib:/usr/lib";
-
-    rv = scan_paths(filename, libpath);
-    if (rv)
-      return rv;
-
-    libpath = getenv("DYLD_FALLBACK_LIBRARY_PATH");
-    rv = scan_paths(filename, libpath);
-    if (rv)
-        return rv;
-
-    rv = scan_paths(filename, fallback);
-    if (rv)
-        return rv;
-
-    return filename;
-}
-
-/*
-
-=item C<void * Parrot_dlopen(const char *filename)>
-
-=cut
-
-*/
-
-void *
-Parrot_dlopen(const char *filename)
-{
-    int dyld_result;
-    NSObjectFileImage ofile;
-    const char *fullpath = get_lib(filename);
-
-    /* try bundle-style loading first */
-    dyld_result = NSCreateObjectFileImageFromFile(fullpath, &ofile);
-
-    if (NSObjectFileImageSuccess == dyld_result)
-    {
-        NSModule module = NSLinkModule(ofile, fullpath,
-                              NSLINKMODULE_OPTION_RETURN_ON_ERROR
-                              | NSLINKMODULE_OPTION_PRIVATE);
-
-        NSDestroyObjectFileImage(ofile);
-
-        return module; /* NSModule is typedef'd to void*  */
-    }
-    else
-    { /* bundle-style loading didn't work; try dylib-style before giving up */
-        const struct mach_header *header =
-                NSAddImage(fullpath,
-                           NSADDIMAGE_OPTION_RETURN_ON_ERROR
-                           | NSADDIMAGE_OPTION_WITH_SEARCHING);
-
-        if (header)
-            return (void *)header;
-
-        /*
-         * that didn't work either; go ahead and report the original error
-         */
-
-        switch (dyld_result) {
-        /* RT#48274 for now, ignore all the known errors */
-        case NSObjectFileImageFailure:
-        case NSObjectFileImageInappropriateFile:
-        case NSObjectFileImageArch:
-        case NSObjectFileImageFormat:
-        case NSObjectFileImageAccess:
-            break;
-
-        default:
-            fprintf(stderr,
-                    "open result was unknown (%i) for fullpath [%s]\n",
-                    dyld_result, fullpath);
-            break;
-        }
-
-        return NULL;
-    }
-}
-
-
-/*
-
-=item C<const char * Parrot_dlerror(void)>
-
-=cut
-
-*/
-
-const char *
-Parrot_dlerror(void)
-{
-    return NULL;
-}
-
-
-/*
-
-=item C<void * Parrot_dlsym(void *handle, const char *symbol)>
-
-=cut
-
-*/
-
-void *
-Parrot_dlsym(void *handle, const char *symbol)
-{
-    NSSymbol found_symbol = NULL;
-    char *fixed_name = malloc(strlen(symbol) + 2);
-
-    /* Need to prepend underscore to symbol name to match the C convention
-       for symbol naming. */
-    strcpy(fixed_name, "_");
-    strcat(fixed_name, symbol);
-
-    if (!handle) /* must be looking up global symbol */
-    {
-        if (NSIsSymbolNameDefined(fixed_name))
-        {
-            found_symbol = NSLookupAndBindSymbol(fixed_name);
-        }
-    }
-    else if (((struct mach_header *)handle)->magic == MH_MAGIC
-             || ((struct mach_header *)handle)->magic == MH_CIGAM)
-    {
-        if (NSIsSymbolNameDefinedInImage(handle, fixed_name))
-        {
-            found_symbol = NSLookupSymbolInImage(handle, fixed_name,
-                    NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR
-                    | NSLOOKUPSYMBOLINIMAGE_OPTION_BIND);
-        }
-    }
-    else
-    {
-        found_symbol = NSLookupSymbolInModule(handle, fixed_name);
-    }
-
-    free(fixed_name);
-
-    if (!symbol)
-    {
-        return NULL;
-    }
-    else
-    {
-        return NSAddressOfSymbol(found_symbol);
-    }
-}
-
-
-/*
-
-=item C<int Parrot_dlclose(void *handle)>
-
-=cut
-
-*/
-
-int
-Parrot_dlclose(void *handle)
-{
-    if (handle && !(((struct mach_header *)handle)->magic == MH_MAGIC
-               ||   ((struct mach_header *)handle)->magic == MH_CIGAM)) {
-        unsigned long options = NSUNLINKMODULE_OPTION_NONE;
-#ifdef __ppc__
-        options = NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES;
-#endif
-
-        return NSUnLinkModule(handle, options) ? 1 : 0;
-    }
-    else
-        return 0;
-}
-
-/*
-
-=back
-
-=cut
-
-*/
-
-/*
- * Local variables:
- *   c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
-

Modified: branches/tt528_vtinit/docs/book/ch02_getting_started.pod
==============================================================================
--- branches/tt528_vtinit/docs/book/ch02_getting_started.pod	Mon May  4 22:06:35 2009	(r38469)
+++ branches/tt528_vtinit/docs/book/ch02_getting_started.pod	Mon May  4 22:40:07 2009	(r38470)
@@ -2,61 +2,64 @@
 
 =head1 Getting Started
 
-The first step before you start playing with Parrot 
+Before you can use Parrot, you have to get it running on your machine.
 
 =head2 Installing Parrot
 
-The simplest way to install Parrot is with pre-compiled binaries for
-your operating system or distribution. Packages are available for many
-packaging systems, including Debian, Ubuntu, Fedora, Mandriva, FreeBSD,
-Cygwin, and MacPorts. A current list of available packages is maintained
-at U<http://www.parrot.org/download>. A binary installer for Windows is
-also available at U<http://parrotwin32.sourceforge.net/>.
-
-If packages aren't available on your system, you can download the latest
-supported release from U<http://www.parrot.org/release/supported>.
-
-To build Parrot you'll need a C compiler and a make utility. Generally,
-you'll use F<gcc> and F<make>, but many different versions of these
-tools are supported on different operation systems. Perl is also needed
-for parts of the configuration and build process.
-
-The following command-line instructions build the core virtual machine
-and compiler toolkit, and run the standard test suite.
-
-  $ perl Configure.pl
-  $ make
-  $ make test
-  $ make install
-
-If you're developing a language on Parrot, you'll also want to install
-the Parrot developer tools:
-
-  $ make install-dev
-
-By default, Parrot is installed in F</usr/local>, but you can
-specify a different location with the C<--prefix> flag to the
-configuration script.
+The simplest way to install Parrot is to use a pre-compiled binary for your
+operating system or distribution. Packages are available for many packaging
+systems, including Debian, Ubuntu, Fedora, Mandriva, FreeBSD, Cygwin, and
+MacPorts. The Parrot website lists all known packages at
+U<http://www.parrot.org/download>. A binary installer for Windows is also
+available at U<http://parrotwin32.sourceforge.net/>.
 
-  $ perl Configure.pl --prefix=/home/me/parrot
+If packages aren't available on your system, download the latest supported
+release from U<http://www.parrot.org/release/supported>.
+
+You need a C compiler and a make utility to build Parrot from source code --
+usually C<gcc> and C<make>, but Parrot can build with standard compiler
+toolchains on different operating systems.  Perl 5.8 is also a prerequiste for
+configuring and building Parrot.
+
+If you have these dependencies installed, build the core virtual machine and
+compiler toolkit and run the standard test suite with the commands:
+
+  $ B<perl Configure.pl>
+  $ B<make>
+  $ B<make test>
+
+By default, Parrot installs to directories F<bin/>, C<lib/>, et cetera under
+the prefix F</usr/local>.  If you have privileges to write to these
+directories, install Parrot with:
+
+  $ B<make install>
+
+To install Parrot beneath a different prefix, use the C<--prefix> option to
+C<Configure.pl>:
+
+    $ B<perl Configure.pl --prefix=/home/me/parrot>
+
+If you intend to I<develop> -- not just I<use> -- a language on Parrot, install
+the Parrot developer tools as well:
+
+  $ B<make install-dev>
 
 =head2 Running Parrot
 
-Once you've installed Parrot, you can run your first small script. Create
-a test file called F<news.pasm>. C<.pasm>
-files are written in Parrot Assembly Language (PASM) which is a
+Once you've installed Parrot, run it.  Create a test file called F<news.pasm>.
+C<.pasm> files contain Parrot Assembly Language (PASM) instructions; this is a
 low-level language native to the Parrot virtual machine.
 
 =begin PASM
 
-  print "Here is the news for Parrots.\n"
+  say "Here is the news for Parrots."
   end
 
 =end PASM
 
 Now run this file with:
 
-  $ parrot news.pasm
+  $ B<parrot news.pasm>
 
 which will print:
 
@@ -79,85 +82,100 @@
 
 =head2 What Next?
 
-This book provides details on the components of Parrot relevant to
-various development tasks. You may pick and choose chapters based on
-your area of interest:
+This book describes Parrot in terms of tasks it supports.  You may pick and
+choose chapters based on your area of interest:
 
 =over 4
 
 =item Chapter 3, I<Parrot Intermediate Representation>
 
-Parrot Intermediate Representation (PIR) is a mid-level language native
-to the Parrot virtual machine. It's commonly used for writing extensions
-and tools for Parrot.
+Parrot Intermediate Representation (PIR) is a mid-level language native to the
+Parrot virtual machine s commonly used for writing extensions and tools for
+Parrot.
 
 =item Chapter 4, I<Compiler Tools>
 
 The Parrot Compiler Toolkit (PCT) provides a common infrastructure and
-set of utilities for implementing languages on Parrot.
+utilities for implementing languages on Parrot.
 
 =item Chapter 5, I<Grammar Engine>
 
-The Parrot Grammar Engine (PGE) is a next-generation regular expression
-engine and recursive descent parser. PGE is part of the compiler tools,
-and the first step to implementing a language on Parrot.
+The Parrot Grammar Engine (PGE) is a powerful regular expression engine and
+recursive descent parser. PGE is part of the compiler tools; understanding PGE
+is essential to implementing a language on Parrot.
 
 =item Chapter 6, I<Grammar Actions>
 
-NQP (Not Quite Perl) is a lightweight language loosely inspired by the
-Perl 6 specification. NQP is part of the compiler tools and is an
-integral part of building language implementations on Parrot.
+NQP (Not Quite Perl) is a lightweight language loosely inspired by Perl 6. NQP
+is part of the compiler tools used for transforming a Parrot-hosted language
+into instructions for Parrot to execute.
 
 =item Chapter 7, I<Dynamic PMCs>
 
-Parrot allows dynamic extensions to Parrot's core data types. These are
-commonly used in more advanced language implementations. This chapter
-covers the details of writing and building these object extensions.
+=for author
+
+This chapter suggests the need for a chapter on core PMCs.  Alternately, this
+chapter could cover PMCs in general and dynpmcs as a special case of PMCs.
+
+=end for
+
+Parrot allows language developers to extend Parrot's core data types to suit
+the needs of advanced languages.
 
 =item Chapter 8, I<Dynamic Opcodes>
 
-Parrot allows dynamic extensions to the core instruction set. These are
-commonly used in more advanced language implementations. This chapter
-covers the details of writing and building these opcode extensions.
+=for author
+
+The same point applies for ops and dynops.
+
+=end for
+
+Parrot allows language developers to extend Parrot's core instruction set -- again to suit the needs of advanced languages.
 
 =item Chapter 9, I<Parrot Assembly Language>
 
-Parrot Assembly Language (PASM) is a low-level language native to the
-Parrot virtual machine. It serves as a plain-English representation of
-Parrot's bytecode format.
+Parrot Assembly Language (PASM) is a low-level language native to the Parrot
+virtual machine. It serves as a source code representation of Parrot's bytecode
+format.
 
 =item Chapter 10, I<Instruction Reference>
 
-The standard instruction set for the Parrot virtual machine.
+Parrot's standard instruction set provides powerful behavior for primitive
+operations, control flow, object orientation, exception handling, and more.
 
 =item Chapter 11, I<Directive Reference>
 
-Out-of-band directives used within PIR/PASM code.
+Parrot supports directives used within PIR and PASM code to change the behavior
+of code and to control what happens in bytecode.
 
 =item Chapter 13, I<Operator Reference>
 
-Operator syntax in PIR code.
+PIR provides several higher-level operators as a convenience to programmers and
+code generators.
 
 =item Appendix A, I<Glossary>
 
-A quick reference to common Parrot terms.
+Parrot and its environment have common jargon.
 
 =item Appendix B, I<Command-Line Options>
 
-Further details on running Parrot.
+Parrot supports several flags to control execution modes, debugging, library
+loading, and more.
 
 =item Appendix C, I<Build Options>
 
-Dependencies and additional options for building Parrot from source.
+Parrot's configuration process gives administrators and developers tremendous
+control over the build system.
 
 =item Appendix D, I<Source Code>
 
-Navigating the Parrot source tree.
+Parrot's source code is organized along logical lines -- logical, once you know
+the layout.
 
 =item Appendix E, I<Patch Submission>
 
-How to submit a patch to Parrot.
-
+Parrot depends on the combined efforts of numerous volunteers.  Your
+contributions are very welcome.
 
 =back
 

Modified: branches/tt528_vtinit/src/debug.c
==============================================================================
--- branches/tt528_vtinit/src/debug.c	Mon May  4 22:06:35 2009	(r38469)
+++ branches/tt528_vtinit/src/debug.c	Mon May  4 22:40:07 2009	(r38470)
@@ -587,9 +587,7 @@
 get_cmd(ARGIN_NULLOK(const char **cmd))
 {
     ASSERT_ARGS(get_cmd)
-    if (cmd == NULL || *cmd == NULL)
-        return NULL;
-    else {
+    if (cmd && *cmd) {
         const char * const start = skip_whitespace(*cmd);
         const char *next = start;
         char c;
@@ -626,9 +624,8 @@
             *cmd = skip_whitespace(next);
             return DebCmdList[found].cmd;
         }
-        else
-            return NULL;
     }
+    return NULL;
 }
 
 /*
@@ -1331,7 +1328,6 @@
 PDB_run_command(PARROT_INTERP, ARGIN(const char *command))
 {
     ASSERT_ARGS(PDB_run_command)
-    unsigned long c;
     PDB_t        * const pdb = interp->pdb;
     const DebuggerCmd *cmd;
 

Modified: branches/tt528_vtinit/src/packfile.c
==============================================================================
--- branches/tt528_vtinit/src/packfile.c	Mon May  4 22:06:35 2009	(r38469)
+++ branches/tt528_vtinit/src/packfile.c	Mon May  4 22:40:07 2009	(r38470)
@@ -4818,7 +4818,6 @@
 Parrot_load_bytecode(PARROT_INTERP, ARGIN_NULLOK(STRING *file_str))
 {
     ASSERT_ARGS(Parrot_load_bytecode)
-    char           *filename;
     STRING         *wo_ext, *ext, *pbc, *path;
     PMC            *is_loaded_hash;
     enum_runtime_ft file_type;

Modified: branches/tt528_vtinit/src/pmc/default.pmc
==============================================================================
--- branches/tt528_vtinit/src/pmc/default.pmc	Mon May  4 22:06:35 2009	(r38469)
+++ branches/tt528_vtinit/src/pmc/default.pmc	Mon May  4 22:40:07 2009	(r38470)
@@ -97,13 +97,13 @@
     if (!ro)
         ro = string_make(interp, "_ro", 3, "ascii",
             PObj_constant_FLAG|PObj_external_FLAG);
-    if (!Parrot_str_compare(interp, key, ro)) {
+    if (Parrot_str_equal(interp, key, ro)) {
 #else
 
     /*
-     * s2 in Parrot_str_compare is freed here
+     * s2 in Parrot_str_equal is freed here
      */
-    if (!Parrot_str_compare(interp, key, CONST_STRING(interp, "_ro"))) {
+    if (Parrot_str_equal(interp, key, CONST_STRING(interp, "_ro"))) {
 #endif
         /* pmc should set/clear readonly */
         const INTVAL on = VTABLE_get_bool(interp, value);
@@ -182,7 +182,7 @@
 static PMC*
 check_get_std_props(PARROT_INTERP, PMC *self, STRING *key) {
     if ((self->vtable->flags & (VTABLE_IS_CONST_FLAG | VTABLE_IS_READONLY_FLAG))
-        &&!Parrot_str_compare(interp, key, CONST_STRING(interp, "_ro"))) {
+       && Parrot_str_equal(interp, key, CONST_STRING(interp, "_ro"))) {
         PMC * const ret_val  = pmc_new(interp, enum_class_Integer);
         VTABLE_set_integer_native(interp, ret_val, 1);
         return ret_val;

Modified: branches/tt528_vtinit/src/pmc/exception.pmc
==============================================================================
--- branches/tt528_vtinit/src/pmc/exception.pmc	Mon May  4 22:06:35 2009	(r38469)
+++ branches/tt528_vtinit/src/pmc/exception.pmc	Mon May  4 22:40:07 2009	(r38470)
@@ -770,9 +770,7 @@
                 VTABLE_set_pmc_keyed_str(interp, frame, CONST_STRING(interp, "sub"), sub_pmc);
 
                 /* Look up any annotations and put them in the hash. */
-                if (!PMC_IS_NULL(sub_pmc)
-                &&  sub_pmc->vtable->base_type == enum_class_Sub) {
-
+                if (!PMC_IS_NULL(sub_pmc)) {
                     PMC_get_sub(interp, sub_pmc, sub);
 
                     if (sub->seg->annotations) {

Modified: branches/tt528_vtinit/src/pmc/orderedhash.pmc
==============================================================================
--- branches/tt528_vtinit/src/pmc/orderedhash.pmc	Mon May  4 22:06:35 2009	(r38469)
+++ branches/tt528_vtinit/src/pmc/orderedhash.pmc	Mon May  4 22:40:07 2009	(r38470)
@@ -629,9 +629,10 @@
                 {
                     Hash     * const hash = (Hash *)SELF.get_pointer();
                     IMAGE_IO * const io   = info->image_io;
+                    const UINTVAL entries = hash->entries;
                     UINTVAL i;
 
-                    for (i = 0; i <= hash->entries; i++) {
+                    for (i = 0; i < entries; i++) {
                         HashBucket * const b   = hash->bs + i;
 
                         if (b) {

Modified: branches/tt528_vtinit/tools/dev/fetch_languages.pl
==============================================================================
--- branches/tt528_vtinit/tools/dev/fetch_languages.pl	Mon May  4 22:06:35 2009	(r38469)
+++ branches/tt528_vtinit/tools/dev/fetch_languages.pl	Mon May  4 22:40:07 2009	(r38470)
@@ -288,6 +288,12 @@
         scm        => 'GIT',
         repository => 'git://github.com/fperrad/wmlscript.git'
     },
+
+    {
+        name       => 'xml',
+        scm        => 'GIT',
+        repository => 'git://github.com/fperrad/xml.git'
+    },
 );
 
 foreach (@hlls) {

Modified: branches/tt528_vtinit/tools/dev/install_files.pl
==============================================================================
--- branches/tt528_vtinit/tools/dev/install_files.pl	Mon May  4 22:06:35 2009	(r38469)
+++ branches/tt528_vtinit/tools/dev/install_files.pl	Mon May  4 22:40:07 2009	(r38470)
@@ -4,112 +4,6 @@
 # $Id$
 ################################################################################
 
-=head1 TITLE
-
-tools/dev/install_files.pl - Copy files to their correct locations
-
-=head1 SYNOPSIS
-
-    % perl tools/dev/install_files.pl [options]
-
-=head1 DESCRIPTION
-
-Use a detailed MANIFEST to install a set of files.
-
-=head2 Options
-
-=over 4
-
-=item C<buildprefix>
-
-The build prefix. Defaults to ''.
-
-=item C<prefix>
-
-The install prefix. Defaults to '/usr'.
-
-=item C<exec_prefix>
-
-The exec prefix. Defaults to '/usr'.
-
-=item C<bindir>
-
-The executables directory. Defaults to '/usr/bin'.
-
-=item C<libdir>
-
-The library directory. Defaults to '/usr/lib'.
-
-=item C<includedir>
-
-The header directory. Defaults to '/usr/include'.
-
-=back
-
-=head2 MANIFEST Format
-
-The format of the MANIFEST (currently MANIFEST and MANIFEST.generated
-are used) is:
-
-    source_path <whitespace> [package]meta1,meta2,...
-
-or you may optionally specify a different destination path:
-
-    source_path <whitespace> [package]meta1,meta2,... <whitespace> destination
-
-Additionally, there may be a * in front of the whole line to designate
-a generated file:
-
-    source_path <whitespace> *[package]meta1,meta2,... <whitespace> destination
-
-The square brackets around C<package> are literal. C<package> gives
-the name of the RPM that the given file will be installed for, and is
-only used by this script to skip files that are not members of any
-package.
-
-The various meta flags recognized are:
-
-=over 4
-
-=item C<doc>
-
-Tag this file with %doc in the RPM, and omit the leading path (because
-rpm will put it into a directory of its choosing)
-
-=item C<include>
-
-Write this file to the location given by the C<--includedir> option
-
-=item C<lib>
-
-Write this file to the location given by the C<--libdir> option
-
-=item C<bin>
-
-Write this file to the location given by the C<--bindir> option
-
-=back
-
-The optional C<destination> field provides a general way to change
-where a file will be written to. It will be applied before any
-metadata tags.
-
-Example: if this line is in the MANIFEST.generated file
-
-  languages/snorkfest/snork-compile        [main]bin
-
-and the --bindir=/usr/parroty/bin, then the generated
-parrot-<VERSION>-1.<arch>.rpm file will contain the file
-/usr/parroty/bin/snork-compile.
-
-=head1 SEE ALSO
-
-F<tools/dev/mk_manifests.pl>
-
-=cut
-
-################################################################################
-
 use strict;
 use warnings;
 use File::Basename qw(dirname basename);
@@ -132,12 +26,12 @@
 );
 
 my @manifests;
-foreach (@ARGV) {
-    if (/^--([^=]+)=(.*)/) {
+foreach my $arg (@ARGV) {
+    if ( $arg =~ m/^--([^=]+)=(.*)/ ) {
         $options{$1} = $2;
     }
     else {
-        push @manifests, $_;
+        push @manifests, $arg;
     }
 }
 
@@ -247,16 +141,15 @@
                 unshift @dirs, $dir;
                 $dir = dirname($dir);
             }
-            foreach (@dirs) {
-                mkdir( $_, 0777 ) or die "mkdir $_: $!\n";
+            foreach my $d (@dirs) {
+                mkdir( $d, 0777 ) or die "mkdir $d: $!\n";
             }
         }
     }
 }
-# TT #347
-# 1. skip build_dir-only binaries for @installable_exe
-for (@installable_exe) {
-    my ( $i, $dest ) = @$_;
+
+for my $iref (@installable_exe) {
+    my ( $i, $dest ) = @{ $iref };
     my ($file) = $i =~ /installable_(.+)$/;
     next unless $file;
     my @f = map { $_ ? $_->[0] : '' } @files;
@@ -267,23 +160,23 @@
         }
     }
 }
-# 2. for every .exe check if there's an installable. Fail if not
-foreach my $f (@files ) {
-    next unless $_;
-    my ( $f, $dest ) = @$_;
+# for every .exe check if there's an installable. Fail if not
+foreach my $fref (@files ) {
+    next unless $fref;
+    my ( $src, $dest ) = @{ $fref };
     my $i;
     # This logic will fail on non-win32 if the generated files are really
     # generated as with rt #40817. We don't have [main]bin here.
-    $i = "installable_$f" if $f =~ /\.exe$/;
+    $i = "installable_$src" if $src =~ /\.exe$/;
     next unless $i;
     unless (map {$_->[0] =~ /^$i$/} @installable_exe) {
         die "$i is missing in MANIFEST or MANIFEST.generated\n";
     }
 }
 print("Installing ...\n");
-foreach ( @files, @installable_exe ) {
-    next unless $_;
-    my ( $src, $dest ) = @$_;
+foreach my $fref ( @files, @installable_exe ) {
+    next unless $fref;
+    my ( $src, $dest ) = @{ $fref };
     $dest = $options{destdir} . $dest;
     if ( $options{'dry-run'} ) {
         print "$src -> $dest\n";
@@ -299,6 +192,112 @@
     chmod $mode, $dest;
 }
 
+################################################################################
+
+=head1 TITLE
+
+tools/dev/install_files.pl - Copy files to their correct locations
+
+=head1 SYNOPSIS
+
+    % perl tools/dev/install_files.pl [options]
+
+=head1 DESCRIPTION
+
+Use a detailed MANIFEST to install a set of files.
+
+=head2 Options
+
+=over 4
+
+=item C<buildprefix>
+
+The build prefix. Defaults to ''.
+
+=item C<prefix>
+
+The install prefix. Defaults to '/usr'.
+
+=item C<exec_prefix>
+
+The exec prefix. Defaults to '/usr'.
+
+=item C<bindir>
+
+The executables directory. Defaults to '/usr/bin'.
+
+=item C<libdir>
+
+The library directory. Defaults to '/usr/lib'.
+
+=item C<includedir>
+
+The header directory. Defaults to '/usr/include'.
+
+=back
+
+=head2 MANIFEST Format
+
+The format of the MANIFEST (currently MANIFEST and MANIFEST.generated
+are used) is:
+
+    source_path <whitespace> [package]meta1,meta2,...
+
+or you may optionally specify a different destination path:
+
+    source_path <whitespace> [package]meta1,meta2,... <whitespace> destination
+
+Additionally, there may be a * in front of the whole line to designate
+a generated file:
+
+    source_path <whitespace> *[package]meta1,meta2,... <whitespace> destination
+
+The square brackets around C<package> are literal. C<package> gives
+the name of the RPM that the given file will be installed for, and is
+only used by this script to skip files that are not members of any
+package.
+
+The various meta flags recognized are:
+
+=over 4
+
+=item C<doc>
+
+Tag this file with %doc in the RPM, and omit the leading path (because
+rpm will put it into a directory of its choosing)
+
+=item C<include>
+
+Write this file to the location given by the C<--includedir> option
+
+=item C<lib>
+
+Write this file to the location given by the C<--libdir> option
+
+=item C<bin>
+
+Write this file to the location given by the C<--bindir> option
+
+=back
+
+The optional C<destination> field provides a general way to change
+where a file will be written to. It will be applied before any
+metadata tags.
+
+Example: if this line is in the MANIFEST.generated file
+
+  languages/snorkfest/snork-compile        [main]bin
+
+and the --bindir=/usr/parroty/bin, then the generated
+parrot-<VERSION>-1.<arch>.rpm file will contain the file
+/usr/parroty/bin/snork-compile.
+
+=head1 SEE ALSO
+
+F<tools/dev/mk_manifests.pl>
+
+=cut
+
 # Local Variables:
 #   mode: cperl
 #   cperl-indent-level: 4


More information about the parrot-commits mailing list