[svn:parrot] r36563 - in branches/vtable_morph_change: . config/auto/format config/init/hints docs/book docs/dev docs/pdds docs/project examples/benchmarks examples/library examples/pir include/parrot languages/PIR languages/befunge languages/ecmascript/t/sanity_pt languages/lua/src/pmc languages/lua/t/test languages/perl6 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 lib/Parrot lib/Parrot/Docs/Section src src/dynpmc src/gc src/io src/ops src/pmc src/string t/benchmark t/compilers/tge t/dynpmc t/native_pbc t/src tools/dev tools/util

whiteknight at svn.parrot.org whiteknight at svn.parrot.org
Wed Feb 11 00:44:37 UTC 2009


Author: whiteknight
Date: Wed Feb 11 00:44:34 2009
New Revision: 36563
URL: https://trac.parrot.org/parrot/changeset/36563

Log:
[vtable_morph_change] update to trunk r36562. Fixes all errors I had. Preparing to merge back to trunk

Added:
   branches/vtable_morph_change/t/src/embed.t
      - copied unchanged from r36562, trunk/t/src/embed.t
Deleted:
   branches/vtable_morph_change/lib/Parrot/Docs/Section/BigNum.pm
   branches/vtable_morph_change/t/src/compiler.t
Modified:
   branches/vtable_morph_change/   (props changed)
   branches/vtable_morph_change/MANIFEST
   branches/vtable_morph_change/MANIFEST.SKIP
   branches/vtable_morph_change/PLATFORMS
   branches/vtable_morph_change/config/auto/format/intval_maxmin_c.in   (props changed)
   branches/vtable_morph_change/config/init/hints/solaris.pm
   branches/vtable_morph_change/docs/book/ch03_pir_basics.pod
   branches/vtable_morph_change/docs/book/ch07_testing_and_debugging.pod   (props changed)
   branches/vtable_morph_change/docs/book/ch08_architecture.pod   (props changed)
   branches/vtable_morph_change/docs/book/ch09_pct.pod   (props changed)
   branches/vtable_morph_change/docs/book/ch10_hlls.pod   (props changed)
   branches/vtable_morph_change/docs/book/ch11_pmcs.pod   (props changed)
   branches/vtable_morph_change/docs/book/ch12_opcodes.pod   (props changed)
   branches/vtable_morph_change/docs/book/ch13_reference.pod   (props changed)
   branches/vtable_morph_change/docs/dev/c_functions.pod   (props changed)
   branches/vtable_morph_change/docs/pdds/pdd09_gc.pod
   branches/vtable_morph_change/docs/project/release_manager_guide.pod
   branches/vtable_morph_change/examples/benchmarks/bench_newp.pasm
   branches/vtable_morph_change/examples/benchmarks/gc_alloc_new.pasm
   branches/vtable_morph_change/examples/benchmarks/gc_alloc_reuse.pasm
   branches/vtable_morph_change/examples/benchmarks/gc_generations.pasm
   branches/vtable_morph_change/examples/benchmarks/gc_header_new.pasm
   branches/vtable_morph_change/examples/benchmarks/gc_header_reuse.pasm
   branches/vtable_morph_change/examples/benchmarks/gc_waves_headers.pasm
   branches/vtable_morph_change/examples/benchmarks/gc_waves_sizeable_data.pasm
   branches/vtable_morph_change/examples/benchmarks/gc_waves_sizeable_headers.pasm
   branches/vtable_morph_change/examples/benchmarks/stress.pasm
   branches/vtable_morph_change/examples/benchmarks/stress1.pasm
   branches/vtable_morph_change/examples/benchmarks/stress3.pasm
   branches/vtable_morph_change/examples/library/ncurses_life.pir
   branches/vtable_morph_change/examples/pir/life.pir
   branches/vtable_morph_change/examples/pir/thr-primes.pir
   branches/vtable_morph_change/include/parrot/gc_api.h   (contents, props changed)
   branches/vtable_morph_change/include/parrot/gc_mark_sweep.h   (contents, props changed)
   branches/vtable_morph_change/include/parrot/gc_pools.h   (props changed)
   branches/vtable_morph_change/include/parrot/interpreter.h
   branches/vtable_morph_change/include/parrot/resources.h
   branches/vtable_morph_change/languages/PIR/pir.pir   (props changed)
   branches/vtable_morph_change/languages/befunge/Configure.pl   (props changed)
   branches/vtable_morph_change/languages/ecmascript/t/sanity_pt/03-boolean.t   (props changed)
   branches/vtable_morph_change/languages/lua/src/pmc/luatable.pmc
   branches/vtable_morph_change/languages/lua/src/pmc/luauserdata.pmc
   branches/vtable_morph_change/languages/lua/t/test/bisect-output-win32.txt   (props changed)
   branches/vtable_morph_change/languages/perl6/   (props changed)
   branches/vtable_morph_change/languages/pipp/docs/internals.pod   (props changed)
   branches/vtable_morph_change/languages/pipp/pipp.pir   (props changed)
   branches/vtable_morph_change/languages/pipp/src/classes/Object.pir   (props changed)
   branches/vtable_morph_change/languages/pipp/src/common/php_filesystem.pir   (props changed)
   branches/vtable_morph_change/languages/pipp/src/pmc/pipp_hash.c   (props changed)
   branches/vtable_morph_change/languages/pipp/src/pmc/pipp_hash.h   (props changed)
   branches/vtable_morph_change/languages/pipp/t/embed/eval.t   (props changed)
   branches/vtable_morph_change/languages/pipp/t/php/filesystem.t   (props changed)
   branches/vtable_morph_change/lib/Parrot/Docs/Section/Parrot.pm
   branches/vtable_morph_change/lib/Parrot/Manifest.pm
   branches/vtable_morph_change/src/dynpmc/pair.pmc   (props changed)
   branches/vtable_morph_change/src/events.c
   branches/vtable_morph_change/src/gc/api.c   (contents, props changed)
   branches/vtable_morph_change/src/gc/generational_ms.c   (contents, props changed)
   branches/vtable_morph_change/src/gc/incremental_ms.c   (contents, props changed)
   branches/vtable_morph_change/src/gc/mark_sweep.c   (contents, props changed)
   branches/vtable_morph_change/src/gc/pools.c   (contents, props changed)
   branches/vtable_morph_change/src/gc/resources.c
   branches/vtable_morph_change/src/gc/system.c   (props changed)
   branches/vtable_morph_change/src/inter_create.c
   branches/vtable_morph_change/src/inter_misc.c
   branches/vtable_morph_change/src/io/portable.c
   branches/vtable_morph_change/src/io/unix.c
   branches/vtable_morph_change/src/io/win32.c
   branches/vtable_morph_change/src/ops/core.ops
   branches/vtable_morph_change/src/pmc/filehandle.pmc
   branches/vtable_morph_change/src/pmc/parrotinterpreter.pmc
   branches/vtable_morph_change/src/pmc_freeze.c
   branches/vtable_morph_change/src/runops_cores.c
   branches/vtable_morph_change/src/stacks.c
   branches/vtable_morph_change/src/string/api.c
   branches/vtable_morph_change/src/thread.c
   branches/vtable_morph_change/t/benchmark/benchmarks.t
   branches/vtable_morph_change/t/compilers/tge/NoneGrammar.tg   (props changed)
   branches/vtable_morph_change/t/dynpmc/pair.t   (props changed)
   branches/vtable_morph_change/t/native_pbc/integer.t
   branches/vtable_morph_change/t/native_pbc/number.t
   branches/vtable_morph_change/t/native_pbc/string.t
   branches/vtable_morph_change/tools/dev/mk_gitignore.pl   (props changed)
   branches/vtable_morph_change/tools/dev/mk_native_pbc
   branches/vtable_morph_change/tools/dev/pbc_to_exe.pir
   branches/vtable_morph_change/tools/util/perlcritic-cage.conf   (props changed)

