[svn:parrot] r36556 - in branches/kill_pccinvoke: . config/auto/format config/gen/makefiles config/init/hints docs/book docs/dev docs/pdds docs/pdds/draft docs/project examples/pir ext/Parrot-Embed/lib/Parrot include/parrot languages/PIR languages/befunge languages/cola languages/dotnet languages/ecmascript/t/sanity_pt languages/lua/src/pmc languages/lua/t/test languages/pheme languages/pipp languages/pipp/docs languages/pipp/src/classes languages/pipp/src/common languages/pipp/src/pmc languages/pipp/t/embed languages/pipp/t/php languages/regex lib/Parrot lib/Parrot/Docs/Section lib/Parrot/Pmc2c ports/debian src src/call src/dynpmc src/gc src/io src/ops src/pmc src/string t/compilers/imcc/syn t/compilers/tge t/dynpmc t/native_pbc t/pmc t/src t/steps t/tools tools/dev tools/install tools/util

whiteknight at svn.parrot.org whiteknight at svn.parrot.org
Tue Feb 10 19:57:42 UTC 2009


Author: whiteknight
Date: Tue Feb 10 19:57:33 2009
New Revision: 36556
URL: https://trac.parrot.org/parrot/changeset/36556

Log:
[kill_pccinvoke] update to trunk r36555 to get past the IO buffering problem from yesterday so I can build/test

Added:
   branches/kill_pccinvoke/languages/cola/TODO
      - copied unchanged from r36554, trunk/languages/cola/TODO
   branches/kill_pccinvoke/languages/regex/TODO
      - copied unchanged from r36554, trunk/languages/regex/TODO
   branches/kill_pccinvoke/t/src/embed.t
      - copied unchanged from r36554, trunk/t/src/embed.t
Deleted:
   branches/kill_pccinvoke/lib/Parrot/Docs/Section/BigNum.pm
   branches/kill_pccinvoke/t/src/compiler.t
Modified:
   branches/kill_pccinvoke/   (props changed)
   branches/kill_pccinvoke/MANIFEST
   branches/kill_pccinvoke/PLATFORMS
   branches/kill_pccinvoke/config/auto/format/intval_maxmin_c.in   (props changed)
   branches/kill_pccinvoke/config/gen/makefiles/dynoplibs_pl.in
   branches/kill_pccinvoke/config/gen/makefiles/dynpmc_pl.in
   branches/kill_pccinvoke/config/gen/makefiles/parrot_embed_pl.in
   branches/kill_pccinvoke/config/init/hints/mswin32.pm
   branches/kill_pccinvoke/config/init/hints/solaris.pm
   branches/kill_pccinvoke/docs/book/appX_patch_submission.pod   (props changed)
   branches/kill_pccinvoke/docs/book/ch03_pir_basics.pod
   branches/kill_pccinvoke/docs/book/ch07_testing_and_debugging.pod   (props changed)
   branches/kill_pccinvoke/docs/book/ch08_architecture.pod   (props changed)
   branches/kill_pccinvoke/docs/book/ch09_pct.pod   (props changed)
   branches/kill_pccinvoke/docs/book/ch10_hlls.pod   (props changed)
   branches/kill_pccinvoke/docs/book/ch11_pmcs.pod   (props changed)
   branches/kill_pccinvoke/docs/book/ch12_opcodes.pod   (props changed)
   branches/kill_pccinvoke/docs/book/ch13_reference.pod   (props changed)
   branches/kill_pccinvoke/docs/dev/c_functions.pod   (props changed)
   branches/kill_pccinvoke/docs/pdds/draft/pdd01_overview.pod
   branches/kill_pccinvoke/docs/pdds/draft/pdd05_opfunc.pod
   branches/kill_pccinvoke/docs/pdds/draft/pdd06_pasm.pod
   branches/kill_pccinvoke/docs/pdds/draft/pdd08_keys.pod
   branches/kill_pccinvoke/docs/pdds/draft/pdd10_embedding.pod
   branches/kill_pccinvoke/docs/pdds/draft/pdd11_extending.pod
   branches/kill_pccinvoke/docs/pdds/draft/pdd14_numbers.pod
   branches/kill_pccinvoke/docs/pdds/draft/pdd16_native_call.pod
   branches/kill_pccinvoke/docs/pdds/draft/pdd29_compiler_tools.pod
   branches/kill_pccinvoke/docs/pdds/draft/pdd30_install.pod
   branches/kill_pccinvoke/docs/pdds/draft/pdd31_hll_interop.pod
   branches/kill_pccinvoke/docs/pdds/pdd00_pdd.pod
   branches/kill_pccinvoke/docs/pdds/pdd09_gc.pod
   branches/kill_pccinvoke/docs/pdds/pdd20_lexical_vars.pod
   branches/kill_pccinvoke/docs/project/release_manager_guide.pod
   branches/kill_pccinvoke/examples/pir/pirric.pir
   branches/kill_pccinvoke/ext/Parrot-Embed/lib/Parrot/Embed.xs
   branches/kill_pccinvoke/include/parrot/gc_api.h   (contents, props changed)
   branches/kill_pccinvoke/include/parrot/gc_mark_sweep.h   (contents, props changed)
   branches/kill_pccinvoke/include/parrot/gc_pools.h   (props changed)
   branches/kill_pccinvoke/include/parrot/interpreter.h
   branches/kill_pccinvoke/include/parrot/pmc.h
   branches/kill_pccinvoke/include/parrot/resources.h
   branches/kill_pccinvoke/languages/PIR/pir.pir   (props changed)
   branches/kill_pccinvoke/languages/befunge/Configure.pl   (props changed)
   branches/kill_pccinvoke/languages/dotnet/TODO
   branches/kill_pccinvoke/languages/ecmascript/t/sanity_pt/03-boolean.t   (props changed)
   branches/kill_pccinvoke/languages/lua/src/pmc/luatable.pmc
   branches/kill_pccinvoke/languages/lua/src/pmc/luauserdata.pmc
   branches/kill_pccinvoke/languages/lua/t/test/bisect-output-win32.txt   (props changed)
   branches/kill_pccinvoke/languages/pheme/TODO
   branches/kill_pccinvoke/languages/pipp/docs/internals.pod   (props changed)
   branches/kill_pccinvoke/languages/pipp/pipp.pir   (props changed)
   branches/kill_pccinvoke/languages/pipp/src/classes/Object.pir   (props changed)
   branches/kill_pccinvoke/languages/pipp/src/common/php_filesystem.pir   (props changed)
   branches/kill_pccinvoke/languages/pipp/src/pmc/pipp_hash.c   (props changed)
   branches/kill_pccinvoke/languages/pipp/src/pmc/pipp_hash.h   (props changed)
   branches/kill_pccinvoke/languages/pipp/t/embed/eval.t   (props changed)
   branches/kill_pccinvoke/languages/pipp/t/php/filesystem.t   (props changed)
   branches/kill_pccinvoke/lib/Parrot/Docs/Section/Parrot.pm
   branches/kill_pccinvoke/lib/Parrot/Pmc2c/Attribute.pm
   branches/kill_pccinvoke/lib/Parrot/Pmc2c/PMCEmitter.pm
   branches/kill_pccinvoke/lib/Parrot/Test.pm
   branches/kill_pccinvoke/lib/Parrot/Vtable.pm
   branches/kill_pccinvoke/ports/debian/copyright
   branches/kill_pccinvoke/src/call/pcc.c
   branches/kill_pccinvoke/src/dynpmc/pair.pmc   (props changed)
   branches/kill_pccinvoke/src/events.c
   branches/kill_pccinvoke/src/extend.c
   branches/kill_pccinvoke/src/gc/api.c   (contents, props changed)
   branches/kill_pccinvoke/src/gc/generational_ms.c   (contents, props changed)
   branches/kill_pccinvoke/src/gc/incremental_ms.c   (contents, props changed)
   branches/kill_pccinvoke/src/gc/mark_sweep.c   (contents, props changed)
   branches/kill_pccinvoke/src/gc/pools.c   (contents, props changed)
   branches/kill_pccinvoke/src/gc/resources.c
   branches/kill_pccinvoke/src/gc/system.c   (props changed)
   branches/kill_pccinvoke/src/inter_cb.c
   branches/kill_pccinvoke/src/inter_create.c
   branches/kill_pccinvoke/src/inter_misc.c
   branches/kill_pccinvoke/src/io/buffer.c
   branches/kill_pccinvoke/src/io/portable.c
   branches/kill_pccinvoke/src/io/unix.c
   branches/kill_pccinvoke/src/io/win32.c
   branches/kill_pccinvoke/src/ops/core.ops
   branches/kill_pccinvoke/src/ops/pmc.ops
   branches/kill_pccinvoke/src/pmc.c
   branches/kill_pccinvoke/src/pmc/addrregistry.pmc
   branches/kill_pccinvoke/src/pmc/exceptionhandler.pmc
   branches/kill_pccinvoke/src/pmc/filehandle.pmc
   branches/kill_pccinvoke/src/pmc/parrotinterpreter.pmc
   branches/kill_pccinvoke/src/pmc/pmcproxy.pmc
   branches/kill_pccinvoke/src/pmc_freeze.c
   branches/kill_pccinvoke/src/runops_cores.c
   branches/kill_pccinvoke/src/stacks.c
   branches/kill_pccinvoke/src/string/api.c
   branches/kill_pccinvoke/src/thread.c
   branches/kill_pccinvoke/t/compilers/imcc/syn/pcc.t
   branches/kill_pccinvoke/t/compilers/tge/NoneGrammar.tg   (props changed)
   branches/kill_pccinvoke/t/dynpmc/pair.t   (props changed)
   branches/kill_pccinvoke/t/native_pbc/integer.t
   branches/kill_pccinvoke/t/native_pbc/number.t
   branches/kill_pccinvoke/t/native_pbc/string.t
   branches/kill_pccinvoke/t/pmc/exceptionhandler.t
   branches/kill_pccinvoke/t/steps/gen_makefiles-01.t
   branches/kill_pccinvoke/t/tools/pmc2c.t
   branches/kill_pccinvoke/tools/dev/mk_gitignore.pl   (props changed)
   branches/kill_pccinvoke/tools/dev/mk_native_pbc
   branches/kill_pccinvoke/tools/dev/pbc_to_exe.pir
   branches/kill_pccinvoke/tools/install/smoke.pl
   branches/kill_pccinvoke/tools/util/perlcritic-cage.conf   (props changed)

Modified: branches/kill_pccinvoke/MANIFEST
==============================================================================
--- branches/kill_pccinvoke/MANIFEST	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/MANIFEST	Tue Feb 10 19:57:33 2009	(r36556)
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Mon Feb  9 23:44:15 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Tue Feb 10 17:24:44 2009 UT
 #
 # See tools/dev/install_files.pl for documentation on the
 # format of this file.
@@ -1264,6 +1264,7 @@
 languages/cola/MAINTAINER                                   [cola]
 languages/cola/README                                       [cola]
 languages/cola/System.cola                                  [cola]
+languages/cola/TODO                                         [cola]
 languages/cola/cola.h                                       [cola]
 languages/cola/cola.l                                       [cola]
 languages/cola/cola.y                                       [cola]
@@ -2181,6 +2182,7 @@
 languages/regex/MAINTAINER                                  [regex]
 languages/regex/README                                      [regex]
 languages/regex/README.hacking                              [regex]
+languages/regex/TODO                                        [regex]
 languages/regex/config/makefiles/root.in                    [regex]
 languages/regex/docs/regex.pod                              [regex]
 languages/regex/lib/Parrot/Test/Regex.pm                    [regex]
@@ -2315,7 +2317,6 @@
 lib/Parrot/Docs/Item.pm                                     [devel]
 lib/Parrot/Docs/POD2HTML.pm                                 [devel]
 lib/Parrot/Docs/Section.pm                                  [devel]
-lib/Parrot/Docs/Section/BigNum.pm                           [devel]
 lib/Parrot/Docs/Section/C.pm                                [devel]
 lib/Parrot/Docs/Section/Compilers.pm                        [devel]
 lib/Parrot/Docs/Section/Config.pm                           [devel]
@@ -3213,7 +3214,7 @@
 t/src/README                                                []
 t/src/atomic.t                                              []
 t/src/basic.t                                               []
-t/src/compiler.t                                            []
+t/src/embed.t                                               []
 t/src/exit.t                                                []
 t/src/extend.t                                              []
 t/src/warnings.t                                            []

Modified: branches/kill_pccinvoke/PLATFORMS
==============================================================================
--- branches/kill_pccinvoke/PLATFORMS	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/PLATFORMS	Tue Feb 10 19:57:33 2009	(r36556)
@@ -13,7 +13,7 @@
 Platform                     B8    Runloops      Feature Comp Test Inst YYYYMMDD
                                 CGoto JIT EXEC   Thr Sig
 --------------------------------------------------------------------------------
-cygwin1.5.25-x86-gcc3.4.4     4   Y    Y    -     -   -   Y    Y/6*1 ?  20080513
+cygwin1.5.25-x86-gcc3.4.4     4   Y    Y    -     -   -   Y    Y     Y  20090203
 darwin8.11.1-x86-gcc4.0.1    ??   ?    ?    ?     ?   ?   Y    Y/1*3 ?  20081216
 freebsd-x86-gcc-3.4.6             Y    ?    ?     ?   ?   Y    Y     ?  20080519
 linux-x86-gcc4.1.2                Y    Y    ?     Y   Y   Y    Y     ?  20080617
@@ -23,7 +23,7 @@
 linux-x86-gcc4.3.2                Y    Y    ?     Y   Y   Y    Y     ?  20081030
 linux-x86-llvm-gcc-4.2            Y    Y    ?     ?   ?   Y    Y     ?  20080801
 sol10-sparc-cc_5.9           B4*2 Y    -    -     Y   Y   Y    Y     ?  20080510
-sol10-sparc-cc_5.9           B8   Y    -    -     Y   Y   Y    Y/2   ?  20080518
+sol10-sparc-cc_5.9           B8   Y    -    -     Y   Y   Y    Y/3*2 ?  20090103
 sol10-sparc-gcc_4.0.2        B4*2 Y    -    -     Y   Y   Y    Y/1   ?  20080510
 sol10-sparc-gcc_4.0.2        B8   Y    -    -     Y   Y   Y    Y/2   ?  20080518
 win32-x86-mingw_gcc3.4.5          Y    Y    -     -   -   Y    Y     Y  20090120
@@ -45,8 +45,9 @@
 sol8-sparc-cc                B    -    -    -     -   -   -    Y/85  ?  20080818
 sol8-sparc-gcc_4.1.0         B    -    -    -     -   -   -    Y/87  ?  20080818
 win32-x86-mingw_gcc4.3.0          Y    Y    -     -   -   Y    Y/88  ?  20081203
-win32-x64-msvc_9.0            8   -    N    -     -   -   Y    Y/51  ?  20081203
-win32-x64-mingw_gcc3.4.5      8   Y    Y    ?     ?   ?   Y    Y     ?  20081216
+win32-x86-msvc_6.0            4   -    Y    -     -   -   Y    Y/8   ?  20090103
+win32-x64-msvc_9.0            8   -    -    -     -   -   Y    Y/51  ?  20081203
+win32-x64-mingw_gcc3.4.5      8   Y    Y    ?     ?   ?   Y    Y     ?  20090210
 
 Legend:
 ?   ... unknown or untested
@@ -74,8 +75,9 @@
 YYYYMMDD  The date tested.
 
 Remarks:
-*1 need PATH=$PATH:$PWD/blib/lib to locate DLL
-*2 gcc and cc defaults to 32bits on solaris
+*2 gcc and cc defaults to 32bits on solaris, for 64bit use
+   --ccflags='-m64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TS_ERRNO'
+   --ldflags='-m64'
 *3 http://rt.perl.org/rt3/Ticket/Display.html?id=60926
 
 The following configurations are also working on x86/linux (and possibly

Modified: branches/kill_pccinvoke/config/gen/makefiles/dynoplibs_pl.in
==============================================================================
--- branches/kill_pccinvoke/config/gen/makefiles/dynoplibs_pl.in	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/config/gen/makefiles/dynoplibs_pl.in	Tue Feb 10 19:57:33 2009	(r36556)
@@ -35,13 +35,7 @@
 #IF(parrot_is_shared):$LIBPARROT = q[@libparrot_ldflags@];
 
 # Here comes some stuff for Win32.
-our $PATHQUOTE = q[];
-if ($^O eq 'MSWin32') {
-    # Paths need quoting as they may contain spaces.
-    $PATHQUOTE = q["];
-    # absolute because we are building in src\dynoplibs
-    $LIBPARROT = '@build_dir@/libparrot.lib'; # the importlib, not the static one
-}
+our $PATHQUOTE = $^O eq 'MSWin32' ? q["] : q[];
 
 # OPS2C Config
 our $OPS2C = "$PERL -I $PATHQUOTE" .

Modified: branches/kill_pccinvoke/config/gen/makefiles/dynpmc_pl.in
==============================================================================
--- branches/kill_pccinvoke/config/gen/makefiles/dynpmc_pl.in	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/config/gen/makefiles/dynpmc_pl.in	Tue Feb 10 19:57:33 2009	(r36556)
@@ -39,13 +39,7 @@
 #IF(parrot_is_shared):$LIBPARROT = q[@libparrot_ldflags@];
 
 # Here comes some stuff for Win32.
-our $PATHQUOTE = '';
-if ($^O eq 'MSWin32') {
-    # Paths need quoting as they may contain spaces.
-    $PATHQUOTE = '"';
-    # absolute because we are building in src\dynoplibs
-    $LIBPARROT = '@build_dir@/libparrot.lib'; # the importlib, not the static one
-}
+our $PATHQUOTE = $^O eq 'MSWin32' ? q["] : q[];
 
 # PMC2C Config
 our $PMC2C = "$PERL $PATHQUOTE" . q[@build_dir@@slash at tools@slash at build@slash at pmc2c.pl] . $PATHQUOTE;
@@ -203,7 +197,6 @@
     return system(@_) == 0;
 }
 
-# TT #289: ordering of libs might be crucial
 sub gather_groups_and_libs {
     my @pmcs = @_;
 

Modified: branches/kill_pccinvoke/config/gen/makefiles/parrot_embed_pl.in
==============================================================================
--- branches/kill_pccinvoke/config/gen/makefiles/parrot_embed_pl.in	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/config/gen/makefiles/parrot_embed_pl.in	Tue Feb 10 19:57:33 2009	(r36556)
@@ -36,7 +36,7 @@
     'PREREQ_PM'    => { 'ExtUtils::CBuilder' => 0 },
 #IF(win32):    'LIBS'         => [ $config{C_LIBS} ],
 #ELSE:    'LIBS'         => [ $config{ALL_PARROT_LIBS} ],
-#IF(win32):    'OBJECT'       => "@libparrot_ldflags@ Embed at o@",
+#IF(win32):    'OBJECT'       => q|@libparrot_ldflags@ Embed at o@|,
     'INC'          => "-I$config{INCLUDE}",
     'PM'           => { map { $_ => "blib/$_" } <lib/Parrot/*pm> },
     'clean'        => { FILES => '*.xs t/greet.pbc' },

Modified: branches/kill_pccinvoke/config/init/hints/mswin32.pm
==============================================================================
--- branches/kill_pccinvoke/config/init/hints/mswin32.pm	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/config/init/hints/mswin32.pm	Tue Feb 10 19:57:33 2009	(r36556)
@@ -103,7 +103,7 @@
 
         # If we are building shared, need to include dynamic libparrot.lib, otherwise
         # the static libparrot.lib.
-        $conf->data->set( libparrot_ldflags   => 'libparrot.lib' );
+        $conf->data->set( libparrot_ldflags   => "\"$build_dir\\libparrot.lib\"" );
 
         # 'link' needs to be link.exe, not cl.exe.
         # This makes 'link' and 'ld' the same.
@@ -239,6 +239,7 @@
             has_dynamic_linking => 1,
             ld_load_flags       => '-shared ',
             ld_share_flags      => '-shared ',
+            libparrot_ldflags   => "\"$build_dir\\libparrot.dll\"",
             ncilib_link_extra   => 'src/libnci_test.def',
             sym_export          => '__declspec(dllexport)',
             sym_import          => '__declspec(dllimport)',

Modified: branches/kill_pccinvoke/config/init/hints/solaris.pm
==============================================================================
--- branches/kill_pccinvoke/config/init/hints/solaris.pm	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/config/init/hints/solaris.pm	Tue Feb 10 19:57:33 2009	(r36556)
@@ -40,9 +40,14 @@
         %gnuc = eval $conf->cc_run() or die "Can't run the test program: $!";
         if ( defined $gnuc{__GNUC__} ) {
             $link = 'g++';
+            unless ($conf->data->get('rpath')) {
+                $conf->data->set( 'rpath', '-Wl,-rpath=' );
+            }
         }
         else {
-            $link =~ s/\bcc\b/CC/;
+            unless ($conf->data->get('rpath')) {
+                $conf->data->set( 'rpath', '-R' );
+            }
         }
         $conf->data->set( link => $link );
         $conf->data->deltrigger( "cc", "solaris_link" );
@@ -64,6 +69,8 @@
         else {
             $conf->data->set( cc_shared => '-KPIC' );
         }
+        $conf->data->set( 'has_dynamic_linking', '1' );
+        $conf->data->set( 'parrot_is_shared', '1' );
         $conf->data->deltrigger( "gccversion", "solaris_cc_shared" );
     };
     $conf->data->settrigger(

Modified: branches/kill_pccinvoke/docs/book/ch03_pir_basics.pod
==============================================================================
--- branches/kill_pccinvoke/docs/book/ch03_pir_basics.pod	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/docs/book/ch03_pir_basics.pod	Tue Feb 10 19:57:33 2009	(r36556)
@@ -316,12 +316,12 @@
 takes more time to execute during the compilation phase. Here's an example
 of where a register could be reused:
 
-.sub main
-  $S0 = "hello "
-  print $S0
-  $S1 = "world!"
-  print $S1
-.end
+  .sub main
+    $S0 = "hello "
+    print $S0
+    $S1 = "world!"
+    print $S1
+  .end
 
 We'll talk about subroutines in more detail in the next chapter. For now,
 we can dissect this little bit of code to see what is happening. The C<.sub>
@@ -345,12 +345,12 @@
 the second allocation. Notice that this code with only one register performs
 identically to the previous example:
 
-.sub main
-  $S0 = "hello "
-  print $S0
-  $S0 = "world!"
-  print $S0
-.end
+  .sub main
+    $S0 = "hello "
+    print $S0
+    $S0 = "world!"
+    print $S0
+  .end
 
 In some situations it can be helpful to turn the allocator off and avoid
 expensive optimizations. Such situations are subroutines where there are a
@@ -762,11 +762,11 @@
 choose not to implement each interface explicitly and instead let Parrot
 call the default implementations>. 
 
-VTABLES are very strict: There are a fixed number with fixed names and
+VTABLEs are very strict: There are a fixed number with fixed names and
 fixed argument lists. You can't just create any random VTABLE interface that
 you want to create, you can only make use of the ones that Parrot supplies
 and expects. To circumvent this limitation, PMCs may have METHODS in
-addition to VTABLES. METHODS are arbitrary code functions that can be
+addition to VTABLEs. METHODs are arbitrary code functions that can be
 written in C, may have any name, and may implement any behavior.
 
 =head2 VTABLE Interfaces
@@ -858,6 +858,132 @@
 both of the ones in the example are. They can be integers, numbers
 or PMCs too.
 
+=head1 Input and Output
+
+Like almost everything else in Parrot, input and output are handled by PMCs.
+Using the C<print> opcode or the C<say> opcode like we've already seen in
+some examples does this internally without your knowledge. However, we can
+do it explicitly too. First we'll talk about basic I/O, and then we will talk
+about using PMC-based filehandles for more advanced operations.
+
+=head2 Basic I/O Opcodes
+
+We've seen C<print> and C<say>. These are carry-over artifacts from Perl, when
+Parrot was simply the VM backend to the Perl 6 language. C<print> prints
+the given string argument, or the stringified form of the argument, if it's
+not a string, to standard output. C<say> does the same thing but also appends
+a trailing newline to it. Another opcode worth mentioning is the C<printerr>
+opcode, which prints an argument to the standard error output instead.
+
+We can read values from the standard input using the C<read> and C<readline>
+ops. C<read> takes an integer value and returns a string with that many
+characters. C<readline> reads an entire line of input from the standard
+input, and returns the string without the trailing newline. Here is a simple
+echo program that reads in characters from the user and echos them to
+standard output:
+
+  .sub main
+    loop_top:
+      $S0 = read 10
+      print $S0
+      goto loop_top
+  .end
+
+=head2 Filehandles
+
+The ops we have seen so far are useful if all your I/O operations are limited
+to the standard streams. However, there are plenty of other places where
+you might want to get data from and send data to. Things like files, sockets,
+and databases all might need to have data sent to them. These things can be
+done by using a file handle.
+
+Filehandles are PMCs that describe a file and keep track of an I/O operations
+internal state. We can get Filehandles for the standard streams using dedicated
+opcodes:
+
+  $P0 = getstdin    # Standard input handle
+  $P1 = getstdout   # Standard output handle
+  $P2 = getstderr   # Standard error handle
+
+If we have a file, we can create a handle to it using the C<open> op:
+
+  $P0 = open "my/file/name.txt"
+
+We can also specify the exact mode that the file handle will be in:
+
+  $P0 = open "my/file/name.txt", "wa"
+
+The mode string at the end should be familiar to C programmers, because they
+are mostly the same values:
+
+  r  : read
+  w  : write
+  wa : append
+  p  : pipe
+
+So if we want a handle that we can read and write to, we write the mode string
+C<"rw">. If we want to be able to read and write to it, but we don't want
+write operations to overwrite the existing contents, we use C<"rwa"> instead.
+
+When we are done with a filehandle that we've created, we can shut it down
+with the C<close> op. Notice that we don't want to be closing any of the
+standard streams.
+
+  close $P0
+
+With a filehandle, we can perform all the same operations as we could earlier,
+but we pass the filehandle as an additional argument to tell the op where to
+write or read the data from.
+
+  print "hello"       # Write "hello!" to STDOUT
+
+  $P0 = getstdout
+  print $P0, "hello"  # Same, but more explicit
+
+  say $P0, " world!"  # say to STDOUT
+
+  $P1 = open "myfile.txt", "wa"
+  print $P1, "foo"    # Write "foo" to myfile.txt
+
+=head2 Filehandle PMCs
+
+Let's see a little example of a program that reads in data from a file, and
+prints it to STDOUT.
+
+  .sub main
+    $P0 = getstdout
+    $P1 = open "myfile.txt", "r"
+    loop_top:
+      $S0 = readline $P1
+      say $P0, $S0
+      if $P1 goto loop_top
+    close $P1
+  .end
+
+This example shows that treating a filehandle PMC like a boolean value
+returns whether or not we have reached the end of the file. A true return
+value means there is more file to read. A false return value means we are at
+the end. In addition to this behavior, Filehandle PMCs have a number of methods
+that can be used to perform various operations. 
+
+  $P0.'open'()
+  $P0.'isatty'()
+  $P0.'close'()
+  $P0.'is_closed'()
+  $P0.'read'()
+  $P0.'readline'()
+  $P0.'readline_interactive'()
+  $P0.'readall'()
+  $P0.'flush'()
+  $P0.'print'()
+  $P0.'puts'()
+  $P0.'buffer_tpe'()
+  $P0.'buffer_size'()
+  $P0.'mode'()
+  $P0.'encoding'()
+  $P0.'eof'()
+  $P0.'get_fd'()
+
 =head1 Exceptions
 
 Parrot includes a robust exception mechanism that is not only used internally

Modified: branches/kill_pccinvoke/docs/pdds/draft/pdd01_overview.pod
==============================================================================
--- branches/kill_pccinvoke/docs/pdds/draft/pdd01_overview.pod	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/docs/pdds/draft/pdd01_overview.pod	Tue Feb 10 19:57:33 2009	(r36556)
@@ -1,19 +1,17 @@
-# Copyright (C) 2001-2007, The Perl Foundation.
+# Copyright (C) 2001-2009, The Perl Foundation.
 # $Id$
 
-=head1 NAME
+=head1 A high-level overview of Parrot
 
-docs/pdds/pdd01_overview.pod - A high-level overview of Parrot
-
-=head1 ABSTRACT
+=head2 Abstract
 
 A high-level overview of the Parrot virtual machine.
 
-=head1 VERSION
+=head2 Version
 
 $Revision$
 
-=head1 DESCRIPTION
+=head2 Description
 
 Parrot is a virtual machine for dynamic languages like Python, PHP, Ruby, and
 Perl. A dynamic language is one that allows things like extension of the code
@@ -25,9 +23,9 @@
 dynamic features like higher-order functions, closures, continuations, and
 coroutines.
 
-=head1 IMPLEMENTATION
+=head2 Implementation
 
-=head2 Parser
+=head3 Parser
 
 While individual high-level languages may implement their own parser,
 most will use Parrot's parser grammar engine (PGE). The parser grammar
@@ -45,18 +43,18 @@
 bytecode. Some compilers will also insert optimization stages into the
 compilation process between the common transformation stages.
 
-=head2 IMCC
+=head3 IMCC
 
 The intermediate code compiler (IMCC) is the main F<parrot> executable,
 and encapsulates several core low-level components.
 
-=head3 PASM & PIR parser
+=head4 PASM & PIR parser
 
 This Bison and Flex based parser/lexer handles Parrot's assembly
 language, PASM, and the slightly higher-level language, PIR (Parrot
 Intermediate Representation).
 
-=head3 Bytecode compiler
+=head4 Bytecode compiler
 
 The bytecode compiler module takes a syntax tree from the parser and emits an
 unoptimized stream of bytecode. This code is suitable for passing straight to
@@ -65,13 +63,13 @@
 Note that currently, the only way to generate bytecode is by first
 generating PASM or PIR.
 
-=head3 Optimizer
+=head4 Optimizer
 
 The optimizer module takes the bytecode stream from the compiler and
 optionally the syntax tree the bytecode was generated from, and optimizes the
 bytecode.
 
-=head3 Interpreter
+=head4 Interpreter
 
 The interpreter module takes the bytecode stream from either the optimizer or
 the bytecode compiler and executes it. There must always be at least one
@@ -84,7 +82,7 @@
 interpreter modules would take the bytecode stream and spit out Java bytecode
 instead of interpreting it.
 
-=head3 Standalone pieces
+=head4 Standalone pieces
 
 Each piece of IMCC can, with enough support hidden away (in the form of an
 interpreter for the parsing module, for example), stand on its own. This means
@@ -96,12 +94,12 @@
 bytecode, far more than you might want to devote to optimizing
 one-liners or code that'll run only once or twice.
 
-=head2 Subsystems
+=head3 Subsystems
 
 The following subsystems are each responsible for a key component of
 Parrot's core functionality.
 
-=head3 I/O subsystem
+=head4 I/O subsystem
 
 The I/O subsystem provides source- and platform-independent synchronous
 and asynchronous I/O to Parrot. How this maps to the OS's underlying I/O
@@ -112,7 +110,7 @@
 input stream if necessary, to manipulate the data before it is presented to a
 program.
 
-=head3 Regular expression engine
+=head4 Regular expression engine
 
 The parser grammar engine (PGE) is also Parrot's regular expression
 engine. The job of the regular expression engine is to compile regular
@@ -122,14 +120,14 @@
 The regular expression engine is available to any language running on
 Parrot.
 
-=head3 Data transformation engine
+=head4 Data transformation engine
 
 The tree grammar engine (TGE) is also a general-purpose data
 transformation tool (somewhat similar to XSLT).
 
-=head2 API levels
+=head3 API Levels
 
-=head3 Embedding
+=head4 Embedding
 
 The embedding API is the set of calls exported to an embedding application.
 This is a small, simple set of calls, requiring minimum effort to use.
@@ -140,7 +138,7 @@
 intellectual effort. Generally it should take less than thirty minutes for a
 simple interface, though more complete integration will take longer.
 
-=head3 Extensions
+=head4 Extensions
 
 The extension API is the set of calls exported to Parrot extensions. They
 provide access to most of the things an extension needs to do, while hiding
@@ -148,14 +146,14 @@
 scalars are stored without having to rewrite, or even recompile, an
 extension).
 
-=head3 Guts
+=head4 Guts
 
 The guts-level APIs are the routines used within a component. These aren't
 guaranteed to be stable, and shouldn't be used outside a component. (For
 example, an extension to the interpreter shouldn't call any of the parser's
 internal routines).
 
-=head2 Target Platforms
+=head3 Target Platforms
 
 The ultimate goal of Parrot is portability to more-or-less the same
 platforms as Perl 5, including AIX, BeOS, BSD/OS, Cygwin, Darwin,
@@ -172,9 +170,9 @@
 actively seek porters for as many other platforms as possible.
 
 
-=head1 LANGUAGE NOTES
+=head2 Language Notes
 
-=head2 Parrot for small platforms
+=head3 Parrot for small platforms
 
 One goal of the Parrot project, though not a requirement of the 1.0
 release, is to run on small devices such as the Palm.  For small
@@ -186,13 +184,13 @@
 loading of precompiled modules via do, use, or require may be
 supported).
 
-=head2 Bytecode compilation
+=head3 Bytecode compilation
 
 One straightforward use of the Parrot system is to precompile a program into
 bytecode and save it for later use. Essentially, we would compile a program as
 normal, but then simply freeze the bytecode to disk for later loading.
 
-=head2 Your HLL in, Java, CLI, or whatever out
+=head3 Your HLL in, Java, CLI, or whatever out
 
 The previous section assumes that we will be emitting Parrot bytecode.
 However, there are other possibilities: we could translate the bytecode
@@ -200,7 +198,7 @@
 principle, Parrot could also act as a front end to other modular
 compilers such as gcc or HP's GEM compiler system.
 
-=head1 REFERENCES
+=head2 References
 
 To come.
 

Modified: branches/kill_pccinvoke/docs/pdds/draft/pdd05_opfunc.pod
==============================================================================
--- branches/kill_pccinvoke/docs/pdds/draft/pdd05_opfunc.pod	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/docs/pdds/draft/pdd05_opfunc.pod	Tue Feb 10 19:57:33 2009	(r36556)
@@ -1,11 +1,9 @@
-# Copyright (C) 2001-2007, The Perl Foundation.
+# Copyright (C) 2001-2009, The Perl Foundation.
 # $Id$
 
-=head1 NAME
+=head1 Opcode Function specs
 
-docs/pdds/pdd05_opfunc.pod - Opcode Function specs
-
-=head1 ABSTRACT
+=head2 Abstract
 
 This PDD specifies how the opcode functions should behave and how they are
 called by the Parrot interpreter.
@@ -15,7 +13,7 @@
 
 {{ NOTE: standardize on underscores or no underscores? }}
 
-=head1 DESCRIPTION
+=head2 Description
 
 The opcode functions are the workhorse of the Parrot engine. They control
 program flow and do most of the work in a program. (The rest being done by the
@@ -53,7 +51,7 @@
 will likely run slower (as the interpreter would need to set up the registers
 and other stuff that would normally get stripped away for speed)
 
-=head2 The wrapping function
+=head3 The wrapping function
 
 This is the function that the interpreter actually executes. It has all the
 intimate knowledge of its parameters embedded in it, and is responsible for
@@ -63,14 +61,14 @@
 the programmer doesn't have to create it. If, for some reason, you do need or
 want to write it (for example if you have no inner function) that's fine.
 
-=head2 The inner function
+=head3 The inner function
 
 The inner function is the code that actually does the work. This is generally
 a chunk of C code, though the interpreter will be able to call perl code soon.
 
-=head1 IMPLEMENTATION
+=head2 Implementation
 
-=head2 Prototype declaration of inner function
+=head3 Prototype declaration of inner function
 
    RETURN function(INPUT[, INPUT[, INPUT...]])
 
@@ -161,7 +159,7 @@
 
 is a simple opcode function that corresponds to the C<addI> opcode.
 
-=head1 TODO
+=head2 TODO
 
 =over 4
 
@@ -169,19 +167,19 @@
 
 =back
 
-=head1 REFERENCES
+=head2 References
 
 Oploop PDD, PDD 4 (Internal types)
 
-=head1 FOOTNOTES
+=head2 Footnotes
 
 None.
 
-=head1 VERSION
+=head2 Version
 
 1.0
 
-=head2 CURRENT
+=head3 Current
 
     Maintainer: Dan Sugalski <dan at sidhe.org>
     Class: Internals
@@ -192,11 +190,11 @@
     PDD Format: 1
     Language: English
 
-=head2 HISTORY
+=head3 History
 
 None. First version
 
-=head1 CHANGES
+=head2 Changes
 
 None. First version
 

Modified: branches/kill_pccinvoke/docs/pdds/draft/pdd06_pasm.pod
==============================================================================
--- branches/kill_pccinvoke/docs/pdds/draft/pdd06_pasm.pod	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/docs/pdds/draft/pdd06_pasm.pod	Tue Feb 10 19:57:33 2009	(r36556)
@@ -1,15 +1,13 @@
-# Copyright (C) 2001-2007, The Perl Foundation.
+# Copyright (C) 2001-2009, The Perl Foundation.
 # $Id$
 
-=head1 NAME
+=head1 Parrot Assembly Language
 
-docs/pdds/pdd06_pasm.pod - Parrot Assembly Language
-
-=head1 ABSTRACT
+=head2 Abstract
 
 The format of Parrot's bytecode assembly language.
 
-=head1 DESCRIPTION
+=head2 Description
 
 Parrot's bytecode can be thought of as a form of machine language for a
 virtual super CISC machine. It makes sense, then, to define an assembly
@@ -20,7 +18,7 @@
 useful as a specification of the format of PASM than as a comprehensive
 listing of all opcodes. }}
 
-=head1 QUESTIONS
+=head2 Questions
 
 =over 4
 
@@ -59,7 +57,7 @@
 
 =back
 
-=head1 IMPLEMENTATION
+=head2 Implementation
 
 Parrot opcodes take the format of:
 
@@ -84,7 +82,7 @@
 All registers have a type prefix of P, S, I, or N, for PMC, string, integer,
 and number respectively.
 
-=head1 Assembly Syntax
+=head2 Assembly Syntax
 
 All assembly opcodes contain only ASCII lowercase letters, digits, and the
 underscore.
@@ -154,7 +152,7 @@
 
 
 
-=head1 OPCODE LIST
+=head2 Opcode List
 
 In the following list, there may be multiple (but unlisted) versions of an
 opcode. If an opcode takes a register that might be keyed, the keyed version
@@ -182,7 +180,7 @@
 either a register or constant of the appropriate type (PMC, string, integer,
 or number)
 
-=head2 Control flow
+=head3 Control flow
 
 The control flow opcodes check conditions and manage program flow.
 
@@ -221,7 +219,7 @@
 
 =back
 
-=head2 Data manipulation
+=head3 Data manipulation
 
 These ops handle manipulating the data in registers
 
@@ -317,7 +315,7 @@
 
 =back
 
-=head2 Transcendental operations
+=head3 Transcendental operations
 
 These opcodes handle the transcendental math functions. The destination
 register here must always be either a numeric or a PMC register.
@@ -402,7 +400,7 @@
 
 =back
 
-=head2 Register and stack ops
+=head3 Register and stack ops
 
 These opcodes deal with registers and stacks
 
@@ -458,7 +456,7 @@
 
 =back
 
-=head2 Names, pads, and globals
+=head3 Names, pads, and globals
 
 These operations are responsible for finding names in lexical or global
 scopes, as well as storing data into those slots.  A static scope is captured
@@ -509,7 +507,7 @@
 
 =back
 
-=head2 Exceptions
+=head3 Exceptions
 
 These opcodes deal with exception handling at the lowest level. Exception
 handlers are dynamically scoped, and any exception handler set in a scope will
@@ -538,7 +536,7 @@
 
 =back
 
-=head2 Object things
+=head3 Object things
 
 These opcodes deal with PMCs as objects, rather than as opaque data items.
 
@@ -565,7 +563,7 @@
 
 =back
 
-=head2 Module handling
+=head3 Module handling
 
 These opcodes deal with loading in bytecode or executable code libraries, and
 fetching info about those libraries. This is all dealing with precompiled
@@ -600,7 +598,7 @@
 
 =back
 
-=head2 I/O operations
+=head3 I/O operations
 
 Reads and writes read and write records, for some value of record.
 
@@ -653,7 +651,7 @@
 
 =back
 
-=head2 Threading ops
+=head3 Threading ops
 
 =over 4
 
@@ -671,7 +669,7 @@
 
 =back
 
-=head2 Interpreter ops
+=head3 Interpreter ops
 
 =over 4
 
@@ -743,7 +741,7 @@
 
 =back
 
-=head2 Garbage collection
+=head3 Garbage collection
 
 =over 4
 
@@ -767,7 +765,7 @@
 
 =back
 
-=head2 Key operations
+=head3 Key operations
 
 Keys are used to get access to individual elements of an aggregate variable.
 This is done to allow for opaque, packed, and multidimensional aggregate
@@ -825,7 +823,7 @@
 
 =back
 
-=head2 Properties
+=head3 Properties
 
 Properties are a sort of runtime note attached to a PMC. Any PMC can have
 properties on it. Properties live in a flat namespace, and they are not in any
@@ -855,7 +853,7 @@
 
 =back
 
-=head2 Symbolic support for HLLs
+=head3 Symbolic support for HLLs
 
 =over 4
 
@@ -885,7 +883,7 @@
 
 =back
 
-=head2 Foreign library access
+=head3 Foreign library access
 
 These are the ops we use to load in and interface to non-parrot libraries.
 
@@ -987,7 +985,7 @@
 
 =back
 
-=head2 Runtime compilation
+=head3 Runtime compilation
 
 These opcodes deal with runtime creation of bytecode and compilation of source
 code.
@@ -1023,19 +1021,19 @@
 
 =back
 
-=head1 ATTACHMENTS
+=head2 Attachments
 
 None.
 
-=head1 REFERENCES
+=head2 References
 
 None.
 
-=head1 VERSION
+=head2 Version
 
 1.9
 
-=head2 CURRENT
+=head3 Current
 
     Maintainer: Dan Sugalski
     Class: Internals
@@ -1046,7 +1044,7 @@
     PDD Format: 1
     Language: English
 
-=head2 HISTORY
+=head3 History
 
 =over 4
 
@@ -1092,7 +1090,7 @@
 
 =back
 
-=head1 CHANGES
+=head2 Changes
 
 =over 4
 

Modified: branches/kill_pccinvoke/docs/pdds/draft/pdd08_keys.pod
==============================================================================
--- branches/kill_pccinvoke/docs/pdds/draft/pdd08_keys.pod	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/docs/pdds/draft/pdd08_keys.pod	Tue Feb 10 19:57:33 2009	(r36556)
@@ -1,16 +1,14 @@
-# Copyright (C) 2001-2004, The Perl Foundation.
+# Copyright (C) 2001-2009, The Perl Foundation.
 # $Id$
 
-=head1 NAME
+=head1 Indexing Aggregate PMCs
 
-docs/pdds/pdd08_keys.pod - Indexing Aggregate PMCs
-
-=head1 ABSTRACT
+=head2 Abstract
 
 This PDD aims to clear up the confusion regarding the implementation of keyed
 access to PMCs in Parrot.
 
-=head1 DESCRIPTION
+=head2 Description
 
 First, let's define some terminology. An C<aggregate PMC> is one which stores
 or references other values as elements.  The aggregate PMC allows indexed
@@ -38,9 +36,9 @@
 
 Now, how does this all get implemented?
 
-=head1 IMPLEMENTATION
+=head2 Implementation
 
-=head2 The key structure
+=head3 The key structure
 
 The key structure must bundle multiple keys.  This is to allow indexing into
 multidimensional aggregate PMCs.  These keys may be specified as integer,
@@ -94,7 +92,7 @@
 These definitions, along with declarations of support routines used to
 manipulate keys, can be found in F<include/parrot/key.h>
 
-=head2 Aggregate and non-aggregate PMCs
+=head3 Aggregate and non-aggregate PMCs
 
 We've already said that what separates the aggregate PMCs from the
 non-aggregates is their implementation of the C<_keyed> vtable methods. So it
@@ -111,7 +109,7 @@
 
 =back
 
-=head2 C<_keyed> vtable methods
+=head3 C<_keyed> vtable methods
 
 So what of these magical C<_keyed> vtable methods? They are generated when you
 add the C<keyed> tag to the appropriate entry in F<src/vtable.tbl>. They are
@@ -173,7 +171,7 @@
 indexing respectively. However, this didn't give us the flexibility and
 scalability that key structures give us.
 
-=head2 Input to the assembler
+=head3 Input to the assembler
 
 There are several different valid specifications of an aggregate key to the
 assembler. These are:
@@ -200,7 +198,7 @@
 represented by a single PMC register that is assumed to  contain a PMC of the
 Key class.
 
-=head2 What the assembler did next
+=head3 What the assembler did next
 
 When the assembler sees an aggregate key, it "detaches" the key to form a
 separate argument. It then decides on the type of key. For  integer keys (both
@@ -230,7 +228,7 @@
 
 produces an op named C<set_p_ki>.
 
-=head2 Bytecode representation
+=head3 Bytecode representation
 
 The bytecode representation of these keys are as follows: constant keys are
 treated just like another constant, and are an index into the packfile's
@@ -255,9 +253,9 @@
 The type values shown above are actually the C<PARROT_ARG_*> values taken from
 F<include/parrot/op.h>.
 
-=head1 VERSION
+=head2 Version
 
-=head2 CURRENT
+=head3 Current
 
    Maintainer: Simon Cozens <simon at netthink.co.uk>
    Class: Internals
@@ -268,7 +266,7 @@
    PDD Format: 1
    Language: English
 
-=head2 HISTORY
+=head3 History
 
 =over 4
 
@@ -290,7 +288,7 @@
 
 =back
 
-=head1 REFERENCES
+=head2 References
 
 To come.
 

Modified: branches/kill_pccinvoke/docs/pdds/draft/pdd10_embedding.pod
==============================================================================
--- branches/kill_pccinvoke/docs/pdds/draft/pdd10_embedding.pod	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/docs/pdds/draft/pdd10_embedding.pod	Tue Feb 10 19:57:33 2009	(r36556)
@@ -1,11 +1,9 @@
-# Copyright (c) 2001-2006, The Perl Foundation.
+# Copyright (c) 2001-2009, The Perl Foundation.
 # $Id$
 
-=head1 NAME
+=head1 Parrot's Embedding and Extending Interface
 
-docs/pdds/embedding.pod - Parrot's Embedding and Extending Interface
-
-=head1 ABSTRACT
+=head2 Abstract
 
 What we believe people will do when embedding and extending Parrot, why they
 do it, and how.
@@ -13,11 +11,11 @@
 {{ NOTE: some of this will later move into pdds 11 & 12, but for now
 just want to get the stub checked in. }}
 
-=head1 VERSION
+=head2 Version
 
 $Revision$
 
-=head1 DESCRIPTION
+=head2 Description
 
 Why embed:
 
@@ -135,7 +133,7 @@
 
 =back
 
-=head1 DEFINITIONS
+=head2 Definitions
 
 Embedding - using libparrot from within another program, likely with a
 C/NCI/FFI interface
@@ -145,7 +143,7 @@
 In practice, there is little difference between the two; mostly in terms of
 who has control.  The necessary interfaces should stay the same.
 
-=head1 IMPLEMENTATION
+=head2 Implementation
 
 Implementation details.
 
@@ -168,7 +166,7 @@
 
 =back
 
-=head2 Working with Interpreters
+=head3 Working with Interpreters
 
 It is the external code's duty to create, manage, and destroy interpreters.
 
@@ -188,7 +186,7 @@
 
 I<Note: It is not clear what happens if this interpreter has active children.>
 
-=head2 Working with Source Code and PBC Files
+=head3 Working with Source Code and PBC Files
 
 Perhaps the most common case for working with code is loading it from an
 external file.  This may often be PBC, but it must also be possible to load
@@ -228,33 +226,33 @@
 
 I<Note: this declaration should move from F<interpreter.h> to F<embed.h>.>
 
-=head2 Working with PMCs
+=head3 Working with PMCs
 
 TBD.
 
-=head2 Calling Functions
+=head3 Calling Functions
 
 TBD.
 
-=head2 Calling Opcodes
+=head3 Calling Opcodes
 
 TBD.
 
-=head1 LANGUAGE NOTES
+=head2 Language Notes
 
 It should be possible to register a compiler for an HLL with an interpreter
 such that it is possible to load source code written in that language or pass
 source code to an interpreter successfully.
 
-=head1 ATTACHMENTS
+=head2 Attachments
 
 Any associated documents.
 
-=head1 FOOTNOTES
+=head2 Footnotes
 
 List of footnotes to the text.
 
-=head1 REFERENCES
+=head2 References
 
 List of references.
 

Modified: branches/kill_pccinvoke/docs/pdds/draft/pdd11_extending.pod
==============================================================================
--- branches/kill_pccinvoke/docs/pdds/draft/pdd11_extending.pod	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/docs/pdds/draft/pdd11_extending.pod	Tue Feb 10 19:57:33 2009	(r36556)
@@ -1,17 +1,15 @@
-# Copyright (C) 2001-2007, The Perl Foundation.
+# Copyright (C) 2001-2009, The Perl Foundation.
 # $Id$
 
-=head1 NAME
+=head1 The Parrot Extension System
 
-docs/pdds/pdd11_extending.pod - The Parrot Extension System
-
-=head1 ABSTRACT
+=head2 Abstract
 
 The extension API for Parrot is a simple, somewhat abstract, interface to
 Parrot for code written in C or other compiled languages. It provides about
 the same level of access to Parrot  that bytecode programs have.
 
-=head1 DESCRIPTION
+=head2 Description
 
 The API presents to C programs roughly the same interface presented to
 bytecode programs--that is, a C extension can see everything that a bytecode
@@ -32,9 +30,9 @@
 functions may be added, and those described below may change or be removed.
 You have been warned...
 
-=head1 IMPLEMENTATION
+=head2 Implementation
 
-=head2 API - Group 1: Internals-unaware functions
+=head3 API - Group 1: Internals-unaware functions
 
 These functions are the ones that are largely unaware of the structure and
 architecture of Parrot. They deal mainly in data as abstract entities, and
@@ -42,7 +40,7 @@
 calls. This is sufficient for many extensions which act as black box
 processing units and in turn treat Parrot itself as a black box.
 
-=head3 PMC access functions
+=head4 PMC access functions
 
 The following functions are for storing and retrieving data inside PMCs. Note
 that use of the _keyed functions with non-aggregate PMCs will generally just
@@ -202,7 +200,7 @@
 
 =back
 
-=head3 Creation and destruction
+=head4 Creation and destruction
 
 Functions used to create and destroy PMCs, Parrot_Strings, etc.
 
@@ -271,7 +269,7 @@
 
 =back
 
-=head3 Subroutine and method calls
+=head4 Subroutine and method calls
 
 Functions to call Parrot subroutines and methods
 
@@ -293,7 +291,7 @@
 
 =back
 
-=head2 API - Group 2: Internals aware
+=head3 API - Group 2: Internals aware
 
 The internals-aware functions are for those extensions that need to query or
 alter the state of Parrot's internals in some way.
@@ -327,21 +325,21 @@
 
 =back
 
-=head1 ATTACHMENTS
+=head2 Attachments
 
 None.
 
-=head1 FOOTNOTES
+=head2 Footnotes
 
 None.
 
-=head1 REFERENCES
+=head2 References
 
 F<docs/glossary.pod>
 
-=head1 VERSION
+=head2 Version
 
-=head2 CURRENT
+=head3 Current
 
     Maintainer:
     Class: Internals
@@ -352,7 +350,7 @@
     PDD Format: 1
     Language: English
 
-=head2 HISTORY
+=head3 History
 
 =over 4
 
@@ -362,7 +360,7 @@
 
 =back
 
-=head1 CHANGES
+=head2 Changes
 
 =over 4
 

Modified: branches/kill_pccinvoke/docs/pdds/draft/pdd14_numbers.pod
==============================================================================
--- branches/kill_pccinvoke/docs/pdds/draft/pdd14_numbers.pod	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/docs/pdds/draft/pdd14_numbers.pod	Tue Feb 10 19:57:33 2009	(r36556)
@@ -1,24 +1,22 @@
-# Copyright (C) 2001-2008, The Perl Foundation.
+# Copyright (C) 2001-2009, The Perl Foundation.
 # $Id$
 
-=head1 NAME
+=head1 Parrot Numbers
 
-docs/pdds/pdd14_numbers.pod - Parrot Numbers
-
-=head1 ABSTRACT
+=head2 Abstract
 
 This PDD describes Parrot's numeric data types.
 
-=head1 VERSION
+=head2 Version
 
 $Revision$
 
-=head1 DESCRIPTION
+=head2 Description
 
 This PDD details the basic numeric datatypes that the Parrot core knows how to
 deal with, including the core numeric PMCs.
 
-=head2 Integer data types
+=head3 Integer data types
 
 Parrot provides a native integer data type, generally known as an "Int". The
 size of the integer is chosen at Parrot configuration time, the same size as
@@ -34,7 +32,7 @@
 integer may be autoboxed as an C<Integer> PMC, or as an HLL type mapped to
 C<Integer>.
 
-=head2 Floating-point data types
+=head3 Floating-point data types
 
 Parrot provides a native floating-point data type, generally known as a "Num".
 The size of the float is chosen at Parrot configuration time, the same size as
@@ -49,7 +47,7 @@
 method call, a native float may be autoboxed as a C<Float> PMC, or as an HLL
 type mapped to C<Float>.
 
-=head2 Integer PMC
+=head3 Integer PMC
 
 The C<Integer> PMC is a high-level integer type, providing the features of a
 integer data type appropriate for use in a high-level language. Some languages
@@ -59,7 +57,7 @@
 
 The C<Integer> PMC has a single attribute, the integer value.
 
-=head3 Integer Vtable Functions
+=head4 Integer Vtable Functions
 
 =over 4
 
@@ -162,7 +160,7 @@
 
 =back
 
-=head3 Integer Multis
+=head4 Integer Multis
 
 Many of the math vtable functions are defined as multiple dispatch functions.
 
@@ -212,7 +210,7 @@
 
 =back
 
-=head3 Integer Methods
+=head4 Integer Methods
 
 =over 4
 
@@ -223,15 +221,15 @@
 
 =back
 
-=head2 Float PMC
+=head3 Float PMC
 
-=head2 BigInt PMC
+=head3 BigInt PMC
 
 The big number library provides Parrot with both a collection of (nearly)
 infinite precision numeric types and an implementation of an extended decimal
 arithmetic (EDA).
 
-=head2 Why decimal arithmetic?
+=head3 Why decimal arithmetic?
 
 There are benefits in using the big number library to provide both values of
 effectively unlimited precision and a defined arithmetic, complete with
@@ -243,7 +241,7 @@
 There is a trade-off in both space and speed, but given the nature of dynamic
 languages, this should not present too great a burden.
 
-=head2 Numeric types provided
+=head3 Numeric types provided
 
 The bignumber library provides the following data types to Parrot:
 
@@ -286,7 +284,7 @@
 functions. The objects will be managed by Parrot's garbage collection in a
 similar manner to strings.
 
-=head2 Special Values
+=head3 Special Values
 
 Additionally the library provides special values which represent the result of
 otherwise undefined operations (division by zero, for instance).  Positive and
@@ -296,7 +294,7 @@
 argument is a signalling C<NaN>, an exception will also be raised.  See the
 EDA for full details.
 
-=head2 Context
+=head3 Context
 
 All operations occur within a defined context.  This tells the operations how
 they should treat their arguments, what sort of rounding to perform, and what
@@ -348,7 +346,7 @@
 operation. This makes it easy to upgrade from one numeric form to another and
 also allows for considerable code-reuse within the library.
 
-=head2 Exception Classes
+=head3 Exception Classes
 
 The following exception classes are available:
 
@@ -388,7 +386,7 @@
 
 =back
 
-=head2 Rounding
+=head3 Rounding
 
 The rounding part of the context defines the rounding algorithm to used.  The
 following contexts are available (examples assume a precision of 5):
@@ -439,7 +437,7 @@
 
 =back
 
-=head2 Operations
+=head3 Operations
 
 The library provides the following operations. They function exactly as those
 described in the Standard Decimal Arithmetic (SDA), with some extension to
@@ -492,7 +490,7 @@
 
 =back
 
-=head2 Conversion to and from strings
+=head3 Conversion to and from strings
 
 A one to one conversion between the abstract representation above and a string
 is provided by the library, and acts as defined by the standard decimal
@@ -504,13 +502,13 @@
 be provided, although in a separate file to the rest of the library.  (They
 will share a common private header file).
 
-=head1 IMPLEMENTATION
+=head2 Implementation
 
 Functions are provided which implement the arithmetic, conversion, creation
 and destruction of big numbers by dealing with otherwise opaque big number
 objects.
 
-=head2 Big number representation
+=head3 Big number representation
 
 A big number is represented by the following structure, capable of being
 allocated, tracked, and destroyed by the Parrot garbage collection system.
@@ -533,7 +531,7 @@
 field, NaN another flag field, and sNaN a third.  In general the flags should
 not be examined directly, even within the module.
 
-=head2 Context
+=head3 Context
 
  typedef struct {
     INTVAL        precision;  /* number of digs to retain */
@@ -553,7 +551,7 @@
 and fixed-fraction number are provided by creating a context with an
 appropriate precision whenever a call into the library is made.
 
-=head2 Exceptional Conditions
+=head3 Exceptional Conditions
 
 When the module raises an exceptional condition, control passes to
 C<BN_nonfatal()>. this examines the error which has occurred and the current
@@ -564,23 +562,23 @@
 
 The possible exceptions are detailed in the extended decimal arithmetic.
 
-=head1 Tests
+=head2 Tests
 
 The Standard Decimal Arithmetic provides a collection of tests for both its
 base and extended behavior.
 
-=head1 TODO
+=head2 TODO
 
 Fill in the remaining functions from the EDA, verify that the test suite still
 passes, integrate the library into the rest of Parrot, provide PMC types and
 suitable opcodes.  Conversion to and from Parrot strings, conversion to and
 from floating point types, sprintf output of bignumbers.
 
-=head1 ATTACHMENTS
+=head2 Attachments
 
-=head1 FOOTNOTES
+=head2 Footnotes
 
-=head1 REFERENCES
+=head2 References
 
 IBM's Standard Decimal Arithmetic, with tests
 (L<http://speleotrove.com/decimal/>)

Modified: branches/kill_pccinvoke/docs/pdds/draft/pdd16_native_call.pod
==============================================================================
--- branches/kill_pccinvoke/docs/pdds/draft/pdd16_native_call.pod	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/docs/pdds/draft/pdd16_native_call.pod	Tue Feb 10 19:57:33 2009	(r36556)
@@ -1,16 +1,14 @@
-# Copyright (C) 2001-2007, The Perl Foundation.
+# Copyright (C) 2001-2009, The Perl Foundation.
 # $Id$
 
-=head1 NAME
+=head1 NCI conventions and definitions
 
-docs/pdds/pdd16_native_call.pod - NCI conventions and definitions
-
-=head1 ABSTRACT
+=head2 Abstract
 
 This PDD describes the native call interface, and the function signatures used
 to describe those functions.
 
-=head1 DESCRIPTION
+=head2 Description
 
 The NCI is designed to allow Parrot to interface to I<most> of the functions
 in a C library without having to write any C code for that interface. It
@@ -34,9 +32,9 @@
 signature) the signature must be passed in when the linkage between the C
 function and parrot is made.
 
-=head1 IMPLEMENTATION
+=head2 Implementation
 
-=head2 Function signatures
+=head3 Function signatures
 
 The following list are the valid letters in the function signatures for
 Parrot's NCI. Note that only letters and numbers are valid, and each letter
@@ -128,7 +126,7 @@
 
 Note that not all types are valid as return types.
 
-=head2 Example NCI call
+=head3 Example NCI call
 
 This section describes the simplest example for NCI possible. To every NCI
 invocation, there are two parts: the native function to be invoked, and the
@@ -169,7 +167,7 @@
   .end
 
 
-=head2 Callbacks
+=head3 Callbacks
 
 Some libraries, particularly ones implementing more complex functionality such
 as databases or GUIs, want callbacks, that is ways to call a function under
@@ -250,7 +248,7 @@
 interpreter pointer, creating the wrapping PMCs, stuffing data various places,
 and generally dealing with the bookkeeping.
 
-=head2 Example Callback
+=head3 Example Callback
 
 This section contains an example to register a callback function and have
 it call back into Parrot.
@@ -312,17 +310,17 @@
 The file containing this C code should be compiled as a shared library
 (specifying the C<include> directory so C<<parrot/parrot.h>> can be found.)
 
-=head1 REFERENCES
+=head2 References
 
 L<pdd06_pasm.pod>
 
-=head1 SEE ALSO
+=head2 See Also
 
 L<t/pmc/nci.t>, L<src/nci_test.c>
 
-=head1 VERSION
+=head2 Version
 
-=head2 CURRENT
+=head3 Current
 
     Maintainer: Dan Sugalski
     Class: Internals
@@ -333,7 +331,7 @@
     PDD Format: 1
     Language: English
 
-=head2 HISTORY
+=head3 History
 
 =over 4
 

Modified: branches/kill_pccinvoke/docs/pdds/draft/pdd29_compiler_tools.pod
==============================================================================
--- branches/kill_pccinvoke/docs/pdds/draft/pdd29_compiler_tools.pod	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/docs/pdds/draft/pdd29_compiler_tools.pod	Tue Feb 10 19:57:33 2009	(r36556)
@@ -1,35 +1,33 @@
-# Copyright (C) 2008, The Perl Foundation.
+# Copyright (C) 2008-2009, The Perl Foundation.
 # $Id$
 
-=head1 NAME
+=head1 Parrot Compiler Tools
 
-docs/pdds/draft/pdd29_compiler_tools.pod - Parrot Compiler Tools
-
-=head1 VERSION
+=head2 Version
 
 $Revision$
 
-=head1 MAINTAINER
+=head2 Maintainer
 
 Will "Coke" Coleda
 Klaas-Jan Stol
 
-=head1 DEFINITIONS
+=head2 Definitions
 
-=head2 Compiler
+=head3 Compiler
 
 In this document, when we speak of a I<compiler>, we mean
 PCT-based compilers.
 
-=head2 HLL
+=head3 HLL
 
 A High-Level Language. Examples are: Perl, Ruby, Python, Lua, Tcl, etc.
 
-=head1 ABSTRACT
+=head2 Abstract
 
 This PDD specifies the Parrot Compiler Tools (PCT).
 
-=head1 SYNOPSIS
+=head2 Synopsis
 
 Creating a PCT-based compiler can be done as follows:
 
@@ -60,7 +58,7 @@
 term.  In a sense, this script can also be considered part of the parrot
 compiler "tools", as it is used to create a compiler.  }}
 
-=head2 Parser Synopsis
+=head3 Parser Synopsis
 
  grammar Foo is PCT::Grammar;
 
@@ -85,7 +83,7 @@
      | <number> {*}      #= number
  }
 
-=head2 Actions Synopsis
+=head3 Actions Synopsis
 
 {{ Is this a good idea? }}
 
@@ -114,7 +112,7 @@
      make $( $/{$key} );
  }
 
-=head2 Running the compiler
+=head3 Running the compiler
 
 Running the compiler is then done as follows:
 
@@ -123,7 +121,7 @@
 {{ other options? Maybe --target=pbc in the future, once PBC can be
    generated? }}
 
-=head1 DESCRIPTION
+=head2 Description
 
 The Parrot Compiler Tools are specially designed to easily create a
 compiler targeting the Parrot Virtual Machine. The tools themselves
@@ -146,7 +144,7 @@
    list these as =items }}
 
 