Modified: branches/vtable_morph_change/MANIFEST
==============================================================================
--- branches/vtable_morph_change/MANIFEST	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/MANIFEST	Wed Feb 11 00:44:34 2009	(r36563)
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Tue Feb 10 03:30:40 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.
@@ -2317,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]
@@ -3215,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/vtable_morph_change/MANIFEST.SKIP
==============================================================================
--- branches/vtable_morph_change/MANIFEST.SKIP	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/MANIFEST.SKIP	Wed Feb 11 00:44:34 2009	(r36563)
@@ -1,6 +1,6 @@
 # ex: set ro:
 # $Id$
-# generated by tools/dev/mk_manifest_and_skip.pl Sun Feb  8 18:48:22 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Tue Feb 10 19:40:38 2009 UT
 #
 # This file should contain a transcript of the svn:ignore properties
 # of the directories in the Parrot subversion repository. (Needed for
@@ -877,23 +877,6 @@
 ^languages/parrot_compiler/t/basic/.*\.code/
 ^languages/parrot_compiler/t/basic/.*\.out$
 ^languages/parrot_compiler/t/basic/.*\.out/
-# generated from svn:ignore of 'languages/perl6/'
-^languages/perl6/.*\.pbc$
-^languages/perl6/.*\.pbc/
-^languages/perl6/Makefile$
-^languages/perl6/Makefile/
-^languages/perl6/Test\.pir$
-^languages/perl6/Test\.pir/
-^languages/perl6/perl6$
-^languages/perl6/perl6/
-^languages/perl6/perl6\.c$
-^languages/perl6/perl6\.c/
-^languages/perl6/perl6\.exe$
-^languages/perl6/perl6\.exe/
-^languages/perl6/perl6\.exe\.manifest$
-^languages/perl6/perl6\.exe\.manifest/
-^languages/perl6/util$
-^languages/perl6/util/
 # generated from svn:ignore of 'languages/pheme/'
 ^languages/pheme/.*\.pbc$
 ^languages/pheme/.*\.pbc/