-=head1 IMPLEMENTATION
+=head2 Implementation
 
 The PCT is made up of the following libraries and programs:
 
@@ -169,7 +167,7 @@
 compilers. NQP is a subset of the Perl 6 language, and is a
 high-level language as an alternative for PIR.
 
-=head2 Compilation phases
+=head3 Compilation phases
 
 A PCT-based compiler has by default four compilation phases, or
 I<transformations>. Phases can be removed and added through the API of
@@ -195,7 +193,7 @@
 
 =back
 
-=head3 Source to Parse Tree
+=head4 Source to Parse Tree
 
 The first stage of a PCT-based compiler is done by the C<parser>. The
 parser is defined as a set of Perl 6 Rules, which is processed by the
@@ -207,7 +205,7 @@
 During the first stage, the source (input string) is parsed, resulting
 in a C<parse tree>.
 
-=head3 Parse tree to PAST
+=head4 Parse tree to PAST
 
 The second stage converts the parse tree into a Parrot Abstract Syntax Tree
 (PAST). PAST is a data structure consisting of PAST nodes, each of which
@@ -222,7 +220,7 @@
    and in the future maybe other languages.
 }}
 
-=head3 PAST to POST
+=head4 PAST to POST
 
 The third transformation converts the PAST into a Parrot Opcode Syntax Tree
 (POST). PAST nodes represent HLL constructs, which are transformed into a
@@ -230,14 +228,14 @@
 a single instruction, label, or a subroutine. While a PAST is very close to
 a HLL program, a POST is much closer to PIR code.
 
-=head3 POST to PIR
+=head4 POST to PIR
 
 The last transformation generates PIR code from the POST.
 
 The generated PIR is then fed into the Parrot executable, and processed
 into Parrot Byte Code (PBC) by the PIR compiler.
 
-=head2 Parrot Grammar Engine
+=head3 Parrot Grammar Engine
 
 The Parrot Grammar Engine (PGE) is a component that I<executes> regular
 expressions. Besides I<classic> regular expressions, it also understands
@@ -246,33 +244,33 @@
 The I<start> symbol in a grammar is named C<TOP>; this is the top-level
 rule that is executed when the parser is invoked.
 
-=head3 Operator precedence parsing
+=head4 Operator precedence parsing
 
 {{ insert stuff about using an operator prec. table here }}
 
-=head2 Parrot Abstract Syntax Tree
+=head3 Parrot Abstract Syntax Tree
 
 The PCT includes a set of PAST classes. PAST classes represent common language
 constructs, such as a C<while statement>.
 These are described extensively in L<docs/pdds/pdd26_ast.pod>.
 
-=head2 Parrot Opcode Syntax Tree
+=head3 Parrot Opcode Syntax Tree
 
-=head3 POST::Node
+=head4 POST::Node
 
 POST::Node is the base class for all other POST classes.
 
-=head3 POST::Op
+=head4 POST::Op
 
-=head3 POST::Ops
+=head4 POST::Ops
 
-=head3 POST::Label
+=head4 POST::Label
 
-=head3 POST::Sub
+=head4 POST::Sub
 
 
 
-=head2 PCT::Grammar
+=head3 PCT::Grammar
 
 The class C<PCT::Grammar> is a built-in grammar class that can be used as
 a parent class for a custom grammar. This class defines a number of rules and
@@ -291,13 +289,13 @@
 
 =back
 
-=head2 PCT::HLLCompiler
+=head3 PCT::HLLCompiler
 
 All PCT-based compilers use a HLLCompiler object as a compiler driver.
 It acts as a I<facade> for the compiler. This object invokes the different
 compiler phases.
 
-=head3 HLLCompiler API Methods
+=head4 HLLCompiler API Methods
 
 {{ TODO: complete this }}
 
@@ -334,11 +332,11 @@
 
 =back
 
-=head1 ATTACHMENTS
+=head2 Attachments
 
 None.
 
-=head1 REFERENCES
+=head2 References
 
 docs/pdd26_ast.pod
 

Modified: branches/kill_pccinvoke/docs/pdds/draft/pdd30_install.pod
==============================================================================
--- branches/kill_pccinvoke/docs/pdds/draft/pdd30_install.pod	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/docs/pdds/draft/pdd30_install.pod	Tue Feb 10 19:57:33 2009	(r36556)
@@ -1,11 +1,9 @@
-# Copyright (C) 2008, The Perl Foundation.
+# Copyright (C) 2008-2009, The Perl Foundation.
 # $Id$
 
-=head1 NAME
+=head1 Parrot Installation
 
-docs/pdds/draft/pdd30_install.pod - Parrot Installation
-
-=head1 ABSTRACT
+=head2 Abstract
 
 This PDD outlines Parrot's installation system and support. Parrot's core
 installation system will provide support for binary packages, a working C<make
@@ -14,11 +12,11 @@
 accessing installed source-only files, and to allow the optimization of config
 bootstrapping if a frozen config_hash is already linked.
 
-=head1 VERSION
+=head2 Version
 
 $Revision$
 
-=head1 SYNOPSIS
+=head2 Synopsis
 
 Parrot installation process (from the parrot source directory):
 
@@ -34,7 +32,7 @@
   make test
   make install
 
-=head1 DESCRIPTION
+=head2 Description
 
 Parrot uses Filesystem Hierarchy Standard (FHS) compliant install directories
 by default. Each install location is configurable with options passed to the
@@ -124,7 +122,7 @@
 adds the blib/lib path to PATH resp. LD_RUN_PATH to all parrot executable
 invocations.
 
-=head1 DEPENDENCIES
+=head2 Dependencies
 
 Building core Parrot depends on Perl (including perldoc, which may be a
 separate package), libgdm and libreadline.
@@ -134,7 +132,7 @@
 in the default C<parrot> package on most systems, but will require a
 C<parrot-dev> package to be installed before they can be built.
 
-=head1 DEFINITIONS
+=head2 Definitions
 
 The B<build_dir> is the full path where Parrot was built. It is defined
 in the configuration hash. When building from source the C<build_dir> is also
@@ -158,7 +156,7 @@
 (F<config.fpmc>), the installable executable (F<install_config.fpmc>) or empty
 for miniparrot (F<null_config.fpmc>).
 
-=head2 make install
+=head3 make install
 
 The Parrot build system is currently optimized for building and testing in
 the build directory, but not for building with an already installed
@@ -170,8 +168,8 @@
 Parrot, its libraries and tools, and its languages so that packagers can
 provide binary packages for parrot and its languages.
 
-The longer-term goal is a framework so that external libraries and languages 
-not within the current parrot source tree can also be properly built, tested 
+The longer-term goal is a framework so that external libraries and languages
+not within the current parrot source tree can also be properly built, tested
 and installed.
 
 We do not only support GNU make or Win32 nmake but also other platform make
@@ -222,7 +220,7 @@
 
 =back
 
-=head2 Configuration bootstrapping
+=head3 Configuration bootstrapping
 
 Bootstrapping the configuration hash should not read a config file when the
 hash is already contained in the PMC or executable.  C<.include
@@ -234,7 +232,7 @@
 a hack to work around earlier limitations in the build system. This is an
 ideal opportunity to eliminate the hack. -allison}}
 
-=head2 Accessing not-installed files
+=head3 Accessing not-installed files
 
 B<Makefile and MANIFEST cleanup>
 
@@ -290,7 +288,7 @@
 
 Source loading PIR statements like C<loadlib> and C<load_bytecode> should
 cache the file name and skip the file if it has already been loaded (as in
-perl5) 
+perl5)
 
 B<Fix 3>: pbc_merge fixups
 
@@ -298,7 +296,7 @@
 load_bytecode pbc-files which are being merged, but hacking bytecode during
 pbc_merge is not desirable.
 
-=head1 IMPLEMENTATION
+=head2 Implementation
 
 A new language is generated by F<tools/dev/mk_language_shell.pl>
 
@@ -312,15 +310,15 @@
 installation maintenance. The entry point could be a Makefile.pl or
 Makefile.pir then.
 
-=head1 ATTACHMENTS
+=head2 Attachments
 
 None.
 
-=head1 FOOTNOTES
+=head2 Footnotes
 
 None.
 
-=head1 REFERENCES
+=head2 References
 
 =cut
 

Modified: branches/kill_pccinvoke/docs/pdds/draft/pdd31_hll_interop.pod
==============================================================================
--- branches/kill_pccinvoke/docs/pdds/draft/pdd31_hll_interop.pod	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/docs/pdds/draft/pdd31_hll_interop.pod	Tue Feb 10 19:57:33 2009	(r36556)
@@ -1,21 +1,19 @@
-# Copyright (C) 2008, The Perl Foundation.
+# Copyright (C) 2008-2009, The Perl Foundation.
 # $Id$
 
-=head1 NAME
+=head1 Inter-language calling
 
-docs/pdds/pddxx_language_interop.pod - Inter-language calling
-
-=head1 VERSION
+=head2 Version
 
 $Revision$
 
-=head1 ABSTRACT
+=head2 Abstract
 
 This PDD describes Parrot's conventions and support for communication between
 high-level languages (HLLs).  It is focused mostly on what implementors should
 do in order to provide this capability to their users.
 
-=head1 DESCRIPTION
+=head2 Description
 
 The ability to mix different high-level languages at runtime has always been
 an important design goal of Parrot.  Another important goal, that of
@@ -33,7 +31,7 @@
 However, this PDD B<is> binding on Parrot implementors, who must provide a
 stable platform for language interoperability to the language implementors.
 
-=head2 Ground rules
+=head3 Ground rules
 
 In order to avoid N**2 complexity and the resulting coordination headaches,
 each language compiler provides an interface as a target for other languages
@@ -137,11 +135,11 @@
 
 =back
 
-=head1 HALF-BAKED IDEAS
+=head2 Half-Baked Ideas
 
 {{ Every draft PDD should have one of these.  ;-}  -- rgr, 28-Jul-08.  }}
 
-=head2 Common syntax for declaring exported functions?
+=head3 Common syntax for declaring exported functions?
 
 I assume we will need some additional namespace support.  Not clear yet
 whether it's better to mark the ones that or OK for external calling, or the
@@ -168,7 +166,7 @@
 {{ Proposal rejected, because we aren't going with "external" and "internal"
 subroutine variants, so it's not needed. --allison }}
 
-=head2 More namespace complexity?
+=head3 More namespace complexity?
 
 {{ Proposal rejected, because we aren't going with "external" and "internal"
 subroutine variants, so it's not needed. --allison }}
@@ -192,7 +190,7 @@
 {{ Of course, this wouldn't be necessary if all external subs were multisubs.
 -- rgr, 31-Jul-08. }}
 
-=head2 Multiple type hierarchies?
+=head3 Multiple type hierarchies?
 
 Different languages will have to "dress up" the Parrot type/class hierarchy
 differently.  For example, Common Lisp specifies that C<STRING> is a subtype
@@ -225,14 +223,14 @@
 
 {{ Absolutely not true. --allison }}
 
-=head1 DEFINITIONS
+=head2 Definitions
 
 {{ Collect definitions of new jargon words here, once we figure out what they
 should be.  -- rgr, 29-Jul-08. }}
 
-=head1 IMPLEMENTATION
+=head2 Implementation
 
-=head2 Plain Parrot Semantics
+=head3 Plain Parrot Semantics
 
 Fortunately, "plain Parrot" is pretty powerful, so the "common denominator" is
 not in fact the lowest possible.  For example, not all Parrot languages
@@ -244,13 +242,13 @@
 
 {{ This needs more?  -- rgr, 28-Jul-08. }}
 
-=head2 Strings
+=head3 Strings
 
     {{ I am probably not competent to write this section.  At the very least,
     it requires discussion of languages that expect strings to be mutable
     versus . . . Java.  -- rgr, 28-Jul-08. }}
 
-=head2 Other scalar data types
+=head3 Other scalar data types
 
 All Parrot language implementations should stick to native Parrot PMC types
 for scalar data, except in case of dire need.  To see with this is so, take
@@ -296,7 +294,7 @@
 {{ Must also discuss morphing:  If some languages do it and other do not, then
 care must be taken at the boundaries.  -- rgr, 31-Jul-08. }}
 
-=head3 Defining new scalar data types
+=head4 Defining new scalar data types
 
 There will be cases where existing Parrot PMC classes cannot represent a
 primitive HLL scalar type, and so a new PMC class is required.  In this case,
@@ -395,7 +393,7 @@
 The rest of this section details exceptions and caveats in dealing with scalar
 data types.
 
-=head3 "Fuzzy" scalars
+=head4 "Fuzzy" scalars
 
 Some languages are willing to coerce strings to numbers and vice versa without
 any special action on the part of the programmer and others are not.  The
@@ -411,7 +409,7 @@
 scalar, and what to do if that value is later used as an integer again.
 --allison }}
 
-=head3 C<Complex> numbers
+=head4 C<Complex> numbers
 
 Not all languages support complex numbers, so if an exported function requires
 a complex argument, it should either throw a suitable error, or coerce an
@@ -423,7 +421,7 @@
 and what results it returns, there's nothing unique about complex numbers.
 --allison }}
 
-=head3 C<Ratio> numbers
+=head4 C<Ratio> numbers
 
 Not all languages support ratios (rather few, actually), so if an exported
 function requires a ratio as an argument, it should either throw a suitable
@@ -440,7 +438,7 @@
     {{ Parrot does not support these yet, so this is not a current issue.  --
     rgr, 28-Jul-08. }}
 
-=head2 Aggregate data types
+=head3 Aggregate data types
 
 {{ I probably haven't done these issues justice; I don't know enough Java or
 Tcl to grok this part of the list discussion.  -- rgr, 28-Jul-08. }}
@@ -476,7 +474,7 @@
 
 {{ Not clear where you're going with this --allison }}
 
-=head2 Functional data types
+=head3 Functional data types
 
 In a sense, functional types (i.e. callable objects) are the easiest things to
 pass across languages, since they require no mapping at all.  On the other
@@ -486,7 +484,7 @@
 {{ Hmmm? They're just subs, how would they not be callable from another
 language? --allison }}
 
-=head2 Datum vs. object
+=head3 Datum vs. object
 
 Some languages present everything to the programmer as an object; in such
 languages, code only exists in methods.  A few languages have no methods, only
@@ -519,7 +517,7 @@
 what you're describing here isn't introspection, it's actually the standard
 vtable functions.  --allison }}
 