Modified: branches/vtable_morph_change/PLATFORMS
==============================================================================
--- branches/vtable_morph_change/PLATFORMS	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/PLATFORMS	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/config/init/hints/solaris.pm
==============================================================================
--- branches/vtable_morph_change/config/init/hints/solaris.pm	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/config/init/hints/solaris.pm	Wed Feb 11 00:44:34 2009	(r36563)
@@ -40,9 +40,15 @@
         %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 +70,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/vtable_morph_change/docs/book/ch03_pir_basics.pod
==============================================================================
--- branches/vtable_morph_change/docs/book/ch03_pir_basics.pod	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/docs/book/ch03_pir_basics.pod	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/docs/pdds/pdd09_gc.pod
==============================================================================
--- branches/vtable_morph_change/docs/pdds/pdd09_gc.pod	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/docs/pdds/pdd09_gc.pod	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/docs/project/release_manager_guide.pod
==============================================================================
--- branches/vtable_morph_change/docs/project/release_manager_guide.pod	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/docs/project/release_manager_guide.pod	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/examples/benchmarks/bench_newp.pasm
==============================================================================
--- branches/vtable_morph_change/examples/benchmarks/bench_newp.pasm	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/examples/benchmarks/bench_newp.pasm	Wed Feb 11 00:44:34 2009	(r36563)
@@ -20,7 +20,7 @@
 
 =item * the total number of bytes allocated
 
-=item * the total of DOD runs made
+=item * the total of GC runs made
 
 =item * the total number of collection runs made
 
@@ -64,7 +64,7 @@
 	interpinfo I1, 2
 	print "A total of "
 	print I1
-	print " DOD runs were made\n"
+	print " GC runs were made\n"
 	interpinfo I1, 3
 	print "A total of "
 	print I1

Modified: branches/vtable_morph_change/examples/benchmarks/gc_alloc_new.pasm
==============================================================================
--- branches/vtable_morph_change/examples/benchmarks/gc_alloc_new.pasm	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/examples/benchmarks/gc_alloc_new.pasm	Wed Feb 11 00:44:34 2009	(r36563)
@@ -3,7 +3,7 @@
 
 =head1 NAME
 
-examples/benchmarks/gc_alloc_new.pasm - GC/DOD Benchmark
+examples/benchmarks/gc_alloc_new.pasm - GC Benchmark
 
 =head1 SYNOPSIS
 
@@ -20,7 +20,7 @@
 
 =item * the total number of bytes allocated
 
-=item * the total of DOD runs made
+=item * the total of GC runs made
 
 =item * the total number of collection runs made
 
@@ -60,7 +60,7 @@
 	interpinfo I1, 2
 	print "A total of "
 	print I1
-	print " DOD runs were made\n"
+	print " GC runs were made\n"
 
 	interpinfo I1, 3
 	print "A total of "

Modified: branches/vtable_morph_change/examples/benchmarks/gc_alloc_reuse.pasm
==============================================================================
--- branches/vtable_morph_change/examples/benchmarks/gc_alloc_reuse.pasm	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/examples/benchmarks/gc_alloc_reuse.pasm	Wed Feb 11 00:44:34 2009	(r36563)
@@ -3,7 +3,7 @@
 
 =head1 NAME
 
-examples/benchmarks/gc_alloc_reuse.pasm - GC/DOD Benchmark
+examples/benchmarks/gc_alloc_reuse.pasm - GC Benchmark
 
 =head1 SYNOPSIS
 
@@ -20,7 +20,7 @@
 
 =item * the total number of bytes allocated
 
-=item * the total of DOD runs made
+=item * the total of GC runs made
 
 =item * the total number of collection runs made
 
@@ -58,7 +58,7 @@
 	interpinfo I1, 2
 	print "A total of "
 	print I1
-	print " DOD runs were made\n"
+	print " GC runs were made\n"
 
 	interpinfo I1, 3
 	print "A total of "

Modified: branches/vtable_morph_change/examples/benchmarks/gc_generations.pasm
==============================================================================
--- branches/vtable_morph_change/examples/benchmarks/gc_generations.pasm	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/examples/benchmarks/gc_generations.pasm	Wed Feb 11 00:44:34 2009	(r36563)
@@ -3,7 +3,7 @@
 
 =head1 NAME
 
-examples/benchmarks/gc_generations.pasm - GC/DOD Benchmark
+examples/benchmarks/gc_generations.pasm - GC Benchmark
 
 =head1 SYNOPSIS
 
@@ -20,7 +20,7 @@
 
 =item * the total number of bytes allocated
 
-=item * the total of DOD runs made
+=item * the total of GC runs made
 
 =item * the total number of collection runs made
 
@@ -96,7 +96,7 @@
 	interpinfo I1, 2
 	print "A total of "
 	print I1
-	print " DOD runs were made\n"
+	print " GC runs were made\n"
 
 	interpinfo I1, 3
 	print "A total of "

Modified: branches/vtable_morph_change/examples/benchmarks/gc_header_new.pasm
==============================================================================
--- branches/vtable_morph_change/examples/benchmarks/gc_header_new.pasm	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/examples/benchmarks/gc_header_new.pasm	Wed Feb 11 00:44:34 2009	(r36563)
@@ -3,7 +3,7 @@
 
 =head1 NAME
 
-examples/benchmarks/gc_header_new.pasm - GC/DOD Benchmark
+examples/benchmarks/gc_header_new.pasm - GC Benchmark
 
 =head1 SYNOPSIS
 
@@ -20,7 +20,7 @@
 
 =item * the total number of bytes allocated
 
-=item * the total of DOD runs made
+=item * the total of GC runs made
 
 =item * the total number of collection runs made
 
@@ -100,7 +100,7 @@
 	interpinfo I1, 2
 	print "A total of "
 	print I1
-	print " DOD runs were made\n"
+	print " GC runs were made\n"
 
 	interpinfo I1, 3
 	print "A total of "

Modified: branches/vtable_morph_change/examples/benchmarks/gc_header_reuse.pasm
==============================================================================
--- branches/vtable_morph_change/examples/benchmarks/gc_header_reuse.pasm	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/examples/benchmarks/gc_header_reuse.pasm	Wed Feb 11 00:44:34 2009	(r36563)
@@ -3,7 +3,7 @@
 
 =head1 NAME
 
-examples/benchmarks/gc_header_reuse.pasm - GC/DOD Benchmark
+examples/benchmarks/gc_header_reuse.pasm - GC Benchmark
 
 =head1 SYNOPSIS
 
@@ -19,7 +19,7 @@
 
 =item * the total number of bytes allocated
 
-=item * the total of DOD runs made
+=item * the total of GC runs made
 
 =item * the total number of collection runs made
 
@@ -65,7 +65,7 @@
 	interpinfo I1, 2
 	print "A total of "
 	print I1
-	print " DOD runs were made\n"
+	print " GC runs were made\n"
 
 	interpinfo I1, 3
 	print "A total of "

Modified: branches/vtable_morph_change/examples/benchmarks/gc_waves_headers.pasm
==============================================================================
--- branches/vtable_morph_change/examples/benchmarks/gc_waves_headers.pasm	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/examples/benchmarks/gc_waves_headers.pasm	Wed Feb 11 00:44:34 2009	(r36563)
@@ -3,7 +3,7 @@
 
 =head1 NAME
 
-examples/benchmarks/gc_waves_headers.pasm - GC/DOD Benchmark
+examples/benchmarks/gc_waves_headers.pasm - GC Benchmark
 
 =head1 SYNOPSIS
 