-=head3 Defining methods across language boundaries
+=head4 Defining methods across language boundaries
 
 {{ Is the term "unimethod" acceptable here?  -- rgr, 29-Jul-08.  They're just
 methods or subroutines, and it's just "single dispatch". --allison}}
@@ -569,7 +567,7 @@
 
 {{ Not sure what you mean here. --allison }}
 
-=head3 Subclassing across language boundaries
+=head4 Subclassing across language boundaries
 
 {{ This is an important feature, but requires compatible metamodels.  -- rgr,
 29-Jul-08.
@@ -578,7 +576,7 @@
 metamodel boundaries. --allison
 }}
 
-=head3 Method vs. multimethod
+=head4 Method vs. multimethod
 
 {{ This is the issue where some languages (e.g. Common Lisp) use only
 multimethods, where others (e.g. Ruby) use only unimethods.  (S04 says
@@ -595,7 +593,7 @@
 the primary focus of language interoperability. Using libraries from other
 languages is. --allison }}
 
-=head1 REFERENCES
+=head2 References
 
 None.
 

Modified: branches/kill_pccinvoke/docs/pdds/pdd00_pdd.pod
==============================================================================
--- branches/kill_pccinvoke/docs/pdds/pdd00_pdd.pod	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/docs/pdds/pdd00_pdd.pod	Tue Feb 10 19:57:33 2009	(r36556)
@@ -3,7 +3,7 @@
 
 =head1 Parrot Design Documents
 
-=head1 Version
+=head2 Version
 
 $Revision$
 
@@ -147,7 +147,8 @@
 =head3 Submission Criteria
 
 Proposed PDDs should be submitted to the parrot-dev mailing list (located
-at parrot-dev at lists.parrot.org) for discussion, criticism and general kibitzing.
+at parrot-dev at lists.parrot.org) for discussion, criticism and general
+kibitzing.
 Acceptance of a particular PDD is ultimately up to the Parrot Architect.
 
 =head3 PDD Translations

Modified: branches/kill_pccinvoke/docs/pdds/pdd09_gc.pod
==============================================================================
--- branches/kill_pccinvoke/docs/pdds/pdd09_gc.pod	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/docs/pdds/pdd09_gc.pod	Tue Feb 10 19:57:33 2009	(r36556)
@@ -380,7 +380,7 @@
 For a concurrent collector, calls to this function may activate a concurrent
 collection thread or, if such a thread is already running, do nothing at all.
 
-The C<do_gc_mark> function is called from the C<Parrot_do_dod_run> function,
+The C<do_gc_mark> function is called from the C<Parrot_do_gc_run> function,
 and should not usually be called directly.
 
 C<flags> is one of:

Modified: branches/kill_pccinvoke/docs/pdds/pdd20_lexical_vars.pod
==============================================================================
--- branches/kill_pccinvoke/docs/pdds/pdd20_lexical_vars.pod	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/docs/pdds/pdd20_lexical_vars.pod	Tue Feb 10 19:57:33 2009	(r36556)
@@ -386,7 +386,7 @@
 
 None.
 
-=head1 References
+=head2 References
 
 =over 4
 

Modified: branches/kill_pccinvoke/docs/project/release_manager_guide.pod
==============================================================================
--- branches/kill_pccinvoke/docs/project/release_manager_guide.pod	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/docs/project/release_manager_guide.pod	Tue Feb 10 19:57:33 2009	(r36556)
@@ -106,11 +106,18 @@
 
 =item g
 
-Run C<perl tools/dev/pbc_header.pl --upd t/native_pbc/*.pbc>
+Coordinate 4-5 platforms to run C<tools/dev/mk_native_pbc>
+to update the native tests. Esp. when the PBC freeze state changed,
+when the tests fail. This happens quite frequently.
+You'd need 32-bit and 64-bit, little-endian and big-endian platforms.
+linux-gcc x86_64 or solaris, plus and darwin/ppc and irix are usually enough.
+C<svn commit> the changed F<t/native_pbc/*.pbc> files.
+
+If not possible, run at least
+C<perl tools/dev/pbc_header.pl --upd t/native_pbc/*.pbc>
 to update version and fingerprint in the native tests.
-Please check with C<prove t/native_pbc/*.t>.
 
-NOTE: Due to frequent PBC changes, these tests are currently skipped.
+Please check with C<prove t/native_pbc/*.t>.
 
 =item h
 

Modified: branches/kill_pccinvoke/examples/pir/pirric.pir
==============================================================================
--- branches/kill_pccinvoke/examples/pir/pirric.pir	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/examples/pir/pirric.pir	Tue Feb 10 19:57:33 2009	(r36556)
@@ -1440,7 +1440,7 @@
     print curline
     print ']'
 
-    unless debugger goto executeline    
+    unless debugger goto executeline
     debug_break
 
 executeline:
@@ -1617,7 +1617,7 @@
     debugger = getattribute self, 'debugger'
 
     say 'Ready'
-    
+
 reinit:
     unless debugger goto doreadline
     debug_break

Modified: branches/kill_pccinvoke/ext/Parrot-Embed/lib/Parrot/Embed.xs
==============================================================================
--- branches/kill_pccinvoke/ext/Parrot-Embed/lib/Parrot/Embed.xs	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/ext/Parrot-Embed/lib/Parrot/Embed.xs	Tue Feb 10 19:57:33 2009	(r36556)
@@ -12,202 +12,240 @@
 
 typedef struct Interpreter_struct
 {
-	SV            *parent;
-	Parrot_Interp  interp;
+    SV            *parent;
+    Parrot_Interp  interp;
 } Interpreter_struct;
 
 typedef struct PMC_struct
 {
-	SV         *interp;
-	Parrot_PMC  pmc;
+    SV         *interp;
+    Parrot_PMC  pmc;
 } PMC_struct;
 
+
 Interpreter_struct*
 make_interp( pTHX_ SV *parent, PARROT_INTERP )
 {
-	Interpreter_struct *interp_struct;
-	if (interp == NULL)
-		return NULL;
+    Interpreter_struct *interp_struct;
+
+    if (!interp)
+        return NULL;
 
-	New( 0, interp_struct, 1, Interpreter_struct );
+    New( 0, interp_struct, 1, Interpreter_struct );
 
-	SvREFCNT_inc( parent );
-	interp_struct->parent = parent;
-	interp_struct->interp = interp;
+    SvREFCNT_inc( parent );
+    interp_struct->parent = parent;
+    interp_struct->interp = interp;
 
-	return interp_struct;
+    return interp_struct;
 }
 
+
 PMC_struct*
 make_pmc( pTHX_ SV *interp, Parrot_PMC pmc )
 {
-	PMC_struct *pmc_struct;
-	if (pmc == NULL)
-		return NULL;
+    PMC_struct *pmc_struct;
 
-	New( 0, pmc_struct, 1, PMC_struct );
+    if (!pmc)
+        return NULL;
 
-	SvREFCNT_inc( interp );
-	pmc_struct->interp = interp;
-	pmc_struct->pmc    = pmc;
+    New( 0, pmc_struct, 1, PMC_struct );
 
-	Parrot_register_pmc( get_interp( interp ), pmc );
+    SvREFCNT_inc( interp );
+    pmc_struct->interp = interp;
+    pmc_struct->pmc    = pmc;
 
-	return pmc_struct;
+    Parrot_register_pmc( get_interp( interp ), pmc );
+
+    return pmc_struct;
 }
 
+
 MODULE = Parrot::Embed PACKAGE = Parrot::Interpreter
 
 Parrot_Interp
 new( class, ... )
-	char *class
+    char *class
 PREINIT:
-	SV *parent_sv = NULL;
-	Parrot_Interp parent;
-	Parrot_Interp interp;
-	Parrot_PackFile pf;
-CODE:
-	if (items == 1)
-	{
-		parent = 0;
-	}
-	else if ( items == 2 && sv_derived_from( ST(1), "Parrot::Interpreter" ))
-	{
-		parent_sv = ST(1);
-		parent    = get_interp( parent_sv );
-	}
-	else
-	{
-		Perl_croak( aTHX_ "Usage: Parrot::Interpreter->new( [ parent ] )" );
-	}
-	interp = Parrot_new( (Parrot_Interp)parent );
-	pf     = PackFile_new( interp, 0 );
-	Parrot_loadbc( interp, pf );
-
-	/* Can't use RETVAL/OUTPUT here because typemap loses class variable */
-	ST(0)  = sv_newmortal();
-	sv_setref_pv( ST(0), class, (void*)make_interp( aTHX_ parent_sv, interp ) );
+    SV             *parent_sv = NULL;
+    Parrot_Interp   parent;
+    Parrot_Interp   interp;
+    Parrot_PackFile pf;
+CODE:
+    if (items == 1)
+        parent = 0;
+    else if ( items == 2 && sv_derived_from( ST(1), "Parrot::Interpreter" ))
+    {
+        parent_sv = ST(1);
+        parent    = get_interp( parent_sv );
+    }
+    else
+        Perl_croak( aTHX_ "Usage: Parrot::Interpreter->new( [ parent ] )" );
+
+    interp = Parrot_new( (Parrot_Interp)parent );
+    pf     = PackFile_new( interp, 0 );
+    Parrot_loadbc( interp, pf );
+
+    /* Can't use RETVAL/OUTPUT here because typemap loses class variable */
+    ST(0)  = sv_newmortal();
+    sv_setref_pv( ST(0), class, (void*)make_interp( aTHX_ parent_sv, interp ) );
+
 
 bool
 load_file( interp, filename )
-	Interpreter_struct *interp
-	char *filename
+    Interpreter_struct *interp
+    char               *filename
 PREINIT:
-	Parrot_Interp real_interp;
-	Parrot_PackFile pf;
+    Parrot_Interp   real_interp;
+    Parrot_PackFile pf;
 CODE:
-	real_interp = interp->interp;
-	pf = Parrot_readbc( real_interp, filename );
-	if (pf == NULL)
-		Perl_croak( aTHX_ \
-		"File '%s' not found in $parrot_interpreter->load_file()", filename );
+    real_interp = interp->interp;
+    pf          = Parrot_readbc( real_interp, filename );
 
-	Parrot_loadbc( real_interp, pf );
-	RETVAL = 1;
+    if (!pf)
+        Perl_croak( aTHX_
+        "File '%s' not found in $parrot_interpreter->load_file()", filename );
+
+    Parrot_loadbc( real_interp, pf );
+    RETVAL = 1;
 OUTPUT:
-	RETVAL
+    RETVAL
+
 
 PMC_struct*
 find_global( interp, global, ... )
-	Interpreter_struct *interp
-	char *global
+    Interpreter_struct *interp
+    char               *global
 PREINIT:
-	Parrot_Interp  real_interp;
-	SV            *namespace;
-	Parrot_String  p_namespace;
-	Parrot_String  p_global;
-	Parrot_PMC     pmc;
-CODE:
-	if ( items < 2 || items > 3 )
-	{
-		Perl_croak( aTHX_
-			"Usage: $parrot_interpreter->find_global( name, [ namespace ] )");
-	}
-
-	real_interp     = interp->interp;
-	p_global        = Parrot_str_new_constant( real_interp, global );
-
-	if ( items == 3 )
-		namespace   = ST(2);
-	else
-		namespace   = &PL_sv_undef;
-
-	if (namespace  != &PL_sv_undef )
-	{
-		p_namespace = Parrot_str_new_constant( real_interp, SvPVX( namespace ) );
-		pmc         = Parrot_find_global_s(real_interp, p_namespace, p_global);
-	}
-	else
-		pmc         = Parrot_find_global_cur( real_interp, p_global );
+    SV            *namespace;
+    Parrot_Interp  real_interp;
+    Parrot_String  p_namespace;
+    Parrot_String  p_global;
+    Parrot_PMC     pmc;
+CODE:
+    if ( items < 2 || items > 3 )
+        Perl_croak( aTHX_
+            "Usage: $parrot_interpreter->find_global( name, [ namespace ] )");
+
+    real_interp     = interp->interp;
+    p_global        = Parrot_str_new_constant( real_interp, global );
+
+    if (items == 3)
+        namespace   = ST(2);
+    else
+        namespace   = &PL_sv_undef;
+
+    if (namespace  != &PL_sv_undef )
+    {
+        char *ns_copy = savepv(SvPV_nolen(namespace));
+        char *ns_str  = ns_copy;
+        char *prev    = ns_str;
+        PMC  *ns      = NULL;
+
+        while (*ns_str++)
+        {
+            STRING *ns_part;
+
+            if (! (*ns_str == ':' && *(ns_str + 1) == ':'))
+                continue;
+
+            *ns_str = 0;
+            ns_str += 2;
+
+            if (!ns)
+                ns = Parrot_find_global_cur(real_interp,
+                    Parrot_str_new_constant(real_interp, prev));
+            else
+                ns = Parrot_find_global_n(real_interp, ns,
+                    Parrot_str_new_constant(real_interp, prev));
+            prev    = ns_str;
+        }
+
+        if (!ns)
+            ns = Parrot_find_global_cur(real_interp,
+                Parrot_str_new_constant(real_interp, prev));
+        else
+            ns = Parrot_find_global_n(real_interp, ns,
+                Parrot_str_new_constant(real_interp, prev));
+
+        pmc          = Parrot_find_global_n(real_interp, ns, p_global);
+        Safefree(ns_copy);
+    }
+    else
+        pmc         = Parrot_find_global_cur( real_interp, p_global );
 
-	RETVAL = make_pmc( aTHX_ ST(0), pmc );
+    RETVAL = make_pmc( aTHX_ ST(0), pmc );
 OUTPUT:
-	RETVAL
+    RETVAL
+
 
 PMC_struct*
 compile( interp, code )
-	Interpreter_struct *interp
-	char * code
+    Interpreter_struct *interp
+    char               *code
 PREINIT:
-	Parrot_Interp  real_interp;
-	STRING        *code_type;
-	STRING        *error;
-	Parrot_PMC     out_pmc;
-CODE:
-	real_interp = interp->interp;  
-	code_type   = Parrot_str_new_constant( real_interp, "PIR" );
-	out_pmc     = Parrot_compile_string( real_interp, code_type, code, &error );
-	RETVAL      = make_pmc( aTHX_ ST(0), out_pmc );
+    STRING        *code_type;
+    STRING        *error;
+    Parrot_Interp  real_interp;
+    Parrot_PMC     out_pmc;
+CODE:
+    real_interp = interp->interp;
+    code_type   = Parrot_str_new_constant( real_interp, "PIR" );
+    out_pmc     = Parrot_compile_string( real_interp, code_type, code, &error );
+    RETVAL      = make_pmc( aTHX_ ST(0), out_pmc );
 OUTPUT:
-	RETVAL
+    RETVAL
+
 
 void
 DESTROY( interp )
-	Interpreter_struct *interp
+    Interpreter_struct *interp
 CODE:
-	if ( interp->parent != NULL )
-		SvREFCNT_dec( interp->parent );
+    if (interp->parent)
+        SvREFCNT_dec( interp->parent );
 
-	Parrot_destroy( interp->interp );
+    Parrot_destroy( interp->interp );
 
 MODULE = Parrot::Embed PACKAGE = Parrot::PMC
 
+
 PMC_struct*
 invoke( pmc, signature, argument )
-	PMC_struct *pmc
-	const char *signature
-	const char *argument
-PREINIT:
-	Parrot_PMC    pmc_actual;
-	Parrot_PMC    out_pmc;
-	Parrot_Interp interp;
-	Parrot_String arg_string;
-CODE:
-	pmc_actual = pmc->pmc;
-	interp     = get_interp( pmc->interp );
-	arg_string = Parrot_str_new_constant( interp, argument );
-	out_pmc    = Parrot_call_sub( interp, pmc_actual, signature, arg_string );
-	RETVAL     = make_pmc( aTHX_ pmc->interp, out_pmc );
+    PMC_struct *pmc
+    const char *signature
+    const char *argument
+PREINIT:
+    Parrot_PMC    pmc_actual;
+    Parrot_PMC    out_pmc;
+    Parrot_Interp interp;
+    Parrot_String arg_string;
+CODE:
+    pmc_actual = pmc->pmc;
+    interp     = get_interp( pmc->interp );
+    arg_string = Parrot_str_new_constant( interp, argument );
+    out_pmc    = Parrot_call_sub( interp, pmc_actual, signature, arg_string );
+    RETVAL     = make_pmc( aTHX_ pmc->interp, out_pmc );
 OUTPUT:
-	RETVAL
+    RETVAL
+
 
 char *
 get_string( pmc )
-	PMC_struct *pmc
+    PMC_struct *pmc
 CODE:
-	RETVAL = Parrot_PMC_get_cstring( get_interp( pmc->interp ), pmc->pmc );
+    RETVAL = Parrot_PMC_get_cstring( get_interp( pmc->interp ), pmc->pmc );
 OUTPUT:
-	RETVAL
+    RETVAL
 
 void
 DESTROY( pmc )
-	PMC_struct *pmc
+    PMC_struct *pmc
 PREINIT:
-	Parrot_Interp interp;
+    Parrot_Interp interp;
 CODE:
-	interp = get_interp( pmc->interp );
+    interp = get_interp( pmc->interp );
 
-	if ( interp != NULL )
-		SvREFCNT_dec( interp );
+    if (interp)
+        SvREFCNT_dec( interp );
 
-	Parrot_unregister_pmc( interp, pmc->pmc );
+    Parrot_unregister_pmc( interp, pmc->pmc );

Modified: branches/kill_pccinvoke/include/parrot/gc_api.h
==============================================================================
--- branches/kill_pccinvoke/include/parrot/gc_api.h	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/include/parrot/gc_api.h	Tue Feb 10 19:57:33 2009	(r36556)
@@ -85,7 +85,7 @@
 STRING * new_string_header(PARROT_INTERP, UINTVAL flags)
         __attribute__nonnull__(1);
 
-void Parrot_do_dod_run(PARROT_INTERP, UINTVAL flags)
+void Parrot_do_gc_run(PARROT_INTERP, UINTVAL flags)
         __attribute__nonnull__(1);
 
 void Parrot_gc_free_buffer(SHIM_INTERP,
@@ -143,7 +143,7 @@
        PARROT_ASSERT_ARG(interp)
 #define ASSERT_ARGS_new_string_header __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_Parrot_do_dod_run __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_do_gc_run __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
 #define ASSERT_ARGS_Parrot_gc_free_buffer __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(pool) \
@@ -246,21 +246,6 @@
 /* HEADERIZER END: src/gc/incremental_ms.c */
 
 /* write barrier */
-#if PARROT_GC_IMS
-#  define GC_WRITE_BARRIER(interp, agg, old, _new) \
-    do { \
-        if (!PMC_IS_NULL(_new)   && \
-                PObj_live_TEST(agg) && \
-                (PObj_get_FLAGS(agg) & PObj_custom_GC_FLAG) && \
-                !PObj_live_TEST(_new)) { \
-            Parrot_dod_ims_wb((interp), (agg), (_new)); \
-        } \
-    } while (0)
-
-#  define GC_WRITE_BARRIER_KEY(interp, agg, old, old_key, _new, new_key) \
-          GC_WRITE_BARRIER((interp), (agg), (old), (_new))
-#endif
-
 #if PARROT_GC_MS
 #  define GC_WRITE_BARRIER(interp, agg, old, _new) do { } while (0)
 #  define GC_WRITE_BARRIER_KEY(interp, agg, old, old_key, _new, new_key) do { } while (0)

Modified: branches/kill_pccinvoke/include/parrot/gc_mark_sweep.h
==============================================================================
--- branches/kill_pccinvoke/include/parrot/gc_mark_sweep.h	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/include/parrot/gc_mark_sweep.h	Tue Feb 10 19:57:33 2009	(r36556)
@@ -27,7 +27,7 @@
 typedef void (*add_free_object_fn_type)(PARROT_INTERP, struct Small_Object_Pool *, void *);
 typedef void * (*get_free_object_fn_type)(PARROT_INTERP, struct Small_Object_Pool *);
 typedef void (*alloc_objects_fn_type)(PARROT_INTERP, struct Small_Object_Pool *);
-typedef void (*dod_object_fn_type)(PARROT_INTERP, struct Small_Object_Pool *, PObj *);
+typedef void (*gc_object_fn_type)(PARROT_INTERP, struct Small_Object_Pool *, PObj *);
 
 #if PARROT_GC_GMS
 /*
@@ -103,7 +103,7 @@
     get_free_object_fn_type     get_free_object;
     alloc_objects_fn_type       alloc_objects;
     alloc_objects_fn_type       more_objects;
-    dod_object_fn_type          dod_object;
+    gc_object_fn_type           gc_object;
     /* gets and removes a free object from the pool's free list */
     /* allocates more objects */
     struct Memory_Pool *mem_pool;

Modified: branches/kill_pccinvoke/include/parrot/interpreter.h
==============================================================================
--- branches/kill_pccinvoke/include/parrot/interpreter.h	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/include/parrot/interpreter.h	Tue Feb 10 19:57:33 2009	(r36556)
@@ -172,7 +172,7 @@
 
 typedef struct _RunProfile {
     FLOATVAL starttime;
-    FLOATVAL dod_time;
+    FLOATVAL gc_time;
     opcode_t cur_op;
     ProfData *data;
 } RunProfile;

Modified: branches/kill_pccinvoke/include/parrot/pmc.h
==============================================================================
--- branches/kill_pccinvoke/include/parrot/pmc.h	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/include/parrot/pmc.h	Tue Feb 10 19:57:33 2009	(r36556)
@@ -40,7 +40,7 @@
         __attribute__nonnull__(1);
 
 PARROT_EXPORT
-void dod_register_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
+void gc_register_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
@@ -93,7 +93,7 @@
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
-void dod_unregister_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
+void gc_unregister_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
@@ -115,7 +115,7 @@
        PARROT_ASSERT_ARG(interp)
 #define ASSERT_ARGS_constant_pmc_new_noinit __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_dod_register_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_gc_register_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(pmc)
 #define ASSERT_ARGS_Parrot_create_mro __attribute__unused__ int _ASSERT_ARGS_CHECK = \
@@ -139,7 +139,7 @@
 #define ASSERT_ARGS_pmc_type_p __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(name)
-#define ASSERT_ARGS_dod_unregister_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_gc_unregister_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(pmc)
 #define ASSERT_ARGS_get_new_vtable_index __attribute__unused__ int _ASSERT_ARGS_CHECK = \

Modified: branches/kill_pccinvoke/include/parrot/resources.h
==============================================================================
--- branches/kill_pccinvoke/include/parrot/resources.h	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/include/parrot/resources.h	Tue Feb 10 19:57:33 2009	(r36556)
@@ -141,8 +141,8 @@
     /*
      * statistics for DOD and GC
      */
-    size_t  dod_runs;           /* Number of times we've done a DOD sweep */
-    size_t  lazy_dod_runs;      /* Number of successful lazy DOD sweep */
+    size_t  gc_runs;           /* Number of times we've done a DOD sweep */
+    size_t  lazy_gc_runs;       /* Number of successful lazy DOD sweep */
     size_t  collect_runs;       /* Number of times we've
                                  * done a memory compaction
                                  */
@@ -165,10 +165,10 @@
     UINTVAL num_early_DOD_PMCs; /* how many PMCs want immediate destruction */
     UINTVAL num_early_PMCs_seen;/* how many such PMCs has DOD seen */
     UINTVAL num_extended_PMCs;  /* active PMCs having pmc_ext */
-    PMC* dod_mark_start;        /* first PMC marked during a DOD run */
-    PMC* dod_mark_ptr;          /* last PMC marked during a DOD run */
-    PMC* dod_trace_ptr;         /* last PMC trace_children was called on */
-    int lazy_dod;               /* flag that indicates whether we should stop
+    PMC* gc_mark_start;         /* first PMC marked during a DOD run */
+    PMC* gc_mark_ptr;           /* last PMC marked during a DOD run */
+    PMC* gc_trace_ptr;          /* last PMC trace_children was called on */
+    int lazy_gc;                /* flag that indicates whether we should stop
                                    when we've seen all impatient PMCs */
     /*
      * DOD, GC blocking

Copied: branches/kill_pccinvoke/languages/cola/TODO (from r36554, trunk/languages/cola/TODO)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/kill_pccinvoke/languages/cola/TODO	Tue Feb 10 19:57:33 2009	(r36556, copy of r36554, trunk/languages/cola/TODO)
@@ -0,0 +1,20 @@
+The following tickets were stored in parrot's RT system.
+
+They have now been marked as rejected in that system, but are listed
+here for posterity, so they can easily be migrated into cola's new
+ticketing system, whatever that may be.
+
+#48198: [TODO] [cola] Add support for member resolution in lookup_type()
+  http://rt.perl.org/rt3/Ticket/Display.html?id=48198
+
+#48200: [TODO] [cola] Add documentation to files and functions
+  http://rt.perl.org/rt3/Ticket/Display.html?id=48200
+
+#48202: [TODO] [cola] Rewrite push_sym() to call generic Node versions of calls
+  http://rt.perl.org/rt3/Ticket/Display.html?id=48202
+
+#48204: [TODO] [cola] Check method signature in gen_arg_list_expr() and find out what type is expected
+  http://rt.perl.org/rt3/Ticket/Display.html?id=48204
+
+#48206: [TODO] [cola] Check that expression evaluates to a method in gen_method_call()
+  http://rt.perl.org/rt3/Ticket/Display.html?id=48206

Modified: branches/kill_pccinvoke/languages/dotnet/TODO
==============================================================================
--- branches/kill_pccinvoke/languages/dotnet/TODO	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/languages/dotnet/TODO	Tue Feb 10 19:57:33 2009	(r36556)
@@ -58,3 +58,20 @@
 
 * Try and make a GUI app run!
 
+The following tickets were stored in parrot's RT system.
+
+They have now been marked as rejected in that system, but are listed
+here for posterity, so they can easily be migrated into dotnet's new
+ticketing system, whatever that may be.
+
+#58590: [PATCH] dotnet make
+  http://rt.perl.org/rt3/Ticket/Display.html?id=58590
+
+#48130: [TODO] [dotnet] Why does sig_token have to be set to 0xFFFF in make_bytecde_pmc()?
+  http://rt.perl.org/rt3/Ticket/Display.html?id=48130
+
+#48128: [TODO] [dotnet] Does a null first byte need special handling in dotnetsignature.pmc?
+  http://rt.perl.org/rt3/Ticket/Display.html?id=48128
+
+#42349: [TODO] dotnet - fix various ops for 64 bit architectures
+  http://rt.perl.org/rt3/Ticket/Display.html?id=42349

Modified: branches/kill_pccinvoke/languages/lua/src/pmc/luatable.pmc
==============================================================================
--- branches/kill_pccinvoke/languages/lua/src/pmc/luatable.pmc	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/languages/lua/src/pmc/luatable.pmc	Tue Feb 10 19:57:33 2009	(r36556)
@@ -706,7 +706,7 @@
 
 */
     METHOD PMC* get_metatable() {
-        PMC *retval = _LuaUserdata_get_metatable(INTERP, SELF);
+        PMC *retval = _LuaTable_get_metatable(INTERP, SELF);
 
         if (!retval)
             retval = pmc_new(INTERP, dynpmc_LuaNil);

Modified: branches/kill_pccinvoke/languages/lua/src/pmc/luauserdata.pmc
==============================================================================
--- branches/kill_pccinvoke/languages/lua/src/pmc/luauserdata.pmc	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/languages/lua/src/pmc/luauserdata.pmc	Tue Feb 10 19:57:33 2009	(r36556)
@@ -23,10 +23,11 @@
 
 #define u_val(pmc) (PARROT_LUAUSERDATA(pmc))->val
 #define u_env(pmc) (PARROT_LUAUSERDATA(pmc))->env
+#define u_mt(pmc)  (PARROT_LUAUSERDATA(pmc))->mt
 
 PMC *
 _LuaUserdata_get_metatable(PARROT_INTERP, PMC *obj) {
-    return PMC_metadata(obj);
+    return u_mt(obj);
 }
 
 static PMC* curr_func(PARROT_INTERP) {
@@ -46,12 +47,11 @@
 }
 
 static PMC* getcurrenv(PARROT_INTERP) {
-    PMC *env = NULL;
-    PMC *sub = curr_func(interp);
+    PMC * const sub = curr_func(interp);
     if (sub) {
-        env = PMC_metadata(sub);
+        return PMC_metadata(sub);
     }
-    return env;
+    return NULL;
 }
 
 
@@ -65,6 +65,7 @@
 
     ATTR PMC    *val;
     ATTR PMC    *env;
+    ATTR PMC    *mt;
 
 /*
 
@@ -79,7 +80,6 @@
         Parrot_LuaUserdata_attributes *u = mem_allocate_zeroed_typed(Parrot_LuaUserdata_attributes);
         PMC_data(SELF) = u;
         u_env(SELF) = getcurrenv(INTERP);
-        PMC_metadata(SELF) = NULL;
         PObj_custom_mark_destroy_SETALL(SELF);
     }
 
@@ -97,8 +97,8 @@
             pobject_lives(INTERP, (PObj *)u_val(SELF));
         if (u_env(SELF))
             pobject_lives(INTERP, (PObj *)u_env(SELF));
-        if (PMC_metadata(SELF))
-            pobject_lives(INTERP, (PObj *)PMC_metadata(SELF));
+        if (u_mt(SELF))
+            pobject_lives(INTERP, (PObj *)u_mt(SELF));
     }
 
 /*
@@ -167,9 +167,9 @@
 */
     VTABLE void set_pmc(PMC *value) {
         /* TODO: should be get_attr_str() and getfenv() */
-        u_val(SELF)        = u_val(value);
-        u_env(SELF)        = u_env(value);
-        PMC_metadata(SELF) = PMC_metadata(value);
+        u_val(SELF) = u_val(value);
+        u_env(SELF) = u_env(value);
+        u_mt(SELF)  = u_mt(value);
     }
 
 /*
@@ -212,8 +212,8 @@
     MULTI INTVAL is_equal(LuaUserdata value) {
         PMC * const meth = _LuaAny_find_meth(INTERP, SELF, "__eq");
         if (meth) {
-            PMC *retval = Parrot_runops_fromc_args(INTERP, meth, "PPP",
-                                                   SELF, value);
+            PMC * const retval = Parrot_runops_fromc_args(INTERP, meth, "PPP",
+                                                          SELF, value);
             if (PMC_IS_NULL(retval))
                 return (INTVAL)0;
 
@@ -366,9 +366,9 @@
 */
     METHOD void set_metatable(PMC *meta) {
         if (dynpmc_LuaNil == PMC_type(meta))
-            PMC_metadata(SELF) = NULL;
+            u_mt(SELF) = NULL;
         else
-            PMC_metadata(SELF) = meta;
+            u_mt(SELF) = meta;
     }
 
 }

Modified: branches/kill_pccinvoke/languages/pheme/TODO
==============================================================================
--- branches/kill_pccinvoke/languages/pheme/TODO	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/languages/pheme/TODO	Tue Feb 10 19:57:33 2009	(r36556)
@@ -67,3 +67,13 @@
 	- port?
 	- predicates are disjoint
 	- empty list satisfies none
+
+
+The following tickets were stored in parrot's RT system.
+
+They have now been marked as rejected in that system, but are listed
+here for posterity, so they can easily be migrated into pheme's new
+ticketing system, whatever that may be.
+
+#60208: [BUG] pheme -- t/null test fails in r32229
+  http://rt.perl.org/rt3/Ticket/Display.html?id=60208

Copied: branches/kill_pccinvoke/languages/regex/TODO (from r36554, trunk/languages/regex/TODO)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/kill_pccinvoke/languages/regex/TODO	Tue Feb 10 19:57:33 2009	(r36556, copy of r36554, trunk/languages/regex/TODO)
@@ -0,0 +1,14 @@
+The following tickets were stored in parrot's RT system.
+
+They have now been marked as rejected in that system, but are listed
+here for posterity, so they can easily be migrated into regex's new
+ticketing system, whatever that may be.
+
+#48168: [TODO] [regex] Implement init_pmc
+  http://rt.perl.org/rt3/Ticket/Display.html?id=48168
+
+#48170: [TODO] [regex] Remove 'use of uninitialized value' issues in match.pmc
+  http://rt.perl.org/rt3/Ticket/Display.html?id=48170
+
+#42393: [TODO] regex - FIXME items in languages/regex/lib/Regex/Grammar.y
+  http://rt.perl.org/rt3/Ticket/Display.html?id=42393

Deleted: branches/kill_pccinvoke/lib/Parrot/Docs/Section/BigNum.pm
==============================================================================
--- branches/kill_pccinvoke/lib/Parrot/Docs/Section/BigNum.pm	Tue Feb 10 19:57:33 2009	(r36555)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,61 +0,0 @@
-# Copyright (C) 2004-2006, The Perl Foundation.
-# $Id$
-
-=head1 NAME
-
-Parrot::Docs::Section::BigNum - Big Number documentation section
-
-=head1 SYNOPSIS
-
-        use Parrot::Docs::Section::BigNum;
-
-=head1 DESCRIPTION
-
-A documentation section describing Parrot's big number subsystem.
-
-=head2 Class Methods
-
-=over
-
-=cut
-
-package Parrot::Docs::Section::BigNum;
-
-use strict;
-use warnings;
-
-use base qw( Parrot::Docs::Section );
-
-=item C<new()>
-
-Returns a new section.
-
-=cut
-
-sub new {
-    my $self = shift;
-
-    return $self->SUPER::new(
-        'Big Number Arithmetic',
-        'bignum.html',
-        '',
-        $self->new_group(
-            'Decimal Arithmetic',
-            '', $self->new_item( '', 'src/bignum.c', 'src/bignum.h' ),
-        ),
-        $self->new_group( 'Testing', '', $self->new_item( '', 't/pmc/bignum.t' ), ),
-    );
-}
-
-=back
-
-=cut
-
-1;
-
-# Local Variables:
-#   mode: cperl
-#   cperl-indent-level: 4
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:

Modified: branches/kill_pccinvoke/lib/Parrot/Docs/Section/Parrot.pm
==============================================================================
--- branches/kill_pccinvoke/lib/Parrot/Docs/Section/Parrot.pm	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/lib/Parrot/Docs/Section/Parrot.pm	Tue Feb 10 19:57:33 2009	(r36556)
@@ -41,7 +41,6 @@
 use Parrot::Docs::Section::Perl;
 use Parrot::Docs::Section::Libs;
 use Parrot::Docs::Section::Tools;
-use Parrot::Docs::Section::BigNum;
 use Parrot::Docs::Section::Compilers;
 use Parrot::Docs::Section::Languages;
 use Parrot::Docs::Section::Config;
@@ -65,7 +64,6 @@
         Parrot::Docs::Section::C->new,         Parrot::Docs::Section::Ops->new,
         Parrot::Docs::Section::IMCC->new,      Parrot::Docs::Section::Perl->new,
         Parrot::Docs::Section::Libs->new,      Parrot::Docs::Section::Tools->new,
-        Parrot::Docs::Section::BigNum->new,    Parrot::Docs::Section::Compilers->new,
         Parrot::Docs::Section::Languages->new, Parrot::Docs::Section::Config->new,
         Parrot::Docs::Section::Tests->new,     Parrot::Docs::Section::EditorPlugins->new,
     );
@@ -130,8 +128,6 @@
 
 =item C<Parrot::Docs::Section::Tools>
 
-=item C<Parrot::Docs::Section::BigNum>
-
 =item C<Parrot::Docs::Section::Compilers>
 
 =item C<Parrot::Docs::Section::Languages>

Modified: branches/kill_pccinvoke/lib/Parrot/Pmc2c/Attribute.pm
==============================================================================
--- branches/kill_pccinvoke/lib/Parrot/Pmc2c/Attribute.pm	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/lib/Parrot/Pmc2c/Attribute.pm	Tue Feb 10 19:57:33 2009	(r36556)
@@ -104,6 +104,7 @@
     my $isptrtostring = qr/STRING\s*\*$/;
     my $isptrtopmc    = qr/PMC\s*\*$/;
 
+    my $inherit        = 1;
     my $decl           = <<"EOA";
 
 /* Generated macro accessors for '$attrname' attribute of $pmcname PMC. */
@@ -116,21 +117,21 @@
         $decl .= <<"EOA";
             PMC *attr_value = VTABLE_get_attr_str(interp, \\
                               pmc, Parrot_str_new_constant(interp, "$attrname")); \\
-            (dest) = VTABLE_get_integer(interp, attr_value); \\
+            (dest) = (PMC_IS_NULL(attr_value) ? (INTVAL) 0: VTABLE_get_integer(interp, attr_value)); \\
 EOA
     }
     elsif ($attrtype eq "FLOATVAL") {
         $decl .= <<"EOA";
             PMC *attr_value = VTABLE_get_attr_str(interp, \\
                               pmc, Parrot_str_new_constant(interp, "$attrname")); \\
-            (dest) = VTABLE_get_number(interp, attr_value); \\
+            (dest) =  (PMC_IS_NULL(attr_value) ? (FLOATVAL) 0.0: VTABLE_get_number(interp, attr_value)); \\
 EOA
     }
     elsif ($attrtype =~ $isptrtostring) {
         $decl .= <<"EOA";
             PMC *attr_value = VTABLE_get_attr_str(interp, \\
                               pmc, Parrot_str_new_constant(interp, "$attrname")); \\
-            (dest) = VTABLE_get_string(interp, attr_value); \\
+            (dest) =  (PMC_IS_NULL(attr_value) ? (STRING *) 0: VTABLE_get_string(interp, attr_value)); \\
 EOA
     }
     elsif ($attrtype =~ $isptrtopmc) {
@@ -141,6 +142,7 @@
     }
 
     else {
+        $inherit = 0;
         $decl .= <<"EOA";
             Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \\
                 "Attributes of type '$attrtype' cannot be " \\
@@ -206,6 +208,8 @@
 
 EOA
 
+    $self->{inherit} = $inherit;
+
     $h->emit($decl);
 
     return 1;

Modified: branches/kill_pccinvoke/lib/Parrot/Pmc2c/PMCEmitter.pm
==============================================================================
--- branches/kill_pccinvoke/lib/Parrot/Pmc2c/PMCEmitter.pm	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/lib/Parrot/Pmc2c/PMCEmitter.pm	Tue Feb 10 19:57:33 2009	(r36556)
@@ -435,6 +435,7 @@
         NULL,       /* isa_hash */
         NULL,       /* class */
         NULL,       /* mro */
+        attr_defs,  /* attribute_defs */
         NULL,       /* ro_variant_vtable */
         $methlist
     };
@@ -487,6 +488,34 @@
 void
 Parrot_${classname}_class_init(PARROT_INTERP, int entry, int pass)
 {
+    static const char attr_defs [] =
+EOC
+    $cout .= '        "';
+
+    my $attributes = $self->attributes;
+    foreach my $attribute ( @$attributes ) {
+        my $attrtype       = $attribute->{type};
+        my $typeid = ':'; # Unhandled
+        if ($attrtype eq "INTVAL") {
+            $typeid = 'I';
+        }
+        elsif ($attrtype eq "FLOATVAL") {
+            $typeid = 'F';
+        }
+        elsif ($attrtype =~ /STRING\s*\*$/) {
+            $typeid = 'S';
+        }
+        elsif ($attrtype =~ /PMC\s*\*$/) {
+            $typeid = 'F';
+        }
+
+        $cout .= $typeid;
+        $cout .= $attribute->name;
+        $cout .= ' ';
+    }
+
+    $cout .= "\";\n";
+    $cout .= <<"EOC";
 $vtable_decl
 EOC
 

Modified: branches/kill_pccinvoke/lib/Parrot/Test.pm
==============================================================================
--- branches/kill_pccinvoke/lib/Parrot/Test.pm	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/lib/Parrot/Test.pm	Tue Feb 10 19:57:33 2009	(r36556)
@@ -966,9 +966,7 @@
                           ? ""
                           : "-L$PConfig{blib_dir} "))
                         . ($^O =~ m/MSWin32/
-                          ? File::Spec->join(
-                              @PConfig{qw/build_dir libparrot_ldflags/},
-                          )
+                          ? $PConfig{libparrot_ldflags}
                           : "-lparrot")
                       : File::Spec->join(
                           @PConfig{qw/build_dir blib_dir libparrot_static/},

Modified: branches/kill_pccinvoke/lib/Parrot/Vtable.pm
==============================================================================
--- branches/kill_pccinvoke/lib/Parrot/Vtable.pm	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/lib/Parrot/Vtable.pm	Tue Feb 10 19:57:33 2009	(r36556)
@@ -175,6 +175,7 @@
     PMC    *pmc_class;      /* for PMCs: a PMC of that type
                                for objects: the class PMC */
     PMC    *mro;            /* array PMC of [class, parents ... ] */
+    const char *attribute_defs; /* list of PMC attributes */
     struct _vtable *ro_variant_vtable; /* A variant of this vtable with the
                                    opposite IS_READONLY flag */
     /* Vtable Functions */

Modified: branches/kill_pccinvoke/ports/debian/copyright
==============================================================================
--- branches/kill_pccinvoke/ports/debian/copyright	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/ports/debian/copyright	Tue Feb 10 19:57:33 2009	(r36556)
@@ -15,9 +15,6 @@
 languages/cola/:
 Copyright (C) 2002 Melvin Smith <melvin.smith at mindspring.com>
 
-languages/regex/lib/Regex/Grammar.pm:
-(c) Copyright 1998-2001 Francois Desarmenien, all rights reserved.
-
 languages/urm:
 2003 (c) by Marcus Thiesen
 

Modified: branches/kill_pccinvoke/src/call/pcc.c
==============================================================================
--- branches/kill_pccinvoke/src/call/pcc.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/call/pcc.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -2892,7 +2892,7 @@
 
     /* Invoke the subroutine object with the given CallSignature object */
     Parrot_pcc_invoke_from_sig_object(interp, sub_obj, sig_obj);
-    dod_unregister_pmc(interp, sig_obj);
+    gc_unregister_pmc(interp, sig_obj);
 
 }
 