@@ -20,7 +20,7 @@
 
 =item * the total number of bytes allocated
 
-=item * the total of DOD runs made
+=item * the total of GC runs made
 
 =item * the total number of collection runs made
 
@@ -77,7 +77,7 @@
 	interpinfo I1, 2
 	print "A total of "
 	print I1
-	print " DOD runs were made\n"
+	print " GC runs were made\n"
 
 	interpinfo I1, 3
 	print "A total of "

Modified: branches/vtable_morph_change/examples/benchmarks/gc_waves_sizeable_data.pasm
==============================================================================
--- branches/vtable_morph_change/examples/benchmarks/gc_waves_sizeable_data.pasm	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/examples/benchmarks/gc_waves_sizeable_data.pasm	Wed Feb 11 00:44:34 2009	(r36563)
@@ -3,7 +3,7 @@
 
 =head1 NAME
 
-examples/benchmarks/gc_waves_sizeable_data.pasm - GC/DOD Benchmark
+examples/benchmarks/gc_waves_sizeable_data.pasm - GC Benchmark
 
 =head1 SYNOPSIS
 
@@ -20,7 +20,7 @@
 
 =item * the total number of bytes allocated
 
-=item * the total of DOD runs made
+=item * the total of GC runs made
 
 =item * the total number of collection runs made
 
@@ -97,7 +97,7 @@
 	interpinfo I1, 2
 	print "A total of "
 	print I1
-	print " DOD runs were made\n"
+	print " GC runs were made\n"
 
 	interpinfo I1, 3
 	print "A total of "

Modified: branches/vtable_morph_change/examples/benchmarks/gc_waves_sizeable_headers.pasm
==============================================================================
--- branches/vtable_morph_change/examples/benchmarks/gc_waves_sizeable_headers.pasm	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/examples/benchmarks/gc_waves_sizeable_headers.pasm	Wed Feb 11 00:44:34 2009	(r36563)
@@ -3,7 +3,7 @@
 
 =head1 NAME
 
-examples/benchmarks/gc_waves_sizeable_headers.pasm - GC/DOD Benchmark
+examples/benchmarks/gc_waves_sizeable_headers.pasm - GC Benchmark
 
 =head1 SYNOPSIS
 
@@ -20,7 +20,7 @@
 
 =item * the total number of bytes allocated
 
-=item * the total of DOD runs made
+=item * the total of GC runs made
 
 =item * the total number of collection runs made
 
@@ -88,7 +88,7 @@
 	interpinfo I1, 2
 	print "A total of "
 	print I1
-	print " DOD runs were made\n"
+	print " GC runs were made\n"
 
 	interpinfo I1, 3
 	print "A total of "

Modified: branches/vtable_morph_change/examples/benchmarks/stress.pasm
==============================================================================
--- branches/vtable_morph_change/examples/benchmarks/stress.pasm	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/examples/benchmarks/stress.pasm	Wed Feb 11 00:44:34 2009	(r36563)
@@ -12,7 +12,7 @@
 =head1 DESCRIPTION
 
 Creates 50 arrays with 10000 elements each, and then prints out the
-total number of DOD runs made.
+total number of GC runs made.
 
 =cut
 
@@ -49,7 +49,7 @@
 	interpinfo I1, 2
 	print "A total of "
 	print I1
-	print " DOD runs were made\n"
+	print " GC runs were made\n"
 
 	end
 

Modified: branches/vtable_morph_change/examples/benchmarks/stress1.pasm
==============================================================================
--- branches/vtable_morph_change/examples/benchmarks/stress1.pasm	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/examples/benchmarks/stress1.pasm	Wed Feb 11 00:44:34 2009	(r36563)
@@ -12,7 +12,7 @@
 =head1 DESCRIPTION
 
 Creates 500 arrays with 20000 elements each. Prints out the number of
-DOD runs made.
+GC runs made.
 
 =cut
 
@@ -53,7 +53,7 @@
 	interpinfo I1, 2
 	print "\nA total of "
 	print I1
-	print " DOD runs were made\n"
+	print " GC runs were made\n"
 
 	dec I20
 	if I20, mloop

Modified: branches/vtable_morph_change/examples/benchmarks/stress3.pasm
==============================================================================
--- branches/vtable_morph_change/examples/benchmarks/stress3.pasm	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/examples/benchmarks/stress3.pasm	Wed Feb 11 00:44:34 2009	(r36563)
@@ -15,7 +15,7 @@
 
 =over 4
 