Modified: branches/kill_pccinvoke/src/events.c
==============================================================================
--- branches/kill_pccinvoke/src/events.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/events.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -1051,7 +1051,7 @@
     event->type   = EVENT_TYPE_IO;
     event->interp = interp;
     /*
-     * TODO dod_register these PMCs as long as the event system
+     * TODO gc_register these PMCs as long as the event system
      *      owns these 3
      *      unregister, when event is passed to interp again
      */

Modified: branches/kill_pccinvoke/src/extend.c
==============================================================================
--- branches/kill_pccinvoke/src/extend.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/extend.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -1311,7 +1311,7 @@
 {
     ASSERT_ARGS(Parrot_register_pmc)
     PARROT_CALLIN_START(interp);
-    dod_register_pmc(interp, pmc);
+    gc_register_pmc(interp, pmc);
     PARROT_CALLIN_END(interp);
 }
 
@@ -1333,7 +1333,7 @@
 {
     ASSERT_ARGS(Parrot_unregister_pmc)
     PARROT_CALLIN_START(interp);
-    dod_unregister_pmc(interp, pmc);
+    gc_unregister_pmc(interp, pmc);
     PARROT_CALLIN_END(interp);
 }
 

Modified: branches/kill_pccinvoke/src/gc/api.c
==============================================================================
--- branches/kill_pccinvoke/src/gc/api.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/gc/api.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -436,7 +436,7 @@
 {
     ASSERT_ARGS(Parrot_gc_profile_start)
     if (Interp_flags_TEST(interp, PARROT_PROFILE_FLAG))
-        interp->profile->dod_time = Parrot_floatval_time();
+        interp->profile->gc_time = Parrot_floatval_time();
 }
 
 /*
@@ -459,18 +459,18 @@
         const FLOATVAL     now     = Parrot_floatval_time();
 
         profile->data[what].numcalls++;
-        profile->data[what].time += now - profile->dod_time;
+        profile->data[what].time += now - profile->gc_time;
 
         /*
          * we've recorded the time of a DOD/GC piece from
-         * dod_time until now, so add this to the start of the
+         * gc_time until now, so add this to the start of the
          * currently executing opcode, which hasn't run this
          * interval.
          */
-        profile->starttime += now - profile->dod_time;
+        profile->starttime += now - profile->gc_time;
 
         /* prepare start for next step */
-        profile->dod_time   = now;
+        profile->gc_time    = now;
     }
 }
 
@@ -491,8 +491,8 @@
     ASSERT_ARGS(Parrot_gc_ms_run_init)
     Arenas * const arena_base       = interp->arena_base;
 
-    arena_base->dod_trace_ptr       = NULL;
-    arena_base->dod_mark_start      = NULL;
+    arena_base->gc_trace_ptr        = NULL;
+    arena_base->gc_mark_start       = NULL;
     arena_base->num_early_PMCs_seen = 0;
     arena_base->num_extended_PMCs   = 0;
 }
@@ -500,7 +500,7 @@
 
 /*
 
-=item C<void Parrot_do_dod_run>
+=item C<void Parrot_do_gc_run>
 
 Calls the configured garbage collector to find and reclaim unused
 headers.
@@ -510,9 +510,9 @@
 */
 
 void
-Parrot_do_dod_run(PARROT_INTERP, UINTVAL flags)
+Parrot_do_gc_run(PARROT_INTERP, UINTVAL flags)
 {
-    ASSERT_ARGS(Parrot_do_dod_run)
+    ASSERT_ARGS(Parrot_do_gc_run)
     interp->arena_base->do_gc_mark(interp, flags);
     parrot_gc_context(interp);
 }

Modified: branches/kill_pccinvoke/src/gc/generational_ms.c
==============================================================================
--- branches/kill_pccinvoke/src/gc/generational_ms.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/gc/generational_ms.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -741,7 +741,7 @@
     if (pool->skip)
         pool->skip = 0;
     else if (pool->last_Arena) {
-        Parrot_do_dod_run(interp, GC_trace_stack_FLAG);
+        Parrot_do_gc_run(interp, GC_trace_stack_FLAG);
         if (pool->num_free_objects <= pool->replenish_level)
             pool->skip = 1;
     }
@@ -1525,10 +1525,10 @@
     ASSERT_ARGS(gc_gms_init_mark)
     Arenas * const arena_base = interp->arena_base;
 
-    arena_base->dod_trace_ptr = NULL;
-    arena_base->dod_mark_start = NULL;
+    arena_base->gc_trace_ptr        = NULL;
+    arena_base->gc_mark_start       = NULL;
     arena_base->num_early_PMCs_seen = 0;
-    arena_base->num_extended_PMCs = 0;
+    arena_base->num_extended_PMCs   = 0;
 
     Parrot_forall_header_pools(interp, POOL_ALL, 0, init_mark_cb);
 }
@@ -1598,19 +1598,19 @@
 {
     ASSERT_ARGS(trace_children_cb)
     Arenas * const arena_base = interp->arena_base;
-    const int lazy_dod = arena_base->lazy_dod;
+    const int lazy_gc = arena_base->lazy_gc;
     Gc_gms_hdr *h;
 
     for (h = pool->gray; h != pool->white;) {
         PMC * const current = (PMC*)GMSH_to_PObj(h);
         UINTVAL bits;
 
-        if (lazy_dod && arena_base->num_early_PMCs_seen >=
+        if (lazy_gc && arena_base->num_early_PMCs_seen >=
                 arena_base->num_early_DOD_PMCs) {
             return 1;
         }
         /* TODO propagate flag in pobject_lives */
-        arena_base->dod_trace_ptr = current;
+        arena_base->gc_trace_ptr = current;
         if (!PObj_needs_early_DOD_TEST(current))
             PObj_high_priority_DOD_CLEAR(current);
 
@@ -1829,7 +1829,7 @@
 
 =item C<static void parrot_gc_gms_run>
 
-Interface to C<Parrot_do_dod_run>. C<flags> is one of:
+Interface to C<Parrot_do_gc_run>. C<flags> is one of:
 
   GC_lazy_FLAG   ... timely destruction
   GC_finish_FLAG ... run a final sweep to destruct objects at
@@ -1863,10 +1863,10 @@
     }
 
     /* normal or lazy DOD run */
-    arena_base->dod_runs++;
-    arena_base->lazy_dod = (flags & GC_lazy_FLAG);
+    arena_base->gc_runs++;
+    arena_base->lazy_gc = (flags & GC_lazy_FLAG);
     gc_gms_init_mark(interp);
-    if (gc_gms_trace_root(interp, !arena_base->lazy_dod) &&
+    if (gc_gms_trace_root(interp, !arena_base->lazy_gc) &&
             gc_gms_trace_children(interp)) {
         gc_gms_sweep(interp);
         gc_gms_set_gen(interp);
@@ -1875,7 +1875,7 @@
         /*
          * successful lazy DOD run
          */
-        ++arena_base->lazy_dod_runs;
+        ++arena_base->lazy_gc_runs;
     }
     gc_gms_end_cycle(interp);
     --arena_base->DOD_block_level;

Modified: branches/kill_pccinvoke/src/gc/incremental_ms.c
==============================================================================
--- branches/kill_pccinvoke/src/gc/incremental_ms.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/gc/incremental_ms.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -698,7 +698,7 @@
     Gc_ims_private *g_ims;
     Arenas * const  arena_base = interp->arena_base;
 
-    arena_base->lazy_dod = 0;
+    arena_base->lazy_gc = 0;
     Parrot_gc_ms_run_init(interp);
 
     /*
@@ -745,11 +745,11 @@
 
     todo = (size_t)(g_ims->alloc_trigger * g_ims->throttle * work_factor);
 
-    PARROT_ASSERT(arena_base->lazy_dod == 0);
+    PARROT_ASSERT(arena_base->lazy_gc == 0);
     Parrot_gc_trace_children(interp, todo);
 
     /* check if we are finished with marking -- the end is self-referential */
-    next = arena_base->dod_mark_start;
+    next = arena_base->gc_mark_start;
 
     if (next == PMC_next_for_GC(next))
         g_ims->state = GC_IMS_START_SWEEP;
@@ -980,7 +980,7 @@
             (void)parrot_gc_ims_collect(interp, 0);
             break;
         case GC_IMS_FINISHED:
-            ++arena_base->dod_runs;
+            ++arena_base->gc_runs;
             g_ims->state = GC_IMS_CONSUMING;
             /* fall through */
         case GC_IMS_CONSUMING:
@@ -1011,7 +1011,7 @@
 
 =item C<static void parrot_gc_ims_run>
 
-Interface to C<Parrot_do_dod_run>. C<flags> is one of:
+Interface to C<Parrot_do_gc_run>. C<flags> is one of:
 
   GC_lazy_FLAG   ... timely destruction
   GC_finish_FLAG ... run until live bits are clear
@@ -1049,7 +1049,7 @@
     }
 
     /* make the test happy that checks the count ;) */
-    arena_base->dod_runs++;
+    arena_base->gc_runs++;
 
     lazy = flags & GC_lazy_FLAG;
 
@@ -1104,7 +1104,7 @@
 
     /* if we stopped early, the lazy run was successful */
     if (g_ims->state < GC_IMS_COLLECT)
-        ++arena_base->lazy_dod_runs;
+        ++arena_base->lazy_gc_runs;
 
     g_ims->lazy = 0;
 }

Modified: branches/kill_pccinvoke/src/gc/mark_sweep.c
==============================================================================
--- branches/kill_pccinvoke/src/gc/mark_sweep.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/gc/mark_sweep.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -195,7 +195,7 @@
     }
 
     ++arena_base->DOD_block_level;
-    arena_base->lazy_dod = flags & GC_lazy_FLAG;
+    arena_base->lazy_gc = flags & GC_lazy_FLAG;
 
     /* tell the threading system that we're doing DOD mark */
     pt_DOD_start_mark(interp);
@@ -210,8 +210,8 @@
         : GC_TRACE_ROOT_ONLY)) {
         int ignored;
 
-        arena_base->dod_trace_ptr = NULL;
-        arena_base->dod_mark_ptr  = NULL;
+        arena_base->gc_trace_ptr = NULL;
+        arena_base->gc_mark_ptr  = NULL;
 
         /* mark is now finished */
         pt_DOD_stop_mark(interp);
@@ -228,7 +228,7 @@
         pt_DOD_stop_mark(interp); /* XXX */
 
         /* successful lazy DOD count */
-        ++arena_base->lazy_dod_runs;
+        ++arena_base->lazy_gc_runs;
 
         Parrot_gc_clear_live_bits(interp);
         if (interp->profile)
@@ -236,7 +236,7 @@
     }
 
     /* Note it */
-    arena_base->dod_runs++;
+    arena_base->gc_runs++;
     --arena_base->DOD_block_level;
 
     return;
@@ -292,9 +292,9 @@
         Parrot_gc_profile_start(interp);
 
     /* We have to start somewhere; the interpreter globals is a good place */
-    if (!arena_base->dod_mark_start) {
-        arena_base->dod_mark_start
-            = arena_base->dod_mark_ptr
+    if (!arena_base->gc_mark_start) {
+        arena_base->gc_mark_start
+            = arena_base->gc_mark_ptr
             = interp->iglobals;
     }
 
@@ -352,7 +352,7 @@
     Parrot_IOData_mark(interp, interp->piodata);
 
     /* quick check if we can already bail out */
-    if (arena_base->lazy_dod
+    if (arena_base->lazy_gc
     &&  arena_base->num_early_PMCs_seen >= arena_base->num_early_DOD_PMCs)
         return 0;
 
@@ -387,7 +387,7 @@
     const UINTVAL object_size = pool->object_size;
 
     Small_Object_Arena *cur_arena;
-    dod_object_fn_type dod_object = pool->dod_object;
+    gc_object_fn_type   gc_object = pool->gc_object;
 
 #if GC_VERBOSE
     if (Interp_trace_TEST(interp, 1)) {
@@ -445,7 +445,7 @@
                     }
                 }
 
-                dod_object(interp, pool, b);
+                gc_object(interp, pool, b);
 
                 pool->add_free_object(interp, pool, b);
             }
@@ -617,8 +617,8 @@
         interp = PMC_sync(obj)->owner;
         PARROT_ASSERT(interp);
         /* XXX FIXME hack */
-        if (!interp->arena_base->dod_mark_ptr)
-            interp->arena_base->dod_mark_ptr = obj;
+        if (!interp->arena_base->gc_mark_ptr)
+            interp->arena_base->gc_mark_ptr = obj;
     }
 
     arena_base = interp->arena_base;
@@ -626,16 +626,16 @@
     if (PObj_needs_early_DOD_TEST(obj))
         ++arena_base->num_early_PMCs_seen;
 
-    if (PObj_high_priority_DOD_TEST(obj) && arena_base->dod_trace_ptr) {
+    if (PObj_high_priority_DOD_TEST(obj) && arena_base->gc_trace_ptr) {
         /* set obj's parent to high priority */
-        PObj_high_priority_DOD_SET(arena_base->dod_trace_ptr);
+        PObj_high_priority_DOD_SET(arena_base->gc_trace_ptr);
         hi_prio = 1;
     }
     else
         hi_prio = 0;
 
     if (obj->pmc_ext) {
-        PMC * const tptr = arena_base->dod_trace_ptr;
+        PMC * const tptr = arena_base->gc_trace_ptr;
 
         ++arena_base->num_extended_PMCs;
         /*
@@ -661,11 +661,11 @@
         }
         else {
             /* put it on the end of the list */
-            PMC_next_for_GC(arena_base->dod_mark_ptr) = obj;
+            PMC_next_for_GC(arena_base->gc_mark_ptr) = obj;
 
             /* Explicitly make the tail of the linked list be
              * self-referential */
-            arena_base->dod_mark_ptr = PMC_next_for_GC(obj) = obj;
+            arena_base->gc_mark_ptr = PMC_next_for_GC(obj) = obj;
         }
     }
     if (PObj_custom_mark_TEST(obj)) {
@@ -698,14 +698,14 @@
         Small_Object_Arena * const arena = pool->last_Arena;
         if (arena) {
             if (arena->used == arena->total_objects)
-                Parrot_do_dod_run(interp, GC_trace_stack_FLAG);
+                Parrot_do_gc_run(interp, GC_trace_stack_FLAG);
 
             if (pool->num_free_objects <= pool->replenish_level)
                 pool->skip = 1;
         }
     }
 
-    /* requires that num_free_objects be updated in Parrot_do_dod_run. If dod
+    /* requires that num_free_objects be updated in Parrot_do_gc_run. If dod
      * is disabled, then we must check the free list directly. */
     if (!pool->free_list)
         (*pool->alloc_objects) (interp, pool);
@@ -954,8 +954,8 @@
 {
     ASSERT_ARGS(Parrot_gc_trace_children)
     Arenas * const arena_base = interp->arena_base;
-    const int      lazy_dod   = arena_base->lazy_dod;
-    PMC           *current    = arena_base->dod_mark_start;
+    const int      lazy_gc    = arena_base->lazy_gc;
+    PMC           *current    = arena_base->gc_mark_start;
 
     /*
      * First phase of mark is finished. Now if we are the owner
@@ -974,12 +974,12 @@
     do {
         PMC *next;
 
-        if (lazy_dod && arena_base->num_early_PMCs_seen >=
+        if (lazy_gc && arena_base->num_early_PMCs_seen >=
                 arena_base->num_early_DOD_PMCs) {
             return 0;
         }
 
-        arena_base->dod_trace_ptr = current;
+        arena_base->gc_trace_ptr = current;
 
         /* short-term hack to color objects black */
         PObj_get_FLAGS(current) |= PObj_custom_GC_FLAG;
@@ -1005,8 +1005,8 @@
         current = next;
     } while (--how_many > 0);
 
-    arena_base->dod_mark_start = current;
-    arena_base->dod_trace_ptr  = NULL;
+    arena_base->gc_mark_start = current;
+    arena_base->gc_trace_ptr  = NULL;
 
     if (interp->profile)
         Parrot_gc_profile_end(interp, PARROT_PROF_DOD_p2);

Modified: branches/kill_pccinvoke/src/gc/pools.c
==============================================================================
--- branches/kill_pccinvoke/src/gc/pools.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/gc/pools.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -141,7 +141,7 @@
         new_small_object_pool(sizeof (PMC), num_headers);
 
     pmc_pool->mem_pool   = NULL;
-    pmc_pool->dod_object = Parrot_gc_free_pmc;
+    pmc_pool->gc_object  = Parrot_gc_free_pmc;
 
     (interp->arena_base->init_pool)(interp, pmc_pool);
     return pmc_pool;