-=item * the total number of DOD runs made
+=item * the total number of GC runs made
 
 =item * the number of active PMCs
 
@@ -61,7 +61,7 @@
 	interpinfo I1, 2
 	print "A total of "
 	print I1
-	print " DOD runs were made\n"
+	print " GC runs were made\n"
 	interpinfo I1, 4
 	print I1
 	print " active PMCs\n"

Modified: branches/vtable_morph_change/examples/library/ncurses_life.pir
==============================================================================
--- branches/vtable_morph_change/examples/library/ncurses_life.pir	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/examples/library/ncurses_life.pir	Wed Feb 11 00:44:34 2009	(r36563)
@@ -180,7 +180,7 @@
     interpinfo $I1, 2
     print "A total of "
     print $I1
-    say " DOD runs were made"
+    say " GC runs were made"
 
     interpinfo $I1, 3
     print "A total of "

Modified: branches/vtable_morph_change/examples/pir/life.pir
==============================================================================
--- branches/vtable_morph_change/examples/pir/life.pir	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/examples/pir/life.pir	Wed Feb 11 00:44:34 2009	(r36563)
@@ -111,7 +111,7 @@
 	interpinfo $I1, 2
 	print "A total of "
 	print $I1
-	print " DOD runs were made\n"
+	print " GC runs were made\n"
 
 	interpinfo $I1, 3
 	print "A total of "

Modified: branches/vtable_morph_change/examples/pir/thr-primes.pir
==============================================================================
--- branches/vtable_morph_change/examples/pir/thr-primes.pir	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/examples/pir/thr-primes.pir	Wed Feb 11 00:44:34 2009	(r36563)
@@ -55,8 +55,8 @@
 # translate to PIR by leo
 
 # Runs here (i386/linux 256MB mem) w.
-#  ARENA_DOD_FLAGS = 1    MAX=500   (~  95 threads)
-#  ARENA_DOD_FLAGS = 0    MAX=1000  (~ 168 threads)
+#  ARENA_GC_FLAGS = 1    MAX=500   (~  95 threads)
+#  ARENA_GC_FLAGS = 0    MAX=1000  (~ 168 threads)
 
 
 .sub _main

Modified: branches/vtable_morph_change/include/parrot/gc_api.h
==============================================================================
--- branches/vtable_morph_change/include/parrot/gc_api.h	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/include/parrot/gc_api.h	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/include/parrot/gc_mark_sweep.h
==============================================================================
--- branches/vtable_morph_change/include/parrot/gc_mark_sweep.h	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/include/parrot/gc_mark_sweep.h	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/include/parrot/interpreter.h
==============================================================================
--- branches/vtable_morph_change/include/parrot/interpreter.h	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/include/parrot/interpreter.h	Wed Feb 11 00:44:34 2009	(r36563)
@@ -172,7 +172,7 @@
 
 typedef struct _RunProfile {
     FLOATVAL starttime;
-    FLOATVAL dod_time;
+    FLOATVAL gc_time;
     opcode_t cur_op;
     ProfData *data;
 } RunProfile;

Modified: branches/vtable_morph_change/include/parrot/resources.h
==============================================================================
--- branches/vtable_morph_change/include/parrot/resources.h	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/include/parrot/resources.h	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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

Modified: branches/vtable_morph_change/languages/lua/src/pmc/luatable.pmc
==============================================================================
--- branches/vtable_morph_change/languages/lua/src/pmc/luatable.pmc	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/languages/lua/src/pmc/luatable.pmc	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/languages/lua/src/pmc/luauserdata.pmc
==============================================================================
--- branches/vtable_morph_change/languages/lua/src/pmc/luauserdata.pmc	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/languages/lua/src/pmc/luauserdata.pmc	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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;
     }
 
 }

Deleted: branches/vtable_morph_change/lib/Parrot/Docs/Section/BigNum.pm
==============================================================================
--- branches/vtable_morph_change/lib/Parrot/Docs/Section/BigNum.pm	Wed Feb 11 00:44:34 2009	(r36562)
+++ /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/vtable_morph_change/lib/Parrot/Docs/Section/Parrot.pm
==============================================================================
--- branches/vtable_morph_change/lib/Parrot/Docs/Section/Parrot.pm	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/lib/Parrot/Docs/Section/Parrot.pm	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/lib/Parrot/Manifest.pm
==============================================================================
--- branches/vtable_morph_change/lib/Parrot/Manifest.pm	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/lib/Parrot/Manifest.pm	Wed Feb 11 00:44:34 2009	(r36563)
@@ -160,7 +160,6 @@
         docs/compiler_faq.pod                           [devel]doc
         docs/configuration.pod                          [devel]doc
         docs/debug.pod                                  [devel]doc
-        docs/dev/dod.pod                                [devel]doc
         docs/dev/events.pod                             [devel]doc
         docs/dev/fhs.pod                                [devel]doc
         docs/dev/infant.pod                             [devel]doc

Modified: branches/vtable_morph_change/src/events.c
==============================================================================
--- branches/vtable_morph_change/src/events.c	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/src/events.c	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/src/gc/api.c
==============================================================================
--- branches/vtable_morph_change/src/gc/api.c	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/src/gc/api.c	Wed Feb 11 00:44:34 2009	(r36563)
@@ -13,7 +13,7 @@
 may operate very differently internally. The functions in this file can be used
 throughtout Parrot without having to be concerned about the internal operations
 of the GC. This is documented in PDD 9 with supplementary notes in
-F<docs/dev/dod.pod> and F<docs/memory_internals.pod>.
+F<docs/memory_internals.pod>.
 
 =head1 FUNCTIONS
 
@@ -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);
 }
@@ -523,8 +523,7 @@
 
 =head1 SEE ALSO
 
-F<include/parrot/gc_api.h>, F<src/cpu_dep.c>, F<docs/dev/dod.dev> and
-F<docs/pdds/pdd09_gc.pod>.
+F<include/parrot/gc_api.h>, F<src/cpu_dep.c> and F<docs/pdds/pdd09_gc.pod>.
 
 =head1 HISTORY
 

Modified: branches/vtable_morph_change/src/gc/generational_ms.c
==============================================================================
--- branches/vtable_morph_change/src/gc/generational_ms.c	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/src/gc/generational_ms.c	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/src/gc/incremental_ms.c
==============================================================================
--- branches/vtable_morph_change/src/gc/incremental_ms.c	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/src/gc/incremental_ms.c	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/src/gc/mark_sweep.c
==============================================================================
--- branches/vtable_morph_change/src/gc/mark_sweep.c	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/src/gc/mark_sweep.c	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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);
             }