@@ -171,8 +171,8 @@
     Small_Object_Pool * const pool =
             new_small_object_pool(buffer_size, num_headers);
 
-    pool->dod_object = Parrot_gc_free_sysmem;
-    pool->mem_pool   = interp->arena_base->memory_pool;
+    pool->gc_object = Parrot_gc_free_sysmem;
+    pool->mem_pool  = interp->arena_base->memory_pool;
     (interp->arena_base->init_pool)(interp, pool);
     return pool;
 }
@@ -199,9 +199,9 @@
     Small_Object_Pool * const pool = get_bufferlike_pool(interp, sizeof (Buffer));
 
 #ifdef GC_IS_MALLOC
-    pool->dod_object = Parrot_gc_free_buffer_malloc;
+    pool->gc_object = Parrot_gc_free_buffer_malloc;
 #else
-    pool->dod_object = Parrot_gc_free_buffer;
+    pool->gc_object = Parrot_gc_free_buffer;
 #endif
 
     return pool;

Modified: branches/kill_pccinvoke/src/gc/resources.c
==============================================================================
--- branches/kill_pccinvoke/src/gc/resources.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/gc/resources.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -247,7 +247,7 @@
          */
         if (!interp->arena_base->DOD_block_level
         &&   interp->arena_base->mem_allocs_since_last_collect) {
-            Parrot_do_dod_run(interp, GC_trace_stack_FLAG);
+            Parrot_do_gc_run(interp, GC_trace_stack_FLAG);
 #if !PARROT_GC_IMS
             /* Compact the pool if allowed and worthwhile */
             if (pool->compact) {

Modified: branches/kill_pccinvoke/src/inter_cb.c
==============================================================================
--- branches/kill_pccinvoke/src/inter_cb.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/inter_cb.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -125,7 +125,7 @@
      * we need to anchor it.
      *
      */
-    dod_register_pmc(interp, user_data);
+    gc_register_pmc(interp, user_data);
 
     /*
      * Finally, the external lib awaits a function pointer.
@@ -142,7 +142,7 @@
         PMC_data(cb) = F2DPTR(Parrot_callback_C);
     else
         PMC_data(cb) = F2DPTR(Parrot_callback_D);
-    dod_register_pmc(interp, cb);
+    gc_register_pmc(interp, cb);
 
     return cb;
 }

Modified: branches/kill_pccinvoke/src/inter_create.c
==============================================================================
--- branches/kill_pccinvoke/src/inter_create.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/inter_create.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -348,7 +348,7 @@
     if (interp->thread_data)
         interp->thread_data->state |= THREAD_STATE_SUSPENDED_GC;
 
-    Parrot_do_dod_run(interp, GC_finish_FLAG);
+    Parrot_do_gc_run(interp, GC_finish_FLAG);
 
     /*
      * that doesn't get rid of constant PMCs like these in vtable->data

Modified: branches/kill_pccinvoke/src/inter_misc.c
==============================================================================
--- branches/kill_pccinvoke/src/inter_misc.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/inter_misc.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -246,10 +246,10 @@
             ret = arena_base->memory_allocated;
             break;
         case DOD_RUNS:
-            ret = arena_base->dod_runs;
+            ret = arena_base->gc_runs;
             break;
         case LAZY_DOD_RUNS:
-            ret = arena_base->lazy_dod_runs;
+            ret = arena_base->lazy_gc_runs;
             break;
         case COLLECT_RUNS:
             ret = arena_base->collect_runs;

Modified: branches/kill_pccinvoke/src/io/buffer.c
==============================================================================
--- branches/kill_pccinvoke/src/io/buffer.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/io/buffer.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -656,6 +656,9 @@
                     Parrot_io_get_file_position(interp, filehandle)));
         Parrot_io_flush(interp, filehandle);
 
+        buffer_flags |= PIO_BF_WRITEBUF;
+        Parrot_io_set_buffer_flags(interp, filehandle, buffer_flags);
+
         buffer_next = Parrot_io_get_buffer_next(interp, filehandle);
         memmove(buffer_start, ((const char *)buffer + avail), diff);
 

Modified: branches/kill_pccinvoke/src/io/portable.c
==============================================================================
--- branches/kill_pccinvoke/src/io/portable.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/io/portable.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -224,14 +224,17 @@
 Parrot_io_close_portable(PARROT_INTERP, ARGMOD(PMC *filehandle))
 {
     ASSERT_ARGS(Parrot_io_close_portable)
+    INTVAL result = 0;
     FILE * const fptr = (FILE *)Parrot_io_get_os_handle(interp, filehandle);
 
-    if (fptr)
-        fclose(fptr);
+    if (fptr) {
+        if (fclose(fptr) != 0)
+            result = errno;
+    }
 
     Parrot_io_set_os_handle(interp, filehandle, (PIOHANDLE)NULL);
 
-    return 0;
+    return result;
 }
 
 

Modified: branches/kill_pccinvoke/src/io/unix.c
==============================================================================
--- branches/kill_pccinvoke/src/io/unix.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/io/unix.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -331,14 +331,16 @@
 Parrot_io_close_unix(PARROT_INTERP, ARGMOD(PMC *filehandle))
 {
     ASSERT_ARGS(Parrot_io_close_unix)
+    INTVAL result = 0;
     PIOHANDLE file_descriptor = Parrot_io_get_os_handle(interp, filehandle);
     /* BSD and Solaris need explicit fsync() */
     if (file_descriptor >= 0) {
         fsync(file_descriptor);
-        close(file_descriptor);
+        if (close(file_descriptor) != 0)
+            result = errno;
     }
     Parrot_io_set_os_handle(interp, filehandle, -1);
-    return 0;
+    return result;
 }
 
 /*

Modified: branches/kill_pccinvoke/src/io/win32.c
==============================================================================
--- branches/kill_pccinvoke/src/io/win32.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/io/win32.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -301,9 +301,11 @@
 Parrot_io_close_win32(PARROT_INTERP, ARGMOD(PMC *filehandle))
 {
     ASSERT_ARGS(Parrot_io_close_win32)
+    UINTVAL result = 0;
     PIOHANDLE os_handle = Parrot_io_get_os_handle(interp, filehandle);
     if (os_handle != INVALID_HANDLE_VALUE) {
-        CloseHandle(os_handle);
+        if (CloseHandle(os_handle) == 0)
+            result = GetLastError ();
         Parrot_io_set_os_handle(interp, filehandle, INVALID_HANDLE_VALUE);
     }
     return 0;

Modified: branches/kill_pccinvoke/src/ops/core.ops
==============================================================================
--- branches/kill_pccinvoke/src/ops/core.ops	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/ops/core.ops	Tue Feb 10 19:57:33 2009	(r36556)
@@ -1219,10 +1219,10 @@
 
 op sweep(inconst INT) {
     if ($1)
-        Parrot_do_dod_run(interp, 0);
+        Parrot_do_gc_run(interp, 0);
     else
         if (interp->arena_base->num_early_DOD_PMCs)
-            Parrot_do_dod_run(interp, GC_lazy_FLAG);
+            Parrot_do_gc_run(interp, GC_lazy_FLAG);
 }
 
 =item B<collect>()

Modified: branches/kill_pccinvoke/src/ops/pmc.ops
==============================================================================
--- branches/kill_pccinvoke/src/ops/pmc.ops	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/ops/pmc.ops	Tue Feb 10 19:57:33 2009	(r36556)
@@ -562,11 +562,11 @@
 =cut
 
 op register(invar PMC) {
-  dod_register_pmc(interp, $1);
+  gc_register_pmc(interp, $1);
 }
 
 op unregister(invar PMC) {
-  dod_unregister_pmc(interp, $1);
+  gc_unregister_pmc(interp, $1);
 }
 
 

Modified: branches/kill_pccinvoke/src/pmc.c
==============================================================================
--- branches/kill_pccinvoke/src/pmc.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/pmc.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -749,11 +749,11 @@
 
 =back
 
-=head2 DOD registry interface
+=head2 GC registry interface
 
 =over 4
 
-=item C<void dod_register_pmc>
+=item C<void gc_register_pmc>
 
 Registers the PMC with the interpreter's DOD registry.
 
@@ -763,9 +763,9 @@
 
 PARROT_EXPORT
 void
-dod_register_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
+gc_register_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
 {
-    ASSERT_ARGS(dod_register_pmc)
+    ASSERT_ARGS(gc_register_pmc)
     /* Better not trigger a DOD run with a potentially unanchored PMC */
     Parrot_block_GC_mark(interp);
 
@@ -778,7 +778,7 @@
 
 /*
 
-=item C<void dod_unregister_pmc>
+=item C<void gc_unregister_pmc>
 
 Unregisters the PMC from the interpreter's DOD registry.
 
@@ -787,9 +787,9 @@
 */
 
 void
-dod_unregister_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
+gc_unregister_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
 {
-    ASSERT_ARGS(dod_unregister_pmc)
+    ASSERT_ARGS(gc_unregister_pmc)
     PARROT_ASSERT(interp->DOD_registry);
 
     VTABLE_delete_keyed(interp, interp->DOD_registry, pmc);

Modified: branches/kill_pccinvoke/src/pmc/addrregistry.pmc
==============================================================================
--- branches/kill_pccinvoke/src/pmc/addrregistry.pmc	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/pmc/addrregistry.pmc	Tue Feb 10 19:57:33 2009	(r36556)
@@ -213,7 +213,7 @@
 
 =head1 SEE ALSO
 
-F<src/pmc.c:dod_register_pmc()>
+F<src/pmc.c:gc_register_pmc()>
 
 =cut
 

Modified: branches/kill_pccinvoke/src/pmc/exceptionhandler.pmc
==============================================================================
--- branches/kill_pccinvoke/src/pmc/exceptionhandler.pmc	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/pmc/exceptionhandler.pmc	Tue Feb 10 19:57:33 2009	(r36556)
@@ -192,20 +192,22 @@
         STRING * const sev    = CONST_STRING(interp, "severity");
         STRING * const ex_str = CONST_STRING(interp, "Exception");
 
-        Parrot_ExceptionHandler_attributes * const core_struct =
-                    PARROT_EXCEPTIONHANDLER(SELF);
         INTVAL severity = VTABLE_get_integer_keyed_str(interp, exception, sev);
 
         if (exception->vtable->base_type == enum_class_Exception
         ||  VTABLE_isa(INTERP, exception, ex_str)) {
-            PMC * handled_types;
+            PMC *handled_types;
+            PMC *handled_types_except;
+            INTVAL min_severity, max_severity;
             GET_ATTR_handled_types(INTERP, SELF, handled_types);
+            GET_ATTR_handled_types_except(INTERP, SELF, handled_types_except);
+            GET_ATTR_max_severity(INTERP, SELF, max_severity);
+            GET_ATTR_min_severity(INTERP, SELF, min_severity);
 
-            if (severity < core_struct->min_severity) {
+            if (severity < min_severity) {
                 RETURN(INTVAL 0);
             }
-            if (core_struct->max_severity > 0
-                 &&  severity                  > core_struct->max_severity) {
+            if (max_severity > 0 &&  severity > max_severity) {
                 RETURN(INTVAL 0);
             }
             if (! PMC_IS_NULL(handled_types)) {
@@ -222,22 +224,21 @@
 
                 RETURN(INTVAL 0);
             }
-            if (core_struct->handled_types_except != PMCNULL) {
-                const INTVAL elems = VTABLE_elements(interp, core_struct->handled_types_except);
+            if (handled_types_except != PMCNULL) {
+                const INTVAL elems = VTABLE_elements(interp, handled_types_except);
                 const INTVAL type  = VTABLE_get_integer_keyed_str(interp, exception, CONST_STRING(interp, "type"));
                 INTVAL i;
 
                 for (i = 0; i < elems; i++) {
                     const INTVAL handled_type = VTABLE_get_integer_keyed_int(interp,
-                            core_struct->handled_types_except, i);
+                            handled_types_except, i);
                     if (handled_type == type)
                         RETURN(INTVAL 0);
                 }
 
                 RETURN(INTVAL 1);
             }
-            else if (core_struct->max_severity > 0 ||
-                    core_struct->min_severity > 0) {
+            else if (max_severity > 0 || min_severity > 0) {
                 RETURN(INTVAL 1);
             }
 

Modified: branches/kill_pccinvoke/src/pmc/filehandle.pmc
==============================================================================
--- branches/kill_pccinvoke/src/pmc/filehandle.pmc	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/pmc/filehandle.pmc	Tue Feb 10 19:57:33 2009	(r36556)
@@ -508,7 +508,7 @@
 #if ! DISABLE_GC_DEBUG
         /* trigger GC for debug - but not during tests */
         if (0 && GC_DEBUG(interp))
-            Parrot_do_dod_run(interp, GC_trace_stack_FLAG);
+            Parrot_do_gc_run(interp, GC_trace_stack_FLAG);
 #endif
 
         if (Parrot_io_is_encoding(interp, SELF, CONST_STRING(interp, "utf8")))

Modified: branches/kill_pccinvoke/src/pmc/parrotinterpreter.pmc
==============================================================================
--- branches/kill_pccinvoke/src/pmc/parrotinterpreter.pmc	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/pmc/parrotinterpreter.pmc	Tue Feb 10 19:57:33 2009	(r36556)
@@ -702,7 +702,7 @@
     }
 
     METHOD run_gc() {
-        Parrot_do_dod_run(PMC_data_typed(SELF, Parrot_Interp), 0);
+        Parrot_do_gc_run(PMC_data_typed(SELF, Parrot_Interp), 0);
     }
 
 /*

Modified: branches/kill_pccinvoke/src/pmc/pmcproxy.pmc
==============================================================================
--- branches/kill_pccinvoke/src/pmc/pmcproxy.pmc	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/pmc/pmcproxy.pmc	Tue Feb 10 19:57:33 2009	(r36556)
@@ -160,6 +160,26 @@
             Parrot_oo_extract_methods_from_namespace(interp, SELF,
                     proxy_info->_namespace);
         }
+
+        { /* Create inherited attributes */
+            /* Each attribute is prefixed with his type
+             * and terminated by an space,
+             * the list is '\0' terminated
+             */
+            const char * attr = interp->vtables[type_num]->attribute_defs;
+            while (* attr) {
+                const char * const current = attr + 1;
+                size_t l;
+                char attrtype = * attr;
+                while (* attr != ' ') ++attr;
+                l= attr - current;
+                if (attrtype != ':') {
+                    STRING *sattr = Parrot_str_new(interp, current, l);
+                    SELF.add_attribute(sattr, NULL);
+                }
+                ++attr;
+            }
+        }
     }
 
 /*

Modified: branches/kill_pccinvoke/src/pmc_freeze.c
==============================================================================
--- branches/kill_pccinvoke/src/pmc_freeze.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/pmc_freeze.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -1823,7 +1823,7 @@
 {
     ASSERT_ARGS(run_thaw)
     visit_info info;
-    int dod_block = 0;
+    int gc_block = 0;
     const UINTVAL bufused = image->bufused;
 
     info.image = image;
@@ -1839,10 +1839,10 @@
      * collected under us.
      */
     if (1 || (Parrot_str_byte_length(interp, image) > THAW_BLOCK_DOD_SIZE)) {
-        Parrot_do_dod_run(interp, 1);
+        Parrot_do_gc_run(interp, 1);
         Parrot_block_GC_mark(interp);
         Parrot_block_GC_sweep(interp);
-        dod_block = 1;
+        gc_block = 1;
     }
 
     info.what = what;   /* _NORMAL or _CONSTANTS */
@@ -1863,7 +1863,7 @@
     image->bufused = bufused;
     PARROT_ASSERT(image->strstart >= (char *)PObj_bufstart(image));
 
-    if (dod_block) {
+    if (gc_block) {
         Parrot_unblock_GC_mark(interp);
         Parrot_unblock_GC_sweep(interp);
     }

Modified: branches/kill_pccinvoke/src/runops_cores.c
==============================================================================
--- branches/kill_pccinvoke/src/runops_cores.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/runops_cores.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -350,7 +350,7 @@
     Arenas * const arena_base = interp->arena_base;
     Interp *debugger;
 
-    dod = arena_base->dod_runs;
+    dod = arena_base->gc_runs;
     gc = arena_base->collect_runs;
     if (interp->pdb) {
         debugger = interp->pdb->debugger;
@@ -398,8 +398,8 @@
         DO_OP(pc, interp);
         trace_op(interp, code_start, code_end, pc);
 
-        if (dod != arena_base->dod_runs) {
-            dod = arena_base->dod_runs;
+        if (dod != arena_base->gc_runs) {
+            dod = arena_base->gc_runs;
             Parrot_io_eprintf(debugger, "       DOD\n");
         }
 
@@ -477,7 +477,7 @@
             Parrot_ex_throw_from_c_args(interp, NULL, 1,
                 "attempt to access code outside of current code segment");
 
-        Parrot_do_dod_run(interp, 0);
+        Parrot_do_gc_run(interp, 0);
         CONTEXT(interp)->current_pc = pc;
 
         DO_OP(pc, interp);
@@ -569,7 +569,7 @@
                     "attempt to access code outside of current code segment");
 
         if (interp->pdb->state & PDB_GCDEBUG)
-            Parrot_do_dod_run(interp, 0);
+            Parrot_do_gc_run(interp, 0);
 
         if (interp->pdb->state & PDB_TRACING) {
             trace_op(interp,

Modified: branches/kill_pccinvoke/src/stacks.c
==============================================================================
--- branches/kill_pccinvoke/src/stacks.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/stacks.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -386,7 +386,7 @@
     if (cur_chunk->refcount <= 0) {
         Small_Object_Pool * const pool = cur_chunk->pool;
 
-        pool->dod_object(interp, pool, (PObj *)cur_chunk);
+        pool->gc_object(interp, pool, (PObj *)cur_chunk);
         pool->add_free_object(interp, pool, (PObj *)cur_chunk);
     }
 

Modified: branches/kill_pccinvoke/src/string/api.c
==============================================================================
--- branches/kill_pccinvoke/src/string/api.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/string/api.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -1609,7 +1609,7 @@
 #if ! DISABLE_GC_DEBUG
     /* trigger GC for debug */
     if (interp && GC_DEBUG(interp))
-        Parrot_do_dod_run(interp, GC_trace_stack_FLAG);
+        Parrot_do_gc_run(interp, GC_trace_stack_FLAG);
 #endif
 
     make_writable(interp, &res, minlen, enum_stringrep_one);
@@ -1761,7 +1761,7 @@
 #if ! DISABLE_GC_DEBUG
     /* trigger GC for debug */
     if (interp && GC_DEBUG(interp))
-        Parrot_do_dod_run(interp, GC_trace_stack_FLAG);
+        Parrot_do_gc_run(interp, GC_trace_stack_FLAG);
 #endif
 
     make_writable(interp, &res, maxlen, enum_stringrep_one);
@@ -1836,7 +1836,7 @@
 #if ! DISABLE_GC_DEBUG
     /* trigger GC for debug */
     if (interp && GC_DEBUG(interp))
-        Parrot_do_dod_run(interp, GC_trace_stack_FLAG);
+        Parrot_do_gc_run(interp, GC_trace_stack_FLAG);
 #endif
 
     make_writable(interp, &res, maxlen, enum_stringrep_one);
@@ -1914,7 +1914,7 @@
 #if ! DISABLE_GC_DEBUG
     /* trigger GC for debug */
     if (interp && GC_DEBUG(interp))
-        Parrot_do_dod_run(interp, GC_trace_stack_FLAG);
+        Parrot_do_gc_run(interp, GC_trace_stack_FLAG);
 #endif
 
     make_writable(interp, &res, len, enum_stringrep_one);

Modified: branches/kill_pccinvoke/src/thread.c
==============================================================================
--- branches/kill_pccinvoke/src/thread.c	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/src/thread.c	Tue Feb 10 19:57:33 2009	(r36556)
@@ -1344,7 +1344,7 @@
              * dying interpreter, so register it in parent's DOD registry
              * XXX is this still needed?
              */
-            dod_register_pmc(parent, parent_ret);
+            gc_register_pmc(parent, parent_ret);
             Parrot_unblock_GC_mark(parent);
             retval = parent_ret;
         }
@@ -1368,7 +1368,7 @@
          * value, caller gets it now
          */
         if (retval)
-            dod_unregister_pmc(parent, retval);
+            gc_unregister_pmc(parent, retval);
 
         return retval;
     }
@@ -1605,7 +1605,7 @@
 
 TODO - Have a count of shared PMCs and check it during DOD.
 
-TODO - Evaluate if a interpreter lock is cheaper when C<dod_mark_ptr> is
+TODO - Evaluate if a interpreter lock is cheaper when C<gc_mark_ptr> is
 updated.
 
 =cut

Modified: branches/kill_pccinvoke/t/compilers/imcc/syn/pcc.t
==============================================================================
--- branches/kill_pccinvoke/t/compilers/imcc/syn/pcc.t	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/t/compilers/imcc/syn/pcc.t	Tue Feb 10 19:57:33 2009	(r36556)
@@ -7,7 +7,7 @@
 use lib qw( . lib ../lib ../../lib );
 use Test::More;
 use Parrot::Config;
-use Parrot::Test tests => 21;
+use Parrot::Test tests => 22;
 
 ##############################
 # Parrot Calling Conventions
@@ -524,7 +524,23 @@
 my $too_many_args_args = join ',', 1 .. 20_000;
 $too_many_args =~ s/_ARGS_/$too_many_args_args/;
 
-pir_output_is( $too_many_args, "didn't segfault\n", "calling a sub with way too many params" );
+pir_output_is( $too_many_args, "didn't segfault\n", "calling a sub with way too many args" );
+
+my $too_many_params = <<'CODE';
+.sub main :main
+    'foo'()
+    say "didn't segfault"
+.end
+
+.sub foo
+    _PARAMS_
+.end
+CODE
+
+my $too_many_params_params = join map { "    .param pmc xx$_\n" } 1 .. 20_000;
+$too_many_params =~ s/_PARAMS_/$too_many_params_params/;
+
+pir_output_is( $too_many_params, "didn't segfault\n", "calling a sub with way too many params" );
 
 # Local Variables:
 #   mode: cperl

Modified: branches/kill_pccinvoke/t/native_pbc/integer.t
==============================================================================
--- branches/kill_pccinvoke/t/native_pbc/integer.t	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/t/native_pbc/integer.t	Tue Feb 10 19:57:33 2009	(r36556)
@@ -8,7 +8,7 @@
 use Test::More;
 use Parrot::Config;
 
-use Parrot::Test tests => 3;
+use Parrot::Test tests => 4;
 
 =head1 NAME
 
@@ -22,11 +22,25 @@
 
 Tests word-size/float-type/endian-ness for different architectures.
 
+These tests usually only work on releases, not on svn checkouts
+and if every release has updated native pbc test files.
+
+See F<tools/dev/mk_native_pbc> to create the platform-specific native pbcs.
+
+=head1 PLATFORMS
+
+  _1   i386 32 bit opcode_t, 32 bit intval   (linux-gcc-ix86, freebsd-gcc, cygwin)
+  _2   i386 32 bit opcode_t, 32 bit intval, long double (linux-gcc-ix86)
+  _3   PPC BE 32 bit opcode_t, 32 bit intval (darwin-ppc)
+  _4   x86_64 double float 64 bit opcode_t   (linux-gcc-x86_64, solaris-cc-64int)
+  _5   big-endian 64-bit                     (irix or similar)
+
 =cut
 
 =begin comment
 
-See t/native_pbc/number.t for additional comments
+See t/native_pbc/number.t for additional comments.
+See tools/dev/mk_native_pbc to create the platform-specific native pbcs.
 
 Test files on different architectures are generated by:
 
@@ -63,11 +77,22 @@
 #         dirformat = 1
 # ]
 TODO: {
-local $TODO = "Known problem on 64bit with reading 32bit dirs. See TT #254"
-  if $PConfig{ptrsize} == 8;
+    local $TODO;
+    if ($PConfig{ptrsize} == 8) {
+        $TODO = "Known problem on 64bit with reading 32bit dirs. See TT #254"
+    } elsif ($PConfig{DEVEL}) {
+        $TODO = "devel versions are not guaranteed to succeed";
+    }
 
 pbc_output_is( undef, '270544960', "i386 32 bit opcode_t, 32 bit intval" )
     or diag "May need to regenerate t/native_pbc/integer_1.pbc; read test file";
+}
+
+TODO: {
+local $TODO = "devel versions are not guaranteed to succeed"
+  if $PConfig{DEVEL};
+pbc_output_is( undef, '270544960', "i386 32 bit opcode_t, 32 bit intval long double" )
+    or diag "May need to regenerate t/native_pbc/integer_2.pbc; read test file";
 
 # darwin/ppc:
 # HEADER => [
@@ -79,9 +104,9 @@
 #         no endianize, no opcode, no numval transform
 #         dirformat = 1
 # ]
+
 pbc_output_is(undef, '270544960', "PPC BE 32 bit opcode_t, 32 bit intval")
-    or diag "May need to regenerate t/native_pbc/integer_2.pbc; read test file";
-}
+    or diag "May need to regenerate t/native_pbc/integer_3.pbc; read test file";
 
 # any ordinary 64-bit intel unix:
 # HEADER => [
@@ -93,12 +118,15 @@
 #         no endianize, no opcode, no numval transform
 #         dirformat = 1
 # ]
-pbc_output_is( undef, '270544960', "x86_64 double float 64 bit opcode_t" )
-    or diag "May need to regenerate t/native_pbc/integer_3.pbc; read test file";
+
+pbc_output_is(undef, '270544960', "i86_64 LE 64 bit opcode_t, 64 bit intval")
+    or diag "May need to regenerate t/native_pbc/integer_4.pbc; read test file";
 
 # Formerly following tests had been set up:
-# pbc_output_is(undef, '270544960', "little-endian 64-bit tru64");
-# pbc_output_is(undef, '270544960', "big-endian 64-bit irix");
+# pbc_output_is(undef, '270544960', "big-endian 64-bit (irix)");
+#    or diag "May need to regenerate t/native_pbc/integer_5.pbc; read test file";
+
+}
 
 # Local Variables:
 #   mode: cperl

Modified: branches/kill_pccinvoke/t/native_pbc/number.t
==============================================================================
--- branches/kill_pccinvoke/t/native_pbc/number.t	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/t/native_pbc/number.t	Tue Feb 10 19:57:33 2009	(r36556)
@@ -8,7 +8,7 @@
 use Test::More;
 use Parrot::Config;
 
-use Parrot::Test skip_all => "Ongoing work in TT #254";
+use Parrot::Test tests => 4;
 
 =head1 NAME
 
@@ -22,6 +22,19 @@
 
 Tests word-size/float-type/endian-ness for different architectures.
 
+These tests usually only work on releases, not on svn checkouts
+and if every release has updated native pbc test files.
+
+See F<tools/dev/mk_native_pbc> to create the platform-specific native pbcs.
+
+=head1 PLATFORMS
+
+  _1   i386 32 bit opcode_t, 32 bit intval   (linux-gcc-ix86, freebsd-gcc, cygwin)
+  _2   i386 32 bit opcode_t, 32 bit intval, long double (linux-gcc-ix86)
+  _3   PPC BE 32 bit opcode_t, 32 bit intval (darwin-ppc)
+  _4   x86_64 double float 64 bit opcode_t   (linux-gcc-x86_64, solaris-cc-64int)
+  _5   big-endian 64-bit                     (irix or similar)
+
 =cut
 
 =begin comment
@@ -93,12 +106,21 @@
 #         dirformat = 1
 # ]
 TODO: {
-local $TODO = "Known problem on 64bit with reading 32bit dirs. See TT #254"
-  if $PConfig{ptrsize} == 8;
+    local $TODO;
+    if ($PConfig{ptrsize} == 8) {
+        $TODO = "Known problem on 64bit with reading 32bit dirs. See TT #254"
+    } elsif ($PConfig{DEVEL}) {
+        $TODO = "devel versions are not guaranteed to succeed";
+    }
 
 pbc_output_is( undef, $output, "i386 double float 32 bit opcode_t" )
     or diag "May need to regenerate t/native_pbc/number_1.pbc; read test file";
 
+pbc_output_is( undef, $output, "i386 long double float 32 bit opcode_t")
+    or diag "May need to regenerate t/native_pbc/number_2.pbc; read test file";
+
+}
+
 # darwin/ppc:
 # HEADER => [
 #         wordsize  = 4   (interpreter's wordsize/INTVAL = 4/4)
@@ -109,9 +131,13 @@
 #         no endianize, no opcode, no numval transform
 #         dirformat = 1
 # ]
+
+TODO: {
+local $TODO = "devel versions are not guaranteed to succeed"
+  if $PConfig{DEVEL};
+
 pbc_output_is(undef, $output, "PPC double float 32 bit BE opcode_t")
-    or diag "May need to regenerate t/native_pbc/number_2.pbc; read test file";
-}
+    or diag "May need to regenerate t/native_pbc/number_3.pbc; read test file";
 
 # any ordinary 64-bit intel unix:
 # HEADER => [
@@ -123,18 +149,15 @@
 #         no endianize, no opcode, no numval transform
 #         dirformat = 1
 # ]
-TODO: {
-local $TODO = "Known problem on 64bit double-float gentoo-amd64, but not solaris-64int. See TT #254"
-  if $PConfig{ptrsize} == 8;
 
-pbc_output_is(undef, $output, "x86_64 double float 64 bit opcode_t")
-    or diag "May need to regenerate t/native_pbc/number_3.pbc; read test file";
-}
+pbc_output_is(undef, $output, "i86_64 LE 64 bit opcode_t, 64 bit intval")
+    or diag "May need to regenerate t/native_pbc/number_4.pbc; read test file";
 
-# Formerly there were tests for:
-# pbc_output_is(undef, <<OUTPUT, "i386 long double float 32 bit opcode_t"); #_2
-# pbc_output_is(undef, <<OUTPUT, "little-endian 64-bit tru64");             #_4
-# pbc_output_is(undef, <<OUTPUT, "big-endian 64-bit irix");                 #_5
+# Formerly there were also a test for:
+# pbc_output_is(undef, $output, "big-endian 64-bit irix")
+#   or diag "May need to regenerate t/native_pbc/number_5.pbc; read test file";
+
+}
 
 # Local Variables:
 #   mode: cperl

Modified: branches/kill_pccinvoke/t/native_pbc/string.t
==============================================================================
--- branches/kill_pccinvoke/t/native_pbc/string.t	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/t/native_pbc/string.t	Tue Feb 10 19:57:33 2009	(r36556)
@@ -6,7 +6,9 @@
 use warnings;
 use lib qw( . lib ../lib ../../lib );
 use Test::More;
-use Parrot::Test skip_all => 'ongoing PBC format changes'; # tests => 1;
+use Parrot::Config;
+
+use Parrot::Test tests => 1;
 
 =head1 NAME
 
@@ -20,6 +22,19 @@
 
 Tests word-size/string/endian-ness for different architectures.
 
+These tests usually only work on releases, not on svn checkouts
+and if every release has updated native pbc test files.
+
+See F<tools/dev/mk_native_pbc> to create the platform-specific native pbcs.
+
+=head1 PLATFORMS
+
+  _1   i386 32 bit opcode_t, 32 bit intval   (linux-gcc-ix86, freebsd-gcc, cygwin)
+  _2   i386 32 bit opcode_t, 32 bit intval, long double (linux-gcc-ix86)
+  _3   PPC BE 32 bit opcode_t, 32 bit intval (darwin-ppc)
+  _4   x86_64 double float 64 bit opcode_t   (linux-gcc-x86_64, solaris-cc-64int)
+  _5   big-endian 64-bit                     (irix or similar)
+
 =cut
 
 =begin comment
@@ -49,8 +64,14 @@
 #         no endianize, no opcode, no numval transform
 #         dirformat = 1
 # ]
+TODO: {
+local $TODO = "devel versions are not guaranteed to succeed"
+  if $PConfig{DEVEL};
+
 pbc_output_is( undef, $output, "i386 32 bit opcode_t, 32 bit intval" );
 
+}
+
 # Local Variables:
 #   mode: cperl
 #   cperl-indent-level: 4

Modified: branches/kill_pccinvoke/t/pmc/exceptionhandler.t
==============================================================================
--- branches/kill_pccinvoke/t/pmc/exceptionhandler.t	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/t/pmc/exceptionhandler.t	Tue Feb 10 19:57:33 2009	(r36556)
@@ -123,7 +123,7 @@
     push_eh outcatch
     $I0 = subclass_handler_catches(myhandler)
   outcatch:
-    todo($I0, 'Exception Handler subclass catch exception')
+    ok($I0, 'Exception Handler subclass catch exception')
 .end
 
 .sub subclass_exception_handler
@@ -178,9 +178,11 @@
     throw $P0
 
   subclassed_failed:
+    .get_results($P0)
     .return(0)
 
   subclassed_handler:
+    .get_results($P0)
     .return(1)
 .end
 
@@ -200,9 +202,11 @@
     throw $P0
 
   subclassed_failed:
+    .get_results($P0)
     .return(0)
 
   subclassed_handler:
+    .get_results($P0)
     .return(1)
 .end
 

Deleted: branches/kill_pccinvoke/t/src/compiler.t
==============================================================================
--- branches/kill_pccinvoke/t/src/compiler.t	Tue Feb 10 19:57:33 2009	(r36555)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,483 +0,0 @@
-#! perl
-# Copyright (C) 2001-2008, The Perl Foundation.
-# $Id$
-
-use strict;
-use warnings;
-use lib qw( . lib ../lib ../../lib );
-use Test::More;
-use Parrot::Test tests => 5;
-
-=head1 NAME
-
-t/src/compiler.t - Compile and run a PIR program from C.
-
-=head1 SYNOPSIS
-
-    % prove t/src/compiler.t
-
-=head1 DESCRIPTION
-
-Show steps to run a program from C. Functionality should be
-gathered in some API calls..
-
-=cut
-
-c_output_is( <<'CODE', <<'OUTPUT', "Parrot Compile API Single call" );
-
-#include <stdio.h>
-#include "parrot/parrot.h"
-#include "parrot/embed.h"
-#include "parrot/extend.h"
-
-static opcode_t *
-run(PARROT_INTERP, int argc, char *argv[])
-{
-    const char *c_src = ".sub main :main\n" "    print \"ok\\n\"\n" ".end\n";
-
-    STRING *src, *smain;
-    PMC *prog, *entry;
-    opcode_t *dest;
-    STRING *error;
-
-    /* get PIR compiler  - TODO API */
-    PMC   *compreg = Parrot_PMC_get_pmc_keyed_int(interp,
-                                       interp->iglobals,
-                                       IGLOBALS_COMPREG_HASH);
-    STRING *pir    = Parrot_str_new_constant(interp, "PIR");
-    PMC    *comp   = Parrot_PMC_get_pmc_keyed_str(interp, compreg, pir);
-
-    if (PMC_IS_NULL(comp) || !Parrot_PMC_defined(interp, comp)) {
-        Parrot_io_eprintf(interp, "Pir compiler not loaded");
-        exit(EXIT_FAILURE);
-    }
-
-    /* compile source */
-    prog = Parrot_compile_string(interp, pir, c_src, &error);
-
-    if (PMC_IS_NULL(prog) || !Parrot_PMC_defined(interp, prog)) {
-        Parrot_io_eprintf(interp, "Pir compiler returned no prog");
-        exit(EXIT_FAILURE);
-    }
-
-    /* keep eval PMC alive */
-    dod_register_pmc(interp, prog);
-
-    /* locate function to run */
-    smain = Parrot_str_new_constant(interp, "main");
-    entry = Parrot_find_global_cur(interp, smain);
-
-    /* location of the entry */
-    interp->current_cont = new_ret_continuation_pmc(interp, NULL);
-    dest                 = Parrot_PMC_invoke(interp, entry, NULL);
-
-    /* where to start */
-    interp->resume_offset = dest -interp->code->base.data;
-
-    /* and go */
-    Parrot_runcode(interp, argc, (char **)argv);
-    return NULL;
-}
-
-int
-main(int margc, char *margv[])
-{
-    Parrot_Interp interp;
-    PackFile *pf;
-    int argc = 1;
-    const char *argv[] = { "test", NULL };
-
-    PackFile_Segment *seg;
-
-    /* Interpreter set-up */
-    interp = Parrot_new(NULL);
-    if (interp == NULL)
-        return 1;
-
-    /* dummy pf and segment to get things started */
-    pf = PackFile_new_dummy(interp, "test_code");
-
-    /* Parrot_set_flag(interp, PARROT_TRACE_FLAG); */
-    run(interp, argc, (char **)argv);
-    Parrot_exit(interp, 0);
-    return 0;
-}
-CODE
-ok
-OUTPUT
-c_output_is( <<'CODE', <<'OUTPUT', "Parrot Compile API Multiple Calls" );
-
-#include <stdio.h>
-#include "parrot/parrot.h"
-#include "parrot/embed.h"
-#include "parrot/extend.h"
-
-static void
-compile_run(PARROT_INTERP, const char *src, STRING *type, int argc,
-            char *argv[])
-{
-    STRING   *smain;
-    PMC      *entry;
-    STRING   *error;
-    opcode_t *dest;
-    PMC      *prog = Parrot_compile_string(interp, type, src, &error);
-
-    if (PMC_IS_NULL(prog) || !Parrot_PMC_defined(interp, prog)) {
-        Parrot_io_eprintf(interp, "Pir compiler returned no prog");
-        exit(EXIT_FAILURE);
-    }
-
-    /* keep eval PMC alive */
-    dod_register_pmc(interp, prog);
-
-    /* locate function to run */
-    smain = Parrot_str_new_constant(interp, "main");
-    entry = Parrot_find_global_cur(interp, smain);
-
-    /* location of the entry */
-    interp->current_cont = new_ret_continuation_pmc(interp, NULL);
-    dest                 = Parrot_PMC_invoke(interp, entry, NULL);
-
-    /* where to start */
-    interp->resume_offset = dest -interp->code->base.data;
-
-    /* and go */
-    Parrot_runcode(interp, argc, (char **)argv);
-}
-
-static opcode_t *
-run(PARROT_INTERP, int argc, char *argv[])
-{
-    const char *c_src  = ".sub main :main\n" "    print \"ok\\n\"\n" ".end\n";
-
-    const char *c2_src =
-        ".sub main :main\n" "    print \"hola\\n\"\n" ".end\n";
-
-    STRING *src, *smain;
-
-    /* get PIR compiler  - TODO API */
-    PMC    *compreg = Parrot_PMC_get_pmc_keyed_int(interp,
-                                       interp->iglobals,
-                                       IGLOBALS_COMPREG_HASH);
-    STRING *pir     = Parrot_str_new_constant(interp, "PIR");
-    PMC    *comp    = Parrot_PMC_get_pmc_keyed_str(interp, compreg, pir);
-
-    if (PMC_IS_NULL(comp) || !Parrot_PMC_defined(interp, comp)) {
-        Parrot_io_eprintf(interp, "Pir compiler not loaded");
-        exit(EXIT_FAILURE);
-    }
-
-    compile_run(interp, c_src, pir, argc, argv);
-    compile_run(interp, c2_src, pir, argc, argv);
-}
-
-int
-main(int margc, char *margv[])
-{
-    Parrot_Interp interp;
-    PackFile *pf;
-    int argc = 1;
-    const char *argv[] = { "test", NULL };
-
-    PackFile_Segment *seg;
-
-    /* Interpreter set-up */
-    interp = Parrot_new(NULL);
-    if (interp == NULL)
-        return 1;
-
-    /* dummy pf and segment to get things started */
-    pf = PackFile_new_dummy(interp, "test_code");
-
-    /* Parrot_set_flag(interp, PARROT_TRACE_FLAG); */
-    run(interp, argc, (char **) argv);
-    Parrot_exit(interp, 0);
-    return 0;
-}
-CODE
-ok
-hola
-OUTPUT
-c_output_is( <<'CODE', <<'OUTPUT', "Parrot Compile API Multiple 1st bad PIR" );
-
-#include <stdio.h>
-#include "parrot/parrot.h"
-#include "parrot/embed.h"
-#include "parrot/extend.h"
-
-static void
-compile_run(PARROT_INTERP, const char *src, STRING *type, int argc,
-            char *argv[])
-{
-    STRING   *smain;
-    PMC      *entry;
-    STRING   *error;
-    opcode_t *dest;
-    PMC      *prog = Parrot_compile_string(interp, type, src, &error);
-
-    if (PMC_IS_NULL(prog) || !Parrot_PMC_defined(interp, prog)) {
-        Parrot_io_eprintf(interp, "Pir compiler returned no prog\n");
-        return;
-    }
-
-    /* keep eval PMC alive */
-    dod_register_pmc(interp, prog);
-
-    /* locate function to run */
-    smain = Parrot_str_new_constant(interp, "main");
-    entry = Parrot_find_global_cur(interp, smain);
-
-    /* location of the entry */
-    interp->current_cont = new_ret_continuation_pmc(interp, NULL);
-    dest                 = Parrot_PMC_invoke(interp, entry, NULL);
-
-    /* where to start */
-    interp->resume_offset = dest -interp->code->base.data;
-
-    /* and go */
-    Parrot_runcode(interp, argc, (char **) argv);
-}
-
-static opcode_t *
-run(PARROT_INTERP, int argc, char *argv[])
-{
-    const char *c_src  = ".sub main :main\n" "    print ok\\n\"\n" ".end\n";
-
-    const char *c2_src =
-        ".sub main :main\n" "    print \"hola\\n\"\n" ".end\n";
-
-    STRING *src, *smain;
-
-    /* get PIR compiler  - TODO API */
-    PMC    *compreg = Parrot_PMC_get_pmc_keyed_int(interp,
-                                       interp->iglobals,
-                                       IGLOBALS_COMPREG_HASH);
-    STRING *pir     = Parrot_str_new_constant(interp, "PIR");
-    PMC    *comp    = Parrot_PMC_get_pmc_keyed_str(interp, compreg, pir);
-
-    if (PMC_IS_NULL(comp) || !Parrot_PMC_defined(interp, comp)) {
-        Parrot_io_eprintf(interp, "Pir compiler not loaded");
-        return NULL;
-    }
-
-    compile_run(interp, c_src, pir, argc, argv);
-    compile_run(interp, c2_src, pir, argc, argv);
-}
-
-int
-main(int margc, char *margv[])
-{
-    Parrot_Interp interp;
-    PackFile *pf;
-    int argc = 1;
-    char *argv[] = { "test", NULL };
-
-    PackFile_Segment *seg;
-
-    /* Interpreter set-up */
-    interp = Parrot_new(NULL);
-    if (interp == NULL)
-        return 1;
-
-    /* dummy pf and segment to get things started */
-    pf = PackFile_new_dummy(interp, "test_code");
-
-    /* Parrot_set_flag(interp, PARROT_TRACE_FLAG); */
-    run(interp, argc, argv);
-    Parrot_exit(interp, 0);
-    return 0;
-}
-CODE
-Pir compiler returned no prog
-hola
-OUTPUT
-c_output_is( <<'CODE', <<'OUTPUT', "Parrot Compile API Multiple 2nd bad PIR" );
-
-#include <stdio.h>
-#include "parrot/parrot.h"
-#include "parrot/embed.h"
-#include "parrot/extend.h"
-
-static void
-compile_run(PARROT_INTERP, const char *src, STRING *type, int argc,
-            char *argv[])
-{
-    STRING   *smain;
-    PMC      *entry;
-    STRING   *error;
-    opcode_t *dest;
-    PMC      *prog = Parrot_compile_string(interp, type, src, &error);
-
-    if (PMC_IS_NULL(prog) || !Parrot_PMC_defined(interp, prog)) {
-        Parrot_io_eprintf(interp, "Pir compiler returned no prog\n");
-        return;
-    }
-
-    /* keep eval PMC alive */
-    dod_register_pmc(interp, prog);
-
-    /* locate function to run */
-    smain = Parrot_str_new_constant(interp, "main");
-    entry = Parrot_find_global_cur(interp, smain);
-
-    /* location of the entry */
-    interp->current_cont = new_ret_continuation_pmc(interp, NULL);
-    dest                 = Parrot_PMC_invoke(interp, entry, NULL);
-
-    /* where to start */
-    interp->resume_offset = dest -interp->code->base.data;
-
-    /* and go */
-    Parrot_runcode(interp, argc, (char **)argv);
-}
-
-static opcode_t *
-run(PARROT_INTERP, int argc, char *argv[])
-{
-    const char *c_src  = ".sub main :main\n" "    print ok\\n\"\n" ".end\n";
-
-    const char *c2_src =
-        ".sub main :main\n" "    print \"hola\\n\"\n" ".end\n";
-
-    STRING *src, *smain;
-    /* get PIR compiler  - TODO API */
-    PMC    *compreg = Parrot_PMC_get_pmc_keyed_int(interp,
-                                       interp->iglobals,
-                                       IGLOBALS_COMPREG_HASH);
-    STRING *pir     = Parrot_str_new_constant(interp, "PIR");
-    PMC    *comp    = Parrot_PMC_get_pmc_keyed_str(interp, compreg, pir);
-
-    if (PMC_IS_NULL(comp) || !Parrot_PMC_defined(interp, comp)) {
-        Parrot_io_eprintf(interp, "Pir compiler not loaded");
-        return NULL;
-    }
-
-    compile_run(interp, c2_src, pir, argc, argv);
-    compile_run(interp, c_src, pir, argc, argv);
-}
-
-int
-main(int margc, char *margv[])
-{
-    Parrot_Interp interp;
-    PackFile *pf;
-    int argc = 1;
-    char *argv[] = { "test", NULL };
-
-    PackFile_Segment *seg;
-
-    /* Interpreter set-up */
-    interp = Parrot_new(NULL);
-    if (interp == NULL)
-        return 1;
-
-    /* dummy pf and segment to get things started */
-    pf = PackFile_new_dummy(interp, "test_code");
-
-    /* Parrot_set_flag(interp, PARROT_TRACE_FLAG); */
-    run(interp, argc, argv);
-    Parrot_exit(interp, 0);
-    return 0;
-}
-CODE
-hola
-Pir compiler returned no prog
-OUTPUT
-c_output_is( <<'CODE', <<'OUTPUT', "Parrot Compile API Multiple bad PIR" );
-
-#include <stdio.h>
-#include "parrot/parrot.h"
-#include "parrot/embed.h"
-#include "parrot/extend.h"
-
-static void
-compile_run(PARROT_INTERP, const char *src, STRING *type, int argc,
-            char *argv[])
-{
-    STRING   *smain;
-    PMC      *entry;
-    STRING   *error;
-    opcode_t *dest;
-    PMC      *prog = Parrot_compile_string(interp, type, src, &error);
-
-    if (PMC_IS_NULL(prog) || !Parrot_PMC_defined(interp, prog)) {
-        Parrot_io_eprintf(interp, "Pir compiler returned no prog\n");
-        return;
-    }
-
-    /* keep eval PMC alive */
-    dod_register_pmc(interp, prog);
-
-    /* locate function to run */
-    smain = Parrot_str_new_constant(interp, "main");
-    entry = Parrot_find_global_cur(interp, smain);
-
-    /* location of the entry */
-    interp->current_cont = new_ret_continuation_pmc(interp, NULL);
-    dest                 = Parrot_PMC_invoke(interp, entry, NULL);
-
-    /* where to start */
-    interp->resume_offset = dest -interp->code->base.data;
-
-    /* and go */
-    Parrot_runcode(interp, argc, (char **)argv);
-}
-
-static opcode_t *
-run(PARROT_INTERP, int argc, char *argv[])
-{
-    const char *c_src  = ".sub main :main\n" "    print ok\\n\"\n" ".end\n";
-
-    const char *c2_src = ".sub main :main\n" "    print hola\\n\"\n" ".end\n";
-
-    STRING *src, *smain;
-    /* get PIR compiler  - TODO API */
-    PMC    *compreg = Parrot_PMC_get_pmc_keyed_int(interp,
-                                       interp->iglobals,
-                                       IGLOBALS_COMPREG_HASH);
-    STRING *pir     = Parrot_str_new_constant(interp, "PIR");
-    PMC    *comp    = Parrot_PMC_get_pmc_keyed_str(interp, compreg, pir);
-
-    if (PMC_IS_NULL(comp) || !Parrot_PMC_defined(interp, comp)) {
-        Parrot_io_eprintf(interp, "Pir compiler not loaded");
-        return NULL;
-    }
-
-    compile_run(interp, c_src, pir, argc, argv);
-    compile_run(interp, c2_src, pir, argc, argv);
-}
-
-int
-main(int margc, char *margv[])
-{
-    Parrot_Interp interp;
-    PackFile *pf;
-    int argc = 1;
-    char *argv[] = { "test", NULL };
-
-    PackFile_Segment *seg;
-
-    /* Interpreter set-up */
-    interp = Parrot_new(NULL);
-    if (interp == NULL)
-        return 1;
-
-    /* dummy pf and segment to get things started */
-    pf = PackFile_new_dummy(interp, "test_code");
-
-    /* Parrot_set_flag(interp, PARROT_TRACE_FLAG); */
-    run(interp, argc, argv);
-    Parrot_exit(interp, 0);
-    return 0;
-}
-CODE
-Pir compiler returned no prog
-Pir compiler returned no prog
-OUTPUT
-
-# Local Variables:
-#   mode: cperl
-#   cperl-indent-level: 4
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:

Copied: branches/kill_pccinvoke/t/src/embed.t (from r36554, trunk/t/src/embed.t)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/kill_pccinvoke/t/src/embed.t	Tue Feb 10 19:57:33 2009	(r36556, copy of r36554, trunk/t/src/embed.t)
@@ -0,0 +1,475 @@
+#! perl
+# Copyright (C) 2001-2008, The Perl Foundation.
+# $Id$
+
+use strict;
+use warnings;
+use lib qw( . lib ../lib ../../lib );
+use Test::More;
+use Parrot::Test;
+
+plan skip_all => 'TT #306; many symbols not exported, embedding parrot fails';
+
+=head1 NAME
+
+t/src/compiler.t - Compile and run a PIR program from C.
+
+=head1 SYNOPSIS
+
+    % prove t/src/compiler.t
+
+=head1 DESCRIPTION
+
+Show steps to run a program from C. Functionality should be
+gathered in some API calls..
+
+=cut
+
+c_output_is( <<'CODE', <<'OUTPUT', "Parrot Compile API Single call" );
+
+#include <stdio.h>
+#include "parrot/embed.h"
+
+static opcode_t *
+run(PARROT_INTERP, int argc, char *argv[])
+{
+    const char *c_src = ".sub main :main\n" "    print \"ok\\n\"\n" ".end\n";
+
+    STRING *src, *smain;
+    PMC *prog, *entry;
+    opcode_t *dest;
+    STRING *error;
+
+    /* get PIR compiler  - TODO API */
+    PMC   *compreg = Parrot_PMC_get_pmc_keyed_int(interp,
+                                       interp->iglobals,
+                                       IGLOBALS_COMPREG_HASH);
+    STRING *pir    = Parrot_str_new_constant(interp, "PIR");
+    PMC    *comp   = Parrot_PMC_get_pmc_keyed_str(interp, compreg, pir);
+
+    if (PMC_IS_NULL(comp) || !Parrot_PMC_defined(interp, comp)) {
+        Parrot_io_eprintf(interp, "Pir compiler not loaded");
+        exit(EXIT_FAILURE);
+    }
+
+    /* compile source */
+    prog = Parrot_compile_string(interp, pir, c_src, &error);
+
+    if (PMC_IS_NULL(prog) || !Parrot_PMC_defined(interp, prog)) {
+        Parrot_io_eprintf(interp, "Pir compiler returned no prog");
+        exit(EXIT_FAILURE);
+    }
+
+    /* keep eval PMC alive */
+    gc_register_pmc(interp, prog);
+
+    /* locate function to run */
+    smain = Parrot_str_new_constant(interp, "main");
+    entry = Parrot_find_global_cur(interp, smain);
+
+    /* location of the entry */
+    interp->current_cont = new_ret_continuation_pmc(interp, NULL);
+    dest                 = Parrot_PMC_invoke(interp, entry, NULL);
+
+    /* where to start */
+    interp->resume_offset = dest -interp->code->base.data;
+
+    /* and go */
+    Parrot_runcode(interp, argc, (char **)argv);
+    return NULL;
+}
+
+int
+main(int margc, char *margv[])
+{
+    Parrot_Interp interp;
+    PackFile *pf;
+    int argc = 1;
+    const char *argv[] = { "test", NULL };
+
+    PackFile_Segment *seg;
+
+    /* Interpreter set-up */
+    interp = Parrot_new(NULL);
+    if (interp == NULL)
+        return 1;
+
+    /* dummy pf and segment to get things started */
+    pf = PackFile_new_dummy(interp, "test_code");
+
+    /* Parrot_set_flag(interp, PARROT_TRACE_FLAG); */
+    run(interp, argc, (char **)argv);
+    Parrot_exit(interp, 0);
+    return 0;
+}
+CODE
+ok
+OUTPUT
+c_output_is( <<'CODE', <<'OUTPUT', "Parrot Compile API Multiple Calls" );
+
+#include <stdio.h>
+#include "parrot/embed.h"
+
+static void
+compile_run(PARROT_INTERP, const char *src, STRING *type, int argc,
+            char *argv[])
+{
+    STRING   *smain;
+    PMC      *entry;
+    STRING   *error;
+    opcode_t *dest;
+    PMC      *prog = Parrot_compile_string(interp, type, src, &error);
+
+    if (PMC_IS_NULL(prog) || !Parrot_PMC_defined(interp, prog)) {
+        Parrot_io_eprintf(interp, "Pir compiler returned no prog");
+        exit(EXIT_FAILURE);
+    }
+
+    /* keep eval PMC alive */
+    gc_register_pmc(interp, prog);
+
+    /* locate function to run */
+    smain = Parrot_str_new_constant(interp, "main");
+    entry = Parrot_find_global_cur(interp, smain);
+
+    /* location of the entry */
+    interp->current_cont = new_ret_continuation_pmc(interp, NULL);
+    dest                 = Parrot_PMC_invoke(interp, entry, NULL);
+
+    /* where to start */
+    interp->resume_offset = dest -interp->code->base.data;
+
+    /* and go */
+    Parrot_runcode(interp, argc, (char **)argv);
+}
+
+static opcode_t *
+run(PARROT_INTERP, int argc, char *argv[])
+{
+    const char *c_src  = ".sub main :main\n" "    print \"ok\\n\"\n" ".end\n";
+
+    const char *c2_src =
+        ".sub main :main\n" "    print \"hola\\n\"\n" ".end\n";
+
+    STRING *src, *smain;
+
+    /* get PIR compiler  - TODO API */
+    PMC    *compreg = Parrot_PMC_get_pmc_keyed_int(interp,
+                                       interp->iglobals,
+                                       IGLOBALS_COMPREG_HASH);
+    STRING *pir     = Parrot_str_new_constant(interp, "PIR");
+    PMC    *comp    = Parrot_PMC_get_pmc_keyed_str(interp, compreg, pir);
+
+    if (PMC_IS_NULL(comp) || !Parrot_PMC_defined(interp, comp)) {
+        Parrot_io_eprintf(interp, "Pir compiler not loaded");
+        exit(EXIT_FAILURE);
+    }
+
+    compile_run(interp, c_src, pir, argc, argv);
+    compile_run(interp, c2_src, pir, argc, argv);
+}
+
+int
+main(int margc, char *margv[])
+{
+    Parrot_Interp interp;
+    PackFile *pf;
+    int argc = 1;
+    const char *argv[] = { "test", NULL };
+
+    PackFile_Segment *seg;
+
+    /* Interpreter set-up */
+    interp = Parrot_new(NULL);
+    if (interp == NULL)
+        return 1;
+
+    /* dummy pf and segment to get things started */
+    pf = PackFile_new_dummy(interp, "test_code");
+
+    /* Parrot_set_flag(interp, PARROT_TRACE_FLAG); */
+    run(interp, argc, (char **) argv);
+    Parrot_exit(interp, 0);
+    return 0;
+}
+CODE
+ok
+hola
+OUTPUT
+c_output_is( <<'CODE', <<'OUTPUT', "Parrot Compile API Multiple 1st bad PIR" );
+
+#include <stdio.h>
+#include "parrot/embed.h"
+
+static void
+compile_run(PARROT_INTERP, const char *src, STRING *type, int argc,
+            char *argv[])
+{
+    STRING   *smain;
+    PMC      *entry;
+    STRING   *error;
+    opcode_t *dest;
+    PMC      *prog = Parrot_compile_string(interp, type, src, &error);
+
+    if (PMC_IS_NULL(prog) || !Parrot_PMC_defined(interp, prog)) {
+        Parrot_io_eprintf(interp, "Pir compiler returned no prog\n");
+        return;
+    }
+
+    /* keep eval PMC alive */
+    gc_register_pmc(interp, prog);
+
+    /* locate function to run */
+    smain = Parrot_str_new_constant(interp, "main");
+    entry = Parrot_find_global_cur(interp, smain);
+
+    /* location of the entry */
+    interp->current_cont = new_ret_continuation_pmc(interp, NULL);
+    dest                 = Parrot_PMC_invoke(interp, entry, NULL);
+
+    /* where to start */
+    interp->resume_offset = dest -interp->code->base.data;
+
+    /* and go */
+    Parrot_runcode(interp, argc, (char **) argv);
+}
+
+static opcode_t *
+run(PARROT_INTERP, int argc, char *argv[])
+{
+    const char *c_src  = ".sub main :main\n" "    print ok\\n\"\n" ".end\n";
+
+    const char *c2_src =
+        ".sub main :main\n" "    print \"hola\\n\"\n" ".end\n";
+
+    STRING *src, *smain;
+
+    /* get PIR compiler  - TODO API */
+    PMC    *compreg = Parrot_PMC_get_pmc_keyed_int(interp,
+                                       interp->iglobals,
+                                       IGLOBALS_COMPREG_HASH);
+    STRING *pir     = Parrot_str_new_constant(interp, "PIR");
+    PMC    *comp    = Parrot_PMC_get_pmc_keyed_str(interp, compreg, pir);
+
+    if (PMC_IS_NULL(comp) || !Parrot_PMC_defined(interp, comp)) {
+        Parrot_io_eprintf(interp, "Pir compiler not loaded");
+        return NULL;
+    }
+
+    compile_run(interp, c_src, pir, argc, argv);
+    compile_run(interp, c2_src, pir, argc, argv);
+}
+
+int
+main(int margc, char *margv[])
+{
+    Parrot_Interp interp;
+    PackFile *pf;
+    int argc = 1;
+    char *argv[] = { "test", NULL };
+
+    PackFile_Segment *seg;
+
+    /* Interpreter set-up */
+    interp = Parrot_new(NULL);
+    if (interp == NULL)
+        return 1;
+
+    /* dummy pf and segment to get things started */
+    pf = PackFile_new_dummy(interp, "test_code");
+
+    /* Parrot_set_flag(interp, PARROT_TRACE_FLAG); */
+    run(interp, argc, argv);
+    Parrot_exit(interp, 0);
+    return 0;
+}
+CODE
+Pir compiler returned no prog
+hola
+OUTPUT
+c_output_is( <<'CODE', <<'OUTPUT', "Parrot Compile API Multiple 2nd bad PIR" );
+
+#include <stdio.h>
+#include "parrot/embed.h"
+
+static void
+compile_run(PARROT_INTERP, const char *src, STRING *type, int argc,
+            char *argv[])
+{
+    STRING   *smain;
+    PMC      *entry;
+    STRING   *error;
+    opcode_t *dest;
+    PMC      *prog = Parrot_compile_string(interp, type, src, &error);
+
+    if (PMC_IS_NULL(prog) || !Parrot_PMC_defined(interp, prog)) {
+        Parrot_io_eprintf(interp, "Pir compiler returned no prog\n");
+        return;
+    }
+
+    /* keep eval PMC alive */
+    gc_register_pmc(interp, prog);
+
+    /* locate function to run */
+    smain = Parrot_str_new_constant(interp, "main");
+    entry = Parrot_find_global_cur(interp, smain);
+
+    /* location of the entry */
+    interp->current_cont = new_ret_continuation_pmc(interp, NULL);
+    dest                 = Parrot_PMC_invoke(interp, entry, NULL);
+
+    /* where to start */
+    interp->resume_offset = dest -interp->code->base.data;
+
+    /* and go */
+    Parrot_runcode(interp, argc, (char **)argv);
+}
+
+static opcode_t *
+run(PARROT_INTERP, int argc, char *argv[])
+{
+    const char *c_src  = ".sub main :main\n" "    print ok\\n\"\n" ".end\n";
+
+    const char *c2_src =
+        ".sub main :main\n" "    print \"hola\\n\"\n" ".end\n";
+
+    STRING *src, *smain;
+    /* get PIR compiler  - TODO API */
+    PMC    *compreg = Parrot_PMC_get_pmc_keyed_int(interp,
+                                       interp->iglobals,
+                                       IGLOBALS_COMPREG_HASH);
+    STRING *pir     = Parrot_str_new_constant(interp, "PIR");
+    PMC    *comp    = Parrot_PMC_get_pmc_keyed_str(interp, compreg, pir);
+
+    if (PMC_IS_NULL(comp) || !Parrot_PMC_defined(interp, comp)) {
+        Parrot_io_eprintf(interp, "Pir compiler not loaded");
+        return NULL;
+    }
+
+    compile_run(interp, c2_src, pir, argc, argv);
+    compile_run(interp, c_src, pir, argc, argv);
+}
+
+int
+main(int margc, char *margv[])
+{
+    Parrot_Interp interp;
+    PackFile *pf;
+    int argc = 1;
+    char *argv[] = { "test", NULL };
+
+    PackFile_Segment *seg;
+
+    /* Interpreter set-up */
+    interp = Parrot_new(NULL);
+    if (interp == NULL)
+        return 1;
+
+    /* dummy pf and segment to get things started */
+    pf = PackFile_new_dummy(interp, "test_code");
+
+    /* Parrot_set_flag(interp, PARROT_TRACE_FLAG); */
+    run(interp, argc, argv);
+    Parrot_exit(interp, 0);
+    return 0;
+}
+CODE
+hola
+Pir compiler returned no prog
+OUTPUT
+c_output_is( <<'CODE', <<'OUTPUT', "Parrot Compile API Multiple bad PIR" );
+
+#include <stdio.h>
+#include "parrot/embed.h"
+
+static void
+compile_run(PARROT_INTERP, const char *src, STRING *type, int argc,
+            char *argv[])
+{
+    STRING   *smain;
+    PMC      *entry;
+    STRING   *error;
+    opcode_t *dest;
+    PMC      *prog = Parrot_compile_string(interp, type, src, &error);
+
+    if (PMC_IS_NULL(prog) || !Parrot_PMC_defined(interp, prog)) {
+        Parrot_io_eprintf(interp, "Pir compiler returned no prog\n");
+        return;
+    }
+
+    /* keep eval PMC alive */
+    gc_register_pmc(interp, prog);
+
+    /* locate function to run */
+    smain = Parrot_str_new_constant(interp, "main");
+    entry = Parrot_find_global_cur(interp, smain);
+
+    /* location of the entry */
+    interp->current_cont = new_ret_continuation_pmc(interp, NULL);
+    dest                 = Parrot_PMC_invoke(interp, entry, NULL);
+
+    /* where to start */
+    interp->resume_offset = dest -interp->code->base.data;
+
+    /* and go */
+    Parrot_runcode(interp, argc, (char **)argv);
+}
+
+static opcode_t *
+run(PARROT_INTERP, int argc, char *argv[])
+{
+    const char *c_src  = ".sub main :main\n" "    print ok\\n\"\n" ".end\n";
+
+    const char *c2_src = ".sub main :main\n" "    print hola\\n\"\n" ".end\n";
+
+    STRING *src, *smain;
+    /* get PIR compiler  - TODO API */
+    PMC    *compreg = Parrot_PMC_get_pmc_keyed_int(interp,
+                                       interp->iglobals,
+                                       IGLOBALS_COMPREG_HASH);
+    STRING *pir     = Parrot_str_new_constant(interp, "PIR");
+    PMC    *comp    = Parrot_PMC_get_pmc_keyed_str(interp, compreg, pir);
+
+    if (PMC_IS_NULL(comp) || !Parrot_PMC_defined(interp, comp)) {
+        Parrot_io_eprintf(interp, "Pir compiler not loaded");
+        return NULL;
+    }
+
+    compile_run(interp, c_src, pir, argc, argv);
+    compile_run(interp, c2_src, pir, argc, argv);
+}
+
+int
+main(int margc, char *margv[])
+{
+    Parrot_Interp interp;
+    PackFile *pf;
+    int argc = 1;
+    char *argv[] = { "test", NULL };
+
+    PackFile_Segment *seg;
+
+    /* Interpreter set-up */
+    interp = Parrot_new(NULL);
+    if (interp == NULL)
+        return 1;
+
+    /* dummy pf and segment to get things started */
+    pf = PackFile_new_dummy(interp, "test_code");
+
+    /* Parrot_set_flag(interp, PARROT_TRACE_FLAG); */
+    run(interp, argc, argv);
+    Parrot_exit(interp, 0);
+    return 0;
+}
+CODE
+Pir compiler returned no prog
+Pir compiler returned no prog
+OUTPUT
+
+# Local Variables:
+#   mode: cperl
+#   cperl-indent-level: 4
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:

Modified: branches/kill_pccinvoke/t/steps/gen_makefiles-01.t
==============================================================================
--- branches/kill_pccinvoke/t/steps/gen_makefiles-01.t	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/t/steps/gen_makefiles-01.t	Tue Feb 10 19:57:33 2009	(r36556)
@@ -1,5 +1,5 @@
 #! perl
-# Copyright (C) 2007, The Perl Foundation.
+# Copyright (C) 2007-2009, The Perl Foundation.
 # $Id$
 # gen_makefiles-01.t
 
@@ -11,11 +11,11 @@
     @cond_tests =
       (
        # perl-syntax       true or false
-       ["IF(true)", 		1],
-       ["IF(false)", 		0],
-       ["UNLESS(true)",	        0],
-       ["UNLESS(false)",	1],
-       ["IF(true | false)",	1],
+       ["IF(true)",             1],
+       ["IF(false)",            0],
+       ["UNLESS(true)",         0],
+       ["UNLESS(false)",        1],
+       ["IF(true | false)",     1],
        ["IF(true & false)",     0],
        ["IF(true or true)",     1],
        ["IF(true or false)",    1],
@@ -27,16 +27,16 @@
        ["IF(false and false)",  0],
        ["UNLESS(true|false)",   0],
        ["UNLESS(true&false)",   1],
-       ["IF(!false)", 		1],
-       ["IF(true)", 		1],
-       ["ELSIF(value)", 	0],
-       ["ELSE", 	        0],
-       ["IF(false)", 		0],
-       ["ELSIF(value)", 	1],
-       ["ELSE", 	        0],
-       ["IF(false)", 		0],
-       ["ELSIF(false)", 	0],
-       ["ELSE", 	        1],
+       ["IF(!false)",           1],
+       ["IF(true)",             1],
+       ["ELSIF(value)",         0],
+       ["ELSE",                 0],
+       ["IF(false)",            0],
+       ["ELSIF(value)",         1],
+       ["ELSE",                 0],
+       ["IF(false)",            0],
+       ["ELSIF(false)",         0],
+       ["ELSE",                 1],
        # Exercise the parser
        ["IF(true and (!false and value))",  1],
        ["IF(true and (!false) and value)",  1],
@@ -54,10 +54,10 @@
        ["IF(not (false or value))",         0],
        ["IF(true and not false)",           1],
        # platform
-       ["IF(someplatform)",		    1],
-       ["IF(not someplatform)",		    0],
-       ["UNLESS(someplatform)",		    0],
-       ["UNLESS(not someplatform)",	    1],
+       ["IF(someplatform)",                 1],
+       ["IF(not someplatform)",             0],
+       ["UNLESS(someplatform)",             0],
+       ["UNLESS(not someplatform)",         1],
        # key==value
        ["IF(value==xx)",                    1],
        ["IF(value==xxy)",                   0],
@@ -65,21 +65,24 @@
        ["UNLESS(value==xxy)",               1],
        ["IF(true & (value==xx & (!false)))",1],
        # These are invalid:
-       #["IF(value == xx)",                  0], # invalid op error
-       #["IF(value = xx)",                   0], # invalid op error
+       #["IF(value == xx)",                 0], # invalid op error
+       #["IF(value = xx)",                  0], # invalid op error
        ["IF(value=xx)",                     0], # also invalid, no warning. checks for key value=xx
 
        # Legacy syntax                 true or false
-       ["CONDITIONED_LINE(true)", 	    1],
+       ["CONDITIONED_LINE(true)",           1],
        ["INVERSE_CONDITIONED_LINE(true)",   0],
-       ["CONDITIONED_LINE(false)", 	    0],
+       ["CONDITIONED_LINE(false)",          0],
        ["INVERSE_CONDITIONED_LINE(false)",  1],
       );
 }
-use Test::More tests => (8 + scalar(@cond_tests));
+
+use Test::More tests => (8 + @cond_tests);
 use Carp;
 use lib qw( . lib );
+
 use_ok('config::gen::makefiles');
+
 use Parrot::Configure;
 use Parrot::Configure::Options qw( process_options );
 use Parrot::Configure::Test qw(
@@ -96,16 +99,20 @@
     }
 );
 
-my $conf = Parrot::Configure->new;
-my $pkg = q{gen::makefiles};
+my $conf = Parrot::Configure->new();
+my $pkg  = 'gen::makefiles';
+
 $conf->add_steps($pkg);
 $conf->options->set( %{$args} );
-my $step = test_step_constructor_and_description($conf);
+
+my $step           = test_step_constructor_and_description($conf);
 my $missing_SOURCE = 0;
-my %makefiles = %{ $step->{makefiles} };
+my %makefiles      = %{ $step->{makefiles} };
+
 foreach my $k ( keys %makefiles ) {
     $missing_SOURCE++ unless (-f $makefiles{$k}{SOURCE});
 }
+
 is($missing_SOURCE, 0, "No Makefile source file missing");
 ok(-f $step->{CFLAGS_source}, "CFLAGS source file located");
 
@@ -121,27 +128,36 @@
     $s =~ s/[\()]//g;
     $s =~ s/ /_/g;
     $s .= ("_".++$index) if $s =~ /^(ELSE|ELSIF)/;
+
     return $s."=".($c->[1]?"true":"false");
 }