@@ -603,7 +603,7 @@
     Arenas *arena_base;
 
     /*
-     * If the object is shared, we have to use the arena and dod
+     * If the object is shared, we have to use the arena and gc
      * pointers of the originating interpreter.
      *
      * We are possibly changing another interpreter's data here, so
@@ -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 gc
      * 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/vtable_morph_change/src/gc/pools.c
==============================================================================
--- branches/vtable_morph_change/src/gc/pools.c	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/src/gc/pools.c	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/src/gc/resources.c
==============================================================================
--- branches/vtable_morph_change/src/gc/resources.c	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/src/gc/resources.c	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/src/inter_create.c
==============================================================================
--- branches/vtable_morph_change/src/inter_create.c	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/src/inter_create.c	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/src/inter_misc.c
==============================================================================
--- branches/vtable_morph_change/src/inter_misc.c	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/src/inter_misc.c	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/src/io/portable.c
==============================================================================
--- branches/vtable_morph_change/src/io/portable.c	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/src/io/portable.c	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/src/io/unix.c
==============================================================================
--- branches/vtable_morph_change/src/io/unix.c	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/src/io/unix.c	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/src/io/win32.c
==============================================================================
--- branches/vtable_morph_change/src/io/win32.c	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/src/io/win32.c	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/src/ops/core.ops
==============================================================================
--- branches/vtable_morph_change/src/ops/core.ops	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/src/ops/core.ops	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/src/pmc/filehandle.pmc
==============================================================================
--- branches/vtable_morph_change/src/pmc/filehandle.pmc	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/src/pmc/filehandle.pmc	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/src/pmc/parrotinterpreter.pmc
==============================================================================
--- branches/vtable_morph_change/src/pmc/parrotinterpreter.pmc	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/src/pmc/parrotinterpreter.pmc	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/src/pmc_freeze.c
==============================================================================
--- branches/vtable_morph_change/src/pmc_freeze.c	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/src/pmc_freeze.c	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/src/runops_cores.c
==============================================================================
--- branches/vtable_morph_change/src/runops_cores.c	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/src/runops_cores.c	Wed Feb 11 00:44:34 2009	(r36563)
@@ -346,12 +346,13 @@
 runops_trace_core(PARROT_INTERP, ARGIN(opcode_t *pc))
 {
     ASSERT_ARGS(runops_trace_core)
-    static size_t dod, gc;
+
+    static size_t  gc_runs, collect_runs;
     Arenas * const arena_base = interp->arena_base;
-    Interp *debugger;
+    Interp        *debugger;
 
-    dod = arena_base->dod_runs;
-    gc = arena_base->collect_runs;
+    gc_runs      = arena_base->gc_runs;
+    collect_runs = arena_base->collect_runs;
     if (interp->pdb) {
         debugger = interp->pdb->debugger;
         PARROT_ASSERT(debugger);
@@ -398,13 +399,13 @@
         DO_OP(pc, interp);
         trace_op(interp, code_start, code_end, pc);
 
-        if (dod != arena_base->dod_runs) {
-            dod = arena_base->dod_runs;
+        if (gc_runs != arena_base->gc_runs) {
+            gc_runs = arena_base->gc_runs;
             Parrot_io_eprintf(debugger, "       DOD\n");
         }
 
-        if (gc != arena_base->collect_runs) {
-            gc = arena_base->collect_runs;
+        if (collect_runs != arena_base->collect_runs) {
+            collect_runs  = arena_base->collect_runs;
             Parrot_io_eprintf(debugger, "       GC\n");
         }
     }
@@ -477,7 +478,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 +570,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/vtable_morph_change/src/stacks.c
==============================================================================
--- branches/vtable_morph_change/src/stacks.c	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/src/stacks.c	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/src/string/api.c
==============================================================================
--- branches/vtable_morph_change/src/string/api.c	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/src/string/api.c	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/src/thread.c
==============================================================================
--- branches/vtable_morph_change/src/thread.c	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/src/thread.c	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/t/benchmark/benchmarks.t
==============================================================================
--- branches/vtable_morph_change/t/benchmark/benchmarks.t	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/t/benchmark/benchmarks.t	Wed Feb 11 00:44:34 2009	(r36563)
@@ -52,10 +52,6 @@
 \n
 1\s\*\s1000\s=\s1000\n
 100\s\*\s1000\s=\s100000\n
-IntList:\s\d+\.\d+s\n
-\n
-1\s\*\s1000\s=\s1000\n
-100\s\*\s1000\s=\s100000\n
 ResizableFloatArray:\s\d+\.\d+s\n
 \n
 1\s\*\s1000\s=\s1000\n

Modified: branches/vtable_morph_change/t/native_pbc/integer.t
==============================================================================
--- branches/vtable_morph_change/t/native_pbc/integer.t	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/t/native_pbc/integer.t	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/t/native_pbc/number.t
==============================================================================
--- branches/vtable_morph_change/t/native_pbc/number.t	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/t/native_pbc/number.t	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/t/native_pbc/string.t
==============================================================================
--- branches/vtable_morph_change/t/native_pbc/string.t	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/t/native_pbc/string.t	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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

Deleted: branches/vtable_morph_change/t/src/compiler.t
==============================================================================
--- branches/vtable_morph_change/t/src/compiler.t	Wed Feb 11 00:44:34 2009	(r36562)
+++ /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 */
-    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/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 */
-    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/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 */
-    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/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 */
-    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/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 */
-    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:

Copied: branches/vtable_morph_change/t/src/embed.t (from r36562, trunk/t/src/embed.t)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/vtable_morph_change/t/src/embed.t	Wed Feb 11 00:44:34 2009	(r36563, copy of r36562, 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/vtable_morph_change/tools/dev/mk_native_pbc
==============================================================================
--- branches/vtable_morph_change/tools/dev/mk_native_pbc	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/tools/dev/mk_native_pbc	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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/vtable_morph_change/tools/dev/pbc_to_exe.pir
==============================================================================
--- branches/vtable_morph_change/tools/dev/pbc_to_exe.pir	Tue Feb 10 23:51:56 2009	(r36562)
+++ branches/vtable_morph_change/tools/dev/pbc_to_exe.pir	Wed Feb 11 00:44:34 2009	(r36563)
@@ -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
 
 


More information about the parrot-commits mailing list