+
 # test #IF(keys):line
 $conf->data->set( @conf_args, ('osname' => 'someplatform' ) );
+
 open my $IN, ">", "Makefile_$$.in";
 print $IN "# There should only be =true results in .out\n";
 for my $c (@cond_tests) {
     my $result = result($c);
     print $IN "#$c->[0]:$result\n";
 }
+
 close $IN;
+
 $conf->genfile("Makefile_$$.in", "Makefile_$$.out",
-	       (makefile => 1, conditioned_lines => 1));
+           (makefile => 1, conditioned_lines => 1));
+
 open my $OUT, "<", "Makefile_$$.out";
+
 my $f;
 {
     local $/;
     $f = <$OUT>;
 }
+
 close $OUT;
 $index = undef;
+
 for my $c (@cond_tests) {
     my $result = result($c);
     if ($c->[2] and $c->[2] =~ /^TODO(.*)$/) {
@@ -164,13 +180,15 @@
     $conf->genfile("Makefile_$$.in", "Makefile_$$.out",
                    (makefile => 1, conditioned_lines => 1));
 };
+
 my $error = $@;
 ok($error eq "invalid op \"bla\" in \"IF(bla)\" at \"(bla)\" at Makefile_$$.in line 2\n",
    "report correct error line");
 
 pass("Completed all tests in $0");
+
 END {
-    unlink "Makefile_$$.in", "Makefile_$$.out";
+    unlink "Makefile_$$.in", "Makefile_$$.out", "Makefile_$$.out.tmp";
 }
 
 ################### DOCUMENTATION ###################

Modified: branches/kill_pccinvoke/t/tools/pmc2c.t
==============================================================================
--- branches/kill_pccinvoke/t/tools/pmc2c.t	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/t/tools/pmc2c.t	Tue Feb 10 19:57:33 2009	(r36556)
@@ -93,6 +93,8 @@
 void
 Parrot_a_class_init(PARROT_INTERP, int entry, int pass)
 {
+    static const char attr_defs [] =
+        "";
     const VTABLE temp_base_vtable = {
 END_C
 

Modified: branches/kill_pccinvoke/tools/dev/mk_native_pbc
==============================================================================
--- branches/kill_pccinvoke/tools/dev/mk_native_pbc	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/tools/dev/mk_native_pbc	Tue Feb 10 19:57:33 2009	(r36556)
@@ -1,32 +1,131 @@
 #!/bin/sh
 
-# generate t/native_pbc_{1,2}.pbc
-# this should be run on i386 systems to regenerate the first two
-# native tests
-# NOTE: This will need a perl compiled with long double support
+# sh tools/dev/mk_native_pbc [--noconf]
+#
+# generate t/native_pbc/_{1,2}.pbc
+# This should only be run on known systems to regenerate the native pbcs.
+# Better do not try that on mingw, use cygwin instead.
+#
+# NOTE:  For _2 this will need a compiler with long double support
 # NOTE2: Installing ccache speeds this process up considerably
+# NOTE3: Do not svn commit this on a devel release,
+#        update the VERSION and rm .parrot_current_rev
 
-# run it as:
-# $ sh tools/dev/mk_native_pbc
-
-make -s progclean
-make -s -C imcc clean
-perl Configure.pl --debugging --floatval="long double" --nomanicheck
-tail myconfig
-make -s
-./parrot -o n.pbc t/op/number_1.pasm
-mv n.pbc t/native_pbc/number_2.pbc
-
-make -s progclean
-make -s -C imcc clean
-perl Configure.pl --debugging --floatval=double --nomanicheck
+#  _1   i386 32 bit opcode_t, 32 bit intval   (linux-gcc-ix86, freebsd-gcc, cygwin)
+#  _2   i386 32 bit opcode_t, 32 bit intval, long double (linux-gcc-ix86)
+#  _3   PPC BE 32 bit opcode_t, 32 bit intval (darwin-ppc)
+#  _4   x86_64 double float 64 bit opcode_t   (linux-gcc-x86_64, solaris-cc-64int)
+#  _5   big-endian 64-bit                     (irix or similar)
+
+#tests:
+#parrot -o i.pbc -a - <<EOF
+#  print 0x10203040
+#  end
+#  EOF
+# t/op/number_1.pasm
+# t/op/string_133.pasm
+
+# check 32/64 bit, endianess, hugefloat
+N=
+enable_long_double=
+conf=
+exe=
+
+# unfortunately there are older perls around
+byteorder=$(perl -V:byteorder | perl -ne "s/byteorder='(\d+)';/\\1/; print")
+ptrsize=$(perl -V:ptrsize)
+
+if [ "$ptrsize" == "ptrsize='4';" ]
+then
+    if [ "$byteorder" == "1234" ]
+    then
+        N=1
+        if [ "$(perl -V:uselongdouble)" == "uselongdouble='define';" ]; then
+            enable_long_double=1
+            conf=" --floatval=double"
+        fi
+    else
+        if [ "$byteorder" == "4321" ]
+        then
+            N=3
+        else
+            if [ "$byteorder" == "12345678" \
+                 -a "$(perl -V:osname)" == "osname='cygwin';" ]
+            then
+                echo "detected cygwin use64bitint: ok"
+                N=1
+                exe=.exe
+            else
+                echo "unsupported perl -V:byteorder $byteorder"
+                exit 1
+            fi
+        fi
+    fi
+else
+    if [ "$ptrsize" == "ptrsize='8';" ]
+    then
+        if [ "$byteorder" == "12345678" ]
+        then
+            N=4
+        else
+            N=5
+        fi
+    else
+        echo "unsupported perl -V:ptrsize $ptrsize"
+        exit 1
+    fi
+fi
+
+if [ "$enable_long_double" == "1" ]; then
+    if [ "$1" != "--noconf" ]; then
+      make -s prog-clean
+      perl Configure.pl --debugging --floatval="long double" --nomanicheck
+    fi
+    tail myconfig
+    make -s || exit 1
+    [ -e t/op/number_1.pasm ] || perl t/harness t/op/number.t
+    [ -e t/op/string_133.pasm ] || perl t/harness t/op/string.t
+    ./parrot -o t/native_pbc/integer_2.pbc -a - <<EOF
+print 0x10203040
+end
+EOF
+    [ $? -le 0 ] && echo "t/native_pbc/integer_2.pbc updated"
+    ./parrot -o t/native_pbc/number_2.pbc t/op/number_1.pasm && echo "t/native_pbc/number_2.pbc updated"
+    ./parrot -o t/native_pbc/string_2.pbc t/op/string_133.pasm  && echo "t/native_pbc/string_2.pbc updated"
+
+    make pbc_dump$exe
+    ./pbc_dump -h t/native_pbc/number_2.pbc
+fi
+
+if [ "$1" != "--noconf" ]; then
+    make -s prog-clean
+    perl Configure.pl --debugging $conf --nomanicheck
+fi
 tail myconfig
-make -s
-./parrot -o n.pbc t/op/number_1.pasm
-mv n.pbc t/native_pbc/number_1.pbc
-
-make pbc_dump
-./pbc_dump -h t/native_pbc/number_1.pbc
-./pbc_dump -h t/native_pbc/number_2.pbc
+make -s || exit 1
 
-perl t/harness t/native_pbc/number.t
+[ -e t/op/number_1.pasm ] || perl t/harness t/op/number.t
+[ -e t/op/string_133.pasm ] || perl t/harness t/op/string.t
+./parrot -o t/native_pbc/integer_${N}.pbc -a - <<EOF
+print 0x10203040
+end
+EOF
+[ $? -le 0 ] && echo "t/native_pbc/integer_${N}.pbc updated"
+./parrot -o t/native_pbc/number_${N}.pbc t/op/number_1.pasm && echo "t/native_pbc/number_${N}.pbc updated"
+./parrot -o t/native_pbc/string_${N}.pbc t/op/string_133.pasm  && echo "t/native_pbc/string_${N}.pbc updated"
+
+make pbc_dump$exe
+./pbc_dump -h t/native_pbc/number_${N}.pbc
+
+perl t/harness t/native_pbc/integer.t && \
+    perl t/harness t/native_pbc/number.t && \
+    perl t/harness t/native_pbc/string.t
+
+echo ""
+if [ -e .parrot_current_rev ]
+then
+    echo "Do not commit these native_pbcs on devel versions, it must be a release candidate!"
+else
+    cd t/native_pbc
+    echo svn commit -m'native_pbc platform updates'
+fi

Modified: branches/kill_pccinvoke/tools/dev/pbc_to_exe.pir
==============================================================================
--- branches/kill_pccinvoke/tools/dev/pbc_to_exe.pir	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/tools/dev/pbc_to_exe.pir	Tue Feb 10 19:57:33 2009	(r36556)
@@ -25,6 +25,7 @@
     .local string objfile
     .local string exefile
     .local string out
+    .local int    closeresult
 
     (infile, cfile, objfile, exefile) = 'handle_args'(argv)
     unless infile > '' goto err_infile
@@ -77,7 +78,11 @@
         }
 MAIN
 
-    close outfh
+    # The close opcode does not return a result code,
+    # use the method instead.
+    closeresult = outfh.'close'()
+    unless closeresult == 0 goto err_close
+
     'compile_file'(cfile, objfile)
     'link_file'(objfile, exefile)
     .return ()
@@ -86,6 +91,8 @@
     die "cannot read infile"
   err_outfh:
     die "cannot write outfile"
+  err_close:
+    die "cannot close outfile"
 .end
 
 

Modified: branches/kill_pccinvoke/tools/install/smoke.pl
==============================================================================
--- branches/kill_pccinvoke/tools/install/smoke.pl	Tue Feb 10 19:41:23 2009	(r36555)
+++ branches/kill_pccinvoke/tools/install/smoke.pl	Tue Feb 10 19:57:33 2009	(r36556)
@@ -9,7 +9,7 @@
 use Getopt::Long;
 use File::Spec::Functions;
 
-use Test::More tests => 25;
+use Test::More tests => 23;
 
 =head1 NAME
 
@@ -24,7 +24,7 @@
 
 parrot in .
 
-    % perl tools/install/smoke.pl --bindir=.
+    % perl tools/install/smoke.pl --bindir=. --libdir=./runtime
 
 test installation in DESTDIR:
 
@@ -86,10 +86,6 @@
 
 ok(system("$parrot -V") == 0, "display parrot version");
 
-$exe = catfile($bindir, 'perl6');
-$out = `$exe -v`;
-ok($out =~ /Rakudo/, "check rakudo");
-
 #
 # some compiler tools
 #
@@ -167,6 +163,8 @@
 ok($out eq "Hello World from JS\n\n", "check ecmascript");
 unlink($filename);
 
+TODO: {
+local $TODO = "lisp is currently broken";
 $filename = 'test.l';
 open $FH, '>', $filename
         or die "Can't open $filename ($!).\n";
@@ -175,6 +173,7 @@
 $out = `$parrot languages/lisp/lisp.pbc $filename`;
 ok($out eq "Hello, World!\n", "check lisp");
 unlink($filename);
+}
 
 $filename = 'test.lolcode';
 open $FH, '>', $filename
@@ -195,9 +194,6 @@
 $out = `$parrot languages/ook/ook.pbc`;
 ok($out eq q{}, "check ook");
 
-$out = `$parrot languages/perl6/perl6.pbc -e "say 'hello world'"`;
-ok($out eq "hello world\n", "check rakudo");
-
 $filename = 'test.l';
 open $FH, '>', $filename
         or die "Can't open $filename ($!).\n";


More information about the parrot-commits mailing list