[svn:parrot] r43633 - in branches/gc_encapsulate: . compilers/data_json compilers/imcc compilers/json compilers/nqp compilers/nqp/bootstrap compilers/nqp/t compilers/pct compilers/pct/src compilers/pge compilers/pirc compilers/pirc/src compilers/pirc/t compilers/tge config/auto config/auto/alignptrs config/auto/byteorder config/auto/cpu/i386 config/gen config/gen/config_h config/gen/config_pm config/gen/makefiles config/gen/platform config/init/hints docs docs/book/pir docs/pdds/draft docs/pmc docs/project docs/user/pir examples/config/file ext/nqp-rx include/parrot lib/Parrot lib/Parrot/Configure lib/Parrot/Configure/Options/Test lib/Parrot/Configure/Step lib/Parrot/Docs/Section lib/Parrot/Harness ports/fedora runtime/parrot/library runtime/parrot/library/Getopt src src/io src/pmc src/string t t/codingstd t/compilers/imcc/syn t/configure/testlib t/native_pbc t/op t/pharness t/pmc t/steps/auto t/steps/gen t/tools/install t/tools/ops2pm t/tools/pmc2cutils tools/build tools/dev tools/util

bacek at svn.parrot.org bacek at svn.parrot.org
Thu Jan 28 09:35:38 UTC 2010


Author: bacek
Date: Thu Jan 28 09:35:26 2010
New Revision: 43633
URL: https://trac.parrot.org/parrot/changeset/43633

Log:
Sync branch with trunk

Added:
   branches/gc_encapsulate/compilers/data_json/Defines.mak
   branches/gc_encapsulate/compilers/data_json/Rules.mak
   branches/gc_encapsulate/compilers/imcc/Defines.mak
   branches/gc_encapsulate/compilers/imcc/Rules.mak
   branches/gc_encapsulate/compilers/json/Defines.mak
   branches/gc_encapsulate/compilers/json/Rules.mak
   branches/gc_encapsulate/compilers/nqp/Defines.mak
   branches/gc_encapsulate/compilers/nqp/Rules.mak
   branches/gc_encapsulate/compilers/pct/Defines.mak
   branches/gc_encapsulate/compilers/pct/Rules.mak
   branches/gc_encapsulate/compilers/pge/Defines.mak
   branches/gc_encapsulate/compilers/pge/Rules.mak
   branches/gc_encapsulate/compilers/pirc/Defines.mak
   branches/gc_encapsulate/compilers/pirc/Rules.mak
   branches/gc_encapsulate/compilers/tge/Defines.mak
   branches/gc_encapsulate/compilers/tge/Rules.mak
   branches/gc_encapsulate/ext/nqp-rx/Defines.mak
   branches/gc_encapsulate/ext/nqp-rx/Rules.mak
   branches/gc_encapsulate/lib/Parrot/H2inc.pm
   branches/gc_encapsulate/ports/fedora/parrot.patch
      - copied, changed from r43481, branches/gc_encapsulate/ports/fedora/parrot-1.x.0.patch
   branches/gc_encapsulate/runtime/parrot/library/Rules.mak
   branches/gc_encapsulate/t/op/trans_old.t
      - copied, changed from r43481, branches/gc_encapsulate/t/op/trans.t
   branches/gc_encapsulate/tools/build/dynpmc.pl
      - copied, changed from r43481, branches/gc_encapsulate/config/gen/makefiles/dynpmc_pl.in
   branches/gc_encapsulate/tools/build/h2inc.pl
Deleted:
   branches/gc_encapsulate/config/auto/alignptrs.pm
   branches/gc_encapsulate/config/auto/alignptrs/test_c.in
   branches/gc_encapsulate/config/auto/cpu/i386/Makefile
   branches/gc_encapsulate/config/auto/cpu/i386/memcpy_mmx.c
   branches/gc_encapsulate/config/auto/cpu/i386/memcpy_mmx_in.c
   branches/gc_encapsulate/config/auto/cpu/i386/memcpy_sse.c
   branches/gc_encapsulate/config/auto/cpu/i386/memcpy_sse_in.c
   branches/gc_encapsulate/config/gen/makefiles/data_json.in
   branches/gc_encapsulate/config/gen/makefiles/dynoplibs_pl.in
   branches/gc_encapsulate/config/gen/makefiles/dynpmc_pl.in
   branches/gc_encapsulate/config/gen/makefiles/json.in
   branches/gc_encapsulate/config/gen/makefiles/nqp-rx.in
   branches/gc_encapsulate/config/gen/makefiles/nqp.in
   branches/gc_encapsulate/config/gen/makefiles/pct.in
   branches/gc_encapsulate/config/gen/makefiles/pge.in
   branches/gc_encapsulate/config/gen/makefiles/pirc.in
   branches/gc_encapsulate/config/gen/makefiles/tge.in
   branches/gc_encapsulate/config/gen/parrot_include.pm
   branches/gc_encapsulate/ports/fedora/parrot-1.x.0.patch
   branches/gc_encapsulate/t/steps/auto/alignptrs-01.t
   branches/gc_encapsulate/t/steps/auto/alignptrs-02.t
   branches/gc_encapsulate/t/steps/gen/parrot_include-01.t
   branches/gc_encapsulate/t/tools/pmc2cutils/00-qualify.t
Modified:
   branches/gc_encapsulate/ChangeLog
   branches/gc_encapsulate/Configure.pl
   branches/gc_encapsulate/DEPRECATED.pod
   branches/gc_encapsulate/MANIFEST
   branches/gc_encapsulate/MANIFEST.SKIP
   branches/gc_encapsulate/MANIFEST.generated
   branches/gc_encapsulate/META.yml
   branches/gc_encapsulate/NEWS
   branches/gc_encapsulate/PBC_COMPAT
   branches/gc_encapsulate/PLATFORMS
   branches/gc_encapsulate/README
   branches/gc_encapsulate/VERSION
   branches/gc_encapsulate/compilers/imcc/imcc.l
   branches/gc_encapsulate/compilers/imcc/imcc.y
   branches/gc_encapsulate/compilers/imcc/imclexer.c
   branches/gc_encapsulate/compilers/imcc/imcparser.c
   branches/gc_encapsulate/compilers/nqp/bootstrap/nqp.pir
   branches/gc_encapsulate/compilers/nqp/nqp.pir
   branches/gc_encapsulate/compilers/nqp/t/01-literals.t
   branches/gc_encapsulate/compilers/nqp/t/02-if-else.t
   branches/gc_encapsulate/compilers/nqp/t/02-if.t
   branches/gc_encapsulate/compilers/nqp/t/03-unless.t
   branches/gc_encapsulate/compilers/nqp/t/04-comments.t
   branches/gc_encapsulate/compilers/nqp/t/05-pod.t
   branches/gc_encapsulate/compilers/nqp/t/06-args-pos.t
   branches/gc_encapsulate/compilers/nqp/t/07-boolean.t
   branches/gc_encapsulate/compilers/nqp/t/08-blocks.t
   branches/gc_encapsulate/compilers/nqp/t/09-var.t
   branches/gc_encapsulate/compilers/nqp/t/10-sub.t
   branches/gc_encapsulate/compilers/nqp/t/11-cmp.t
   branches/gc_encapsulate/compilers/nqp/t/12-list.t
   branches/gc_encapsulate/compilers/nqp/t/13-logical.t
   branches/gc_encapsulate/compilers/nqp/t/14-op.t
   branches/gc_encapsulate/compilers/nqp/t/15-module.t
   branches/gc_encapsulate/compilers/nqp/t/16-while.t
   branches/gc_encapsulate/compilers/nqp/t/17-class.t
   branches/gc_encapsulate/compilers/nqp/t/18-inline.t
   branches/gc_encapsulate/compilers/nqp/t/19-hash_access.t
   branches/gc_encapsulate/compilers/nqp/t/20-list_access.t
   branches/gc_encapsulate/compilers/nqp/t/22-optional_args.t
   branches/gc_encapsulate/compilers/nqp/t/23-named_args.t
   branches/gc_encapsulate/compilers/nqp/t/24-scalar_context.t
   branches/gc_encapsulate/compilers/nqp/t/25-list_context.t
   branches/gc_encapsulate/compilers/nqp/t/26-method_ops.t
   branches/gc_encapsulate/compilers/nqp/t/27-ternary.t
   branches/gc_encapsulate/compilers/nqp/t/28-return.t
   branches/gc_encapsulate/compilers/nqp/t/29-self.t
   branches/gc_encapsulate/compilers/nqp/t/30-subclass.t
   branches/gc_encapsulate/compilers/nqp/t/harness
   branches/gc_encapsulate/compilers/pct/src/PAST.pir
   branches/gc_encapsulate/compilers/pirc/src/bcgen.c
   branches/gc_encapsulate/compilers/pirc/src/bcgen.h
   branches/gc_encapsulate/compilers/pirc/t/basic.t
   branches/gc_encapsulate/compilers/pirc/t/harness
   branches/gc_encapsulate/compilers/pirc/t/heredoc.t
   branches/gc_encapsulate/compilers/pirc/t/macro.t
   branches/gc_encapsulate/compilers/pirc/t/stmts.t
   branches/gc_encapsulate/compilers/pirc/t/subflags.t
   branches/gc_encapsulate/compilers/tge/TGE.pir
   branches/gc_encapsulate/config/auto/byteorder/test_c.in
   branches/gc_encapsulate/config/auto/cgoto.pm
   branches/gc_encapsulate/config/auto/cpu/i386/auto.pm
   branches/gc_encapsulate/config/auto/gc.pm
   branches/gc_encapsulate/config/auto/icu.pm
   branches/gc_encapsulate/config/auto/pmc.pm
   branches/gc_encapsulate/config/gen/config_h/config_h.in
   branches/gc_encapsulate/config/gen/config_pm/myconfig.in
   branches/gc_encapsulate/config/gen/makefiles.pm
   branches/gc_encapsulate/config/gen/makefiles/docs.in
   branches/gc_encapsulate/config/gen/makefiles/dynoplibs.in
   branches/gc_encapsulate/config/gen/makefiles/dynpmc.in
   branches/gc_encapsulate/config/gen/makefiles/editor.in
   branches/gc_encapsulate/config/gen/makefiles/ext.in
   branches/gc_encapsulate/config/gen/makefiles/root.in
   branches/gc_encapsulate/config/gen/platform/platform_interface.h
   branches/gc_encapsulate/config/init/hints/openbsd.pm
   branches/gc_encapsulate/docs/book/pir/ch06_subroutines.pod
   branches/gc_encapsulate/docs/embed.pod
   branches/gc_encapsulate/docs/extend.pod
   branches/gc_encapsulate/docs/intro.pod
   branches/gc_encapsulate/docs/parrothist.pod
   branches/gc_encapsulate/docs/pdds/draft/pdd11_extending.pod
   branches/gc_encapsulate/docs/pdds/draft/pdd16_native_call.pod
   branches/gc_encapsulate/docs/pmc/subs.pod
   branches/gc_encapsulate/docs/project/release_manager_guide.pod
   branches/gc_encapsulate/docs/submissions.pod
   branches/gc_encapsulate/docs/user/pir/intro.pod
   branches/gc_encapsulate/examples/config/file/configcompiler
   branches/gc_encapsulate/examples/config/file/configwithfatalstep
   branches/gc_encapsulate/include/parrot/extend.h
   branches/gc_encapsulate/include/parrot/hash.h
   branches/gc_encapsulate/include/parrot/list.h
   branches/gc_encapsulate/include/parrot/packfile.h
   branches/gc_encapsulate/include/parrot/parrot.h
   branches/gc_encapsulate/include/parrot/pmc_freeze.h
   branches/gc_encapsulate/include/parrot/string_funcs.h
   branches/gc_encapsulate/lib/Parrot/Configure/Compiler.pm
   branches/gc_encapsulate/lib/Parrot/Configure/Options/Test/Prepare.pm
   branches/gc_encapsulate/lib/Parrot/Configure/Step/List.pm
   branches/gc_encapsulate/lib/Parrot/Docs/Section/Tools.pm
   branches/gc_encapsulate/lib/Parrot/Harness/Options.pm
   branches/gc_encapsulate/ports/fedora/parrot.spec.fedora
   branches/gc_encapsulate/runtime/parrot/library/Getopt/Obj.pir
   branches/gc_encapsulate/runtime/parrot/library/distutils.pir
   branches/gc_encapsulate/src/embed.c
   branches/gc_encapsulate/src/extend.c
   branches/gc_encapsulate/src/frame_builder.h
   branches/gc_encapsulate/src/hash.c
   branches/gc_encapsulate/src/io/buffer.c
   branches/gc_encapsulate/src/list.c
   branches/gc_encapsulate/src/nci_test.c
   branches/gc_encapsulate/src/packfile.c
   branches/gc_encapsulate/src/pmc/array.pmc
   branches/gc_encapsulate/src/pmc/class.pmc
   branches/gc_encapsulate/src/pmc/continuation.pmc
   branches/gc_encapsulate/src/pmc/coroutine.pmc
   branches/gc_encapsulate/src/pmc/default.pmc
   branches/gc_encapsulate/src/pmc/eval.pmc
   branches/gc_encapsulate/src/pmc/fixedbooleanarray.pmc
   branches/gc_encapsulate/src/pmc/fixedintegerarray.pmc
   branches/gc_encapsulate/src/pmc/fixedpmcarray.pmc
   branches/gc_encapsulate/src/pmc/fixedstringarray.pmc
   branches/gc_encapsulate/src/pmc/float.pmc
   branches/gc_encapsulate/src/pmc/hash.pmc
   branches/gc_encapsulate/src/pmc/integer.pmc
   branches/gc_encapsulate/src/pmc/key.pmc
   branches/gc_encapsulate/src/pmc/lexinfo.pmc
   branches/gc_encapsulate/src/pmc/object.pmc
   branches/gc_encapsulate/src/pmc/orderedhash.pmc
   branches/gc_encapsulate/src/pmc/orderedhashiterator.pmc
   branches/gc_encapsulate/src/pmc/parrotinterpreter.pmc
   branches/gc_encapsulate/src/pmc/parrotthread.pmc
   branches/gc_encapsulate/src/pmc/resizablebooleanarray.pmc
   branches/gc_encapsulate/src/pmc/resizableintegerarray.pmc
   branches/gc_encapsulate/src/pmc/scheduler.pmc
   branches/gc_encapsulate/src/pmc/schedulermessage.pmc
   branches/gc_encapsulate/src/pmc/string.pmc
   branches/gc_encapsulate/src/pmc/sub.pmc
   branches/gc_encapsulate/src/pmc/task.pmc
   branches/gc_encapsulate/src/pmc/unmanagedstruct.pmc
   branches/gc_encapsulate/src/pmc_freeze.c
   branches/gc_encapsulate/src/string/api.c
   branches/gc_encapsulate/t/codingstd/c_function_docs.t
   branches/gc_encapsulate/t/codingstd/copyright.t
   branches/gc_encapsulate/t/compilers/imcc/syn/macro.t
   branches/gc_encapsulate/t/configure/testlib/adefectivefoobar
   branches/gc_encapsulate/t/configure/testlib/bdefectivefoobar
   branches/gc_encapsulate/t/configure/testlib/cdefectivefoobar
   branches/gc_encapsulate/t/configure/testlib/ddefectivefoobar
   branches/gc_encapsulate/t/configure/testlib/verbosefoobar
   branches/gc_encapsulate/t/harness
   branches/gc_encapsulate/t/native_pbc/annotations.pbc
   branches/gc_encapsulate/t/native_pbc/integer_1.pbc
   branches/gc_encapsulate/t/native_pbc/number_1.pbc
   branches/gc_encapsulate/t/native_pbc/string_1.pbc
   branches/gc_encapsulate/t/op/lexicals.t
   branches/gc_encapsulate/t/op/trans.t
   branches/gc_encapsulate/t/pharness/03-handle_long_options.t
   branches/gc_encapsulate/t/pmc/io.t
   branches/gc_encapsulate/t/pmc/nci.t
   branches/gc_encapsulate/t/pmc/orderedhash.t
   branches/gc_encapsulate/t/tools/install/01-create_directories.t
   branches/gc_encapsulate/t/tools/install/02-install_files.t
   branches/gc_encapsulate/t/tools/install/03-lines_to_files.t
   branches/gc_encapsulate/t/tools/install/dev_overall.t
   branches/gc_encapsulate/t/tools/install/overall.t
   branches/gc_encapsulate/t/tools/ops2pm/00-qualify.t
   branches/gc_encapsulate/t/tools/pmc2cutils/04-dump_pmc.t
   branches/gc_encapsulate/t/tools/pmc2cutils/README
   branches/gc_encapsulate/tools/build/nativecall.pl
   branches/gc_encapsulate/tools/dev/cc_flags.pl
   branches/gc_encapsulate/tools/dev/checkdepend.pl
   branches/gc_encapsulate/tools/dev/install_dev_files.pl
   branches/gc_encapsulate/tools/util/release.json

Modified: branches/gc_encapsulate/ChangeLog
==============================================================================
--- branches/gc_encapsulate/ChangeLog	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/ChangeLog	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,9 @@
 #1 $Id$
 
+2010.01.19     chromatic
+	* Released 2.0.0
+	See NEWS for more.
+
 2009.12.15     Gerd
 	* Released 1.9.0
 	See NEWS for more.

Modified: branches/gc_encapsulate/Configure.pl
==============================================================================
--- branches/gc_encapsulate/Configure.pl	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/Configure.pl	Thu Jan 28 09:35:26 2010	(r43633)
@@ -183,11 +183,7 @@
 
 =item C<--test=build>
 
-Run tests found in F<t/postconfigure/>, F<t/tools/pmc2cutils/>,
-F<t/tools/ops2cutils/> and F<t/tools/ops2pm/> I<after> configuration has
-completed.  These tests demonstrate (a) that certain of Parrot's configuration
-tools are working properly post-configuration; and (b) that certain of
-Parrot's build tools will work properly once you call F<make>.
+Run tests found in F<t/steps/>,  F<t/postconfigure/> and F<t/pharness>.
 
 =item C<--test>
 
@@ -645,7 +641,6 @@
     gen::config_h
     gen::core_pmcs
     gen::crypto
-    gen::parrot_include
     gen::opengl
     gen::call_list
     gen::makefiles

Modified: branches/gc_encapsulate/DEPRECATED.pod
==============================================================================
--- branches/gc_encapsulate/DEPRECATED.pod	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/DEPRECATED.pod	Thu Jan 28 09:35:26 2010	(r43633)
@@ -23,7 +23,7 @@
 you should no longer rely on it.
 
 Whenever deprecated items are removed, information
-regarding how to cope with the removal will be added to
+regarding how to cope with the removal should be added to
 L<https://trac.parrot.org/parrot/wiki/Deprecation>.
 
 When running parrot, you can receive warnings about deprecated opcodes.
@@ -108,13 +108,6 @@
 
 L<https://trac.parrot.org/parrot/ticket/1303>
 
-=item OrderedHash PMC [eligible in 2.1]
-
-This PMC is old, haskish and will be reimplemented with some backward incompatible
-changes in semantic of handling removed elements.
-
-L<https://trac.parrot.org/parrot/ticket/1403>
-
 =item CPointer PMC [eligible in 2.1]
 
 And all uses in the Parrot calling conventions.
@@ -182,10 +175,6 @@
 
 =back
 
-=head1 Class Features
-
-[Nothing at this time.]
-
 =head1 Debugger
 
 Assigning to registers [experimental]
@@ -287,6 +276,11 @@
 
 L<https://trac.parrot.org/parrot/ticket/1069>
 
+=item STRING Out parameters in Parrot_str_* functions [eligible in 2.1]
+
+All STRING modification functions will return a STRING pointer; capture and use
+this rather than relying on in-place modification of an existing pointer.
+
 =back
 
 =head1 Compiler tools
@@ -386,7 +380,7 @@
 
 =over 4
 
-=item tools/build/dynoplibs.pl and tools/build/dynpmc.pl [eligible in 1.1]
+=item tools/build/dynpmc.pl [eligible in 1.1]
 
 Replaced with makefiles.
 
@@ -416,6 +410,16 @@
 
 L<https://trac.parrot.org/parrot/ticket/852>
 
+=item Library name changes [eligible in 2.1]
+
+The use of C<::> a namespace separator is deprecated.  Core libraries will
+change to use multi-level keys instead.  For example, C<Getopt::Obj> will
+change to C<Getopt; Obj>.  Affected libraries include C<Data::Dumper>,
+C<Getopt::Obj>, C<Parrot::Coroutine>, C<SDL>, C<Test::Builder>,
+C<YAML::Dumper>, and C<PCRE::NCI>.
+
+As well, anything under F<examples/> is subject to this change.
+
 =back
 
 =head1 Footnotes

Modified: branches/gc_encapsulate/MANIFEST
==============================================================================
--- branches/gc_encapsulate/MANIFEST	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/MANIFEST	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Thu Jan  7 09:32:27 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Tue Jan 26 00:27:14 2010 UT
 #
 # See below for documentation on the format of this file.
 #
@@ -28,9 +28,13 @@
 RESPONSIBLE_PARTIES                                         [main]doc
 TODO                                                        [devel]doc
 VERSION                                                     [devel]
+compilers/data_json/Defines.mak                             [data_json]
+compilers/data_json/Rules.mak                               [data_json]
 compilers/data_json/data_json.pir                           [data_json]
 compilers/data_json/data_json/grammar.pg                    [data_json]
 compilers/data_json/data_json/pge2pir.tg                    [data_json]
+compilers/imcc/Defines.mak                                  [imcc]
+compilers/imcc/Rules.mak                                    [imcc]
 compilers/imcc/cfg.c                                        [imcc]
 compilers/imcc/cfg.h                                        [imcc]
 compilers/imcc/debug.c                                      [imcc]
@@ -58,9 +62,11 @@
 compilers/imcc/symreg.c                                     [imcc]
 compilers/imcc/symreg.h                                     [imcc]
 compilers/imcc/unit.h                                       [imcc]
+compilers/json/Defines.mak                                  [json]
 compilers/json/JSON.pir                                     [json]
 compilers/json/JSON/grammar.pg                              [json]
 compilers/json/JSON/pge2pir.tg                              [json]
+compilers/json/Rules.mak                                    [json]
 compilers/ncigen/MAINTAINER                                 [ncigen]
 compilers/ncigen/NCIGEN.TODO                                [ncigen]
 compilers/ncigen/NCIGENP6.pm                                [ncigen]
@@ -80,7 +86,9 @@
 compilers/ncigen/t/parse_00.t                               [test]
 compilers/ncigen/t/parse_01.t                               [test]
 compilers/ncigen/t/parse_02.t                               [test]
+compilers/nqp/Defines.mak                                   [nqp]
 compilers/nqp/README.pod                                    []doc
+compilers/nqp/Rules.mak                                     [nqp]
 compilers/nqp/TODO.pod                                      [nqp]
 compilers/nqp/bootstrap/actions.pm                          [nqp]
 compilers/nqp/bootstrap/nqp.pir                             [nqp]
@@ -120,8 +128,10 @@
 compilers/nqp/t/29-self.t                                   [test]
 compilers/nqp/t/30-subclass.t                               [test]
 compilers/nqp/t/harness                                     [test]
+compilers/pct/Defines.mak                                   [pct]
 compilers/pct/PCT.pir                                       [pct]
 compilers/pct/README.pod                                    []doc
+compilers/pct/Rules.mak                                     [pct]
 compilers/pct/src/PAST.pir                                  [pct]
 compilers/pct/src/PAST/Compiler.pir                         [pct]
 compilers/pct/src/PAST/Node.pir                             [pct]
@@ -131,6 +141,7 @@
 compilers/pct/src/PCT/Node.pir                              [pct]
 compilers/pct/src/POST/Compiler.pir                         [pct]
 compilers/pct/src/POST/Node.pir                             [pct]
+compilers/pge/Defines.mak                                   [pge]
 compilers/pge/P6Rule.grammar                                [pge]
 compilers/pge/PGE.pir                                       [pge]
 compilers/pge/PGE/Exp.pir                                   [pge]
@@ -141,8 +152,11 @@
 compilers/pge/PGE/Regex.pir                                 [pge]
 compilers/pge/PGE/builtins.pg                               [pge]
 compilers/pge/README.pod                                    []doc
+compilers/pge/Rules.mak                                     [pge]
 compilers/pge/STATUS                                        [pge]
+compilers/pirc/Defines.mak                                  [pirc]
 compilers/pirc/README.pod                                   []doc
+compilers/pirc/Rules.mak                                    [pirc]
 compilers/pirc/TODO                                         [pirc]
 compilers/pirc/heredoc/heredocmain.c                        [pirc]
 compilers/pirc/macro/lexer.h                                [pirc]
@@ -193,7 +207,9 @@
 compilers/pirc/t/macro.t                                    [test]
 compilers/pirc/t/stmts.t                                    [test]
 compilers/pirc/t/subflags.t                                 [test]
+compilers/tge/Defines.mak                                   [tge]
 compilers/tge/README                                        []doc
+compilers/tge/Rules.mak                                     [tge]
 compilers/tge/TGE.pir                                       [tge]
 compilers/tge/TGE/Compiler.pir                              [tge]
 compilers/tge/TGE/Grammar.pir                               [tge]
@@ -201,8 +217,6 @@
 compilers/tge/TGE/Rule.pir                                  [tge]
 compilers/tge/TGE/Tree.pir                                  [tge]
 compilers/tge/tgc.pir                                       [tge]
-config/auto/alignptrs.pm                                    []
-config/auto/alignptrs/test_c.in                             []
 config/auto/arch.pm                                         []
 config/auto/attributes.pm                                   []
 config/auto/attributes/test_c.in                            []
@@ -214,12 +228,7 @@
 config/auto/cgoto.pm                                        []
 config/auto/cgoto/test_c.in                                 []
 config/auto/cpu.pm                                          []
-config/auto/cpu/i386/Makefile                               []
 config/auto/cpu/i386/auto.pm                                []
-config/auto/cpu/i386/memcpy_mmx.c                           []
-config/auto/cpu/i386/memcpy_mmx_in.c                        []
-config/auto/cpu/i386/memcpy_sse.c                           []
-config/auto/cpu/i386/memcpy_sse_in.c                        []
 config/auto/cpu/i386/test_gcc_cmpxchg_c.in                  []
 config/auto/cpu/ppc/auto.pm                                 []
 config/auto/cpu/ppc/test_gcc_cmpset_c.in                    []
@@ -312,26 +321,15 @@
 config/gen/crypto/digest_t.in                               []
 config/gen/makefiles.pm                                     []
 config/gen/makefiles/CFLAGS.in                              []
-config/gen/makefiles/data_json.in                           []
 config/gen/makefiles/docs.in                                []
 config/gen/makefiles/dynoplibs.in                           []
-config/gen/makefiles/dynoplibs_pl.in                        []
 config/gen/makefiles/dynpmc.in                              []
-config/gen/makefiles/dynpmc_pl.in                           []
 config/gen/makefiles/editor.in                              []
 config/gen/makefiles/ext.in                                 []
-config/gen/makefiles/json.in                                []
-config/gen/makefiles/nqp-rx.in                              []
-config/gen/makefiles/nqp.in                                 []
 config/gen/makefiles/parrot_embed_pl.in                     []
 config/gen/makefiles/parrot_pc.in                           []
-config/gen/makefiles/pct.in                                 []
-config/gen/makefiles/pge.in                                 []
-config/gen/makefiles/pirc.in                                []
 config/gen/makefiles/root.in                                []
-config/gen/makefiles/tge.in                                 []
 config/gen/opengl.pm                                        []
-config/gen/parrot_include.pm                                []
 config/gen/platform.pm                                      []
 config/gen/platform/aix/asm.s                               []
 config/gen/platform/ansi/dl.c                               []
@@ -943,8 +941,10 @@
 ext/SQLite3/test.pir                                        []
 ext/nqp-rx/.gitignore                                       []
 ext/nqp-rx/CREDITS                                          []
+ext/nqp-rx/Defines.mak                                      []
 ext/nqp-rx/LICENSE                                          []
 ext/nqp-rx/README                                           []doc
+ext/nqp-rx/Rules.mak                                        []
 ext/nqp-rx/STATUS                                           []
 ext/nqp-rx/src/stage0/HLL-s0.pir                            []
 ext/nqp-rx/src/stage0/NQP-s0.pir                            []
@@ -1119,6 +1119,7 @@
 lib/Parrot/Docs/Section/Tests.pm                            [devel]lib
 lib/Parrot/Docs/Section/Tools.pm                            [devel]lib
 lib/Parrot/Docs/Text2HTML.pm                                [devel]lib
+lib/Parrot/H2inc.pm                                         [devel]lib
 lib/Parrot/Harness/DefaultTests.pm                          [devel]lib
 lib/Parrot/Harness/Options.pm                               [devel]lib
 lib/Parrot/Harness/Smoke.pm                                 [devel]lib
@@ -1249,6 +1250,7 @@
 runtime/parrot/library/Pg.pir                               [library]
 runtime/parrot/library/Protoobject.pir                      [library]
 runtime/parrot/library/Range.pir                            [library]
+runtime/parrot/library/Rules.mak                            [library]
 runtime/parrot/library/SDL.pir                              [library]
 runtime/parrot/library/SDL/App.pir                          [library]
 runtime/parrot/library/SDL/Button.pir                       [library]
@@ -1843,6 +1845,7 @@
 t/op/time.t                                                 [test]
 t/op/time_old.t                                             [test]
 t/op/trans.t                                                [test]
+t/op/trans_old.t                                            [test]
 t/op/vivify.t                                               [test]
 t/perl/Parrot_Distribution.t                                [test]
 t/perl/Parrot_Docs.t                                        [test]
@@ -1978,8 +1981,6 @@
 t/src/exit.t                                                [test]
 t/src/extend.t                                              [test]
 t/src/warnings.t                                            [test]
-t/steps/auto/alignptrs-01.t                                 [test]
-t/steps/auto/alignptrs-02.t                                 [test]
 t/steps/auto/arch-01.t                                      [test]
 t/steps/auto/attributes-01.t                                [test]
 t/steps/auto/backtrace-01.t                                 [test]
@@ -2028,7 +2029,6 @@
 t/steps/gen/crypto-01.t                                     [test]
 t/steps/gen/makefiles-01.t                                  [test]
 t/steps/gen/opengl-01.t                                     [test]
-t/steps/gen/parrot_include-01.t                             [test]
 t/steps/gen/platform-01.t                                   [test]
 t/steps/init/defaults-01.t                                  [test]
 t/steps/init/headers-01.t                                   [test]
@@ -2122,7 +2122,6 @@
 t/tools/pbc_dump.t                                          [test]
 t/tools/pbc_merge.t                                         [test]
 t/tools/pgegrep.t                                           [test]
-t/tools/pmc2cutils/00-qualify.t                             [test]
 t/tools/pmc2cutils/01-pmc2cutils.t                          [test]
 t/tools/pmc2cutils/02-find_file.t                           [test]
 t/tools/pmc2cutils/03-dump_vtable.t                         [test]
@@ -2133,7 +2132,9 @@
 t/tools/testdata                                            [test]
 tools/build/addopstags.pl                                   []
 tools/build/c2str.pl                                        []
+tools/build/dynpmc.pl                                       []
 tools/build/fixup_gen_file.pl                               []
+tools/build/h2inc.pl                                        []
 tools/build/headerizer.pl                                   []
 tools/build/nativecall.pl                                   []
 tools/build/ops2c.pl                                        [devel]

Modified: branches/gc_encapsulate/MANIFEST.SKIP
==============================================================================
--- branches/gc_encapsulate/MANIFEST.SKIP	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/MANIFEST.SKIP	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,6 +1,6 @@
 # ex: set ro:
 # $Id$
-# generated by tools/dev/mk_manifest_and_skip.pl Wed Dec 16 15:31:13 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Wed Jan 27 09:57:54 2010 UT
 #
 # This file should contain a transcript of the svn:ignore properties
 # of the directories in the Parrot subversion repository. (Needed for
@@ -150,8 +150,6 @@
 ^vtable\.dump$
 ^vtable\.dump/
 # generated from svn:ignore of 'compilers/data_json/'
-^compilers/data_json/Makefile$
-^compilers/data_json/Makefile/
 ^compilers/data_json/data_json\.pbc$
 ^compilers/data_json/data_json\.pbc/
 # generated from svn:ignore of 'compilers/data_json/data_json/'
@@ -170,8 +168,6 @@
 ^compilers/imcc/.*\.tmp/
 ^compilers/imcc/CFLAGS$
 ^compilers/imcc/CFLAGS/
-^compilers/imcc/Makefile$
-^compilers/imcc/Makefile/
 ^compilers/imcc/imcc$
 ^compilers/imcc/imcc/
 ^compilers/imcc/imclexer\.c$
@@ -185,8 +181,6 @@
 # generated from svn:ignore of 'compilers/json/'
 ^compilers/json/JSON\.pbc$
 ^compilers/json/JSON\.pbc/
-^compilers/json/Makefile$
-^compilers/json/Makefile/
 # generated from svn:ignore of 'compilers/json/JSON/'
 ^compilers/json/JSON/.*\.pbc$
 ^compilers/json/JSON/.*\.pbc/
@@ -205,8 +199,6 @@
 ^compilers/ncigen/src/gen_grammar\.pir$
 ^compilers/ncigen/src/gen_grammar\.pir/
 # generated from svn:ignore of 'compilers/nqp/'
-^compilers/nqp/Makefile$
-^compilers/nqp/Makefile/
 ^compilers/nqp/nqp\.pbc$
 ^compilers/nqp/nqp\.pbc/
 # generated from svn:ignore of 'compilers/nqp/bootstrap/'
@@ -217,21 +209,10 @@
 # generated from svn:ignore of 'compilers/nqp/src/'
 ^compilers/nqp/src/Grammar_gen\.pir$
 ^compilers/nqp/src/Grammar_gen\.pir/
-# generated from svn:ignore of 'compilers/pct/'
-^compilers/pct/.*\.pbc$
-^compilers/pct/.*\.pbc/
-^compilers/pct/Makefile$
-^compilers/pct/Makefile/
 # generated from svn:ignore of 'compilers/pct/src/POST/'
 ^compilers/pct/src/POST/Grammar_gen\.pir$
 ^compilers/pct/src/POST/Grammar_gen\.pir/
 # generated from svn:ignore of 'compilers/pge/'
-^compilers/pge/.*\.dylib$
-^compilers/pge/.*\.dylib/
-^compilers/pge/.*\.so$
-^compilers/pge/.*\.so/
-^compilers/pge/Makefile$
-^compilers/pge/Makefile/
 ^compilers/pge/PGE\.pbc$
 ^compilers/pge/PGE\.pbc/
 # generated from svn:ignore of 'compilers/pge/PGE/'
@@ -246,8 +227,6 @@
 ^compilers/pirc/.*\.obj/
 ^compilers/pirc/.*\.pbd$
 ^compilers/pirc/.*\.pbd/
-^compilers/pirc/Makefile$
-^compilers/pirc/Makefile/
 ^compilers/pirc/pirc$
 ^compilers/pirc/pirc/
 ^compilers/pirc/pirc\.exe$
@@ -266,8 +245,8 @@
 ^compilers/pirc/t/subflags_?\.pir$
 ^compilers/pirc/t/subflags_?\.pir/
 # generated from svn:ignore of 'compilers/tge/'
-^compilers/tge/Makefile$
-^compilers/tge/Makefile/
+^compilers/tge/tgc\.pbc$
+^compilers/tge/tgc\.pbc/
 # generated from svn:ignore of 'compilers/tge/TGE/'
 ^compilers/tge/TGE/Parser\.pir$
 ^compilers/tge/TGE/Parser\.pir/
@@ -461,11 +440,6 @@
 # generated from svn:ignore of 'ext/Parrot-Embed/t/'
 ^ext/Parrot-Embed/t/.*\.pbc$
 ^ext/Parrot-Embed/t/.*\.pbc/
-# generated from svn:ignore of 'ext/nqp-rx/'
-^ext/nqp-rx/.*\.pbc$
-^ext/nqp-rx/.*\.pbc/
-^ext/nqp-rx/Makefile$
-^ext/nqp-rx/Makefile/
 # generated from svn:ignore of 'include/parrot/'
 ^include/parrot/.*\.tmp$
 ^include/parrot/.*\.tmp/
@@ -1067,11 +1041,6 @@
 ^t/tools/pmc2c\..*\.h/
 ^t/tools/pmc2c\..*\.pmc$
 ^t/tools/pmc2c\..*\.pmc/
-# generated from svn:ignore of 'tools/build/'
-^tools/build/dynoplibs\.pl$
-^tools/build/dynoplibs\.pl/
-^tools/build/dynpmc\.pl$
-^tools/build/dynpmc\.pl/
 # Local variables:
 #   mode: text
 #   buffer-read-only: t

Modified: branches/gc_encapsulate/MANIFEST.generated
==============================================================================
--- branches/gc_encapsulate/MANIFEST.generated	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/MANIFEST.generated	Thu Jan 28 09:35:26 2010	(r43633)
@@ -2,10 +2,10 @@
 # See tools/dev/install_files.pl for documentation on the
 # format of this file.
 # Please re-sort this file after *EVERY* modification
-blib/lib/libparrot.1.9.0.dylib                    [main]lib
+blib/lib/libparrot.2.0.0.dylib                    [main]lib
 blib/lib/libparrot.a                              [main]lib
 blib/lib/libparrot.dylib                          [main]lib
-blib/lib/libparrot.so.1.9.0                       [main]lib
+blib/lib/libparrot.so.2.0.0                       [main]lib
 blib/lib/libparrot.so                             [main]lib
 compilers/data_json/data_json.pbc                 [data_json]
 compilers/json/JSON.pbc                           [json]

Modified: branches/gc_encapsulate/META.yml
==============================================================================
--- branches/gc_encapsulate/META.yml	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/META.yml	Thu Jan 28 09:35:26 2010	(r43633)
@@ -4,7 +4,7 @@
 # See http://module-build.sourceforge.net/META-spec-current.html for details.
 ---
 name: parrot
-version: 1.9.0
+version: 2.0.0
 author: parrot-dev at lists.parrot.org
 abstract: a virtual machine designed for dynamic languages
 license: artistic2

Modified: branches/gc_encapsulate/NEWS
==============================================================================
--- branches/gc_encapsulate/NEWS	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/NEWS	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,16 +1,29 @@
 # $Id$
 
 New in 2.0.0
-- Functionality
-- Compilers
+- Features
+  + Context PMCs now support attribute-based introspection
+  + Context and CallSignature PMCs merged into CallContext
+  + .lex directive throws exceptions when used with incorrect register types
 - Platforms
+  + Packaging improved for free OS distributions
+  + PPC, PPC64, and ARM now tested when running Linux
 - Performance
+  + Minor improvements to the profiling runcore
+  + Improvements from the CallContext PMC merge
 - New deprecations
-- Realized deprecations
+  + In/out parameters in STRING modification functions
+  + Void handling in NCI signatures
+  + Parameter passing opcodes order in PBC
 - Tests
-- Documentation
+  + Continued migration of core tests from Perl 5 to PIR
 - Tools
+  + dependency checker improved
 - Miscellaneous
+  + Deprecation cycle length changed to three months from six
+  + GC accuracy improved
+  + PMC freeze improvements; much more reliable
+  + Makefile improvements for dependency handling
 
 New in 1.9.0
 - Core

Modified: branches/gc_encapsulate/PBC_COMPAT
==============================================================================
--- branches/gc_encapsulate/PBC_COMPAT	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/PBC_COMPAT	Thu Jan 28 09:35:26 2010	(r43633)
@@ -27,11 +27,7 @@
 
 # please insert tab separated entries at the top of the list
 
-5.6	2009.12.12	bacek	merge CallSignature and Context
-5.4	2009.12.02	bacek	remove CallSignatureReturns
-5.3	2009.10.23	bacek	add CallSignatureReturns
-5.2	2009.09.16	darbelo	remove pic.ops
-5.2	2009.08.06	dukeleto	remove Random PMC
+6.0	2010.01.19	chromatic	released 2.0.0
 5.1	2009.08.06	cotto	remove branch_cs opcode
 5.0	2009.07.21	cotto	released 1.4.0
 4.0	2009.03.17	allison	released 1.0.0

Modified: branches/gc_encapsulate/PLATFORMS
==============================================================================
--- branches/gc_encapsulate/PLATFORMS	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/PLATFORMS	Thu Jan 28 09:35:26 2010	(r43633)
@@ -42,6 +42,9 @@
 linux-amd64-gcc4.3.3          8   Y    ?     Y   Y   Y    Y     ?  20090712
 linux-amd64-gcc4.4.1          8   Y    ?     Y   Y   Y    Y     Y  20091020
 linux-amd64-g++4.4.1          8   Y    ?     Y   Y   Y    Y     Y  20091116
+linux-ppc-gcc_4.4.2               Y    Y     Y   Y   Y    Y     Y  20100118
+linux-ppc64-gcc_4.4.2             Y    Y     Y   Y   Y    Y     Y  20100118
+linux-arm-gcc_4.4.2               Y    Y     Y   Y   Y    Y     Y  20100118
 netbsd3.1-ppc-gcc-3.3.3       B   Y    ?     Y   Y   Y    Y     ?  20090419
 netbsd4.0-alpha-gcc-4.1.2     8   Y    ?     Y   Y   Y    Y     ?  20090518
 netbsd4.0-arm-gcc-4.1.2           Y    ?     Y   Y   Y    Y     ?  20090518

Modified: branches/gc_encapsulate/README
==============================================================================
--- branches/gc_encapsulate/README	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/README	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,7 +1,7 @@
-This is Parrot, version 1.9.0
+This is Parrot, version 2.0.0
 ------------------------------
 
-Parrot is Copyright (C) 2001-2009, Parrot Foundation.
+Parrot is Copyright (C) 2001-2010, Parrot Foundation.
 
 $Id$
 
@@ -16,15 +16,15 @@
 
 You need a C compiler, a linker, and a make program of course.
 
-If you will be linking with the ICU library you have to download and install it before
-configuring Parrot. Get it from http://site.icu-project.org/download
+If you will be linking with the ICU library you have to download and install it
+before configuring Parrot. Get it from http://site.icu-project.org/download
 
 You also need Perl 5.8.4 or newer, and Storable 2.12 or newer
 for running various configure and build scripts.
 
 For most of the platforms that we are supporting initially, Parrot should build
-out of the box. docs/parrot.pod lists the core platforms.
-PLATFORMS provides reports on the platforms on which Parrot has been built and tested. 
+out of the box. docs/parrot.pod lists the core platforms. PLATFORMS provides
+reports on the platforms on which Parrot has been built and tested.
 
 INSTRUCTIONS
 ------------
@@ -85,13 +85,6 @@
 But please note that dynamic libs will not be found for non-standard
 locations unless you set LD_LIBRARY_PATH or similar.
 
-If you want to build high level languages on top of Parrot, you should
-also run
-
-    make install-dev
-
-to install development files which compilers need in their build process.
-
 Look at docs/parrot.pod and docs/intro.pod for where to go from here.  If you
 have any problems, see the section "How To Submit A Bug Report" in
 docs/submissions.pod.  These documents are in POD format. You can view these
@@ -116,14 +109,16 @@
 MAILING LISTS
 -------------
 
-The mailing list for Parrot is parrot-dev at lists.parrot.org. Subscribe by
-filling out the form at http://lists.parrot.org/mailman/listinfo/parrot-dev
-It is archived at http://lists.parrot.org/pipermail/parrot-dev/
+The Parrot user mailing list is parrot-users at lists.parrot.org. Subscribe by
+filling out the form at http://lists.parrot.org/mailman/listinfo/parrot-users .
+The list is archived at http://lists.parrot.org/pipermail/parrot-users/ .
+
+For development discussions see the information in docs/gettingstarted.pod.
 
 FEEDBACK, PATCHES, etc.
 -----------------------
 
-See F<docs/submissions.pod> for more information on reporting bugs and
+See docs/submissions.pod for more information on reporting bugs and
 submitting patches.
 
 WEB SITES

Modified: branches/gc_encapsulate/VERSION
==============================================================================
--- branches/gc_encapsulate/VERSION	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/VERSION	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1 +1 @@
-1.9.0
+2.0.0

Added: branches/gc_encapsulate/compilers/data_json/Defines.mak
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gc_encapsulate/compilers/data_json/Defines.mak	Thu Jan 28 09:35:26 2010	(r43633)
@@ -0,0 +1 @@
+DATA_JSON_LIB_PBCS = compilers/data_json/data_json.pbc

Added: branches/gc_encapsulate/compilers/data_json/Rules.mak
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gc_encapsulate/compilers/data_json/Rules.mak	Thu Jan 28 09:35:26 2010	(r43633)
@@ -0,0 +1,20 @@
+$(LIBRARY_DIR)/data_json.pbc: compilers/data_json/data_json.pbc
+	$(CP) compilers/data_json/data_json.pbc $@
+	
+compilers/data_json/data_json.pbc : \
+    runtime/parrot/library/PGE.pbc \
+    runtime/parrot/library/PGE/Util.pbc \
+    runtime/parrot/library/TGE.pbc \
+    compilers/data_json/data_json/grammar.pir \
+    compilers/data_json/data_json/pge2pir.pir
+
+compilers/data_json/data_json/grammar.pir : $(PARROT) \
+    compilers/data_json/data_json/grammar.pg \
+    $(LIBRARY_DIR)/PGE/Perl6Grammar.pbc \
+    $(LIBRARY_DIR)/PCT/HLLCompiler.pbc
+	$(PARROT) $(LIBRARY_DIR)/PGE/Perl6Grammar.pbc --output=$@ compilers/data_json/data_json/grammar.pg
+
+compilers/data_json/data_json/pge2pir.pir : $(PARROT) \
+    compilers/data_json/data_json/pge2pir.tg \
+    compilers/tge/tgc.pbc
+	$(PARROT) compilers/tge/tgc.pbc --output=$@ compilers/data_json/data_json/pge2pir.tg

Added: branches/gc_encapsulate/compilers/imcc/Defines.mak
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gc_encapsulate/compilers/imcc/Defines.mak	Thu Jan 28 09:35:26 2010	(r43633)
@@ -0,0 +1,16 @@
+# these are private to the IMCC subsystem
+IMCC_O_FILES = \
+    compilers/imcc/imcparser$(O) \
+    compilers/imcc/imclexer$(O) \
+    compilers/imcc/imc$(O) \
+    compilers/imcc/main$(O) \
+    compilers/imcc/symreg$(O) \
+    compilers/imcc/instructions$(O) \
+    compilers/imcc/cfg$(O) \
+    compilers/imcc/reg_alloc$(O) \
+    compilers/imcc/sets$(O) \
+    compilers/imcc/debug$(O) \
+    compilers/imcc/optimizer$(O) \
+    compilers/imcc/pbc$(O) \
+    compilers/imcc/parser_util$(O) \
+    compilers/imcc/pcc$(O)

Added: branches/gc_encapsulate/compilers/imcc/Rules.mak
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gc_encapsulate/compilers/imcc/Rules.mak	Thu Jan 28 09:35:26 2010	(r43633)
@@ -0,0 +1,201 @@
+compilers/imcc/pcc$(O) : \
+    compilers/imcc/cfg.h \
+    compilers/imcc/debug.h \
+    compilers/imcc/imc.h \
+    compilers/imcc/imcparser.h \
+    compilers/imcc/instructions.h \
+    compilers/imcc/parser.h \
+    compilers/imcc/sets.h \
+    compilers/imcc/symreg.h \
+    compilers/imcc/unit.h \
+    $(INC_DIR)/oplib/ops.h \
+    $(PARROT_H_HEADERS)
+
+compilers/imcc/instructions$(O) : \
+    compilers/imcc/cfg.h \
+    compilers/imcc/debug.h \
+    compilers/imcc/imc.h \
+    compilers/imcc/instructions.h \
+    compilers/imcc/optimizer.h \
+    compilers/imcc/pbc.h \
+    compilers/imcc/sets.h \
+    compilers/imcc/symreg.h \
+    compilers/imcc/unit.h \
+    $(INC_DIR)/oplib/ops.h \
+    $(PARROT_H_HEADERS)
+
+compilers/imcc/pbc$(O) : \
+    compilers/imcc/cfg.h \
+    compilers/imcc/debug.h \
+    compilers/imcc/imc.h \
+    compilers/imcc/instructions.h \
+    compilers/imcc/pbc.h \
+    compilers/imcc/sets.h \
+    compilers/imcc/symreg.h \
+    compilers/imcc/unit.h \
+    $(INC_DIR)/oplib/ops.h \
+    $(PARROT_H_HEADERS) \
+    include/pmc/pmc_sub.h
+
+compilers/imcc/parser_util$(O) : \
+    compilers/imcc/cfg.h \
+    compilers/imcc/debug.h \
+    compilers/imcc/imc.h \
+    compilers/imcc/imcparser.h \
+    compilers/imcc/instructions.h \
+    compilers/imcc/optimizer.h \
+    compilers/imcc/parser.h \
+    compilers/imcc/pbc.h \
+    compilers/imcc/sets.h \
+    compilers/imcc/symreg.h \
+    compilers/imcc/unit.h \
+    $(INC_DIR)/dynext.h \
+    $(INC_DIR)/embed.h \
+    $(INC_DIR)/oplib/ops.h \
+    $(PARROT_H_HEADERS) \
+    include/pmc/pmc_sub.h
+
+compilers/imcc/imc$(O) : \
+    compilers/imcc/cfg.h \
+    compilers/imcc/debug.h \
+    compilers/imcc/imc.h \
+    compilers/imcc/instructions.h \
+    compilers/imcc/optimizer.h \
+    compilers/imcc/sets.h \
+    compilers/imcc/symreg.h \
+    compilers/imcc/unit.h \
+    $(INC_DIR)/oplib/ops.h \
+    $(PARROT_H_HEADERS)
+
+compilers/imcc/cfg$(O) : \
+    compilers/imcc/cfg.h \
+    compilers/imcc/debug.h \
+    compilers/imcc/imc.h \
+    compilers/imcc/instructions.h \
+    compilers/imcc/optimizer.h \
+    compilers/imcc/sets.h \
+    compilers/imcc/symreg.h \
+    compilers/imcc/unit.h \
+    $(INC_DIR)/oplib/ops.h \
+    $(PARROT_H_HEADERS)
+
+compilers/imcc/debug$(O) : \
+    compilers/imcc/cfg.h \
+    compilers/imcc/debug.h \
+    compilers/imcc/imc.h \
+    compilers/imcc/instructions.h \
+    compilers/imcc/sets.h \
+    compilers/imcc/symreg.h \
+    compilers/imcc/unit.h \
+    $(INC_DIR)/oplib/ops.h \
+    $(PARROT_H_HEADERS)
+
+compilers/imcc/imclexer$(O) : \
+    compilers/imcc/cfg.h \
+    compilers/imcc/debug.h \
+    compilers/imcc/imc.h \
+    compilers/imcc/imcparser.h \
+    compilers/imcc/instructions.h \
+    compilers/imcc/parser.h \
+    compilers/imcc/sets.h \
+    compilers/imcc/symreg.h \
+    compilers/imcc/unit.h \
+    $(INC_DIR)/oplib/ops.h \
+    $(PARROT_H_HEADERS)
+
+compilers/imcc/imcparser$(O) : \
+    compilers/imcc/cfg.h \
+    compilers/imcc/debug.h \
+    compilers/imcc/imc.h \
+    compilers/imcc/imcparser.h \
+    compilers/imcc/instructions.h \
+    compilers/imcc/optimizer.h \
+    compilers/imcc/parser.h \
+    compilers/imcc/pbc.h \
+    compilers/imcc/sets.h \
+    compilers/imcc/symreg.h \
+    compilers/imcc/unit.h \
+    $(INC_DIR)/dynext.h \
+    $(INC_DIR)/oplib/ops.h \
+    $(PARROT_H_HEADERS)
+
+compilers/imcc/main$(O) : \
+    compilers/imcc/cfg.h \
+    compilers/imcc/debug.h \
+    compilers/imcc/imc.h \
+    compilers/imcc/imcparser.h \
+    compilers/imcc/instructions.h \
+    compilers/imcc/parser.h \
+    compilers/imcc/pbc.h \
+    compilers/imcc/sets.h \
+    compilers/imcc/symreg.h \
+    compilers/imcc/unit.h \
+    $(INC_DIR)/embed.h \
+    $(INC_DIR)/imcc.h \
+    $(INC_DIR)/oplib/ops.h \
+    $(INC_DIR)/runcore_api.h \
+    $(PARROT_H_HEADERS)
+
+compilers/imcc/optimizer$(O) : \
+    compilers/imcc/cfg.h \
+    compilers/imcc/debug.h \
+    compilers/imcc/imc.h \
+    compilers/imcc/instructions.h \
+    compilers/imcc/optimizer.h \
+    compilers/imcc/pbc.h \
+    compilers/imcc/sets.h \
+    compilers/imcc/symreg.h \
+    compilers/imcc/unit.h \
+    $(INC_DIR)/oplib/ops.h \
+    $(PARROT_H_HEADERS)
+
+compilers/imcc/reg_alloc$(O) : \
+    compilers/imcc/cfg.h \
+    compilers/imcc/debug.h \
+    compilers/imcc/imc.h \
+    compilers/imcc/instructions.h \
+    compilers/imcc/optimizer.h \
+    compilers/imcc/sets.h \
+    compilers/imcc/symreg.h \
+    compilers/imcc/unit.h \
+    $(INC_DIR)/oplib/ops.h \
+    $(PARROT_H_HEADERS)
+
+compilers/imcc/sets$(O) : \
+    compilers/imcc/cfg.h \
+    compilers/imcc/debug.h \
+    compilers/imcc/imc.h \
+    compilers/imcc/instructions.h \
+    compilers/imcc/sets.h \
+    compilers/imcc/symreg.h \
+    compilers/imcc/unit.h \
+    $(INC_DIR)/oplib/ops.h \
+    $(PARROT_H_HEADERS)
+
+compilers/imcc/symreg$(O) : \
+    compilers/imcc/cfg.h \
+    compilers/imcc/debug.h \
+    compilers/imcc/imc.h \
+    compilers/imcc/instructions.h \
+    compilers/imcc/sets.h \
+    compilers/imcc/symreg.h \
+    compilers/imcc/unit.h \
+    $(INC_DIR)/oplib/ops.h \
+    $(PARROT_H_HEADERS)
+
+# imcc file dependencies
+#
+# The .flag files are needed because we keep some derived files in SVN,
+# which does not keep accurate timestamps on the files, relative to each other.
+# Note that YACC or LEX may be null commands, so we must `touch` all the
+# target files, instead of just the .flag files.
+
+compilers/imcc/imcc.y.flag compilers/imcc/imcparser.c compilers/imcc/imcparser.h : compilers/imcc/imcc.y
+	$(YACC) compilers/imcc/imcc.y -d -o compilers/imcc/imcparser.c
+	$(PERL) $(BUILD_TOOLS_DIR)/fixup_gen_file.pl -noheaderizer compilers/imcc/imcparser.c compilers/imcc/imcc.y
+	$(PERL) $(BUILD_TOOLS_DIR)/fixup_gen_file.pl -noheaderizer compilers/imcc/imcparser.h compilers/imcc/imcc.y
+	$(TOUCH) compilers/imcc/imcc.y.flag compilers/imcc/imcparser.c compilers/imcc/imcparser.h
+
+compilers/imcc/imcc.l.flag compilers/imcc/imclexer.c : compilers/imcc/imcc.l
+	$(LEX) -ocompilers/imcc/imclexer.c compilers/imcc/imcc.l
+	$(TOUCH) compilers/imcc/imcc.l.flag compilers/imcc/imclexer.c

Modified: branches/gc_encapsulate/compilers/imcc/imcc.l
==============================================================================
--- branches/gc_encapsulate/compilers/imcc/imcc.l	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/imcc/imcc.l	Thu Jan 28 09:35:26 2010	(r43633)
@@ -718,21 +718,33 @@
     }
 
 <macro>".$"{ID} {
-        if (valp) {
-            const size_t len = strlen(IMCC_INFO(interp)->cur_macro_name) + yyleng + 12;
-            char * const label = (char *)mem_sys_allocate(len);
-
-            snprintf(label, len, "local__%s__%s__$",
-                IMCC_INFO(interp)->cur_macro_name, yytext+2);
+    if (valp) {
+        if (!IMCC_INFO(interp)->cur_macro_name) {
+            if (valp->s)
+                mem_sys_free(valp->s);
+            IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
+                "Invalid LABEL outside of macro");
+        }
+        else {
+            char * const fmt    = "local__%s__%s__$";
+            const size_t fmtlen = strlen(fmt) - (2 * strlen("%s"));
+            const size_t len    = strlen(IMCC_INFO(interp)->cur_macro_name)
+                                + yyleng + fmtlen;
+            char * const label  = (char *)mem_sys_allocate(len);
+
+            /* skip over ".$" prefix with the +2 */
+            snprintf(label, len, fmt,
+                IMCC_INFO(interp)->cur_macro_name, yytext + 2);
 
             if (valp->s)
                 mem_sys_free(valp->s);
             valp->s = label;
         }
-
-        return IDENTIFIER;
     }
 
+    return IDENTIFIER;
+}
+
 <macro>^{WS}+                       /* skip leading ws */;
 <macro>{WS}+                        DUP_AND_RET(valp, ' ');
 <macro>[SNIP]{DIGITS}               DUP_AND_RET(valp, REG);
@@ -1139,7 +1151,7 @@
 
     m = find_macro(interp, name);
     if (m) {
-        int i,c,start_cond;
+        int i, c, start_cond;
 
         macro_frame_t * frame = new_frame(interp);
         frame->params         = &m->params;

Modified: branches/gc_encapsulate/compilers/imcc/imcc.y
==============================================================================
--- branches/gc_encapsulate/compilers/imcc/imcc.y	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/imcc/imcc.y	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1942,19 +1942,33 @@
          }
    | LEXICAL STRINGC COMMA target
          {
-           SymReg *n;
-           char   *name = mem_sys_strdup($2 + 1);
-           name[strlen(name) - 1] = 0;
-           n = mk_const(interp, name, 'S');
-           set_lexical(interp, $4, n); $$ = 0;
-           mem_sys_free($2);
-           mem_sys_free(name);
+            if ($4->set != 'P') {
+                mem_sys_free($2);
+                IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
+                    "Cannot use %c register with .lex", $4->set);
+            }
+            else {
+               SymReg *n;
+               char   *name = mem_sys_strdup($2 + 1);
+               name[strlen(name) - 1] = 0;
+               n = mk_const(interp, name, 'S');
+               set_lexical(interp, $4, n); $$ = 0;
+               mem_sys_free($2);
+               mem_sys_free(name);
+            }
          }
    | LEXICAL USTRINGC COMMA target
          {
-           SymReg *n = mk_const(interp, $2, 'U');
-           set_lexical(interp, $4, n); $$ = 0;
-           mem_sys_free($2);
+            if ($4->set != 'P') {
+                mem_sys_free($2);
+                IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
+                    "Cannot use %c register with .lex", $4->set);
+            }
+            else {
+               SymReg *n = mk_const(interp, $2, 'U');
+               set_lexical(interp, $4, n); $$ = 0;
+               mem_sys_free($2);
+            }
          }
    | CONST { IMCC_INFO(interp)->is_def = 1; } type IDENTIFIER '=' const
          {

Modified: branches/gc_encapsulate/compilers/imcc/imclexer.c
==============================================================================
--- branches/gc_encapsulate/compilers/imcc/imclexer.c	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/imcc/imclexer.c	Thu Jan 28 09:35:26 2010	(r43633)
@@ -3901,66 +3901,77 @@
 YY_RULE_SETUP
 #line 720 "compilers/imcc/imcc.l"
 {
-        if (valp) {
-            const size_t len = strlen(IMCC_INFO(interp)->cur_macro_name) + yyleng + 12;
-            char * const label = (char *)mem_sys_allocate(len);
+    if (valp) {
+        if (!IMCC_INFO(interp)->cur_macro_name) {
+            if (valp->s)
+                mem_sys_free(valp->s);
+            IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
+                "Invalid LABEL outside of macro");
+        }
+        else {
+            char * const fmt    = "local__%s__%s__$";
+            const size_t fmtlen = strlen(fmt) - ( 2 * strlen("%s") );
+            const size_t len    = strlen(IMCC_INFO(interp)->cur_macro_name)
+                                + yyleng + fmtlen;
+            char * const label  = (char *)mem_sys_allocate(len);
 
-            snprintf(label, len, "local__%s__%s__$",
-                IMCC_INFO(interp)->cur_macro_name, yytext+2);
+            snprintf(label, len, fmt,
+                IMCC_INFO(interp)->cur_macro_name, yytext + 2);
 
             if (valp->s)
                 mem_sys_free(valp->s);
             valp->s = label;
         }
-
-        return IDENTIFIER;
     }
+
+    return IDENTIFIER;
+}
 	YY_BREAK
 case 141:
 YY_RULE_SETUP
-#line 736 "compilers/imcc/imcc.l"
+#line 747 "compilers/imcc/imcc.l"
 /* skip leading ws */;
 	YY_BREAK
 case 142:
 YY_RULE_SETUP
-#line 737 "compilers/imcc/imcc.l"
+#line 748 "compilers/imcc/imcc.l"
 DUP_AND_RET(valp, ' ');
 	YY_BREAK
 case 143:
 YY_RULE_SETUP
-#line 738 "compilers/imcc/imcc.l"
+#line 749 "compilers/imcc/imcc.l"
 DUP_AND_RET(valp, REG);
 	YY_BREAK
 case 144:
 YY_RULE_SETUP
-#line 739 "compilers/imcc/imcc.l"
+#line 750 "compilers/imcc/imcc.l"
 DUP_AND_RET(valp, REG);
 	YY_BREAK
 case 145:
 YY_RULE_SETUP
-#line 740 "compilers/imcc/imcc.l"
+#line 751 "compilers/imcc/imcc.l"
 DUP_AND_RET(valp, IDENTIFIER);
 	YY_BREAK
 case 146:
 YY_RULE_SETUP
-#line 741 "compilers/imcc/imcc.l"
+#line 752 "compilers/imcc/imcc.l"
 DUP_AND_RET(valp, MACRO);
 	YY_BREAK
 case 147:
 YY_RULE_SETUP
-#line 742 "compilers/imcc/imcc.l"
+#line 753 "compilers/imcc/imcc.l"
 DUP_AND_RET(valp, yytext[0]);
 	YY_BREAK
 case YY_STATE_EOF(macro):
-#line 743 "compilers/imcc/imcc.l"
+#line 754 "compilers/imcc/imcc.l"
 yyterminate();
 	YY_BREAK
 case 148:
 YY_RULE_SETUP
-#line 745 "compilers/imcc/imcc.l"
+#line 756 "compilers/imcc/imcc.l"
 ECHO;
 	YY_BREAK
-#line 3964 "compilers/imcc/imclexer.c"
+#line 3975 "compilers/imcc/imclexer.c"
 case YY_STATE_EOF(pod):
 case YY_STATE_EOF(cmt1):
 case YY_STATE_EOF(cmt2):
@@ -5162,7 +5173,7 @@
 
 #define YYTABLES_NAME "yytables"
 
-#line 745 "compilers/imcc/imcc.l"
+#line 756 "compilers/imcc/imcc.l"
 
 
 
@@ -5561,7 +5572,7 @@
 
     m = find_macro(interp, name);
     if (m) {
-        int i,c,start_cond;
+        int i, c, start_cond;
 
         macro_frame_t * frame = new_frame(interp);
         frame->params         = &m->params;

Modified: branches/gc_encapsulate/compilers/imcc/imcparser.c
==============================================================================
--- branches/gc_encapsulate/compilers/imcc/imcparser.c	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/imcc/imcparser.c	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1878,22 +1878,22 @@
     1794,  1798,  1799,  1809,  1814,  1824,  1833,  1834,  1846,  1850,
     1852,  1853,  1854,  1855,  1856,  1860,  1861,  1865,  1866,  1870,
     1881,  1882,  1893,  1900,  1909,  1919,  1920,  1925,  1926,  1927,
-    1927,  1943,  1953,  1959,  1959,  1966,  1967,  1967,  1973,  1979,
-    1983,  1995,  1996,  1997,  1998,  1999,  2000,  2004,  2005,  2006,
-    2007,  2011,  2024,  2026,  2028,  2030,  2032,  2037,  2040,  2047,
-    2046,  2055,  2056,  2057,  2058,  2066,  2067,  2068,  2072,  2073,
-    2074,  2075,  2076,  2077,  2078,  2079,  2080,  2081,  2082,  2083,
-    2084,  2085,  2086,  2087,  2088,  2089,  2090,  2091,  2092,  2093,
-    2094,  2100,  2099,  2111,  2116,  2117,  2118,  2119,  2120,  2121,
-    2122,  2123,  2124,  2125,  2126,  2127,  2128,  2133,  2144,  2145,
-    2146,  2147,  2153,  2167,  2173,  2179,  2185,  2184,  2193,  2194,
-    2204,  2214,  2221,  2226,  2236,  2240,  2241,  2245,  2246,  2247,
-    2250,  2251,  2255,  2259,  2269,  2275,  2285,  2290,  2294,  2295,
-    2299,  2303,  2307,  2314,  2318,  2322,  2329,  2330,  2334,  2335,
-    2336,  2337,  2338,  2339,  2343,  2344,  2348,  2349,  2353,  2354,
-    2358,  2359,  2366,  2373,  2374,  2375,  2379,  2380,  2384,  2385,
-    2389,  2390,  2394,  2395,  2399,  2399,  2411,  2411,  2423,  2424,
-    2432,  2439,  2440,  2441,  2442,  2443,  2447,  2448,  2449,  2450
+    1927,  1943,  1960,  1973,  1973,  1980,  1981,  1981,  1987,  1993,
+    1997,  2009,  2010,  2011,  2012,  2013,  2014,  2018,  2019,  2020,
+    2021,  2025,  2038,  2040,  2042,  2044,  2046,  2051,  2054,  2061,
+    2060,  2069,  2070,  2071,  2072,  2080,  2081,  2082,  2086,  2087,
+    2088,  2089,  2090,  2091,  2092,  2093,  2094,  2095,  2096,  2097,
+    2098,  2099,  2100,  2101,  2102,  2103,  2104,  2105,  2106,  2107,
+    2108,  2114,  2113,  2125,  2130,  2131,  2132,  2133,  2134,  2135,
+    2136,  2137,  2138,  2139,  2140,  2141,  2142,  2147,  2158,  2159,
+    2160,  2161,  2167,  2181,  2187,  2193,  2199,  2198,  2207,  2208,
+    2218,  2228,  2235,  2240,  2250,  2254,  2255,  2259,  2260,  2261,
+    2264,  2265,  2269,  2273,  2283,  2289,  2299,  2304,  2308,  2309,
+    2313,  2317,  2321,  2328,  2332,  2336,  2343,  2344,  2348,  2349,
+    2350,  2351,  2352,  2353,  2357,  2358,  2362,  2363,  2367,  2368,
+    2372,  2373,  2380,  2387,  2388,  2389,  2393,  2394,  2398,  2399,
+    2403,  2404,  2408,  2409,  2413,  2413,  2425,  2425,  2437,  2438,
+    2446,  2453,  2454,  2455,  2456,  2457,  2461,  2462,  2463,  2464
 };
 #endif
 
@@ -4629,38 +4629,52 @@
 /* Line 1455 of yacc.c  */
 #line 1944 "compilers/imcc/imcc.y"
     {
-           SymReg *n;
-           char   *name = mem_sys_strdup((yyvsp[(2) - (4)].s) + 1);
-           name[strlen(name) - 1] = 0;
-           n = mk_const(interp, name, 'S');
-           set_lexical(interp, (yyvsp[(4) - (4)].sr), n); (yyval.i) = 0;
-           mem_sys_free((yyvsp[(2) - (4)].s));
-           mem_sys_free(name);
+            if ((yyvsp[(4) - (4)].sr)->set != 'P') {
+                mem_sys_free((yyvsp[(2) - (4)].s));
+                IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
+                    "Cannot use %c register with .lex", (yyvsp[(4) - (4)].sr)->set);
+            }
+            else {
+               SymReg *n;
+               char   *name = mem_sys_strdup((yyvsp[(2) - (4)].s) + 1);
+               name[strlen(name) - 1] = 0;
+               n = mk_const(interp, name, 'S');
+               set_lexical(interp, (yyvsp[(4) - (4)].sr), n); (yyval.i) = 0;
+               mem_sys_free((yyvsp[(2) - (4)].s));
+               mem_sys_free(name);
+            }
          }
     break;
 
   case 182:
 
 /* Line 1455 of yacc.c  */
-#line 1954 "compilers/imcc/imcc.y"
+#line 1961 "compilers/imcc/imcc.y"
     {
-           SymReg *n = mk_const(interp, (yyvsp[(2) - (4)].s), 'U');
-           set_lexical(interp, (yyvsp[(4) - (4)].sr), n); (yyval.i) = 0;
-           mem_sys_free((yyvsp[(2) - (4)].s));
+            if ((yyvsp[(4) - (4)].sr)->set != 'P') {
+                mem_sys_free((yyvsp[(2) - (4)].s));
+                IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
+                    "Cannot use %c register with .lex", (yyvsp[(4) - (4)].sr)->set);
+            }
+            else {
+               SymReg *n = mk_const(interp, (yyvsp[(2) - (4)].s), 'U');
+               set_lexical(interp, (yyvsp[(4) - (4)].sr), n); (yyval.i) = 0;
+               mem_sys_free((yyvsp[(2) - (4)].s));
+            }
          }
     break;
 
   case 183:
 
 /* Line 1455 of yacc.c  */
-#line 1959 "compilers/imcc/imcc.y"
+#line 1973 "compilers/imcc/imcc.y"
     { IMCC_INFO(interp)->is_def = 1; }
     break;
 
   case 184:
 
 /* Line 1455 of yacc.c  */
-#line 1960 "compilers/imcc/imcc.y"
+#line 1974 "compilers/imcc/imcc.y"
     {
            mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 0);
            IMCC_INFO(interp)->is_def = 0;
@@ -4671,14 +4685,14 @@
   case 186:
 
 /* Line 1455 of yacc.c  */
-#line 1967 "compilers/imcc/imcc.y"
+#line 1981 "compilers/imcc/imcc.y"
     { IMCC_INFO(interp)->is_def = 1; }
     break;
 
   case 187:
 
 /* Line 1455 of yacc.c  */
-#line 1968 "compilers/imcc/imcc.y"
+#line 1982 "compilers/imcc/imcc.y"
     {
            mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 1);
            IMCC_INFO(interp)->is_def = 0;
@@ -4689,7 +4703,7 @@
   case 188:
 
 /* Line 1455 of yacc.c  */
-#line 1974 "compilers/imcc/imcc.y"
+#line 1988 "compilers/imcc/imcc.y"
     {
            (yyval.i) = NULL;
            IMCC_INFO(interp)->cur_call->pcc_sub->flags |= isTAIL_CALL;
@@ -4700,7 +4714,7 @@
   case 189:
 
 /* Line 1455 of yacc.c  */
-#line 1980 "compilers/imcc/imcc.y"
+#line 1994 "compilers/imcc/imcc.y"
     {
             (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "branch", 1, (yyvsp[(2) - (2)].sr));
          }
@@ -4709,7 +4723,7 @@
   case 190:
 
 /* Line 1455 of yacc.c  */
-#line 1984 "compilers/imcc/imcc.y"
+#line 1998 "compilers/imcc/imcc.y"
     {
            (yyval.i) = INS(interp,
                     IMCC_INFO(interp)->cur_unit,
@@ -4726,63 +4740,63 @@
   case 191:
 
 /* Line 1455 of yacc.c  */
-#line 1995 "compilers/imcc/imcc.y"
+#line 2009 "compilers/imcc/imcc.y"
     { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr)); }
     break;
 
   case 192:
 
 /* Line 1455 of yacc.c  */
-#line 1996 "compilers/imcc/imcc.y"
+#line 2010 "compilers/imcc/imcc.y"
     { (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
     break;
 
   case 193:
 
 /* Line 1455 of yacc.c  */
-#line 1997 "compilers/imcc/imcc.y"
+#line 2011 "compilers/imcc/imcc.y"
     { (yyval.i) = 0; }
     break;
 
   case 196:
 
 /* Line 1455 of yacc.c  */
-#line 2000 "compilers/imcc/imcc.y"
+#line 2014 "compilers/imcc/imcc.y"
     { (yyval.i) = 0;}
     break;
 
   case 197:
 
 /* Line 1455 of yacc.c  */
-#line 2004 "compilers/imcc/imcc.y"
+#line 2018 "compilers/imcc/imcc.y"
     { (yyval.t) = 'I'; }
     break;
 
   case 198:
 
 /* Line 1455 of yacc.c  */
-#line 2005 "compilers/imcc/imcc.y"
+#line 2019 "compilers/imcc/imcc.y"
     { (yyval.t) = 'N'; }
     break;
 
   case 199:
 
 /* Line 1455 of yacc.c  */
-#line 2006 "compilers/imcc/imcc.y"
+#line 2020 "compilers/imcc/imcc.y"
     { (yyval.t) = 'S'; }
     break;
 
   case 200:
 
 /* Line 1455 of yacc.c  */
-#line 2007 "compilers/imcc/imcc.y"
+#line 2021 "compilers/imcc/imcc.y"
     { (yyval.t) = 'P'; }
     break;
 
   case 201:
 
 /* Line 1455 of yacc.c  */
-#line 2012 "compilers/imcc/imcc.y"
+#line 2026 "compilers/imcc/imcc.y"
     {
            /* there'd normally be a mem_sys_strdup() here, but the lexer already
             * copied the string, so it's safe to use directly */
@@ -4797,49 +4811,49 @@
   case 202:
 
 /* Line 1455 of yacc.c  */
-#line 2025 "compilers/imcc/imcc.y"
+#line 2039 "compilers/imcc/imcc.y"
     { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "set", 2, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr));  }
     break;
 
   case 203:
 
 /* Line 1455 of yacc.c  */
-#line 2027 "compilers/imcc/imcc.y"
+#line 2041 "compilers/imcc/imcc.y"
     { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (4)].s), 2, (yyvsp[(1) - (4)].sr), (yyvsp[(4) - (4)].sr));  }
     break;
 
   case 204:
 
 /* Line 1455 of yacc.c  */
-#line 2029 "compilers/imcc/imcc.y"
+#line 2043 "compilers/imcc/imcc.y"
     { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(4) - (5)].s), 3, (yyvsp[(1) - (5)].sr), (yyvsp[(3) - (5)].sr), (yyvsp[(5) - (5)].sr)); }
     break;
 
   case 205:
 
 /* Line 1455 of yacc.c  */
-#line 2031 "compilers/imcc/imcc.y"
+#line 2045 "compilers/imcc/imcc.y"
     { (yyval.i) = iINDEXFETCH(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (6)].sr), (yyvsp[(3) - (6)].sr), (yyvsp[(5) - (6)].sr)); }
     break;
 
   case 206:
 
 /* Line 1455 of yacc.c  */
-#line 2033 "compilers/imcc/imcc.y"
+#line 2047 "compilers/imcc/imcc.y"
     { (yyval.i) = iINDEXSET(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (6)].sr), (yyvsp[(3) - (6)].sr), (yyvsp[(6) - (6)].sr)); }
     break;
 
   case 207:
 
 /* Line 1455 of yacc.c  */
-#line 2038 "compilers/imcc/imcc.y"
+#line 2052 "compilers/imcc/imcc.y"
     { (yyval.i) = iNEW(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (7)].sr), (yyvsp[(4) - (7)].s), (yyvsp[(6) - (7)].sr), 1); }
     break;
 
   case 208:
 
 /* Line 1455 of yacc.c  */
-#line 2041 "compilers/imcc/imcc.y"
+#line 2055 "compilers/imcc/imcc.y"
     {
            add_pcc_result((yyvsp[(3) - (3)].i)->symregs[0], (yyvsp[(1) - (3)].sr));
            IMCC_INFO(interp)->cur_call = NULL;
@@ -4850,7 +4864,7 @@
   case 209:
 
 /* Line 1455 of yacc.c  */
-#line 2047 "compilers/imcc/imcc.y"
+#line 2061 "compilers/imcc/imcc.y"
     {
            (yyval.i) = IMCC_create_itcall_label(interp);
          }
@@ -4859,7 +4873,7 @@
   case 210:
 
 /* Line 1455 of yacc.c  */
-#line 2051 "compilers/imcc/imcc.y"
+#line 2065 "compilers/imcc/imcc.y"
     {
            IMCC_itcall_sub(interp, (yyvsp[(6) - (9)].sr));
            IMCC_INFO(interp)->cur_call = NULL;
@@ -4869,7 +4883,7 @@
   case 214:
 
 /* Line 1455 of yacc.c  */
-#line 2059 "compilers/imcc/imcc.y"
+#line 2073 "compilers/imcc/imcc.y"
     {
            (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(1) - (3)].sr));
          }
@@ -4878,189 +4892,189 @@
   case 215:
 
 /* Line 1455 of yacc.c  */
-#line 2066 "compilers/imcc/imcc.y"
+#line 2080 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"not"; }
     break;
 
   case 216:
 
 /* Line 1455 of yacc.c  */
-#line 2067 "compilers/imcc/imcc.y"
+#line 2081 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"bnot"; }
     break;
 
   case 217:
 
 /* Line 1455 of yacc.c  */
-#line 2068 "compilers/imcc/imcc.y"
+#line 2082 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"neg"; }
     break;
 
   case 218:
 
 /* Line 1455 of yacc.c  */
-#line 2072 "compilers/imcc/imcc.y"
+#line 2086 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"sub"; }
     break;
 
   case 219:
 
 /* Line 1455 of yacc.c  */
-#line 2073 "compilers/imcc/imcc.y"
+#line 2087 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"add"; }
     break;
 
   case 220:
 
 /* Line 1455 of yacc.c  */
-#line 2074 "compilers/imcc/imcc.y"
+#line 2088 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"mul"; }
     break;
 
   case 221:
 
 /* Line 1455 of yacc.c  */
-#line 2075 "compilers/imcc/imcc.y"
+#line 2089 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"div"; }
     break;
 
   case 222:
 
 /* Line 1455 of yacc.c  */
-#line 2076 "compilers/imcc/imcc.y"
+#line 2090 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"mod"; }
     break;
 
   case 223:
 
 /* Line 1455 of yacc.c  */
-#line 2077 "compilers/imcc/imcc.y"
+#line 2091 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"fdiv"; }
     break;
 
   case 224:
 
 /* Line 1455 of yacc.c  */
-#line 2078 "compilers/imcc/imcc.y"
+#line 2092 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"pow"; }
     break;
 
   case 225:
 
 /* Line 1455 of yacc.c  */
-#line 2079 "compilers/imcc/imcc.y"
+#line 2093 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"concat"; }
     break;
 
   case 226:
 
 /* Line 1455 of yacc.c  */
-#line 2080 "compilers/imcc/imcc.y"
+#line 2094 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"iseq"; }
     break;
 
   case 227:
 
 /* Line 1455 of yacc.c  */
-#line 2081 "compilers/imcc/imcc.y"
+#line 2095 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"isne"; }
     break;
 
   case 228:
 
 /* Line 1455 of yacc.c  */
-#line 2082 "compilers/imcc/imcc.y"
+#line 2096 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"isgt"; }
     break;
 
   case 229:
 
 /* Line 1455 of yacc.c  */
-#line 2083 "compilers/imcc/imcc.y"
+#line 2097 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"isge"; }
     break;
 
   case 230:
 
 /* Line 1455 of yacc.c  */
-#line 2084 "compilers/imcc/imcc.y"
+#line 2098 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"islt"; }
     break;
 
   case 231:
 
 /* Line 1455 of yacc.c  */
-#line 2085 "compilers/imcc/imcc.y"
+#line 2099 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"isle"; }
     break;
 
   case 232:
 
 /* Line 1455 of yacc.c  */
-#line 2086 "compilers/imcc/imcc.y"
+#line 2100 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"shl"; }
     break;
 
   case 233:
 
 /* Line 1455 of yacc.c  */
-#line 2087 "compilers/imcc/imcc.y"
+#line 2101 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"shr"; }
     break;
 
   case 234:
 
 /* Line 1455 of yacc.c  */
-#line 2088 "compilers/imcc/imcc.y"
+#line 2102 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"lsr"; }
     break;
 
   case 235:
 
 /* Line 1455 of yacc.c  */
-#line 2089 "compilers/imcc/imcc.y"
+#line 2103 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"and"; }
     break;
 
   case 236:
 
 /* Line 1455 of yacc.c  */
-#line 2090 "compilers/imcc/imcc.y"
+#line 2104 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"or"; }
     break;
 
   case 237:
 
 /* Line 1455 of yacc.c  */
-#line 2091 "compilers/imcc/imcc.y"
+#line 2105 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"xor"; }
     break;
 
   case 238:
 
 /* Line 1455 of yacc.c  */
-#line 2092 "compilers/imcc/imcc.y"
+#line 2106 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"band"; }
     break;
 
   case 239:
 
 /* Line 1455 of yacc.c  */
-#line 2093 "compilers/imcc/imcc.y"
+#line 2107 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"bor"; }
     break;
 
   case 240:
 
 /* Line 1455 of yacc.c  */
-#line 2094 "compilers/imcc/imcc.y"
+#line 2108 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"bxor"; }
     break;
 
   case 241:
 
 /* Line 1455 of yacc.c  */
-#line 2100 "compilers/imcc/imcc.y"
+#line 2114 "compilers/imcc/imcc.y"
     {
            (yyval.i) = IMCC_create_itcall_label(interp);
            (yyval.i)->type &= ~ITCALL;
@@ -5071,112 +5085,112 @@
   case 242:
 
 /* Line 1455 of yacc.c  */
-#line 2105 "compilers/imcc/imcc.y"
+#line 2119 "compilers/imcc/imcc.y"
     {  (yyval.i) = 0; }
     break;
 
   case 243:
 
 /* Line 1455 of yacc.c  */
-#line 2112 "compilers/imcc/imcc.y"
+#line 2126 "compilers/imcc/imcc.y"
     { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(2) - (3)].s), 2, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr)); }
     break;
 
   case 244:
 
 /* Line 1455 of yacc.c  */
-#line 2116 "compilers/imcc/imcc.y"
+#line 2130 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"add"; }
     break;
 
   case 245:
 
 /* Line 1455 of yacc.c  */
-#line 2117 "compilers/imcc/imcc.y"
+#line 2131 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"sub"; }
     break;
 
   case 246:
 
 /* Line 1455 of yacc.c  */
-#line 2118 "compilers/imcc/imcc.y"
+#line 2132 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"mul"; }
     break;
 
   case 247:
 
 /* Line 1455 of yacc.c  */
-#line 2119 "compilers/imcc/imcc.y"
+#line 2133 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"div"; }
     break;
 
   case 248:
 
 /* Line 1455 of yacc.c  */
-#line 2120 "compilers/imcc/imcc.y"
+#line 2134 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"mod"; }
     break;
 
   case 249:
 
 /* Line 1455 of yacc.c  */
-#line 2121 "compilers/imcc/imcc.y"
+#line 2135 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"fdiv"; }
     break;
 
   case 250:
 
 /* Line 1455 of yacc.c  */
-#line 2122 "compilers/imcc/imcc.y"
+#line 2136 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"concat"; }
     break;
 
   case 251:
 
 /* Line 1455 of yacc.c  */
-#line 2123 "compilers/imcc/imcc.y"
+#line 2137 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"band"; }
     break;
 
   case 252:
 
 /* Line 1455 of yacc.c  */
-#line 2124 "compilers/imcc/imcc.y"
+#line 2138 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"bor"; }
     break;
 
   case 253:
 
 /* Line 1455 of yacc.c  */
-#line 2125 "compilers/imcc/imcc.y"
+#line 2139 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"bxor"; }
     break;
 
   case 254:
 
 /* Line 1455 of yacc.c  */
-#line 2126 "compilers/imcc/imcc.y"
+#line 2140 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"shr"; }
     break;
 
   case 255:
 
 /* Line 1455 of yacc.c  */
-#line 2127 "compilers/imcc/imcc.y"
+#line 2141 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"shl"; }
     break;
 
   case 256:
 
 /* Line 1455 of yacc.c  */
-#line 2128 "compilers/imcc/imcc.y"
+#line 2142 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"lsr"; }
     break;
 
   case 257:
 
 /* Line 1455 of yacc.c  */
-#line 2134 "compilers/imcc/imcc.y"
+#line 2148 "compilers/imcc/imcc.y"
     {
         (yyval.i) = func_ins(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (4)].sr), (yyvsp[(3) - (4)].s),
                       IMCC_INFO(interp) -> regs,
@@ -5189,28 +5203,28 @@
   case 258:
 
 /* Line 1455 of yacc.c  */
-#line 2144 "compilers/imcc/imcc.y"
+#line 2158 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s));       mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 259:
 
 /* Line 1455 of yacc.c  */
-#line 2145 "compilers/imcc/imcc.y"
+#line 2159 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_sub_address_fromc(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 260:
 
 /* Line 1455 of yacc.c  */
-#line 2146 "compilers/imcc/imcc.y"
+#line 2160 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_sub_address_u(interp, (yyvsp[(1) - (1)].s));     mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 261:
 
 /* Line 1455 of yacc.c  */
-#line 2148 "compilers/imcc/imcc.y"
+#line 2162 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = (yyvsp[(1) - (1)].sr);
            if ((yyvsp[(1) - (1)].sr)->set != 'P')
@@ -5221,7 +5235,7 @@
   case 262:
 
 /* Line 1455 of yacc.c  */
-#line 2154 "compilers/imcc/imcc.y"
+#line 2168 "compilers/imcc/imcc.y"
     {
             /* disallow bareword method names; SREG name constants are fine */
             const char * const name = (yyvsp[(3) - (3)].sr)->name;
@@ -5240,7 +5254,7 @@
   case 263:
 
 /* Line 1455 of yacc.c  */
-#line 2168 "compilers/imcc/imcc.y"
+#line 2182 "compilers/imcc/imcc.y"
     {
             IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr);
             (yyval.sr)                         = mk_const(interp, (yyvsp[(3) - (3)].s), 'U');
@@ -5251,7 +5265,7 @@
   case 264:
 
 /* Line 1455 of yacc.c  */
-#line 2174 "compilers/imcc/imcc.y"
+#line 2188 "compilers/imcc/imcc.y"
     {
             IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr);
             (yyval.sr)                         = mk_const(interp, (yyvsp[(3) - (3)].s), 'S');
@@ -5262,14 +5276,14 @@
   case 265:
 
 /* Line 1455 of yacc.c  */
-#line 2179 "compilers/imcc/imcc.y"
+#line 2193 "compilers/imcc/imcc.y"
     { IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr); (yyval.sr) = (yyvsp[(3) - (3)].sr); }
     break;
 
   case 266:
 
 /* Line 1455 of yacc.c  */
-#line 2185 "compilers/imcc/imcc.y"
+#line 2199 "compilers/imcc/imcc.y"
     {
            (yyval.i) = IMCC_create_itcall_label(interp);
            IMCC_itcall_sub(interp, (yyvsp[(1) - (1)].sr));
@@ -5279,21 +5293,21 @@
   case 267:
 
 /* Line 1455 of yacc.c  */
-#line 2189 "compilers/imcc/imcc.y"
+#line 2203 "compilers/imcc/imcc.y"
     { (yyval.i) = (yyvsp[(2) - (5)].i); }
     break;
 
   case 268:
 
 /* Line 1455 of yacc.c  */
-#line 2193 "compilers/imcc/imcc.y"
+#line 2207 "compilers/imcc/imcc.y"
     { (yyval.sr) = 0; }
     break;
 
   case 269:
 
 /* Line 1455 of yacc.c  */
-#line 2195 "compilers/imcc/imcc.y"
+#line 2209 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = 0;
            if (IMCC_INFO(interp)->adv_named_id) {
@@ -5308,7 +5322,7 @@
   case 270:
 
 /* Line 1455 of yacc.c  */
-#line 2205 "compilers/imcc/imcc.y"
+#line 2219 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = 0;
            if (IMCC_INFO(interp)->adv_named_id) {
@@ -5323,7 +5337,7 @@
   case 271:
 
 /* Line 1455 of yacc.c  */
-#line 2215 "compilers/imcc/imcc.y"
+#line 2229 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = 0;
            add_pcc_named_arg(IMCC_INFO(interp)->cur_call,
@@ -5335,7 +5349,7 @@
   case 272:
 
 /* Line 1455 of yacc.c  */
-#line 2222 "compilers/imcc/imcc.y"
+#line 2236 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = 0;
            add_pcc_named_arg_var(IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr));
@@ -5345,7 +5359,7 @@
   case 273:
 
 /* Line 1455 of yacc.c  */
-#line 2227 "compilers/imcc/imcc.y"
+#line 2241 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = 0;
            add_pcc_named_arg(IMCC_INFO(interp)->cur_call,
@@ -5357,70 +5371,70 @@
   case 274:
 
 /* Line 1455 of yacc.c  */
-#line 2236 "compilers/imcc/imcc.y"
+#line 2250 "compilers/imcc/imcc.y"
     { (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); }
     break;
 
   case 275:
 
 /* Line 1455 of yacc.c  */
-#line 2240 "compilers/imcc/imcc.y"
+#line 2254 "compilers/imcc/imcc.y"
     { (yyval.t) = 0; }
     break;
 
   case 276:
 
 /* Line 1455 of yacc.c  */
-#line 2241 "compilers/imcc/imcc.y"
+#line 2255 "compilers/imcc/imcc.y"
     { (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
     break;
 
   case 277:
 
 /* Line 1455 of yacc.c  */
-#line 2245 "compilers/imcc/imcc.y"
+#line 2259 "compilers/imcc/imcc.y"
     { (yyval.t) = VT_FLAT;     }
     break;
 
   case 278:
 
 /* Line 1455 of yacc.c  */
-#line 2246 "compilers/imcc/imcc.y"
+#line 2260 "compilers/imcc/imcc.y"
     { (yyval.t) = VT_NAMED;    }
     break;
 
   case 279:
 
 /* Line 1455 of yacc.c  */
-#line 2247 "compilers/imcc/imcc.y"
+#line 2261 "compilers/imcc/imcc.y"
     { (yyval.t) = VT_CALL_SIG; }
     break;
 
   case 280:
 
 /* Line 1455 of yacc.c  */
-#line 2250 "compilers/imcc/imcc.y"
+#line 2264 "compilers/imcc/imcc.y"
     { adv_named_set_u(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; }
     break;
 
   case 281:
 
 /* Line 1455 of yacc.c  */
-#line 2251 "compilers/imcc/imcc.y"
+#line 2265 "compilers/imcc/imcc.y"
     { adv_named_set(interp, (yyvsp[(3) - (4)].s));   (yyval.t) = 0; }
     break;
 
   case 282:
 
 /* Line 1455 of yacc.c  */
-#line 2255 "compilers/imcc/imcc.y"
+#line 2269 "compilers/imcc/imcc.y"
     { (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); }
     break;
 
   case 283:
 
 /* Line 1455 of yacc.c  */
-#line 2260 "compilers/imcc/imcc.y"
+#line 2274 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = 0;
            if (IMCC_INFO(interp)->adv_named_id) {
@@ -5435,7 +5449,7 @@
   case 284:
 
 /* Line 1455 of yacc.c  */
-#line 2270 "compilers/imcc/imcc.y"
+#line 2284 "compilers/imcc/imcc.y"
     {
             add_pcc_named_result(IMCC_INFO(interp)->cur_call,
             mk_const(interp, (yyvsp[(3) - (5)].s), 'S'), (yyvsp[(5) - (5)].sr));
@@ -5446,7 +5460,7 @@
   case 285:
 
 /* Line 1455 of yacc.c  */
-#line 2276 "compilers/imcc/imcc.y"
+#line 2290 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = 0;
            if (IMCC_INFO(interp)->adv_named_id) {
@@ -5461,7 +5475,7 @@
   case 286:
 
 /* Line 1455 of yacc.c  */
-#line 2286 "compilers/imcc/imcc.y"
+#line 2300 "compilers/imcc/imcc.y"
     {
            add_pcc_named_result(IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(1) - (3)].s), 'S'), (yyvsp[(3) - (3)].sr));
            mem_sys_free((yyvsp[(1) - (3)].s));
@@ -5471,28 +5485,28 @@
   case 287:
 
 /* Line 1455 of yacc.c  */
-#line 2290 "compilers/imcc/imcc.y"
+#line 2304 "compilers/imcc/imcc.y"
     { (yyval.sr) = 0; }
     break;
 
   case 288:
 
 /* Line 1455 of yacc.c  */
-#line 2294 "compilers/imcc/imcc.y"
+#line 2308 "compilers/imcc/imcc.y"
     { (yyval.i) = (yyvsp[(1) - (1)].i); }
     break;
 
   case 289:
 
 /* Line 1455 of yacc.c  */
-#line 2295 "compilers/imcc/imcc.y"
+#line 2309 "compilers/imcc/imcc.y"
     { (yyval.i) = (yyvsp[(1) - (1)].i); }
     break;
 
   case 290:
 
 /* Line 1455 of yacc.c  */
-#line 2300 "compilers/imcc/imcc.y"
+#line 2314 "compilers/imcc/imcc.y"
     {
            (yyval.i) =MK_I(interp, IMCC_INFO(interp)->cur_unit, inv_op((yyvsp[(3) - (6)].s)), 3, (yyvsp[(2) - (6)].sr), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].sr));
          }
@@ -5501,7 +5515,7 @@
   case 291:
 
 /* Line 1455 of yacc.c  */
-#line 2304 "compilers/imcc/imcc.y"
+#line 2318 "compilers/imcc/imcc.y"
     {
            (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "unless_null", 2, (yyvsp[(3) - (5)].sr), (yyvsp[(5) - (5)].sr));
          }
@@ -5510,7 +5524,7 @@
   case 292:
 
 /* Line 1455 of yacc.c  */
-#line 2308 "compilers/imcc/imcc.y"
+#line 2322 "compilers/imcc/imcc.y"
     {
            (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "unless", 2, (yyvsp[(2) - (4)].sr), (yyvsp[(4) - (4)].sr));
          }
@@ -5519,7 +5533,7 @@
   case 293:
 
 /* Line 1455 of yacc.c  */
-#line 2315 "compilers/imcc/imcc.y"
+#line 2329 "compilers/imcc/imcc.y"
     {
            (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "if", 2, (yyvsp[(2) - (4)].sr), (yyvsp[(4) - (4)].sr));
          }
@@ -5528,7 +5542,7 @@
   case 294:
 
 /* Line 1455 of yacc.c  */
-#line 2319 "compilers/imcc/imcc.y"
+#line 2333 "compilers/imcc/imcc.y"
     {
            (yyval.i) =MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (6)].s), 3, (yyvsp[(2) - (6)].sr), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].sr));
          }
@@ -5537,7 +5551,7 @@
   case 295:
 
 /* Line 1455 of yacc.c  */
-#line 2323 "compilers/imcc/imcc.y"
+#line 2337 "compilers/imcc/imcc.y"
     {
            (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "if_null", 2, (yyvsp[(3) - (5)].sr), (yyvsp[(5) - (5)].sr));
          }
@@ -5546,91 +5560,91 @@
   case 296:
 
 /* Line 1455 of yacc.c  */
-#line 2329 "compilers/imcc/imcc.y"
+#line 2343 "compilers/imcc/imcc.y"
     { (yyval.t) = 0; }
     break;
 
   case 297:
 
 /* Line 1455 of yacc.c  */
-#line 2330 "compilers/imcc/imcc.y"
+#line 2344 "compilers/imcc/imcc.y"
     { (yyval.t) = 0; }
     break;
 
   case 298:
 
 /* Line 1455 of yacc.c  */
-#line 2334 "compilers/imcc/imcc.y"
+#line 2348 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"eq"; }
     break;
 
   case 299:
 
 /* Line 1455 of yacc.c  */
-#line 2335 "compilers/imcc/imcc.y"
+#line 2349 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"ne"; }
     break;
 
   case 300:
 
 /* Line 1455 of yacc.c  */
-#line 2336 "compilers/imcc/imcc.y"
+#line 2350 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"gt"; }
     break;
 
   case 301:
 
 /* Line 1455 of yacc.c  */
-#line 2337 "compilers/imcc/imcc.y"
+#line 2351 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"ge"; }
     break;
 
   case 302:
 
 /* Line 1455 of yacc.c  */
-#line 2338 "compilers/imcc/imcc.y"
+#line 2352 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"lt"; }
     break;
 
   case 303:
 
 /* Line 1455 of yacc.c  */
-#line 2339 "compilers/imcc/imcc.y"
+#line 2353 "compilers/imcc/imcc.y"
     { (yyval.s) = (char *)"le"; }
     break;
 
   case 306:
 
 /* Line 1455 of yacc.c  */
-#line 2348 "compilers/imcc/imcc.y"
+#line 2362 "compilers/imcc/imcc.y"
     { (yyval.sr) = NULL; }
     break;
 
   case 307:
 
 /* Line 1455 of yacc.c  */
-#line 2349 "compilers/imcc/imcc.y"
+#line 2363 "compilers/imcc/imcc.y"
     { (yyval.sr) = (yyvsp[(1) - (1)].sr); }
     break;
 
   case 308:
 
 /* Line 1455 of yacc.c  */
-#line 2353 "compilers/imcc/imcc.y"
+#line 2367 "compilers/imcc/imcc.y"
     { (yyval.sr) = IMCC_INFO(interp)->regs[0]; }
     break;
 
   case 310:
 
 /* Line 1455 of yacc.c  */
-#line 2358 "compilers/imcc/imcc.y"
+#line 2372 "compilers/imcc/imcc.y"
     { IMCC_INFO(interp)->regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(1) - (1)].sr); }
     break;
 
   case 311:
 
 /* Line 1455 of yacc.c  */
-#line 2360 "compilers/imcc/imcc.y"
+#line 2374 "compilers/imcc/imcc.y"
     {
            IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(1) - (4)].sr);
            IMCC_INFO(interp) -> keyvec |= KEY_BIT(IMCC_INFO(interp)->nargs);
@@ -5642,7 +5656,7 @@
   case 312:
 
 /* Line 1455 of yacc.c  */
-#line 2367 "compilers/imcc/imcc.y"
+#line 2381 "compilers/imcc/imcc.y"
     {
            IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(2) - (3)].sr);
            (yyval.sr) = (yyvsp[(2) - (3)].sr);
@@ -5652,49 +5666,49 @@
   case 314:
 
 /* Line 1455 of yacc.c  */
-#line 2374 "compilers/imcc/imcc.y"
+#line 2388 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_sub_address_fromc(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 315:
 
 /* Line 1455 of yacc.c  */
-#line 2375 "compilers/imcc/imcc.y"
+#line 2389 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_sub_address_u(interp, (yyvsp[(1) - (1)].s));  mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 316:
 
 /* Line 1455 of yacc.c  */
-#line 2379 "compilers/imcc/imcc.y"
+#line 2393 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 317:
 
 /* Line 1455 of yacc.c  */
-#line 2380 "compilers/imcc/imcc.y"
+#line 2394 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 318:
 
 /* Line 1455 of yacc.c  */
-#line 2384 "compilers/imcc/imcc.y"
+#line 2398 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 319:
 
 /* Line 1455 of yacc.c  */
-#line 2385 "compilers/imcc/imcc.y"
+#line 2399 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 324:
 
 /* Line 1455 of yacc.c  */
-#line 2399 "compilers/imcc/imcc.y"
+#line 2413 "compilers/imcc/imcc.y"
     {
            IMCC_INFO(interp)->nkeys    = 0;
          }
@@ -5703,7 +5717,7 @@
   case 325:
 
 /* Line 1455 of yacc.c  */
-#line 2403 "compilers/imcc/imcc.y"
+#line 2417 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = link_keys(interp,
                           IMCC_INFO(interp)->nkeys,
@@ -5714,7 +5728,7 @@
   case 326:
 
 /* Line 1455 of yacc.c  */
-#line 2411 "compilers/imcc/imcc.y"
+#line 2425 "compilers/imcc/imcc.y"
     {
            IMCC_INFO(interp)->nkeys = 0;
          }
@@ -5723,7 +5737,7 @@
   case 327:
 
 /* Line 1455 of yacc.c  */
-#line 2415 "compilers/imcc/imcc.y"
+#line 2429 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = link_keys(interp,
                           IMCC_INFO(interp)->nkeys,
@@ -5734,14 +5748,14 @@
   case 328:
 
 /* Line 1455 of yacc.c  */
-#line 2423 "compilers/imcc/imcc.y"
+#line 2437 "compilers/imcc/imcc.y"
     { IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(1) - (1)].sr); }
     break;
 
   case 329:
 
 /* Line 1455 of yacc.c  */
-#line 2425 "compilers/imcc/imcc.y"
+#line 2439 "compilers/imcc/imcc.y"
     {
            IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(3) - (3)].sr);
            (yyval.sr) = IMCC_INFO(interp)->keys[0];
@@ -5751,7 +5765,7 @@
   case 330:
 
 /* Line 1455 of yacc.c  */
-#line 2433 "compilers/imcc/imcc.y"
+#line 2447 "compilers/imcc/imcc.y"
     {
            (yyval.sr) = (yyvsp[(1) - (1)].sr);
          }
@@ -5760,70 +5774,70 @@
   case 331:
 
 /* Line 1455 of yacc.c  */
-#line 2439 "compilers/imcc/imcc.y"
+#line 2453 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'I'); }
     break;
 
   case 332:
 
 /* Line 1455 of yacc.c  */
-#line 2440 "compilers/imcc/imcc.y"
+#line 2454 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'N'); }
     break;
 
   case 333:
 
 /* Line 1455 of yacc.c  */
-#line 2441 "compilers/imcc/imcc.y"
+#line 2455 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'S'); }
     break;
 
   case 334:
 
 /* Line 1455 of yacc.c  */
-#line 2442 "compilers/imcc/imcc.y"
+#line 2456 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'P'); }
     break;
 
   case 335:
 
 /* Line 1455 of yacc.c  */
-#line 2443 "compilers/imcc/imcc.y"
+#line 2457 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_pasm_reg(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 336:
 
 /* Line 1455 of yacc.c  */
-#line 2447 "compilers/imcc/imcc.y"
+#line 2461 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'I'); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 337:
 
 /* Line 1455 of yacc.c  */
-#line 2448 "compilers/imcc/imcc.y"
+#line 2462 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'N'); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 338:
 
 /* Line 1455 of yacc.c  */
-#line 2449 "compilers/imcc/imcc.y"
+#line 2463 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'S'); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
   case 339:
 
 /* Line 1455 of yacc.c  */
-#line 2450 "compilers/imcc/imcc.y"
+#line 2464 "compilers/imcc/imcc.y"
     { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'U'); mem_sys_free((yyvsp[(1) - (1)].s)); }
     break;
 
 
 
 /* Line 1455 of yacc.c  */
-#line 5816 "compilers/imcc/imcparser.c"
+#line 5830 "compilers/imcc/imcparser.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -6035,7 +6049,7 @@
 
 
 /* Line 1675 of yacc.c  */
-#line 2456 "compilers/imcc/imcc.y"
+#line 2470 "compilers/imcc/imcc.y"
 
 
 /* I need this prototype somewhere... */

Added: branches/gc_encapsulate/compilers/json/Defines.mak
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gc_encapsulate/compilers/json/Defines.mak	Thu Jan 28 09:35:26 2010	(r43633)
@@ -0,0 +1,6 @@
+JSON_LIB_PBCS = compilers/json/JSON.pbc
+JSON_CLEANUPS = $(JSON_LIB_PBCS) \
+    compilers/json/JSON/grammar.pir \
+    compilers/json/JSON/pge2pir.pir \
+    compilers/json/JSON/grammar.pbc \
+    compilers/json/JSON/pge2pir.pbc

Added: branches/gc_encapsulate/compilers/json/Rules.mak
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gc_encapsulate/compilers/json/Rules.mak	Thu Jan 28 09:35:26 2010	(r43633)
@@ -0,0 +1,16 @@
+compilers/json/JSON.pbc : \
+    $(LIBRARY_DIR)/PGE.pbc \
+    $(LIBRARY_DIR)/PGE/Util.pbc \
+    $(LIBRARY_DIR)/TGE.pbc \
+    compilers/json/JSON/grammar.pbc \
+    compilers/json/JSON/pge2pir.pbc \
+    compilers/json/JSON.pir
+	$(PARROT) -o $@ compilers/json/JSON.pir
+
+compilers/json/JSON/grammar.pir : compilers/json/JSON/grammar.pg \
+    $(LIBRARY_DIR)/PGE/Perl6Grammar.pbc
+	$(PARROT) $(LIBRARY_DIR)/PGE/Perl6Grammar.pbc --output=$@ compilers/json/JSON/grammar.pg
+
+compilers/json/JSON/pge2pir.pir : compilers/json/JSON/pge2pir.tg \
+    $(LIBRARY_DIR)/TGE.pbc
+	$(PARROT) compilers/tge/tgc.pir --output=$@ compilers/json/JSON/pge2pir.tg

Added: branches/gc_encapsulate/compilers/nqp/Defines.mak
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gc_encapsulate/compilers/nqp/Defines.mak	Thu Jan 28 09:35:26 2010	(r43633)
@@ -0,0 +1,7 @@
+NQP_LIB_PBCS = compilers/nqp/nqp.pbc
+
+NQP_CLEANUPS = \
+    compilers/nqp/nqp.pbc \
+    compilers/nqp/src/Grammar_gen.pir \
+    compilers/nqp/bootstrap/gen_actions.pir \
+    compilers/nqp/bootstrap/nqp.pbc

Added: branches/gc_encapsulate/compilers/nqp/Rules.mak
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gc_encapsulate/compilers/nqp/Rules.mak	Thu Jan 28 09:35:26 2010	(r43633)
@@ -0,0 +1,21 @@
+compilers/nqp/nqp.pbc : compilers/nqp/src/builtins.pir \
+    compilers/nqp/src/Grammar/Actions.pir \
+    compilers/nqp/src/Grammar_gen.pir \
+    $(LIBRARY_DIR)/PCT.pbc \
+    $(LIBRARY_DIR)/PGE.pbc
+
+compilers/nqp/src/Grammar_gen.pir : $(PARROT) $(LIBRARY_DIR)/PGE/Perl6Grammar.pir compilers/nqp/src/Grammar.pg $(LIBRARY_DIR)/PCT/HLLCompiler.pbc $(LIBRARY_DIR)/PGE.pbc
+	$(PARROT) $(LIBRARY_DIR)/PGE/Perl6Grammar.pir --output=$@ compilers/nqp/src/Grammar.pg
+
+# Developer target to regnerate bootstrap. Unused?
+nqp-boot: \
+    compilers/nqp/bootstrap/nqp.pir \
+    compilers/nqp/bootstrap/gen_actions.pir
+
+compilers/nqp/bootstrap/gen_actions.pir : $(PARROT) \
+    compilers/nqp/nqp.pbc \
+    compilers/nqp/bootstrap/actions.pm
+	$(PARROT) compilers/nqp/nqp.pbc --output=$@ --target=pir \
+	    compilers/nqp/bootstrap/actions.pm
+
+compilers/nqp/bootstrap/nqp.pbc : $(LIBRARY)/PCT.pbc

Modified: branches/gc_encapsulate/compilers/nqp/bootstrap/nqp.pir
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/bootstrap/nqp.pir	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/bootstrap/nqp.pir	Thu Jan 28 09:35:26 2010	(r43633)
@@ -52,9 +52,9 @@
     $P1 = $P0.'command_line'(args)
 .end
 
-.include 'src/builtins.pir'
-.include 'src/Grammar_gen.pir'
-.include 'bootstrap/gen_actions.pir'
+.include 'compilers/nqp/src/builtins.pir'
+.include 'compilers/nqp/src/Grammar_gen.pir'
+.include 'compilers/nqp/bootstrap/gen_actions.pir'
 
 
 .namespace []

Modified: branches/gc_encapsulate/compilers/nqp/nqp.pir
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/nqp.pir	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/nqp.pir	Thu Jan 28 09:35:26 2010	(r43633)
@@ -22,11 +22,11 @@
     .tailcall $P0.'command_line'(args, 'encoding'=>'utf8', 'transcode'=>'ascii')
 .end
 
-.include 'src/Grammar_gen.pir'
+.include 'compilers/nqp/src/Grammar_gen.pir'
 
-.include 'src/Grammar/Actions.pir'
+.include 'compilers/nqp/src/Grammar/Actions.pir'
 
-.include 'src/builtins.pir'
+.include 'compilers/nqp/src/builtins.pir'
 
 # Local Variables:
 #   mode: pir

Modified: branches/gc_encapsulate/compilers/nqp/t/01-literals.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/01-literals.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/01-literals.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # check literals
 
 say('1..8');

Modified: branches/gc_encapsulate/compilers/nqp/t/02-if-else.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/02-if-else.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/02-if-else.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # check control structure 'if ... else'
 
 say('1..14');

Modified: branches/gc_encapsulate/compilers/nqp/t/02-if.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/02-if.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/02-if.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # check control structure 'if'
 
 say('1..4');

Modified: branches/gc_encapsulate/compilers/nqp/t/03-unless.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/03-unless.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/03-unless.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # check control structure 'unless'
 
 say('1..4');

Modified: branches/gc_encapsulate/compilers/nqp/t/04-comments.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/04-comments.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/04-comments.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # check comments
 
 say('1..2');

Modified: branches/gc_encapsulate/compilers/nqp/t/05-pod.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/05-pod.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/05-pod.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # check pod
 
 say('1..4');

Modified: branches/gc_encapsulate/compilers/nqp/t/06-args-pos.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/06-args-pos.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/06-args-pos.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # positional arguments
 
 say('1..2');

Modified: branches/gc_encapsulate/compilers/nqp/t/07-boolean.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/07-boolean.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/07-boolean.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # Testing boolean context operators, ! and ?
 
 plan(8);

Modified: branches/gc_encapsulate/compilers/nqp/t/08-blocks.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/08-blocks.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/08-blocks.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # check blocks and statement enders
 
 say('1..7');

Modified: branches/gc_encapsulate/compilers/nqp/t/09-var.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/09-var.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/09-var.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # check variables
 
 say('1..14');

Modified: branches/gc_encapsulate/compilers/nqp/t/10-sub.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/10-sub.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/10-sub.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # check subs
 
 say('1..11');

Modified: branches/gc_encapsulate/compilers/nqp/t/11-cmp.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/11-cmp.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/11-cmp.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # check comparisons
 
 say('1..19');

Modified: branches/gc_encapsulate/compilers/nqp/t/12-list.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/12-list.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/12-list.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # lists and for
 
 plan(3);

Modified: branches/gc_encapsulate/compilers/nqp/t/13-logical.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/13-logical.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/13-logical.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # check '||' and '&&'
 
 plan(4);

Modified: branches/gc_encapsulate/compilers/nqp/t/14-op.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/14-op.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/14-op.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # checking basic operands and circumfix:( )
 
 plan(29);

Modified: branches/gc_encapsulate/compilers/nqp/t/15-module.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/15-module.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/15-module.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # check module
 
 XYZ::sayfoo();

Modified: branches/gc_encapsulate/compilers/nqp/t/16-while.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/16-while.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/16-while.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # while, until statements
 
 plan(8);

Modified: branches/gc_encapsulate/compilers/nqp/t/17-class.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/17-class.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/17-class.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # class
 
 plan(1);

Modified: branches/gc_encapsulate/compilers/nqp/t/18-inline.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/18-inline.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/18-inline.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # inline
 
 plan(7);

Modified: branches/gc_encapsulate/compilers/nqp/t/19-hash_access.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/19-hash_access.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/19-hash_access.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # check hash access methods
 
 plan(7);

Modified: branches/gc_encapsulate/compilers/nqp/t/20-list_access.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/20-list_access.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/20-list_access.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # check list access methods
 
 plan(7);

Modified: branches/gc_encapsulate/compilers/nqp/t/22-optional_args.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/22-optional_args.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/22-optional_args.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # test optional arguments and parameters
 
 plan(3);

Modified: branches/gc_encapsulate/compilers/nqp/t/23-named_args.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/23-named_args.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/23-named_args.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # test named parameters and arguments
 
 plan(4);

Modified: branches/gc_encapsulate/compilers/nqp/t/24-scalar_context.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/24-scalar_context.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/24-scalar_context.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # scalar context
 
 plan(1);

Modified: branches/gc_encapsulate/compilers/nqp/t/25-list_context.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/25-list_context.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/25-list_context.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # list context
 
 plan(1);

Modified: branches/gc_encapsulate/compilers/nqp/t/26-method_ops.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/26-method_ops.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/26-method_ops.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # method ops (just method calls for now)
 
 plan(3);

Modified: branches/gc_encapsulate/compilers/nqp/t/27-ternary.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/27-ternary.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/27-ternary.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # the ternary ?? !! operator
 
 plan(8);

Modified: branches/gc_encapsulate/compilers/nqp/t/28-return.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/28-return.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/28-return.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # implicit and explicit returns from subs
 
 plan(3);

Modified: branches/gc_encapsulate/compilers/nqp/t/29-self.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/29-self.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/29-self.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 plan(3);
 
 class Foo {

Modified: branches/gc_encapsulate/compilers/nqp/t/30-subclass.t
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/30-subclass.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/30-subclass.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
 # class inheritance
 
 plan(6);

Modified: branches/gc_encapsulate/compilers/nqp/t/harness
==============================================================================
--- branches/gc_encapsulate/compilers/nqp/t/harness	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/nqp/t/harness	Thu Jan 28 09:35:26 2010	(r43633)
@@ -4,5 +4,10 @@
 
 use FindBin;
 use lib qw( . lib ../lib ../../lib ../../../lib );
-use Parrot::Test::Harness language => 'nqp', compiler => 'nqp.pbc';
+use Parrot::Test::Harness
+    language  => 'nqp',
+    exec      => [ './parrot', 'compilers/nqp/nqp.pbc' ],
+    files     => [ 'compilers/nqp/t/*.t' ];
 
+    #arguments => [ '--files' ],
+    #verbosity => 1,

Added: branches/gc_encapsulate/compilers/pct/Defines.mak
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gc_encapsulate/compilers/pct/Defines.mak	Thu Jan 28 09:35:26 2010	(r43633)
@@ -0,0 +1,8 @@
+PCT_LIB_PBCS = \
+    $(LIBRARY_DIR)/PCT.pbc \
+    $(LIBRARY_DIR)/PCT/PAST.pbc \
+    $(LIBRARY_DIR)/PCT/Grammar.pbc \
+    $(LIBRARY_DIR)/PCT/HLLCompiler.pbc \
+    $(LIBRARY_DIR)/PCT/Dumper.pbc 
+
+PCT_CLEANUPS = $(PCT_LIB_PBCS)

Added: branches/gc_encapsulate/compilers/pct/Rules.mak
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gc_encapsulate/compilers/pct/Rules.mak	Thu Jan 28 09:35:26 2010	(r43633)
@@ -0,0 +1,32 @@
+## XXX does not cover .includes of core .pasm files
+
+$(LIBRARY_DIR)/PCT.pbc : $(PARROT) compilers/pct/PCT.pir \
+    $(LIBRARY_DIR)/PCT/Grammar.pbc $(LIBRARY_DIR)/PCT/PAST.pbc
+	$(PARROT) -o $@ compilers/pct/PCT.pir
+
+$(LIBRARY_DIR)/PCT/PAST.pbc : compilers/pct/src/PAST.pir $(PARROT) \
+    $(LIBRARY_DIR)/PCT/HLLCompiler.pbc \
+    compilers/pct/src/PCT/Node.pir \
+    compilers/pct/src/PAST/Node.pir \
+    compilers/pct/src/PAST/Compiler.pir \
+    compilers/pct/src/POST/Node.pir \
+    compilers/pct/src/POST/Compiler.pir
+	$(PARROT) -o $@ compilers/pct/src/PAST.pir
+
+$(LIBRARY_DIR)/PCT/Grammar.pbc : compilers/pct/src/PCT/Grammar.pir $(PARROT) \
+    $(LIBRARY_DIR)/PGE.pbc $(LIBRARY_DIR)/PGE/Util.pbc
+	$(PARROT) -o $@ compilers/pct/src/PCT/Grammar.pir
+
+$(LIBRARY_DIR)/PCT/HLLCompiler.pbc : compilers/pct/src/PCT/HLLCompiler.pir \
+    $(PARROT) \
+    $(LIBRARY_DIR)/PGE/Dumper.pbc \
+    $(LIBRARY_DIR)/P6object.pbc \
+    $(LIBRARY_DIR)/Parrot/Exception.pbc \
+    $(LIBRARY_DIR)/config.pir \
+    $(LIBRARY_DIR)/Getopt/Obj.pbc \
+    $(LIBRARY_DIR)/dumper.pbc \
+    $(LIBRARY_DIR)/PCT/Dumper.pbc
+	$(PARROT) -o $@ compilers/pct/src/PCT/HLLCompiler.pir
+
+$(LIBRARY_DIR)/PCT/Dumper.pbc : compilers/pct/src/PCT/Dumper.pir $(PARROT)
+	$(PARROT) -o $@ compilers/pct/src/PCT/Dumper.pir

Modified: branches/gc_encapsulate/compilers/pct/src/PAST.pir
==============================================================================
--- branches/gc_encapsulate/compilers/pct/src/PAST.pir	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/pct/src/PAST.pir	Thu Jan 28 09:35:26 2010	(r43633)
@@ -11,15 +11,15 @@
 
 =cut
 
-.include 'src/PCT/Node.pir'
+.include 'compilers/pct/src/PCT/Node.pir'
 
-.include 'src/PAST/Node.pir'
+.include 'compilers/pct/src/PAST/Node.pir'
 
-.include 'src/PAST/Compiler.pir'
+.include 'compilers/pct/src/PAST/Compiler.pir'
 
-.include 'src/POST/Node.pir'
+.include 'compilers/pct/src/POST/Node.pir'
 
-.include 'src/POST/Compiler.pir'
+.include 'compilers/pct/src/POST/Compiler.pir'
 
 =head1 AUTHOR
 

Added: branches/gc_encapsulate/compilers/pge/Defines.mak
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gc_encapsulate/compilers/pge/Defines.mak	Thu Jan 28 09:35:26 2010	(r43633)
@@ -0,0 +1,2 @@
+PGE_LIB_PBCS = $(LIBRARY_DIR)/PGE.pbc
+PGE_CLEANUPS = $(PGE_LIB_PBCS) compilers/pge/PGE/builtins_gen.pir

Added: branches/gc_encapsulate/compilers/pge/Rules.mak
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gc_encapsulate/compilers/pge/Rules.mak	Thu Jan 28 09:35:26 2010	(r43633)
@@ -0,0 +1,15 @@
+$(LIBRARY_DIR)/PGE.pbc: $(PARROT) \
+    compilers/pge/PGE.pir \
+    compilers/pge/PGE/Exp.pir \
+    compilers/pge/PGE/Match.pir \
+    compilers/pge/PGE/Regex.pir \
+    compilers/pge/PGE/Perl6Regex.pir \
+    compilers/pge/PGE/OPTable.pir \
+    compilers/pge/PGE/P5Regex.pir \
+    compilers/pge/PGE/builtins.pg \
+    $(LIBRARY_DIR)/PCT/HLLCompiler.pbc
+	$(PERL) -e "" > compilers/pge/PGE/builtins_gen.pir
+	$(PARROT) -o $@ compilers/pge/PGE.pir
+	$(PARROT) $(LIBRARY_DIR)/PGE/Perl6Grammar.pir --output=compilers/pge/PGE/builtins_gen.pir compilers/pge/PGE/builtins.pg
+	$(PARROT) -o $@ compilers/pge/PGE.pir
+

Added: branches/gc_encapsulate/compilers/pirc/Defines.mak
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gc_encapsulate/compilers/pirc/Defines.mak	Thu Jan 28 09:35:26 2010	(r43633)
@@ -0,0 +1,18 @@
+PIRC_O_FILES = \
+    compilers/pirc/src/main$(O) \
+    compilers/pirc/src/pirparser$(O) \
+    compilers/pirc/src/pirlexer$(O) \
+    compilers/pirc/src/pircompunit$(O) \
+    compilers/pirc/src/pircompiler$(O) \
+    compilers/pirc/src/pirsymbol$(O) \
+    compilers/pirc/src/piremit$(O) \
+    compilers/pirc/src/hdocprep$(O) \
+    compilers/pirc/src/pirmacro$(O) \
+    compilers/pirc/src/pirregalloc$(O) \
+    compilers/pirc/src/bcgen$(O) \
+    compilers/pirc/src/pirpcc$(O) \
+    compilers/pirc/src/pirerr$(O) \
+    compilers/pirc/src/pircapi$(O) \
+    compilers/pirc/src/pirop$(O)
+
+PIRC_CLEANUPS = $(PIRC_O_FILES) "compilers/pirc/t/*.pir" ./pirc$(EXE)

Added: branches/gc_encapsulate/compilers/pirc/Rules.mak
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gc_encapsulate/compilers/pirc/Rules.mak	Thu Jan 28 09:35:26 2010	(r43633)
@@ -0,0 +1,226 @@
+compilers/pirc/src/piremit$(O) : $(PARROT_H_HEADERS) \
+        compilers/pirc/src/piremit.h \
+        compilers/pirc/src/pircompunit.h \
+        compilers/pirc/src/pircompiler.h \
+        compilers/pirc/src/pirerr.h \
+        compilers/pirc/src/bcgen.h \
+        compilers/pirc/src/pirdefines.h \
+        compilers/pirc/src/pirmacro.h \
+        compilers/pirc/src/pirregalloc.h \
+        compilers/pirc/src/pirsymbol.h \
+        compilers/pirc/src/piryy.h \
+        $(INC_DIR)/embed.h \
+        $(INC_DIR)/oplib/ops.h
+
+compilers/pirc/src/pirparser$(O) : $(PARROT_H_HEADERS) \
+        compilers/pirc/src/pircompiler.h \
+        compilers/pirc/src/pircompunit.h \
+        compilers/pirc/src/pirdefines.h \
+        compilers/pirc/src/pirparser.h \
+        compilers/pirc/src/piryy.h \
+        compilers/pirc/src/pirlexer.h \
+        compilers/pirc/src/pirerr.h \
+        compilers/pirc/src/pirop.h \
+        compilers/pirc/src/pirpcc.h \
+        compilers/pirc/src/pirmacro.h \
+        compilers/pirc/src/pirregalloc.h \
+        compilers/pirc/src/pirsymbol.h \
+        compilers/pirc/src/bcgen.h \
+        $(INC_DIR)/oplib/ops.h \
+        $(INC_DIR)/embed.h
+
+compilers/pirc/src/pirerr$(O) : $(PARROT_H_HEADERS) \
+        compilers/pirc/src/pircompiler.h \
+        compilers/pirc/src/pircompunit.h \
+        compilers/pirc/src/pirdefines.h \
+        compilers/pirc/src/pirparser.h \
+        compilers/pirc/src/piryy.h \
+        compilers/pirc/src/pirlexer.h \
+        compilers/pirc/src/pirerr.h \
+        compilers/pirc/src/pirmacro.h \
+        compilers/pirc/src/pirregalloc.h \
+        compilers/pirc/src/pirsymbol.h \
+        compilers/pirc/src/bcgen.h \
+        $(INC_DIR)/embed.h
+
+compilers/pirc/src/bcgen$(O) :  \
+  compilers/pirc/src/pirsymbol.h \
+  compilers/pirc/src/pircompiler.h \
+  compilers/pirc/src/pirregalloc.h \
+  compilers/pirc/src/pircompunit.h \
+  compilers/pirc/src/pirdefines.h \
+  compilers/pirc/src/pirmacro.h \
+  compilers/pirc/src/bcgen.h \
+  $(PARROT_H_HEADERS) \
+  $(INC_DIR)/embed.h \
+  include/pmc/pmc_sub.h \
+  include/pmc/pmc_namespace.h
+
+compilers/pirc/src/pirregalloc$(O) : $(PARROT_H_HEADERS) \
+        compilers/pirc/src/pircompiler.h \
+        compilers/pirc/src/pircompunit.h \
+        compilers/pirc/src/pirdefines.h \
+        compilers/pirc/src/pirmacro.h \
+        compilers/pirc/src/pirregalloc.h \
+        compilers/pirc/src/pirsymbol.h \
+        compilers/pirc/src/bcgen.h \
+        $(INC_DIR)/embed.h
+
+compilers/pirc/heredoc/heredocmain$(O) : $(PARROT_H_HEADERS)
+
+compilers/pirc/macro/macrolexer$(O) : $(PARROT_H_HEADERS) \
+        compilers/pirc/macro/macro.h  \
+        compilers/pirc/macro/lexer.h  \
+        compilers/pirc/macro/macroparser.h
+
+compilers/pirc/macro/macroparser$(O) : $(PARROT_H_HEADERS) \
+        compilers/pirc/macro/macro.h  \
+        compilers/pirc/macro/lexer.h  \
+        compilers/pirc/macro/macroparser.h \
+        compilers/pirc/macro/macrolexer.h
+
+compilers/pirc/src/hdocprep$(O) : $(PARROT_H_HEADERS) \
+        $(INC_DIR)/embed.h compilers/pirc/src/pirheredoc.h
+
+compilers/pirc/src/main$(O) : \
+        $(PARROT_H_HEADERS) \
+        $(INC_DIR)/embed.h \
+        compilers/pirc/src/bcgen.h \
+        compilers/pirc/src/pirparser.h \
+        compilers/pirc/src/pircompiler.h \
+        compilers/pirc/src/pircompunit.h \
+        compilers/pirc/src/pirmacro.h \
+        compilers/pirc/src/pirdefines.h \
+        compilers/pirc/src/piremit.h \
+        compilers/pirc/src/piryy.h \
+        compilers/pirc/src/pirlexer.h \
+        compilers/pirc/src/pirheredoc.h \
+        compilers/pirc/src/pirsymbol.h \
+        compilers/pirc/src/pirregalloc.h \
+        compilers/pirc/src/pircapi.h
+
+compilers/pirc/src/pircapi$(O) : \
+        $(PARROT_H_HEADERS) \
+        compilers/pirc/src/bcgen.h \
+        compilers/pirc/src/pircompiler.h \
+        compilers/pirc/src/pirparser.h \
+        compilers/pirc/src/pircompunit.h \
+        compilers/pirc/src/pirsymbol.h \
+        compilers/pirc/src/pirregalloc.h \
+        compilers/pirc/src/pirmacro.h \
+        compilers/pirc/src/pirdefines.h \
+        compilers/pirc/src/piremit.h \
+        compilers/pirc/src/piryy.h \
+        compilers/pirc/src/pirlexer.h \
+        compilers/pirc/src/pircapi.h \
+        $(INC_DIR)/embed.h
+
+compilers/pirc/src/pircompiler$(O) : \
+        compilers/pirc/src/pircompiler.h \
+        $(PARROT_H_HEADERS) \
+        compilers/pirc/src/piryy.h \
+        compilers/pirc/src/pirmacro.h \
+        compilers/pirc/src/pirregalloc.h \
+        compilers/pirc/src/pirerr.h \
+        compilers/pirc/src/bcgen.h \
+        compilers/pirc/src/pircompunit.h \
+        compilers/pirc/src/pirsymbol.h \
+        compilers/pirc/src/pirdefines.h \
+        $(INC_DIR)/embed.h
+
+compilers/pirc/src/pircompunit$(O) : $(PARROT_H_HEADERS) \
+  compilers/pirc/src/pircompunit.h \
+  compilers/pirc/src/pircompiler.h \
+  compilers/pirc/src/pirsymbol.h \
+  compilers/pirc/src/piryy.h \
+  compilers/pirc/src/pirdefines.h \
+  compilers/pirc/src/pirregalloc.h \
+  compilers/pirc/src/pirpcc.h \
+  compilers/pirc/src/pirerr.h \
+  compilers/pirc/src/pirmacro.h \
+  compilers/pirc/src/pirop.h \
+  compilers/pirc/src/bcgen.h \
+  $(INC_DIR)/oplib/ops.h \
+  $(INC_DIR)/dynext.h \
+  $(INC_DIR)/embed.h
+
+compilers/pirc/src/pirlexer$(O) : $(PARROT_H_HEADERS) \
+  compilers/pirc/src/pirparser.h \
+  compilers/pirc/src/pirmacro.h \
+  compilers/pirc/src/pirerr.h \
+  compilers/pirc/src/pircompunit.h \
+  compilers/pirc/src/pircompiler.h \
+  compilers/pirc/src/pirsymbol.h \
+  compilers/pirc/src/piryy.h \
+  compilers/pirc/src/pirdefines.h \
+  compilers/pirc/src/pirregalloc.h \
+  compilers/pirc/src/bcgen.h \
+  $(INC_DIR)/embed.h
+
+compilers/pirc/src/pirmacro$(O) : $(PARROT_H_HEADERS) \
+  compilers/pirc/src/pirmacro.h \
+  compilers/pirc/src/pircompunit.h \
+  compilers/pirc/src/pircompiler.h \
+  compilers/pirc/src/pirsymbol.h \
+  compilers/pirc/src/pirdefines.h \
+  compilers/pirc/src/pirregalloc.h \
+  compilers/pirc/src/bcgen.h \
+  $(INC_DIR)/embed.h
+
+compilers/pirc/src/pirop$(O) : $(PARROT_H_HEADERS) \
+  compilers/pirc/src/pircompiler.h \
+  compilers/pirc/src/pircompunit.h \
+  compilers/pirc/src/pirop.h \
+  compilers/pirc/src/pirerr.h \
+  compilers/pirc/src/pirsymbol.h \
+  compilers/pirc/src/piryy.h \
+  compilers/pirc/src/pirdefines.h \
+  compilers/pirc/src/pirregalloc.h \
+  compilers/pirc/src/pirmacro.h \
+  compilers/pirc/src/bcgen.h \
+  $(INC_DIR)/embed.h
+
+compilers/pirc/src/pirpcc$(O) : $(PARROT_H_HEADERS) \
+  compilers/pirc/src/pirpcc.h \
+  compilers/pirc/src/pircompiler.h \
+  compilers/pirc/src/pirerr.h \
+  compilers/pirc/src/pircompunit.h \
+  compilers/pirc/src/pirsymbol.h \
+  compilers/pirc/src/piryy.h \
+  compilers/pirc/src/pirdefines.h \
+  compilers/pirc/src/pirregalloc.h \
+  compilers/pirc/src/pirmacro.h \
+  compilers/pirc/src/bcgen.h \
+  $(INC_DIR)/oplib/ops.h \
+  $(INC_DIR)/embed.h
+
+compilers/pirc/src/pirsymbol$(O) : $(PARROT_H_HEADERS) \
+  compilers/pirc/src/pircompiler.h \
+  compilers/pirc/src/pirsymbol.h \
+  compilers/pirc/src/piryy.h \
+  compilers/pirc/src/pirerr.h \
+  compilers/pirc/src/pircompunit.h \
+  compilers/pirc/src/pirdefines.h \
+  compilers/pirc/src/pirregalloc.h \
+  compilers/pirc/src/pirmacro.h \
+  compilers/pirc/src/bcgen.h \
+  $(INC_DIR)/embed.h
+
+# the all here is too broad, but the separate pirc.exe is going away soonish.
+pirc$(EXE): $(PIRC_O_FILES) all
+	$(LINK) $(LD_OUT) $@ \
+	    $(PIRC_O_FILES) \
+	    $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(C_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
+#IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+
+compilers/pirc/src/pir.y.flag compilers/pirc/src/pirparser.c compilers/pirc/src/pirparser.h : compilers/pirc/src/pir.y
+	$(YACC) compilers/pirc/src/pir.y -d -o compilers/pirc/src/pirparser.c
+	$(TOUCH) compilers/pirc/src/pir.y.flag compilers/pirc/src/pirparser.c compilers/pirc/src/pirparser.h
+
+compilers/pirc/src/pir.l.flag compilers/pirc/src/pirlexer.c : compilers/pirc/src/pir.l
+	$(LEX) -o compilers/pirc/src/pirlexer.c compilers/pirc/src/pir.l
+	$(TOUCH) compilers/pirc/src/pir.l.flag compilers/pirc/src/pirlexer.c
+
+# XXX This should eventually be combined with the standard parrot test suite.
+pirc-test: all
+	$(PERL) compilers/pirc/t/harness

Modified: branches/gc_encapsulate/compilers/pirc/src/bcgen.c
==============================================================================
--- branches/gc_encapsulate/compilers/pirc/src/bcgen.c	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/pirc/src/bcgen.c	Thu Jan 28 09:35:26 2010	(r43633)
@@ -846,7 +846,7 @@
 
 /*
 
-=item C<int emit_pbc_key(bytecode * const bc, key * const k)>
+=item C<int emit_pbc_key(bytecode * const bc, struct key * const k)>
 
 Emit bytecode for the key C<k>. First the bytecode is
 written to a temporary buffer, which is later unpacked
@@ -856,7 +856,7 @@
 
 */
 int
-emit_pbc_key(ARGIN(bytecode * const bc), ARGIN(key * const k))
+emit_pbc_key(ARGIN(bytecode * const bc), ARGIN(struct key * const k))
 {
     ASSERT_ARGS(emit_pbc_key)
     key_entry  *iter;

Modified: branches/gc_encapsulate/compilers/pirc/src/bcgen.h
==============================================================================
--- branches/gc_encapsulate/compilers/pirc/src/bcgen.h	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/pirc/src/bcgen.h	Thu Jan 28 09:35:26 2010	(r43633)
@@ -162,7 +162,7 @@
 emit_opcode(ARGIN(bytecode * const bc), opcode_t op)
         __attribute__nonnull__(1);
 
-int emit_pbc_key(ARGIN(bytecode * const bc), ARGIN(key * const k))
+int emit_pbc_key(ARGIN(bytecode * const bc), ARGIN(struct key * const k))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
@@ -289,8 +289,6 @@
 
 STRING *get_string_const(bytecode * const bc, unsigned index);
 
-int emit_pbc_key(bytecode * const bc, struct key * const k);
-
 /*
 
 int add_string_const(bytecode * const bc, STRING *s);

Modified: branches/gc_encapsulate/compilers/pirc/t/basic.t
==============================================================================
--- branches/gc_encapsulate/compilers/pirc/t/basic.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/pirc/t/basic.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -2,7 +2,7 @@
 # Copyright (C) 2008-2009, Parrot Foundation.
 # $Id$
 
-use lib "../../lib";
+use lib qw(lib);
 use Parrot::Test tests => 6;
 
 pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a local, a reg and an if-stat");

Modified: branches/gc_encapsulate/compilers/pirc/t/harness
==============================================================================
--- branches/gc_encapsulate/compilers/pirc/t/harness	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/pirc/t/harness	Thu Jan 28 09:35:26 2010	(r43633)
@@ -5,11 +5,11 @@
 use strict;
 use warnings;
 
-use lib '../../lib';
+use lib qw(lib);
 
 use Test::Harness;
 
-my @tests = @ARGV ? @ARGV : <t/*.t>;
+my @tests = @ARGV ? @ARGV : <compilers/pirc/t/*.t>;
 
 eval { require TAP::Harness };
 if ($@) {

Modified: branches/gc_encapsulate/compilers/pirc/t/heredoc.t
==============================================================================
--- branches/gc_encapsulate/compilers/pirc/t/heredoc.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/pirc/t/heredoc.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -2,7 +2,7 @@
 # Copyright (C) 2008-2009, Parrot Foundation.
 # $Id$
 
-use lib "../../lib";
+use lib qw(lib);
 use Parrot::Test tests => 1;
 
 pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a single const declaration");

Modified: branches/gc_encapsulate/compilers/pirc/t/macro.t
==============================================================================
--- branches/gc_encapsulate/compilers/pirc/t/macro.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/pirc/t/macro.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -2,7 +2,7 @@
 # Copyright (C) 2008-2009, Parrot Foundation.
 # $Id$
 
-use lib "../../lib";
+use lib qw(lib);
 use Parrot::Test tests => 1;
 
 pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a single const declaration");

Modified: branches/gc_encapsulate/compilers/pirc/t/stmts.t
==============================================================================
--- branches/gc_encapsulate/compilers/pirc/t/stmts.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/pirc/t/stmts.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -2,7 +2,7 @@
 # Copyright (C) 2008-2009, Parrot Foundation.
 # $Id$
 
-use lib "../../lib";
+use lib qw(lib);
 use Parrot::Test tests => 5;
 
 pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a simple sub call - no params");

Modified: branches/gc_encapsulate/compilers/pirc/t/subflags.t
==============================================================================
--- branches/gc_encapsulate/compilers/pirc/t/subflags.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/pirc/t/subflags.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -2,7 +2,7 @@
 # Copyright (C) 2008-2009, Parrot Foundation.
 # $Id$
 
-use lib "../../lib";
+use lib qw(lib);
 use Parrot::Test tests => 1;
 
 pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a single const declaration");

Added: branches/gc_encapsulate/compilers/tge/Defines.mak
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gc_encapsulate/compilers/tge/Defines.mak	Thu Jan 28 09:35:26 2010	(r43633)
@@ -0,0 +1,2 @@
+TGE_LIB_PBCS = $(LIBRARY_DIR)/TGE.pbc compilers/tge/tgc.pbc
+TGE_CLEANUPS = $(TGE_LIB_PBCS) compilers/tge/TGE/Parser.pir

Added: branches/gc_encapsulate/compilers/tge/Rules.mak
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gc_encapsulate/compilers/tge/Rules.mak	Thu Jan 28 09:35:26 2010	(r43633)
@@ -0,0 +1,18 @@
+$(LIBRARY_DIR)/TGE.pbc:  \
+    $(LIBRARY_DIR)/PGE.pbc \
+    $(LIBRARY_DIR)/PGE/Util.pbc \
+    $(LIBRARY_DIR)/P6object.pbc \
+    compilers/tge/TGE.pir \
+    compilers/tge/TGE/Rule.pir \
+    compilers/tge/TGE/Parser.pir \
+    compilers/tge/TGE/Grammar.pir \
+    compilers/tge/TGE/Compiler.pir \
+    compilers/tge/TGE/Tree.pir
+	$(PARROT) -o $@ compilers/tge/TGE.pir
+
+compilers/tge/tgc.pbc : $(LIBRARY_DIR)/TGE.pbc $(LIBRARY_DIR)/Getopt/Obj.pbc
+
+compilers/tge/TGE/Parser.pir: $(PARROT) \
+    compilers/tge/TGE/Parser.pg \
+    $(LIBRARY_DIR)/PGE/Perl6Grammar.pbc 
+	$(PARROT) $(LIBRARY_DIR)/PGE/Perl6Grammar.pbc --output=$@ compilers/tge/TGE/Parser.pg

Modified: branches/gc_encapsulate/compilers/tge/TGE.pir
==============================================================================
--- branches/gc_encapsulate/compilers/tge/TGE.pir	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/compilers/tge/TGE.pir	Thu Jan 28 09:35:26 2010	(r43633)
@@ -16,7 +16,7 @@
     # and elsewhere...
 
     .sub _main :main
-        load_bytecode 'TGE.pir'
+        load_bytecode 'TGE.pbc'
 
         # Compile a grammar from the source grammar file
         .local pmc compiler

Deleted: branches/gc_encapsulate/config/auto/alignptrs.pm
==============================================================================
--- branches/gc_encapsulate/config/auto/alignptrs.pm	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,110 +0,0 @@
-# Copyright (C) 2001-2005, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-config/auto/alignptrs.pm - pointer alignment
-
-=head1 DESCRIPTION
-
-Determine the minimum pointer alignment.
-
-=cut
-
-package auto::alignptrs;
-
-use strict;
-use warnings;
-
-use base qw(Parrot::Configure::Step);
-
-use Parrot::Configure::Utils ':auto';
-
-sub _init {
-    my $self = shift;
-    my %data;
-    $data{description} = q{Determine your minimum pointer alignment};
-    $data{result}      = q{};
-    return \%data;
-}
-
-sub runstep {
-    my ( $self, $conf ) = ( shift, shift );
-
-    my $result_str = '';
-    my $align;
-    if ( defined( $conf->data->get('ptr_alignment') ) ) {
-        $align = $conf->data->get('ptr_alignment');
-        $result_str .= "configured: ";
-    }
-    elsif ( $conf->data->get('OSNAME_provisional') eq 'hpux'
-            && $conf->data->get('ccflags_provisional') !~ /DD64/ ) {
-
-        # HP-UX 10.20/32 hangs in this test.
-        $align = 4;
-        $conf->data->set( ptr_alignment => $align );
-        $result_str .= "for hpux: ";
-    }
-    else {
-
-        # Now really test by compiling some code
-        $conf->cc_gen('config/auto/alignptrs/test_c.in');
-        $conf->cc_build();
-        my $minimum_valid_align;
-        my @aligns = (1, 2, 4, 8, 16, 32, 64);
-        TRY_ALIGN: while ( defined( my $try_align = shift(@aligns) ) ) {
-            my $results = $conf->cc_run_capture($try_align);
-            $align = _evaluate_results($results, $try_align);
-            if (defined $align) {
-                $minimum_valid_align = $align;
-                last TRY_ALIGN;
-            }
-            else {
-                next TRY_ALIGN;
-            }
-        }
-        $conf->cc_clean();
-
-        _evaluate_ptr_alignment($conf, $minimum_valid_align);
-
-        # If at this point we haven't died, then we can assign
-        # $minimum_valid_align to $align.
-        $align = $minimum_valid_align;
-    }
-
-    $self->_finalize_result_str($align, $result_str);
-
-    return 1;
-}
-
-sub _evaluate_results {
-    my ($results, $try_align) = @_;
-    my $align;
-    if ( $results =~ /OK/ && $results !~ /align/i ) {
-        $align = $try_align;
-    }
-    return $align;
-}
-
-sub _evaluate_ptr_alignment {
-    my ($conf, $minimum_valid_align) = @_;
-    die "Can't determine alignment!\n" unless defined $minimum_valid_align;
-    $conf->data->set( ptr_alignment => $minimum_valid_align );
-}
-
-sub _finalize_result_str {
-    my $self = shift;
-    my ($align, $result_str) = @_;
-    $result_str .= " $align byte";
-    $result_str .= "s" unless $align == 1;
-    $self->set_result($result_str);
-}
-
-1;
-
-# Local Variables:
-#   mode: cperl
-#   cperl-indent-level: 4
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:

Deleted: branches/gc_encapsulate/config/auto/alignptrs/test_c.in
==============================================================================
--- branches/gc_encapsulate/config/auto/alignptrs/test_c.in	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,63 +0,0 @@
-/*
-Copyright (C) 2002-2009, Parrot Foundation.
-$Id$
-
-figure out our minimum pointer alignment
-*/
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <signal.h>
-/* Try to catch bus errors */
-#ifdef SIGBUS
-#  include <stdlib.h>
-void bletch(int s) { exit(1); }
-#endif
-
-int
-main(int argc, char **argv)
-{
-    int i;
-    char *c;
-
-    long space[32];
-    void **ptr;
-
-    int align = 0;
-
-    if (argc != 2) {
-        printf("FAILED - single command-line parameter required!\n");
-        return 1;
-    }
-
-#ifdef SIGBUS
-    signal(SIGBUS, bletch);
-#endif
-
-    for (i = 0; i < 32; i ++) space[i] = 0;
-
-    for (c = argv[1]; *c; c++) align = align * 10 + ((int)*c - '0');
-
-#if defined(__alpha)
-    if (align < 8) {
-        printf("Soft failure hack for systems that simulate unaligned access\n");
-        return 1;
-    }
-#endif
-
-    ptr = (void **)((char *)space + align);
-
-    if (*ptr == (void *)0)
-        printf("%d OK\n", align);
-    else
-        printf("%d OK but didnt equal zero\n", align);
-
-    return 0;
-}
-
-/*
- * Local variables:
- *   c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */

Modified: branches/gc_encapsulate/config/auto/byteorder/test_c.in
==============================================================================
--- branches/gc_encapsulate/config/auto/byteorder/test_c.in	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/config/auto/byteorder/test_c.in	Thu Jan 28 09:35:26 2010	(r43633)
@@ -15,6 +15,14 @@
         unsigned char b[sizeof (@iv@)/sizeof (unsigned char)];
         @iv@ w;
     } w;
+#if defined(__ARM__) || defined(__arm__)
+#  if defined(__ARMEB__)
+    printf("87654321\n");
+#  else
+    printf("1234\n");
+#  endif
+    return 0;
+#endif
     if (sizeof (w) == 4) {
         w.w = 0x04030201;
     }

Modified: branches/gc_encapsulate/config/auto/cgoto.pm
==============================================================================
--- branches/gc_encapsulate/config/auto/cgoto.pm	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/config/auto/cgoto.pm	Thu Jan 28 09:35:26 2010	(r43633)
@@ -62,25 +62,25 @@
             TEMP_cg_c => <<'EOF',
 # generated by config/auto/cgoto.pm
 
-$(OPS_DIR)/core_ops_cg$(O): $(GENERAL_H_FILES) $(OPS_DIR)/core_ops_cg.c \
-	$(PMC_INC_DIR)/pmc/pmc_parrotlibrary.h
-$(OPS_DIR)/core_ops_cgp$(O): $(GENERAL_H_FILES) $(OPS_DIR)/core_ops_cgp.c \
-	$(PMC_INC_DIR)/pmc/pmc_parrotlibrary.h
-$(SRC_DIR)/runcore/cores.c: $(INC_DIR)/oplib/core_ops_cgp.h
+src/ops/core_ops_cg$(O): $(GENERAL_H_FILES) src/ops/core_ops_cg.c \
+	include/pmc/pmc_parrotlibrary.h
+src/ops/core_ops_cgp$(O): $(GENERAL_H_FILES) src/ops/core_ops_cgp.c \
+	include/pmc/pmc_parrotlibrary.h
+src/runcore/cores.c: $(INC_DIR)/oplib/core_ops_cgp.h
 
-$(INC_DIR)/oplib/core_ops_cg.h: $(OPS_DIR)/core_ops_cg.c
+$(INC_DIR)/oplib/core_ops_cg.h: src/ops/core_ops_cg.c
 
-$(OPS_DIR)/core_ops_cg.c : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2c.pl lib/Parrot/OpsFile.pm lib/Parrot/Op.pm lib/Parrot/OpTrans/CGoto.pm lib/Parrot/OpLib/core.pm
+src/ops/core_ops_cg.c : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2c.pl lib/Parrot/OpsFile.pm lib/Parrot/Op.pm lib/Parrot/OpTrans/CGoto.pm lib/Parrot/OpLib/core.pm
 	$(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl CGoto --core
 
-$(INC_DIR)/oplib/core_ops_cgp.h: $(OPS_DIR)/core_ops_cgp.c
+$(INC_DIR)/oplib/core_ops_cgp.h: src/ops/core_ops_cgp.c
 
-$(OPS_DIR)/core_ops_cgp.c : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2c.pl lib/Parrot/OpsFile.pm lib/Parrot/Op.pm lib/Parrot/OpTrans/CGP.pm lib/Parrot/OpLib/core.pm lib/Parrot/OpTrans/CPrederef.pm
+src/ops/core_ops_cgp.c : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2c.pl lib/Parrot/OpsFile.pm lib/Parrot/Op.pm lib/Parrot/OpTrans/CGP.pm lib/Parrot/OpLib/core.pm lib/Parrot/OpTrans/CPrederef.pm
 	$(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl CGP --core
 EOF
-            TEMP_cg_o => '$(OPS_DIR)/core_ops_cg$(O) $(OPS_DIR)/core_ops_cgp$(O)',
-            TEMP_cg_r => '$(RM_F) $(INC_DIR)/oplib/core_ops_cg.h $(OPS_DIR)/core_ops_cg.c \
-                    $(INC_DIR)/oplib/core_ops_cgp.h $(OPS_DIR)/core_ops_cgp.c',
+            TEMP_cg_o => 'src/ops/core_ops_cg$(O) src/ops/core_ops_cgp$(O)',
+            TEMP_cg_r => '$(RM_F) $(INC_DIR)/oplib/core_ops_cg.h src/ops/core_ops_cg.c \
+                    $(INC_DIR)/oplib/core_ops_cgp.h src/ops/core_ops_cgp.c',
             cg_flag => '-DHAVE_COMPUTED_GOTO'
         );
         print " (yes) " if $verbose;

Deleted: branches/gc_encapsulate/config/auto/cpu/i386/Makefile
==============================================================================
--- branches/gc_encapsulate/config/auto/cpu/i386/Makefile	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,17 +0,0 @@
-# use gcc/as to generate some files
-# this file is not intended to be run during normal config
-# but only by developers that change the source
-
-
-all: memcpy_files
-
-memcpy_files: memcpy_mmx.c memcpy_sse.c
-
-memcpy_mmx.c: memcpy_mmx_in.c ../../../../tools/dev/as2c.pl
-	perl ../../../../tools/dev/as2c.pl memcpy_mmx_in > $@
-	rm -f memcpy_mmx_in.s memcpy_mmx_in.o
-
-memcpy_sse.c: memcpy_sse_in.c ../../../../tools/dev/as2c.pl
-	perl ../../../../tools/dev/as2c.pl memcpy_sse_in > $@
-	rm -f memcpy_sse_in.s memcpy_sse_in.o
-

Modified: branches/gc_encapsulate/config/auto/cpu/i386/auto.pm
==============================================================================
--- branches/gc_encapsulate/config/auto/cpu/i386/auto.pm	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/config/auto/cpu/i386/auto.pm	Thu Jan 28 09:35:26 2010	(r43633)
@@ -7,10 +7,10 @@
 
 =head1 DESCRIPTION
 
-Test for MMX/SSE functionality. Creates these Config entries
+Test for cmpxchg ASM functionality. Creates these Config entries
 
  TEMP_generated => 'files ...'   for inclusion in platform.c or platform.h
- i386_has_mmx   => 1
+ i386_has_gcc_cmpxchg_c   => 1
 
 =cut
 
@@ -24,25 +24,7 @@
 
     my $verbose = $conf->options->get('verbose');
 
-    my @files = qw( memcpy_mmx.c memcpy_sse.c );
-    for my $f (@files) {
-        print " $f " if $verbose;
-        my ($suffix) = $f =~ /memcpy_(\w+)/;
-        my $path_f = "config/auto/cpu/i386/$f";
-        $conf->cc_gen($path_f);
-        eval( $conf->cc_build("-DPARROT_CONFIG_TEST") );
-        if ($@) {
-            print " $@ " if $verbose;
-        }
-        else {
-            if ( $conf->cc_run() =~ /ok/ ) {
-                _handle_cc_run_ok($conf, $suffix, $path_f, $verbose);
-            }
-        }
-        $conf->cc_clean();
-    }
-
-    @files = qw( test_gcc_cmpxchg_c.in );
+    my @files = qw( test_gcc_cmpxchg_c.in );
     for my $f (@files) {
         print " $f " if $verbose;
         my ($suffix) = $f =~ /test_(\w+)/;

Deleted: branches/gc_encapsulate/config/auto/cpu/i386/memcpy_mmx.c
==============================================================================
--- branches/gc_encapsulate/config/auto/cpu/i386/memcpy_mmx.c	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,103 +0,0 @@
-/*
- * DO NOT EDIT THIS FILE
- *
- * Generated from memcpy_mmx_in.c via memcpy_mmx_in.s
- * by '../../../../tools/dev/as2c.pl memcpy_mmx_in'
- */
-
-/*
- * GAS LISTING /home/chip/tmp/cci2hVe3.s 			page 1
- *
- *
- *    1              		.file	"memcpy_mmx_in.c"
- *    2              		.text
- *    3              		.p2align 4,,15
- *    4              	.globl Parrot_memcpy_aligned_mmx
- *
- */
-static const char Parrot_memcpy_aligned_mmx_code[] = {
-                           /* Parrot_memcpy_aligned_mmx: */
-    0x57,                       /* pushl %edi */
-    0x56,                       /* pushl %esi */
-    0x53,                       /* pushl %ebx */
-    0x83, 0xEC, 0x10,           /* subl $16, %esp */
-    0x8B, 0x44, 0x24, 0x20,     /* movl 32(%esp), %eax */
-    0x8B, 0x5C, 0x24, 0x24,     /* movl 36(%esp), %ebx */
-    0x8B, 0x54, 0x24, 0x28,     /* movl 40(%esp), %edx */
-    0xDD, 0x5C, 0x24, 0x08,     /* fstpl 8(%esp) */
-    0x89, 0xC7,                 /* mov %eax, %edi */
-    0x89, 0xDE,                 /* mov %ebx, %esi */
-    0x89, 0xD1,                 /* mov %edx, %ecx */
-    0xC1, 0xE9, 0x04,           /* shr $4, %ecx */
-                           /* 1: */
-    0x0F, 0x6F, 0x06,           /* movq 0(%esi), %mm0 */
-    0x0F, 0x6F, 0x4E, 0x08,     /* movq 8(%esi), %mm1 */
-    0x83, 0xC6, 0x10,           /* add $16, %esi */
-    0x0F, 0x7F, 0x07,           /* movq %mm0, 0(%edi) */
-    0x0F, 0x7F, 0x4F, 0x08,     /* movq %mm1, 8(%edi) */
-    0x83, 0xC7, 0x10,           /* add $16, %edi */
-    0x49,                       /* dec %ecx */
-    0x75, 0xE9,                 /* jnz 1b */
-    0x0F, 0x77,                 /* emms */
-    0xDD, 0x44, 0x24, 0x08,     /* fldl 8(%esp) */
-    0x83, 0xC4, 0x10,           /* addl $16, %esp */
-    0x5B,                       /* popl %ebx */
-    0x5E,                       /* popl %esi */
-    0x5F,                       /* popl %edi */
-    0xC3,                       /* ret */
-    0x00
-};
-
-#include <stdlib.h>
-typedef void* (*Parrot_memcpy_aligned_mmx_t)(void *dest, const void *src, size_t);
-
-#ifndef NDEBUG
-#include <assert.h>
-static void*
-Parrot_memcpy_aligned_mmx_debug(void* d, const void* s, size_t n)
-{
-    assert( (n & 0xf) == 0);
-    assert( ((unsigned long) d & 7) == 0);
-    assert( ((unsigned long) s & 7) == 0);
-    return ((Parrot_memcpy_aligned_mmx_t)Parrot_memcpy_aligned_mmx_code)(d, s, n);
-}
-
-Parrot_memcpy_aligned_mmx_t Parrot_memcpy_aligned_mmx = Parrot_memcpy_aligned_mmx_debug;
-
-#else
-Parrot_memcpy_aligned_mmx_t Parrot_memcpy_aligned_mmx =
-    (Parrot_memcpy_aligned_mmx_t) Parrot_memcpy_aligned_mmx_code;
-#endif
-
-#ifdef PARROT_CONFIG_TEST
-#include <string.h>
-#include <stdio.h>
-int main(int argc, char *argv[]) {
-    unsigned char *s, *d;
-    size_t i, n;
-
-    n = 640;	/* sizeof(reg_store) */
-
-    s = (unsigned char *)malloc(n);
-    for (i = 0; i < n; ++i)
-    s[i] = i & 0xff;
-    d = (unsigned char *)malloc(n);
-    for (i = 0; i < n; ++i)
-    d[i] = 0xff;
-    Parrot_memcpy_aligned_mmx(d, s, n);
-    for (i = 0; i < n; ++i)
-    if (d[i] != (i & 0xff)) {
-        printf("error s[%d] = %d d = %d\n", i, s[i], d[i]);
-        exit(EXIT_FAILURE);
-    }
-    puts("ok");
-    return 0;
-}
-#endif /* PARROT_CONFIG_TEST */
-
-/*
- * Local variables:
- *   c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */

Deleted: branches/gc_encapsulate/config/auto/cpu/i386/memcpy_mmx_in.c
==============================================================================
--- branches/gc_encapsulate/config/auto/cpu/i386/memcpy_mmx_in.c	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,95 +0,0 @@
-/*
- * $Id$
- * Copyright (C) 2004-2006, Parrot Foundation.
- */
-
-#include <stdlib.h>
-void*
-Parrot_memcpy_aligned_mmx(void *dest, const void *src, size_t n)
-{
-    double tos;
-    /*
-     * must preserve tos - need also a version with fstpt/fldt
-     */
-    asm(
-        "fstpl %3\n\t"
-        "mov %0, %%edi\n\t"
-        "mov %1, %%esi\n\t"
-        "mov %2, %%ecx\n\t"
-        "shr $4, %%ecx\n\t"
-        "# .p2align 3\n\t"
-        "1:\n\t"
-        "movq 0(%%esi), %%mm0\n\t"
-        "movq 8(%%esi), %%mm1\n\t"
-        "add $16, %%esi\n\t"
-        "movq %%mm0, 0(%%edi)\n\t"
-        "movq %%mm1, 8(%%edi)\n\t"
-        "add $16, %%edi\n\t"
-        "dec %%ecx\n\t"
-        "jnz 1b\n\t"
-        "emms\n\t"
-        "fldl %3\n\t"
-    : /* no out */
-    : "g"(dest), "g"(src), "g"(n), "m"(tos)
-    : "%esi", "%edi", "%ecx", "memory");
-
-    return dest;
-}
-
-/*INTERFACE
-
-#include <stdlib.h>
-typedef void* (*@FUNC at _t)(void *dest, const void *src, size_t);
-
-#ifndef NDEBUG
-#  include <assert.h>
-static void*
- at FUNC@_debug(void* d, const void* s, size_t n)
-{
-    assert( (n & 0xf) == 0);
-    assert( ((unsigned long) d & 7) == 0);
-    assert( ((unsigned long) s & 7) == 0);
-    return ((@FUNC at _t)@FUNC at _code)(d, s, n);
-}
-
- at FUNC@_t @FUNC@ = @FUNC at _debug;
-
-#else
- at FUNC@_t @FUNC@ =
-    (@FUNC at _t) @FUNC at _code;
-#endif
-
-#ifdef PARROT_CONFIG_TEST
-#  include <string.h>
-#  include <stdio.h>
-int main(int argc, char *argv[]) {
-    unsigned char *s, *d;
-    size_t i, n;
-
-    n = 640; @* sizeof(reg_store) *@
-
-    s = malloc(n);
-    for (i = 0; i < n; ++i)
-        s[i] = i & 0xff;
-    d = malloc(n);
-    for (i = 0; i < n; ++i)
-        d[i] = 0xff;
-    @FUNC@(d, s, n);
-    for (i = 0; i < n; ++i) {
-        if (d[i] != (i & 0xff)) {
-            printf("error s[%d] = %d d = %d\n", i, s[i], d[i]);
-            exit(EXIT_FAILURE);
-        }
-    }
-    puts("ok");
-    return 0;
-}
-#endif @* PARROT_CONFIG_TEST *@
-INTERFACE*/
-
-/*
- * Local variables:
- *   c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */

Deleted: branches/gc_encapsulate/config/auto/cpu/i386/memcpy_sse.c
==============================================================================
--- branches/gc_encapsulate/config/auto/cpu/i386/memcpy_sse.c	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,94 +0,0 @@
-/*
- * DO NOT EDIT THIS FILE
- *
- * Generated from memcpy_sse_in.c via memcpy_sse_in.s
- * by '../../../../tools/dev/as2c.pl memcpy_sse_in'
- */
-
-/*
- * GAS LISTING /home/chip/tmp/ccvNpFsi.s 			page 1
- *
- *
- *    1              		.file	"memcpy_sse_in.c"
- *    2              		.text
- *    3              		.p2align 4,,15
- *    4              	.globl Parrot_memcpy_aligned_sse
- *
- */
-static const char Parrot_memcpy_aligned_sse_code[] = {
-                           /* Parrot_memcpy_aligned_sse: */
-    0x57,                       /* pushl %edi */
-    0x56,                       /* pushl %esi */
-    0x8B, 0x44, 0x24, 0x0C,     /* movl 12(%esp), %eax */
-    0x8B, 0x4C, 0x24, 0x14,     /* mov 20(%esp), %ecx */
-    0x8B, 0x74, 0x24, 0x10,     /* mov 16(%esp), %esi */
-    0x89, 0xC7,                 /* mov %eax, %edi */
-    0xC1, 0xE9, 0x05,           /* shr $5, %ecx */
-                           /* 1: */
-    0x0F, 0x10, 0x06,           /* movups 0(%esi), %xmm0 */
-    0x0F, 0x10, 0x4E, 0x10,     /* movups 16(%esi), %xmm1 */
-    0x83, 0xC6, 0x20,           /* add $32, %esi */
-    0x0F, 0x11, 0x07,           /* movups %xmm0, 0(%edi) */
-    0x0F, 0x11, 0x4F, 0x10,     /* movups %xmm1, 16(%edi) */
-    0x83, 0xC7, 0x20,           /* add $32, %edi */
-    0x49,                       /* dec %ecx */
-    0x75, 0xE9,                 /* jnz 1b */
-    0x5E,                       /* popl %esi */
-    0x5F,                       /* popl %edi */
-    0xC3,                       /* ret */
-    0x00
-};
-
-#include <stdlib.h>
-typedef void* (*Parrot_memcpy_aligned_sse_t)(void *dest, const void *src, size_t);
-
-#ifndef NDEBUG
-#include <assert.h>
-static void*
-Parrot_memcpy_aligned_sse_debug(void* d, const void* s, size_t n)
-{
-    assert( (n & 0x1f) == 0);
-    assert( ((unsigned long) d & 7) == 0);
-    assert( ((unsigned long) s & 7) == 0);
-    return ((Parrot_memcpy_aligned_sse_t)Parrot_memcpy_aligned_sse_code)(d, s, n);
-}
-
-Parrot_memcpy_aligned_sse_t Parrot_memcpy_aligned_sse = Parrot_memcpy_aligned_sse_debug;
-
-#else
-Parrot_memcpy_aligned_sse_t Parrot_memcpy_aligned_sse =
-    (Parrot_memcpy_aligned_sse_t) Parrot_memcpy_aligned_sse_code;
-#endif
-
-#ifdef PARROT_CONFIG_TEST
-#include <string.h>
-#include <stdio.h>
-int main(int argc, char *argv[]) {
-    unsigned char *s, *d;
-    size_t i, n;
-
-    n = 640;	/* sizeof(reg_store) */
-
-    s = (unsigned char *)malloc(n);
-    for (i = 0; i < n; ++i)
-    s[i] = i & 0xff;
-    d = (unsigned char *)malloc(n);
-    for (i = 0; i < n; ++i)
-    d[i] = 0xff;
-    Parrot_memcpy_aligned_sse(d, s, n);
-    for (i = 0; i < n; ++i)
-    if (d[i] != (i & 0xff)) {
-        printf("error s[%d] = %d d = %d\n", i, s[i], d[i]);
-        exit(EXIT_FAILURE);
-    }
-    puts("ok");
-    return 0;
-}
-#endif /* PARROT_CONFIG_TEST */
-
-/*
- * Local variables:
- *   c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */

Deleted: branches/gc_encapsulate/config/auto/cpu/i386/memcpy_sse_in.c
==============================================================================
--- branches/gc_encapsulate/config/auto/cpu/i386/memcpy_sse_in.c	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,85 +0,0 @@
-/*
- * $Id$
- * Copyright (C) 2004-2006, Parrot Foundation.
- */
-
-#include <stdlib.h>
-void*
-Parrot_memcpy_aligned_sse(void *dest, const void *src, size_t n)
-{
-    asm(
-        "mov %0, %%ecx\n\t"
-        "mov %1, %%esi\n\t"
-        "mov %2, %%edi\n\t"
-        "shr $5, %%ecx\n\t"
-        "#.p2align 4\n\t"
-        "1:\n\t"
-        "movups 0(%%esi), %%xmm0\n\t"
-        "movups 16(%%esi), %%xmm1\n\t"
-        "add $32, %%esi\n\t"
-        "movups %%xmm0, 0(%%edi)\n\t"
-        "movups %%xmm1, 16(%%edi)\n\t"
-        "add $32, %%edi\n\t"
-        "dec %%ecx\n\t"
-        "jnz 1b\n\t"
-
-    : : "g"(n), "g"(src), "g"(dest) : "%esi", "%edi", "%ecx");
-    return dest;
-}
-
-/*INTERFACE
-
-#include <stdlib.h>
-typedef void* (*@FUNC at _t)(void *dest, const void *src, size_t);
-
-#ifndef NDEBUG
-#  include <assert.h>
-static void*
- at FUNC@_debug(void* d, const void* s, size_t n)
-{
-    assert( (n & 0x1f) == 0);
-    assert( ((unsigned long) d & 7) == 0);
-    assert( ((unsigned long) s & 7) == 0);
-    return ((@FUNC at _t)@FUNC at _code)(d, s, n);
-}
-
- at FUNC@_t @FUNC@ = @FUNC at _debug;
-
-#else
- at FUNC@_t @FUNC@ =
-    (@FUNC at _t) @FUNC at _code;
-#endif
-
-#ifdef PARROT_CONFIG_TEST
-#  include <string.h>
-#  include <stdio.h>
-int main(int argc, char *argv[]) {
-    unsigned char *s, *d;
-    size_t i, n;
-
-    n = 640; @* sizeof(reg_store) *@
-
-    s = malloc(n);
-    for (i = 0; i < n; ++i)
-        s[i] = i & 0xff;
-    d = malloc(n);
-    for (i = 0; i < n; ++i)
-        d[i] = 0xff;
-    @FUNC@(d, s, n);
-    for (i = 0; i < n; ++i)
-        if (d[i] != (i & 0xff)) {
-            printf("error s[%d] = %d d = %d\n", i, s[i], d[i]);
-            exit(EXIT_FAILURE);
-        }
-    puts("ok");
-    return 0;
-}
-#endif @* PARROT_CONFIG_TEST *@
-INTERFACE*/
-
-/*
- * Local variables:
- *   c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */

Modified: branches/gc_encapsulate/config/auto/gc.pm
==============================================================================
--- branches/gc_encapsulate/config/auto/gc.pm	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/config/auto/gc.pm	Thu Jan 28 09:35:26 2010	(r43633)
@@ -45,9 +45,9 @@
 
     $conf->data->set(
         TEMP_gc_c => <<"EOF",
-\$(SRC_DIR)/gc/alloc_resources\$(O):	\$(GENERAL_H_FILES) \$(SRC_DIR)/gc/alloc_resources.c
+src/gc/alloc_resources\$(O):	\$(GENERAL_H_FILES) src/gc/alloc_resources.c
 EOF
-        TEMP_gc_o => "\$(SRC_DIR)/gc/alloc_resources\$(O)",
+        TEMP_gc_o => "src/gc/alloc_resources\$(O)",
         gc_flag   => '',
     );
     print(" ($gc) ") if $conf->options->get('verbose');

Modified: branches/gc_encapsulate/config/auto/icu.pm
==============================================================================
--- branches/gc_encapsulate/config/auto/icu.pm	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/config/auto/icu.pm	Thu Jan 28 09:35:26 2010	(r43633)
@@ -288,6 +288,7 @@
         print "Trying $arg->{icuconfig} with '--ldflags'\n"
             if $arg->{verbose};
         $icushared = capture_output("$arg->{icuconfig} --ldflags");
+        chomp $icushared;
         print "icushared:  captured $icushared\n"
             if $arg->{verbose};
         ($icushared, $arg->{without}) =

Modified: branches/gc_encapsulate/config/auto/pmc.pm
==============================================================================
--- branches/gc_encapsulate/config/auto/pmc.pm	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/config/auto/pmc.pm	Thu Jan 28 09:35:26 2010	(r43633)
@@ -98,7 +98,7 @@
 src/pmc/$pmc.dump : vtable.dump $parent_dumps src/pmc/$pmc.pmc \$(PMC2C_FILES) $pccmethod_depend
 \t\$(PMC2CD) src/pmc/$pmc.pmc
 
-\$(PMC_INC_DIR)/pmc/pmc_$pmc.h: src/pmc/$pmc.c
+include/pmc/pmc_$pmc.h: src/pmc/$pmc.c
 
 src/pmc/$pmc\$(O): include/pmc/pmc_${pmc}.h src/pmc/$pmc.str \$(NONGEN_HEADERS) \\
     $parent_headers $include_headers include/pmc/pmc_continuation.h \\
@@ -173,7 +173,6 @@
         TEMP_pmc_classes_o   => $TEMP_pmc_classes_o,
         TEMP_pmc_classes_str => $TEMP_pmc_classes_str,
         TEMP_pmc_classes_pmc => $TEMP_pmc_classes_pmc,
-        pmc_inc              => 'include',
     );
 
     return 1;

Modified: branches/gc_encapsulate/config/gen/config_h/config_h.in
==============================================================================
--- branches/gc_encapsulate/config/gen/config_h/config_h.in	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/config/gen/config_h/config_h.in	Thu Jan 28 09:35:26 2010	(r43633)
@@ -94,7 +94,6 @@
 #define PARROT_OS_NAME          "@jitosname@"
 #define PARROT_BYTEORDER        0x at byteorder@
 #define PARROT_BIGENDIAN        @bigendian@
-#define PARROT_PTR_ALIGNMENT    @ptr_alignment@
 
 #define PARROT_LITTLEENDIAN	!(PARROT_BIGENDIAN)
 

Modified: branches/gc_encapsulate/config/gen/config_pm/myconfig.in
==============================================================================
--- branches/gc_encapsulate/config/gen/config_pm/myconfig.in	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/config/gen/config_pm/myconfig.in	Thu Jan 28 09:35:26 2010	(r43633)
@@ -17,5 +17,5 @@
     load_ext='@load_ext@', ld_load_flags='@ld_load_flags@'
   Types:
     iv=@iv@, intvalsize=@intvalsize@, intsize=@intsize@, opcode_t=@opcode_t@, opcode_t_size=@opcode_t_size@,
-    ptrsize=@ptrsize@, ptr_alignment=@ptr_alignment@ byteorder=@byteorder@, 
+    ptrsize=@ptrsize@,  byteorder=@byteorder@, 
     nv=@nv@, numvalsize=@numvalsize@, doublesize=@doublesize@, longdoublesize=@hugefloatvalsize@

Modified: branches/gc_encapsulate/config/gen/makefiles.pm
==============================================================================
--- branches/gc_encapsulate/config/gen/makefiles.pm	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/config/gen/makefiles.pm	Thu Jan 28 09:35:26 2010	(r43633)
@@ -36,24 +36,8 @@
             conditioned_lines => 1,
         },
 
-        'ext/nqp-rx/Makefile' => { SOURCE => 'config/gen/makefiles/nqp-rx.in' },
-
         'compilers/ncigen/Makefile'  =>
             { SOURCE => 'compilers/ncigen/config/makefiles/ncigen.in' },
-        'compilers/nqp/Makefile'     =>
-            { SOURCE => 'config/gen/makefiles/nqp.in' },
-        'compilers/pct/Makefile'     =>
-            { SOURCE => 'config/gen/makefiles/pct.in' },
-        'compilers/pge/Makefile'     =>
-            { SOURCE => 'config/gen/makefiles/pge.in' },
-        'compilers/tge/Makefile'     =>
-            { SOURCE => 'config/gen/makefiles/tge.in' },
-        'compilers/json/Makefile'    =>
-            { SOURCE => 'config/gen/makefiles/json.in' },
-        'compilers/data_json/Makefile' =>
-            { SOURCE => 'config/gen/makefiles/data_json.in' },
-        'compilers/pirc/Makefile'    =>
-            { SOURCE => 'config/gen/makefiles/pirc.in' },
         'src/dynpmc/Makefile'        =>
             { SOURCE => 'config/gen/makefiles/dynpmc.in' },
         'src/dynoplibs/Makefile'     =>
@@ -61,16 +45,6 @@
         'editor/Makefile'            =>
             { SOURCE => 'config/gen/makefiles/editor.in' },
 
-        'tools/build/dynpmc.pl' => {
-            SOURCE            => 'config/gen/makefiles/dynpmc_pl.in',
-            replace_slashes   => 0,
-            conditioned_lines => 1,
-        },
-        'tools/build/dynoplibs.pl' => {
-            SOURCE            => 'config/gen/makefiles/dynoplibs_pl.in',
-            replace_slashes   => 0,
-            conditioned_lines => 1,
-        },
         'parrot.pc'     => { SOURCE => 'config/gen/makefiles/parrot_pc.in' },
         'docs/Makefile' => { SOURCE => 'config/gen/makefiles/docs.in' },
     };

Deleted: branches/gc_encapsulate/config/gen/makefiles/data_json.in
==============================================================================
--- branches/gc_encapsulate/config/gen/makefiles/data_json.in	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,60 +0,0 @@
-# Copyright (C) 2006-2009, Parrot Foundation.
-# $Id$
-
-PERL     := @perl@
-RM_F     := @rm_f@
-PARROT   := ../../parrot at exe@
-
-TOOL_DIR := ../..
-PGE_DIR  := ../../compilers/pge
-TGE_DIR  := ../../compilers/tge
-
-# the default target
-all: data_json.pbc
-
-# This is a listing of all targets, that are meant to be called by users
-help:
-	@echo ""
-	@echo "Following targets are available for the user:"
-	@echo ""
-	@echo "  all:               data_json.pbc"
-	@echo "                     This is the default."
-	@echo "Testing:"
-	@echo "  test:              Run the test suite."
-	@echo "  testclean:         Clean up test results and temporary files."
-	@echo ""
-	@echo "Cleaning:"
-	@echo "  clean:             Basic cleaning up."
-	@echo ""
-	@echo "Misc:"
-	@echo "  help:              Print this help message."
-	@echo ""
-
-test: all
-	cd $(TOOL_DIR) && prove -r t/compilers/json
-
-testclean:
-	$(RM_F) "../../t/compilers/json/*.pir"
-
-data_json.pbc : data_json/grammar.pbc data_json/pge2pir.pbc data_json.pir
-	$(PARROT) --output=data_json.pbc data_json.pir
-
-data_json/grammar.pbc : data_json/grammar.pir
-	$(PARROT) --output=data_json/grammar.pbc data_json/grammar.pir
-
-data_json/grammar.pir : data_json/grammar.pg
-	$(PARROT) $(TOOL_DIR)/runtime/parrot/library/PGE/Perl6Grammar.pbc --output=data_json/grammar.pir data_json/grammar.pg
-
-data_json/pge2pir.pbc : data_json/pge2pir.pir
-	$(PARROT) --output=data_json/pge2pir.pbc data_json/pge2pir.pir
-
-data_json/pge2pir.pir : data_json/pge2pir.tg
-	$(PARROT) $(TGE_DIR)/tgc.pir --output=data_json/pge2pir.pir data_json/pge2pir.tg
-
-clean : testclean
-	$(RM_F) "data_json/*.pbc" "data_json/*.pir" data_json.pbc
-
-# Local variables:
-#   mode: makefile
-# End:
-# vim: ft=make:

Modified: branches/gc_encapsulate/config/gen/makefiles/docs.in
==============================================================================
--- branches/gc_encapsulate/config/gen/makefiles/docs.in	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/config/gen/makefiles/docs.in	Thu Jan 28 09:35:26 2010	(r43633)
@@ -2,17 +2,17 @@
 # $Id$
 
 # Setup of some commands
-PERL    := @perl@
-CHMOD   := @chmod@
-MKPATH  := @mkpath@
-TOUCH   := @touch@
-RM_F    := @rm_f@
-RM_RF   := @rm_rf@
-PERLDOC := @perldoc@
-VERSION := @VERSION@@DEVEL@
+PERL    = @perl@
+CHMOD   = @chmod@
+MKPATH  = @mkpath@
+TOUCH   = @touch@
+RM_F    = @rm_f@
+RM_RF   = @rm_rf@
+PERLDOC = @perldoc@
+VERSION = @VERSION@@DEVEL@
 
 # long list of .pod files
-POD := @TEMP_pod@
+POD = @TEMP_pod@
 
 #
 # Targets

Modified: branches/gc_encapsulate/config/gen/makefiles/dynoplibs.in
==============================================================================
--- branches/gc_encapsulate/config/gen/makefiles/dynoplibs.in	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/config/gen/makefiles/dynoplibs.in	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,28 +1,28 @@
 # Copyright (C) 2003-2009, Parrot Foundation.
 # $Id$
 
-PERL          := @perl@
-RM_F          := @rm_f@
-CP            := @cp@
-CHMOD         := @chmod@
-LOAD_EXT      := @load_ext@
-BUILD_DIR     := @build_dir@
-RECONFIGURE   := $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
-INSTALL_DIR   := $(BUILD_DIR)/runtime/parrot/dynext
-O             := @o@
-CC            := @cc@
-LD            := @ld@
-LDFLAGS       := @ldflags@ @ld_debug@ @rpath_blib@ @linkflags@
-LD_LOAD_FLAGS := @ld_load_flags@
-CFLAGS        := @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@
-LIBPARROT     := @libparrot_ldflags@
-
-BUILD_TOOLS_DIR := $(BUILD_DIR)@slash at tools@slash at build
-OPS2C           := $(PERL) -I$(BUILD_DIR)@slash at lib $(BUILD_TOOLS_DIR)@slash at ops2c.pl
-INCLUDES        := -I$(BUILD_DIR)@slash at include -I at build_dir@@slash at src@slash at pmc
-LINKARGS        := $(LDFLAGS) $(LD_LOAD_FLAGS) $(LIBPARROT) @icu_shared@ @libs@
+PERL          = @perl@
+RM_F          = @rm_f@
+CP            = @cp@
+CHMOD         = @chmod@
+LOAD_EXT      = @load_ext@
+BUILD_DIR     = @build_dir@
+RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
+INSTALL_DIR   = $(BUILD_DIR)/runtime/parrot/dynext
+O             = @o@
+CC            = @cc@
+LD            = @ld@
+LDFLAGS       = @ldflags@ @ld_debug@ @rpath_blib@ @linkflags@
+LD_LOAD_FLAGS = @ld_load_flags@
+CFLAGS        = @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@
+LIBPARROT     = @libparrot_ldflags@
+
+BUILD_TOOLS_DIR = $(BUILD_DIR)@slash at tools@slash at build
+OPS2C           = $(PERL) -I$(BUILD_DIR)@slash at lib $(BUILD_TOOLS_DIR)@slash at ops2c.pl
+INCLUDES        = -I$(BUILD_DIR)@slash at include -I at build_dir@@slash at src@slash at pmc
+LINKARGS        = $(LDFLAGS) $(LD_LOAD_FLAGS) $(LIBPARROT) @icu_shared@ @libs@
 
-OPS_TARGETS := \
+OPS_TARGETS = \
 #IF(cg_flag):  obscure_ops_cg$(LOAD_EXT) \
 #IF(cg_flag):  obscure_ops_cgp$(LOAD_EXT) \
   obscure_ops$(LOAD_EXT) \
@@ -32,7 +32,7 @@
   math_ops$(LOAD_EXT) \
   math_ops_switch$(LOAD_EXT)
 
-CLEANUPS := \
+CLEANUPS = \
   "*.c" \
   "*.h" \
 #IF(o):  "*@o@" \

Deleted: branches/gc_encapsulate/config/gen/makefiles/dynoplibs_pl.in
==============================================================================
--- branches/gc_encapsulate/config/gen/makefiles/dynoplibs_pl.in	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,216 +0,0 @@
-# Copyright (C) 2001-2007, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-tools/build/dynoplibs.pl - Build script for dynamic op libraries
-
-=head1 DESCRIPTION
-
-This file is generated by F<config/gen/makefiles.pm> from
-F<config/gen/makefiles/dynopslibs_pl.in>.  This script is used for building
-dynamic op libraries.
-
-=cut
-
-use strict;
-use warnings;
-
-use File::Copy qw(copy);
-
-# qq[] isn't guaranteed to work, but it's safer than "" as some platforms
-# (eg FreeBSD) have ""s embedded in their substution values. q[] is used in
-# some places as Win32 paths have \'s in, which qq[] treats as escape sequences.
-# Config stuff
-our $CC = q[@cc@ -c];
-our $LD = q[@ld@];
-our $LDFLAGS = q[@ldflags@ @ld_debug@ @rpath_blib@ @linkflags@];
-our $LD_LOAD_FLAGS = q[@ld_load_flags@];
-our $PERL = q[@perl@];
-our $LOAD_EXT = q[@load_ext@];
-our $O = q[@o@];
-our $CFLAGS = q[@ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@];
-
-our $LIBPARROT = q[];
-#IF(parrot_is_shared):$LIBPARROT = q[@libparrot_ldflags@];
-
-# Here comes some stuff for Win32.
-our $PATHQUOTE = $^O eq 'MSWin32' ? q["] : q[];
-
-# OPS2C Config
-our $OPS2C = "$PERL -I $PATHQUOTE" .
-             q[@build_dir@@slash at lib] .
-             "$PATHQUOTE $PATHQUOTE" .
-             q[@build_dir@@slash at tools@slash at build@slash at ops2c.pl] .
-             $PATHQUOTE;
-our %cores = (
-    C       => q[],
-#IF(cg_flag):   CGP     => '_cgp',
-#IF(cg_flag):   CGoto   => '_cg',
-    CSwitch => '_switch'
-);
-
-# Actual commands
-sub compile_cmd {
-    my ($target, $source) = @_;
-
-    return
-        "$CC " .
-        "@cc_o_out@" . $target . " " .
-        "-I" . $PATHQUOTE . '@build_dir@@slash at include' . $PATHQUOTE . " " .
-        "-I" . $PATHQUOTE . '@build_dir@@slash at src@slash at pmc' . $PATHQUOTE . " " .
-        "$CFLAGS " .
-        $source;
-};
-
-sub partial_link_cmd {
-    my ($target, $libs, $sources) = @_;
-
-    my $liblist;
-    if ($^O =~ /mswin32/i) {
-        # Need to put various libraries in the link line.
-        $liblist = join( ' ', map { "$_.lib" } keys %$libs );
-        my $extraLibs = '@libs@ @icu_shared@';
-        $extraLibs =~ s/blib/..\\blib/g;
-        $extraLibs =~ s/\Q$(A)\E/.lib/g;
-        $liblist .= ' ' . $extraLibs;
-    }
-    else {
-        $liblist = join( ' ', map { "-l$_" } keys %$libs );
-    }
-
-    return
-        "$LD ".
-        "@ld_out@" . $target . " " .
-        join(" ", map {"$PATHQUOTE$_$PATHQUOTE"} @$sources) .
-        " $liblist $LDFLAGS $LD_LOAD_FLAGS $LIBPARROT";
-}
-
-our $NOW = time();
-
-################### MAIN PROGRAM ################
-
-my ($mode, @oplibs) = @ARGV;
-
-if ($mode eq 'generate') {
-    # Convert X.ops -> ops_X.c, ops_X_cgp.c, ops_X_cg.c and ops_X_switch.c
-    my $core;
-    generate_c($_) foreach (@oplibs);
-}
-elsif ($mode eq 'compile') {
-    # Convert X.c -> X.o for all X.c
-    my $core_suffix;
-    foreach $core_suffix (values %cores) {
-        compile($_ . "_ops$core_suffix") foreach (@oplibs);
-    }
-}
-elsif ($mode eq 'linklibs') {
-    my @objs = grep { /$O$/} @oplibs;
-    @oplibs  = grep {!/$O$/} @oplibs;
-
-    # Convert X.o -> X.so
-    my $core_suffix;
-    foreach $core_suffix (values %cores) {
-        partial_link({}, $_ . "_ops$core_suffix", @objs) foreach (@oplibs);
-    }
-}
-elsif ($mode eq 'copy') {
-    # Copy *.so -> destination, where destination is the first
-    # argument, given as --destination=DIRECTORY
-    shift(@oplibs) =~ /--destination=(.*)/
-      or die "copy command requires destination";
-    my $dest = $1;
-
-    my $core_suffix;
-    foreach $core_suffix (values %cores) {
-        foreach (@oplibs) {
-            my $src = $_ . "_ops$core_suffix$LOAD_EXT";
-            copy($src, $dest)
-                or die "Copy $src failed ($?)\n";
-
-            # Execute permissions on libraries is especially important on
-            # some platforms
-            if ($^O eq 'hpux' or $^O eq 'cygwin') {
-                chmod 0755, "$dest at slash@$src";
-            }
-        }
-    }
-}
-else {
-    die "invalid command '$mode'\nmust be one of generate, compile, linklibs, or copy\n";
-}
-
-sub run {
-    print join(" ", @_), "\n";
-
-    return system(@_) == 0;
-}
-
-sub modtime {
-    my $ago = (-M shift);
-
-    if (defined $ago) {
-        return $NOW - $ago;
-    }
-    else {
-        return;
-    }
-}
-
-sub needs_build {
-    my ($target, @sources) = @_;
-
-    my $target_mod = modtime($target)
-      or return 1;
-    for my $source (@sources) {
-        return 1 if modtime($source) > $target_mod;
-    }
-
-    return 0;
-}
-
-sub generate_c {
-    my ($oplib) = @_;
-
-    foreach (keys %cores) {
-        if (needs_build($oplib . "_ops$cores{$_}.c", "$oplib.ops")) {
-            run("$OPS2C $_ --dynamic $oplib.ops")
-                or die "ops2c code generation failed ($?)\n";
-        }
-    }
-
-    return;
-}
-
-sub compile {
-    my ($src_stem, $dest_stem) = @_;
-
-    $dest_stem ||= $src_stem;
-    if (needs_build("$dest_stem$O", "$src_stem.c")) {
-        return run(compile_cmd("$dest_stem$O", "$src_stem.c"))
-          or die "compile $src_stem.c failed ($?)\n";
-    }
-    else {
-        return 1;
-    }
-}
-
-sub partial_link {
-    my ($libs, $stem, @objs) = @_;
-
-    if (needs_build("$stem$LOAD_EXT", "$stem$O", @objs)) {
-        return run(partial_link_cmd("$stem$LOAD_EXT", $libs, [ "$stem$O", @objs ]))
-          or die "partial link $stem$LOAD_EXT failed ($?)\n";
-    }
-    else {
-        return 1;
-    }
-}
-
-
-# Local Variables:
-#   mode: cperl
-#   cperl-indent-level: 4
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:

Modified: branches/gc_encapsulate/config/gen/makefiles/dynpmc.in
==============================================================================
--- branches/gc_encapsulate/config/gen/makefiles/dynpmc.in	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/config/gen/makefiles/dynpmc.in	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,33 +1,33 @@
 # Copyright (C) 2003-2009, Parrot Foundation.
 # $Id$
 
-PERL          := @perl@
-RM_F          := @rm_f@
-CP            := @cp@
-CHMOD         := @chmod@
-LOAD_EXT      := @load_ext@
-BUILD_DIR     := @build_dir@
-RECONFIGURE   := $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
-INSTALL_DIR   := $(BUILD_DIR)@slash at runtime@slash at parrot@slash at dynext
-O             := @o@
-CC            := @cc@
-LD            := @ld@
-LDFLAGS       := @ldflags@ @ld_debug@ @rpath_blib@
-LD_LOAD_FLAGS := @ld_load_flags@
-CFLAGS        := @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@
-LIBPARROT     := @libparrot_ldflags@
-
-BUILD_TOOLS_DIR := $(BUILD_DIR)@slash at tools@slash at build
-BUILD_LIB_DIR   := $(BUILD_DIR)@slash at blib@slash at lib
-PMC2C           := $(PERL) $(BUILD_TOOLS_DIR)@slash at pmc2c.pl
-INCLUDES        := -I$(BUILD_DIR)@slash at include -I at build_dir@@slash at include@slash at pmc
-LINKARGS        := $(LDFLAGS) $(LD_LOAD_FLAGS) $(LIBPARROT) @icu_shared@ @libs@
+PERL          = @perl@
+RM_F          = @rm_f@
+CP            = @cp@
+CHMOD         = @chmod@
+LOAD_EXT      = @load_ext@
+BUILD_DIR     = @build_dir@
+RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
+INSTALL_DIR   = $(BUILD_DIR)@slash at runtime@slash at parrot@slash at dynext
+O             = @o@
+CC            = @cc@
+LD            = @ld@
+LDFLAGS       = @ldflags@ @ld_debug@ @rpath_blib@
+LD_LOAD_FLAGS = @ld_load_flags@
+CFLAGS        = @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@
+LIBPARROT     = @libparrot_ldflags@
+
+BUILD_TOOLS_DIR = $(BUILD_DIR)@slash at tools@slash at build
+BUILD_LIB_DIR   = $(BUILD_DIR)@slash at blib@slash at lib
+PMC2C           = $(PERL) $(BUILD_TOOLS_DIR)@slash at pmc2c.pl
+INCLUDES        = -I$(BUILD_DIR)@slash at include -I at build_dir@@slash at include@slash at pmc
+LINKARGS        = $(LDFLAGS) $(LD_LOAD_FLAGS) $(LIBPARROT) @icu_shared@ @libs@
 
-PMC2CD := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --dump
-PMC2CC := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --c
+PMC2CD = $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --dump
+PMC2CC = $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --c
 
 # add your dynamic pmcs here
-PMC_TARGETS := \
+PMC_TARGETS = \
   dynlexpad$(LOAD_EXT) \
   foo_group$(LOAD_EXT) \
   rotest$(LOAD_EXT) \
@@ -36,7 +36,7 @@
 #IF(has_crypto):  digest_group$(LOAD_EXT) \
   subproxy$(LOAD_EXT)
 
-PMCS_DIGEST := \
+PMCS_DIGEST = \
   md2.pmc \
   md4.pmc \
   md5.pmc \
@@ -46,7 +46,7 @@
   sha256.pmc \
   sha512.pmc
 
-OBJS_DIGEST := \
+OBJS_DIGEST = \
   md2$(O) \
   md4$(O) \
   md5$(O) \
@@ -56,23 +56,23 @@
   sha256$(O) \
   sha512$(O)
 
-PMCS_FOO := \
+PMCS_FOO = \
   foo.pmc \
   foo2.pmc
 
-OBJS_FOO := \
+OBJS_FOO = \
   foo$(O) \
   foo2$(O)
 
-#IF(win32 and cc==gcc):LIB_GDBM := -llibgdbm
-#ELSIF(win32):LIB_GDBM := libgdbm.lib
-#ELSE:LIB_GDBM := -lgdbm
-
-#IF(win32 and cc==gcc):LIB_CRYPTO := -lcrypto
-#ELSIF(win32):LIB_CRYPTO := libcrypto.lib
-#ELSE:LIB_CRYPTO := -lcrypto
+#IF(win32 and cc==gcc):LIB_GDBM = -llibgdbm
+#ELSIF(win32):LIB_GDBM = libgdbm.lib
+#ELSE:LIB_GDBM = -lgdbm
+
+#IF(win32 and cc==gcc):LIB_CRYPTO = -lcrypto
+#ELSIF(win32):LIB_CRYPTO = libcrypto.lib
+#ELSE:LIB_CRYPTO = -lcrypto
 
-CLEANUPS := \
+CLEANUPS = \
   "*.c" \
   "pmc_*.h" \
   "*_group.h" \

Deleted: branches/gc_encapsulate/config/gen/makefiles/dynpmc_pl.in
==============================================================================
--- branches/gc_encapsulate/config/gen/makefiles/dynpmc_pl.in	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,298 +0,0 @@
-# Copyright (C) 2001-2009, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-tools/build/dynpmc.pl - Build script for dynamic PMCs
-
-=head1 DESCRIPTION
-
-This file is generated by F<config/gen/makefiles.pl> from
-F<config/gen/makefiles/dynpmc_pl.in>.  This script is used for building
-dynamic PMCs.
-
-=cut
-
-use strict;
-use warnings;
-use FindBin;
-use lib "$FindBin::Bin/../..";
-use lib "$FindBin::Bin/../../lib";
-
-use File::Copy qw(copy);
-use Storable;
-
-# Config stuff
-# q[] isn't guaranteed to work, but it's safer than "" as some platforms
-# (eg FreeBSD) have ""s embedded in their substitution values. q[] is used
-# as Win32 paths have \'s in, which qq treats as escape sequences.
-our $CC              = q[@cc@ -c];
-our $LD              = q[@ld@];
-our $LDFLAGS         = q[@ldflags@ @ld_debug@ @rpath_blib@];
-our $LD_LOAD_FLAGS   = q[@ld_load_flags@];
-our $PERL            = q[@perl@];
-our $LOAD_EXT        = q[@load_ext@];
-our $O               = q[@o@];
-our $CFLAGS          = q[@ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@];
-
-our $LIBPARROT = q[];
-#IF(parrot_is_shared):$LIBPARROT = q[@libparrot_ldflags@];
-
-# Here comes some stuff for Win32.
-our $PATHQUOTE = $^O eq 'MSWin32' ? q["] : q[];
-
-# PMC2C Config
-our $PMC2C = "$PERL $PATHQUOTE" . q[@build_dir@@slash at tools@slash at build@slash at pmc2c.pl] . $PATHQUOTE;
-
-# Actual commands
-sub compile_cmd {
-    my ($target, $source) = @_;
-
-    my $dynpmc_include = '';
-    if (defined $ENV{DYNPMC_INCLUDE} )
-    {
-        $dynpmc_include = $ENV{DYNPMC_INCLUDE};
-        $dynpmc_include =~ s/,/$PATHQUOTE -I$PATHQUOTE/g;
-        $dynpmc_include = "-I" . $PATHQUOTE . $dynpmc_include . $PATHQUOTE . " ";
-    }
-
-    return
-        "$CC " .
-        '@cc_o_out@' . $target . " " .
-        "-I" . $PATHQUOTE . '@build_dir@@slash at include' . $PATHQUOTE . " " .
-        "-I" . $PATHQUOTE . '@build_dir@@slash at src@slash at pmc' . $PATHQUOTE . " " .
-        $dynpmc_include . " " .
-        "$CFLAGS " .
-        $source;
-};
-
-sub partial_link_cmd {
-    my ($target, $libs, $sources) = @_;
-
-    my $liblist;
-    if ($^O =~ /mswin32/i) {
-        # Need to put various libraries in the link line.
-        if ($CC =~ /gcc/i) {
-            $liblist = join( ' ', map { "-l$_" } keys %$libs );
-            $liblist =~ s/-lgdbm/-llibgdbm/i;
-        }
-        else {
-            $liblist = join( ' ', map { "$_.lib" } keys %$libs );
-        }
-        my $extraLibs = '@libs@ @icu_shared@';
-        $extraLibs =~ s/blib/..\\blib/g;
-        $extraLibs =~ s/\Q$(A)\E/.lib/g;
-        $liblist .= ' ' . $extraLibs;
-
-        # Also note that we may need to look in the Parrot blib directory.
-        if ($CC =~ /gcc/i) {
-            $liblist .= qq{ -Wl,-L "@build_dir@/blib/lib"};
-        }
-        else {
-            $liblist .= qq{ /LIBPATH:"@build_dir@/blib/lib"};
-        }
-    }
-    else {
-        $liblist = join( ' ', map { "-l$_" } keys %$libs );
-        my $extraLibs = '@libs@ @icu_shared@';
-        $liblist .= ' ' . $extraLibs;
-    }
-
-    if (defined $ENV{DYNPMC_LINK}) {
-        push @{$sources}, split /,/, $ENV{DYNPMC_LINK};
-    }
-
-    return
-        "$LD ".
-        '@ld_out@' . $target . " " .
-        join(" ", map {"$PATHQUOTE$_$PATHQUOTE"} @$sources) .
-        " $liblist $LDFLAGS $LD_LOAD_FLAGS $LIBPARROT";
-}
-
-our $NOW = time();
-
-################### MAIN PROGRAM ################
-
-my ($mode, @pmcs) = @ARGV;
-
-if ($mode eq 'generate') {
-    # Convert X.pmc -> X.dump and X.c and also create any lib-GROUP.c files
-
-    generate_dump($_) foreach (@pmcs);
-    generate_c($_) foreach (@pmcs);
-
-    my ($group_files, $group_libs, $pmc_group, $pmc_libs) =
-        gather_groups_and_libs(@pmcs);
-
-    while (my ($group, $pmcs) = each %$group_files) {
-        my @pmcfiles = map { "$_.pmc" } @$pmcs;
-        if (needs_build("$group.c", @pmcfiles)) {
-            run("$PMC2C --library $group --c " . join(" ", at pmcfiles))
-              or die "pmc2c library creation failed ($?)\n";
-        }
-    }
-}
-elsif ($mode eq 'compile') {
-    my ($group_files, $group_libs, $pmc_group, $pmc_libs) =
-        gather_groups_and_libs(@pmcs);
-
-    # Convert X.c -> X.o for all X.c
-    compile($_) foreach (@pmcs);
-
-    # lib-GROUP.c
-    for my $group (keys %$group_files) {
-        compile("$group", "lib-$group")
-          or die "compile $group.c failed ($?)\n";
-    }
-}
-elsif ($mode eq 'linklibs') {
-    my ($group_files, $group_libs, $pmc_group, $pmc_libs) =
-        gather_groups_and_libs(@pmcs);
-
-    # Convert lib-GROUP.so + A.so + B.so ... -> GROUP.so
-    while (my ($group, $pmcs) = each %$group_files) {
-        partial_link($group, $group_libs->{$group}, [ "lib-$group", @$pmcs ] )
-          or die "partial link of $group failed ($?)\n";
-    }
-
-    # Link non-grouped PMCs individually
-    my @ungrouped_pmcs = grep { ! exists $pmc_group->{$_} } @pmcs;
-    partial_link($_, $pmc_libs->{$_}, [ $_ ] ) foreach (@ungrouped_pmcs);
-}
-elsif ($mode eq 'copy') {
-    # Copy *.so -> destination, where destination is the first
-    # argument, given as --destination=DIRECTORY
-    shift(@pmcs) =~ /--destination=(.*)/
-      or die "copy command requires destination";
-    my $dest = $1;
-
-    my ($group_files, $group_libs, $pmc_group, $pmc_libs) =
-        gather_groups_and_libs(@pmcs);
-    my @ungrouped_pmcs = grep { ! exists $pmc_group->{$_} } @pmcs;
-
-    my (@list_to_process) = (@ungrouped_pmcs, keys %$group_files);
-
-    die "nothing found to copy" unless @list_to_process;
-
-    foreach (@list_to_process) {
-        copy("$_$LOAD_EXT", $dest) or die "Copy $_$LOAD_EXT failed ($?)\n";
-
-        # Execute permissions on libraries is especially important on
-        # some platforms
-        if ($^O eq 'hpux' or $^O eq 'cygwin') {
-            chmod 0755, "$dest at slash@$_$LOAD_EXT";
-        }
-
-    }
-}
-else {
-    die "invalid command '$mode'\nmust be one of generate, compile, linklibs, or copy\n";
-}
-
-sub run {
-    print join(" ", @_), "\n";
-
-    return system(@_) == 0;
-}
-
-sub gather_groups_and_libs {
-    my @pmcs = @_;
-
-    my ( %group_files, %group_libs, %pmc_group, %pmc_libs );
-    for my $pmc (@pmcs) {
-        our $class = retrieve("$pmc.dump");
-
-        # there can be many libs
-        my %libs = %{ $class->{flags}{lib} || {} };
-        $pmc_libs{$pmc} = \%libs;
-
-        # There should be at most a single group
-        my $group = $class->{flags}{group}
-          or next;
-        $pmc_group{$pmc} = $group;
-        push @{ $group_files{$group} }, $pmc;
-        $group_libs{$group} ||= {};
-        foreach my $lib ( keys %libs ) {
-            $group_libs{$group}->{$lib} = 1;
-        }
-    }
-
-    return (\%group_files, \%group_libs, \%pmc_group, \%pmc_libs);
-}
-
-sub modtime {
-    my $ago = (-M shift);
-
-    if (defined $ago) {
-        return $NOW - $ago;
-    }
-    else {
-        return;
-    }
-}
-
-sub needs_build {
-    my ($target, @sources) = @_;
-
-    my $target_mod = modtime($target)
-      or return 1;
-    for my $source (@sources) {
-        return 1 if modtime($source) > $target_mod;
-    }
-
-    return 0;
-}
-
-sub generate_dump {
-    my ($pmc) = @_;
-
-    if (needs_build("$pmc.dump", "$pmc.pmc")) {
-        run("$PMC2C --dump $pmc.pmc")
-          or die "pmc2c dump failed ($?)\n";
-    }
-
-    return;
-}
-
-sub generate_c {
-    my ($pmc) = @_;
-
-    if (needs_build("$pmc.c", "$pmc.pmc")) {
-        run("$PMC2C --c $pmc.pmc")
-          or die "pmc2c code generation failed ($?)\n";
-    }
-
-    return;
-}
-
-sub compile {
-    my ($src_stem, $dest_stem) = @_;
-
-    $dest_stem ||= $src_stem;
-    if (needs_build("$dest_stem$O", "$src_stem.c")) {
-        run(compile_cmd("$dest_stem$O", "$src_stem.c"))
-          or die "compile $src_stem.c failed ($?)\n";
-    }
-    return 1;
-}
-
-sub partial_link {
-    my ($group, $libs, $stems) = @_;
-
-    my @sources = map { "$_$O" } @$stems;
-    if (needs_build("$group$LOAD_EXT", @sources)) {
-        return run(partial_link_cmd("$group$LOAD_EXT", $libs, \@sources))
-          or die "partial link $group$LOAD_EXT failed ($?)\n";
-    }
-    else {
-        return 1;
-    }
-}
-
-
-# Local Variables:
-#   mode: cperl
-#   cperl-indent-level: 4
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:

Modified: branches/gc_encapsulate/config/gen/makefiles/editor.in
==============================================================================
--- branches/gc_encapsulate/config/gen/makefiles/editor.in	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/config/gen/makefiles/editor.in	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,17 +1,16 @@
 # Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 
-OPS_DIR     := ../src/ops
-#IF(win32):VIM_DIR     := $(USERPROFILE)/vimfiles
-#ELSE:VIM_DIR     := $(HOME)/.vim
-VIM_FT_DIR  := $(VIM_DIR)/plugin
-VIM_IN_DIR  := $(VIM_DIR)/indent
-VIM_SYN_DIR := $(VIM_DIR)/syntax
-
-PERL   := @perl@
-CP     := @cp@
-MKPATH := @mkpath@
-RM_F   := @rm_f@
+#IF(win32):VIM_DIR     = $(USERPROFILE)/vimfiles
+#ELSE:VIM_DIR     = $(HOME)/.vim
+VIM_FT_DIR  = $(VIM_DIR)/plugin
+VIM_IN_DIR  = $(VIM_DIR)/indent
+VIM_SYN_DIR = $(VIM_DIR)/syntax
+
+PERL   = @perl@
+CP     = @cp@
+MKPATH = @mkpath@
+RM_F   = @rm_f@
 
 default: all
 
@@ -33,9 +32,9 @@
 	@echo "  realclean:         clean up local files including Makefile"
 	@echo ""
 
-pir.vim: pir_vim.in $(OPS_DIR)//*.ops ops2vim.pl
+pir.vim: pir_vim.in ../src/ops/*.ops ops2vim.pl
 	$(CP) pir_vim.in pir.vim
-	$(PERL) ops2vim.pl $(OPS_DIR)/*.ops >> pir.vim
+	$(PERL) ops2vim.pl ../src/ops/*.ops >> pir.vim
 
 vim-install: pir.vim
 	$(MKPATH) "$(VIM_DIR)"

Modified: branches/gc_encapsulate/config/gen/makefiles/ext.in
==============================================================================
--- branches/gc_encapsulate/config/gen/makefiles/ext.in	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/config/gen/makefiles/ext.in	Thu Jan 28 09:35:26 2010	(r43633)
@@ -3,13 +3,13 @@
 
 # setup of commands
 @make_set_make@
-MAKE      := @make@
-PERL      := @perl@
-RM_F      := @rm_f@
+MAKE      = @make@
+PERL      = @perl@
+RM_F      = @rm_f@
 
 # add new languages here
 # remove obsolete languages here
-EXT := \
+EXT = \
     Parrot-Embed
 
 # the default target

Deleted: branches/gc_encapsulate/config/gen/makefiles/json.in
==============================================================================
--- branches/gc_encapsulate/config/gen/makefiles/json.in	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,60 +0,0 @@
-# Copyright (C) 2006-2009, Parrot Foundation.
-# $Id$
-
-PERL     := @perl@
-RM_F     := @rm_f@
-PARROT   := ../../parrot at exe@
-
-TOOL_DIR := ../..
-PGE_DIR  := ../../compilers/pge
-TGE_DIR  := ../../compilers/tge
-
-# the default target
-all: JSON.pbc
-
-# This is a listing of all targets, that are meant to be called by users
-help:
-	@echo ""
-	@echo "Following targets are available for the user:"
-	@echo ""
-	@echo "  all:               JSON.pbc"
-	@echo "                     This is the default."
-	@echo "Testing:"
-	@echo "  test:              Run the test suite."
-	@echo "  testclean:         Clean up test results and temporary files."
-	@echo ""
-	@echo "Cleaning:"
-	@echo "  clean:             Basic cleaning up."
-	@echo ""
-	@echo "Misc:"
-	@echo "  help:              Print this help message."
-	@echo ""
-
-test: all
-	cd $(TOOL_DIR) && prove -r t/compilers/json
-
-testclean:
-	$(RM_F) "../../t/compilers/json/*.pir"
-
-JSON.pbc : JSON/grammar.pbc JSON/pge2pir.pbc JSON.pir
-	$(PARROT) --output=JSON.pbc JSON.pir
-
-JSON/grammar.pbc : JSON/grammar.pir
-	$(PARROT) --output=JSON/grammar.pbc JSON/grammar.pir
-
-JSON/grammar.pir : JSON/grammar.pg
-	$(PARROT) $(TOOL_DIR)/runtime/parrot/library/PGE/Perl6Grammar.pbc --output=JSON/grammar.pir JSON/grammar.pg
-
-JSON/pge2pir.pbc : JSON/pge2pir.pir
-	$(PARROT) --output=JSON/pge2pir.pbc JSON/pge2pir.pir
-
-JSON/pge2pir.pir : JSON/pge2pir.tg
-	$(PARROT) $(TGE_DIR)/tgc.pir --output=JSON/pge2pir.pir JSON/pge2pir.tg
-
-clean : testclean
-	$(RM_F) "JSON/*.pbc" "JSON/*.pir" JSON.pbc
-
-# Local variables:
-#   mode: makefile
-# End:
-# vim: ft=make:

Deleted: branches/gc_encapsulate/config/gen/makefiles/nqp-rx.in
==============================================================================
--- branches/gc_encapsulate/config/gen/makefiles/nqp-rx.in	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,63 +0,0 @@
-# Copyright (C) 2009, Parrot Foundation.
-# $Id$
-
-# Setup some commands
-PERL     := @perl@
-CP       := @cp@
-RM_F     := @rm_f@
-PARROT   := ../../parrot at exe@
-
-PARROT_LIBRARY := @build_dir@/runtime/parrot/library
-
-NQP_LIB_PBCS := Regex.pbc HLL.pbc P6Regex.pbc nqp-rx.pbc
-
-all: $(NQP_LIB_PBCS)
-	$(CP) $(NQP_LIB_PBCS) $(PARROT_LIBRARY)
-
-Regex.pbc: src/stage0/Regex-s0.pir
-	$(PARROT) $(PARROT_ARGS) -o Regex.pbc src/stage0/Regex-s0.pir
-
-HLL.pbc: src/stage0/HLL-s0.pir
-	$(PARROT) $(PARROT_ARGS) -o HLL.pbc src/stage0/HLL-s0.pir
-
-P6Regex.pbc: src/stage0/P6Regex-s0.pir
-	$(PARROT) $(PARROT_ARGS) -o P6Regex.pbc src/stage0/P6Regex-s0.pir
-
-nqp-rx.pbc: src/stage0/NQP-s0.pir
-	$(PARROT) $(PARROT_ARGS) -o nqp-rx.pbc src/stage0/NQP-s0.pir
-
-# This is a listing of all targets, that are meant to be called by users
-help:
-	@echo ""
-	@echo "Following targets are available for the user:"
-	@echo ""
-	@echo "  all:               nqp.pbc"
-	@echo "                     This is the default."
-	@echo ""
-	@echo "Cleaning:"
-	@echo "  clean:             Basic cleaning up."
-	@echo "  realclean:         Removes also files generated by 'Configure.pl'"
-	@echo "  distclean:         Removes also anything built, in theory"
-	@echo ""
-	@echo "Misc:"
-	@echo "  help:              Print this help message."
-	@echo ""
-
-# this target has nothing to do
-testclean:
-
-CLEANUPS := \
-  $(NQP_LIB_PBCS)
-
-clean:
-	$(RM_F) $(CLEANUPS)
-
-realclean: clean
-	$(RM_F) Makefile
-
-distclean: realclean
-
-# Local variables:
-#   mode: makefile
-# End:
-# vim: ft=make:

Deleted: branches/gc_encapsulate/config/gen/makefiles/nqp.in
==============================================================================
--- branches/gc_encapsulate/config/gen/makefiles/nqp.in	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,81 +0,0 @@
-# Copyright (C) 2007-2009, Parrot Foundation.
-# $Id$
-
-# Setup some commands
-PERL     := @perl@
-RM_F     := @rm_f@
-PARROT   := ../../parrot at exe@
-
-PARROT_LIBRARY := @build_dir@/runtime/parrot/library
-PGE_LIBRARY    := @build_dir@/runtime/parrot/library/PGE
-
-all: nqp.pbc
-
-SOURCES := \
-  nqp.pir \
-  src/Grammar.pg \
-  src/Grammar/Actions.pir \
-  src/builtins.pir
-
-BOOTSRC := \
-  bootstrap/nqp.pir \
-  bootstrap/actions.pm
-
-# the default target
-nqp.pbc: $(PARROT) $(PGE_LIBRARY)/Perl6Grammar.pir $(SOURCES)
-	$(PARROT) $(PARROT_ARGS) $(PGE_LIBRARY)/Perl6Grammar.pir \
-	    --output=src/Grammar_gen.pir src/Grammar.pg
-	$(PARROT) -o nqp.pbc nqp.pir
-
-boot: $(BOOTSRC)
-	$(PARROT) nqp.pbc \
-	    --output=bootstrap/gen_actions.pir \
-	    --target=pir \
-	    bootstrap/actions.pm
-	$(PARROT) --output-pbc -o bootstrap/nqp.pbc bootstrap/nqp.pir
-
-# This is a listing of all targets, that are meant to be called by users
-help:
-	@echo ""
-	@echo "Following targets are available for the user:"
-	@echo ""
-	@echo "  all:               nqp.pbc"
-	@echo "                     This is the default."
-	@echo "Testing:"
-	@echo "  test:              Run the test suite."
-	@echo "  testclean:         Clean up test results."
-	@echo ""
-	@echo "Cleaning:"
-	@echo "  clean:             Basic cleaning up."
-	@echo "  realclean:         Removes also files generated by 'Configure.pl'"
-	@echo "  distclean:         Removes also anything built, in theory"
-	@echo ""
-	@echo "Misc:"
-	@echo "  help:              Print this help message."
-	@echo ""
-
-test: all
-	$(PERL) t/harness t
-
-# this target has nothing to do
-testclean:
-
-CLEANUPS := \
-  nqp.pbc \
-  src/Grammar_gen.pir \
-  bootstrap/gen_actions.pir \
-  bootstrap/nqp.pbc
-
-
-clean:
-	$(RM_F) $(CLEANUPS)
-
-realclean: clean
-	$(RM_F) Makefile
-
-distclean: realclean
-
-# Local variables:
-#   mode: makefile
-# End:
-# vim: ft=make:

Deleted: branches/gc_encapsulate/config/gen/makefiles/pct.in
==============================================================================
--- branches/gc_encapsulate/config/gen/makefiles/pct.in	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,83 +0,0 @@
-# Copyright (C) 2006-2009, Parrot Foundation.
-# $Id$
-
-# Setup some commands
-PERL     := @perl@
-CP       := @cp@
-RM_F     := @rm_f@
-PARROT   := ../../parrot at exe@
-
-TOOL_DIR := ../..
-PGE_DIR  := ../../compilers/pge
-TEST_DIR := ../../t/compilers/pct
-
-# Where to put things
-PARROT_LIBRARY := ../../runtime/parrot/library
-
-PCT_TARGETS := \
-  $(PARROT_LIBRARY)/PCT.pbc \
-  $(PARROT_LIBRARY)/PCT/PAST.pbc \
-  $(PARROT_LIBRARY)/PCT/Grammar.pbc \
-  $(PARROT_LIBRARY)/PCT/HLLCompiler.pbc \
-  $(PARROT_LIBRARY)/PCT/Dumper.pbc
-
-PCT_SOURCES := \
-  PCT.pir \
-  src/PCT/Dumper.pir \
-  src/PCT/Grammar.pir \
-  src/PCT/HLLCompiler.pir \
-  src/PCT/Node.pir \
-  src/PAST/Compiler.pir \
-  src/PAST/Node.pir \
-  src/POST/Compiler.pir \
-  src/POST/Node.pir
-
-# the default target
-all: $(PARROT_LIBRARY)/PCT.pbc
-
-$(PARROT_LIBRARY)/PCT.pbc: $(PARROT) $(PCT_SOURCES)
-	$(PARROT) -o $(PARROT_LIBRARY)/PCT.pbc --output-pbc PCT.pir
-	$(PARROT) -o $(PARROT_LIBRARY)/PCT/PAST.pbc --output-pbc src/PAST.pir
-	$(PARROT) -o $(PARROT_LIBRARY)/PCT/Grammar.pbc --output-pbc src/PCT/Grammar.pir
-	$(PARROT) -o $(PARROT_LIBRARY)/PCT/HLLCompiler.pbc --output-pbc src/PCT/HLLCompiler.pir
-	$(PARROT) -o $(PARROT_LIBRARY)/PCT/Dumper.pbc --output-pbc src/PCT/Dumper.pir
-
-# This is a listing of all targets, that are meant to be called by users
-help:
-	@echo ""
-	@echo "Following targets are available for the user:"
-	@echo ""
-	@echo "  all:               all PCT libraries"
-	@echo "                     This is the default."
-	@echo "Testing:"
-	@echo "  test:              Run the test suite."
-	@echo "  testclean:         Clean up test results."
-	@echo ""
-	@echo "Cleaning:"
-	@echo "  clean:             Basic cleaning up."
-	@echo "  realclean:         Removes also files generated by 'Configure.pl'"
-	@echo "  distclean:         Removes also anything built, in theory"
-	@echo ""
-	@echo "Misc:"
-	@echo "  help:              Print this help message."
-	@echo ""
-
-test: all
-	cd $(TOOL_DIR) && prove -r t/compilers/pct
-
-testclean:
-	$(RM_F) $(TEST_DIR)/*.pir \
-	    $(TEST_DIR)/*.pbc
-
-clean: testclean
-	$(RM_F) $(PCT_TARGETS)
-
-realclean: clean
-	$(RM_F) Makefile
-
-distclean: realclean
-
-# Local variables:
-#   mode: makefile
-# End:
-# vim: ft=make:

Deleted: branches/gc_encapsulate/config/gen/makefiles/pge.in
==============================================================================
--- branches/gc_encapsulate/config/gen/makefiles/pge.in	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,84 +0,0 @@
-# Copyright (C) 2004-2009, Parrot Foundation.
-# $Id$
-
-# Setup some commands
-PERL     := @perl@
-CP       := @cp@
-RM_F     := @rm_f@
-PARROT   := ../../parrot at exe@
-
-TOOL_DIR := ../..
-
-# Where to put things
-PARROT_LIBRARY := ../../runtime/parrot/library
-
-# the default target
-all: $(PARROT_LIBRARY)/PGE.pbc
-
-SOURCES := \
-  PGE.pir \
-  PGE/Exp.pir \
-  PGE/Match.pir \
-  PGE/Regex.pir \
-  PGE/Perl6Regex.pir \
-  PGE/OPTable.pir \
-  PGE/P5Regex.pir \
-  PGE/builtins.pg
-
-$(PARROT_LIBRARY)/PGE.pbc: PGE.pbc
-	$(CP) PGE.pbc $(PARROT_LIBRARY)
-
-PGE.pbc: $(PARROT) $(SOURCES)
-	$(RM_F) PGE.pbc $(PARROT_LIBRARY)/PGE.pbc
-	$(PERL) -e "" >PGE/builtins_gen.pir
-	$(PARROT) -o PGE.pbc --output-pbc PGE.pir
-	$(PARROT) $(PARROT_LIBRARY)/PGE/Perl6Grammar.pir  --output=PGE/builtins_gen.pir PGE/builtins.pg
-	$(RM_F) PGE.pbc
-	$(PARROT) -o PGE.pbc --output-pbc PGE.pir
-
-# This is a listing of all targets, that are meant to be called by users
-help:
-	@echo ""
-	@echo "Following targets are available for the user:"
-	@echo ""
-	@echo "  all:               PGE.pbc"
-	@echo "                     This is the default."
-	@echo "Testing:"
-	@echo "  test:              Run the test suite."
-	@echo "  testclean:         Clean up test results."
-	@echo ""
-	@echo "Cleaning:"
-	@echo "  clean:             Basic cleaning up."
-	@echo "  realclean:         Removes also files generated by 'Configure.pl'"
-	@echo "  distclean:         Removes also anything built, in theory"
-	@echo ""
-	@echo "Misc:"
-	@echo "  help:              Print this help message."
-	@echo ""
-
-test: all
-	cd $(TOOL_DIR) && prove -r t/compilers/pge
-
-testclean:
-	$(RM_F) "../../t/compilers/pge/*.pir" \
-	    "../../t/compilers/pge/p5regex/*.pir" \
-	    "../../t/compilers/pge/perl6regex/*.pir" \
-	    "../../t/compilers/pge/*.pbc" \
-	    "../../t/compilers/pge/p5regex/*.pbc" \
-	    "../../t/compilers/pge/perl6regex/*.pbc"
-
-clean: testclean
-	$(RM_F) \
-	    PGE.pbc \
-	    $(PARROT_LIBRARY)/PGE.pbc \
-	    PGE/builtins_gen.pir
-
-realclean: clean
-	$(RM_F) Makefile
-
-distclean: realclean
-
-# Local variables:
-#   mode: makefile
-# End:
-# vim: ft=make:

Deleted: branches/gc_encapsulate/config/gen/makefiles/pirc.in
==============================================================================
--- branches/gc_encapsulate/config/gen/makefiles/pirc.in	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,126 +0,0 @@
-# Copyright (C) 2007-2009, Parrot Foundation.
-# $Id$
-
-.SUFFIXES : .c @o@
-
-# Setup some commands
-PERL          := @perl@
-RM_F          := @rm_f@
-CP            := @cp@
-PARROT        := ../../parrot at exe@
-BUILD_DIR     := @build_dir@
-RECONFIGURE   := $(PERL) @build_dir@/tools/dev/reconfigure.pl
-
-CC            := @cc@
-O             := @o@
-EXE           := @exe@
-CC_INC        := -I../../include -I../../include/pmc
-C_LIBS        := @libs@
-CC_SHARED     := @cc_shared@
-CFLAGS        := $(CC_INC) @ccflags@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@ $(CC_SHARED)
-LINK_DYNAMIC  := @link_dynamic@
-LINK          := @link@
-LINKFLAGS     := @linkflags@ @link_debug@ @ld_debug@
-LD            := @ld@
-LDFLAGS       := @ldflags@ @ld_debug@
-TOUCH		  := @touch@
-LEX			  := @lex@
-YACC	      := @yacc@
-
-SOURCES       := \
-  src/main.c \
-  src/pirparser.c \
-  src/pirlexer.c \
-  src/pircompunit.c \
-  src/pircompiler.c \
-  src/pirsymbol.c \
-  src/piremit.c \
-  src/hdocprep.c \
-  src/pirmacro.c \
-  src/pirregalloc.c \
-  src/bcgen.c \
-  src/pirerr.c \
-  src/pircapi.c \
-  src/pirop.c
-
-OBJS          := \
-  src/main$(O) \
-  src/pirparser$(O) \
-  src/pirlexer$(O) \
-  src/pircompunit$(O) \
-  src/pircompiler$(O) \
-  src/pirsymbol$(O) \
-  src/piremit$(O) \
-  src/hdocprep$(O) \
-  src/pirmacro$(O) \
-  src/pirregalloc$(O) \
-  src/bcgen$(O) \
-  src/pirpcc$(O) \
-  src/pirerr$(O) \
-  src/pircapi$(O) \
-  src/pirop$(O)
-
-.c$(O) : # suffix rule (limited support)
-	@$(PERL) ../../tools/dev/cc_flags.pl -v ../../CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
-
-
-# the default target
-all: pirc$(EXE)
-
-
-pirc$(EXE): $(OBJS)
-	$(LINK) @ld_out@$@ \
-	    $(OBJS) \
-	    @rpath_blib@ @libparrot_linkflags@ $(C_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
-#IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
-
-src/pir.y.flag src/pirparser.c src/pirparser.h : src/pir.y
-	cd src && $(YACC) pir.y -d -o pirparser.c
-	#$(PERL) $(BUILD_TOOLS_DIR)/fixup_gen_file.pl -noheaderizer src/pirparser.c src/pir.y
-	#$(PERL) $(BUILD_TOOLS_DIR)/fixup_gen_file.pl -noheaderizer src/pirparser.h src/pir.y
-	$(TOUCH) src/pir.y.flag src/pirparser.c src/pirparser.h
-
-src/pir.l.flag src/pirlexer.c : src/pir.l
-	cd src && $(LEX) -opirlexer.c pir.l
-	$(TOUCH) src/pir.l.flag src/pirlexer.c
-
-
-src/pirparser$(O): src/pirparser.c src/pirparser.h
-src/pirlexer$(O): src/pirlexer.c src/pirlexer.h
-src/pircompunit$(O): src/pircompunit.c src/pircompunit.h
-src/pircompiler$(O): src/pircompiler.c src/pircompiler.h
-src/pirsymbol$(O): src/pirsymbol.c src/pirsymbol.h
-src/piremit$(O): src/piremit.c src/piremit.h
-src/hdocprep$(O): src/hdocprep.c src/hdocprep.l
-src/pirmacro$(O): src/pirmacro.c src/pirmacro.h
-src/pirregalloc$(O): src/pirregalloc.c src/pirregalloc.h
-src/bcgen$(O): src/bcgen.c src/bcgen.h
-src/pirpcc$(O): src/pirpcc.c src/pirpcc.h
-src/pirerr$(O): src/pirerr.c src/pirerr.h
-src/pircapi$(O): src/pircapi.c src/pircapi.h
-src/pirop$(O): src/pirop.c src/pirop.h
-
-test: all
-	perl t/harness
-
-# regenerate the Makefile
-Makefile: $(BUILD_DIR)/config/gen/makefiles/pirc.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::makefiles --target=compilers/pirc/Makefile
-
-
-clean:
-	$(RM_F) *$(O)
-	$(RM_F) $(OBJS)
-	$(RM_F) pirc$(EXE)
-
-realclean: clean
-	$(RM_F) \
-	    Makefile \
-	    doc/*.html
-
-distclean: realclean
-
-# Local variables:
-#   mode: makefile
-# End:
-# vim: ft=make:

Modified: branches/gc_encapsulate/config/gen/makefiles/root.in
==============================================================================
--- branches/gc_encapsulate/config/gen/makefiles/root.in	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/config/gen/makefiles/root.in	Thu Jan 28 09:35:26 2010	(r43633)
@@ -16,23 +16,23 @@
 #
 ###############################################################################
 
-DEVEL           := @DEVEL@
-VERSION         := @VERSION@$(DEVEL)
-SOVERSION       := @VERSION@
+DEVEL           = @DEVEL@
+VERSION         = @VERSION@$(DEVEL)
+SOVERSION       = @VERSION@
 
-CONFIG_ARGS     := @configure_args@
+CONFIG_ARGS     = @configure_args@
 
 # Override at least PREFIX with the install location if you're going
 # to be using this outside of your build area.
-BUILDPREFIX     :=
-PREFIX          := @prefix@
-EXEC_PREFIX     := @exec_prefix@
-DESTDIR         :=
-BIN_DIR         := @bindir@
-LIB_DIR         := @libdir@
-INCLUDE_DIR     := @includedir@
-DATA_DIR        := @datadir@
-DOC_DIR         := @docdir@
+BUILDPREFIX     =
+PREFIX          = @prefix@
+EXEC_PREFIX     = @exec_prefix@
+DESTDIR         =
+BIN_DIR         = @bindir@
+LIB_DIR         = @libdir@
+INCLUDE_DIR     = @includedir@
+DATA_DIR        = @datadir@
+DOC_DIR         = @docdir@
 VERSION_DIR     = @versiondir@
 
 
@@ -45,40 +45,16 @@
 ###############################################################################
 
 # where we're building parrot from (needed for pbc_to_exe)
-BUILD_DIR := @build_dir@
+BUILD_DIR = @build_dir@
 
 # directory for build tools
-BUILD_TOOLS_DIR := tools/build
-
-# current directory
-CUR_DIR         := .
-
-# directory for the intermediate code compiler
-IMCC_DIR        := compilers/imcc
-
-# directory for the (experimental) PIR code compiler
-PIRC_DIR        := compilers/pirc
+BUILD_TOOLS_DIR = tools/build
 
 # directory for header files
-INC_DIR         := @inc@
-
-# directory for PMC generated header files
-PMC_INC_DIR     := @pmc_inc@
-
-# directory for the IO subsystem
-IO_DIR          := src/io
+INC_DIR         = @inc@
 
 # directory with Parrot modules
-LIBRARY_DIR     := runtime/parrot/library
-
-# directory for *.ops file
-OPS_DIR         := src/ops
-
-# directory for packfile files
-PF_DIR          := src/packfile
-
-# source directory
-SRC_DIR         := src
+LIBRARY_DIR     = runtime/parrot/library
 
 ###############################################################################
 #
@@ -90,32 +66,33 @@
 #
 ###############################################################################
 
-PERL             := @perl@
-CP               := @cp@
-CHMOD            := @chmod@
-MKPATH           := @mkpath@
-RM_F             := @rm_f@
-RM_RF            := @rm_rf@
-TOUCH            := @touch@
-AR_CR            := @ar@ @ar_flags@
-RANLIB           := @ranlib@
-YACC             := @yacc@
-LEX              := @lex@
-AS               := @as@
-CC               := @cc@
-CC_INC           := @cc_inc@
-C_LIBS           := @libs@
-CC_SHARED        := @cc_shared@
-CFLAGS           := $(CC_INC) @ccflags@ @cc_build_call_frames@ @cc_debug@ @ccwarn@ @cg_flag@ @gc_flag@ @clock_best@ $(CC_SHARED)
-LINK_DYNAMIC     := @link_dynamic@
-LINK             := @link@
-LINKFLAGS        := @linkflags@ @link_debug@ @ld_debug@
-LD               := @ld@
-LDFLAGS          := @ldflags@ @ld_debug@
-RECONFIGURE      := $(PERL) tools/dev/reconfigure.pl
-INNO_SETUP       := iscc
-TEMPDIR          := @tempdir@
-#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+PERL             = @perl@
+CP               = @cp@
+CHMOD            = @chmod@
+MKPATH           = @mkpath@
+RM_F             = @rm_f@
+RM_RF            = @rm_rf@
+TOUCH            = @touch@
+AR_CR            = @ar@ @ar_flags@
+RANLIB           = @ranlib@
+YACC             = @yacc@
+LEX              = @lex@
+AS               = @as@
+CC               = @cc@
+CC_INC           = @cc_inc@
+C_LIBS           = @libs@
+CC_SHARED        = @cc_shared@
+CFLAGS           = $(CC_INC) @ccflags@ @cc_build_call_frames@ @cc_debug@ @ccwarn@ @cg_flag@ @gc_flag@ @clock_best@ $(CC_SHARED)
+LINK_DYNAMIC     = @link_dynamic@
+LINK             = @link@
+LINKFLAGS        = @linkflags@ @link_debug@ @ld_debug@
+LD               = @ld@
+LD_OUT           = @ld_out@
+LDFLAGS          = @ldflags@ @ld_debug@
+INNO_SETUP       = iscc
+TEMPDIR          = @tempdir@
+RPATH_BLIB       = @rpath_blib@
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET = @osx_version@
 
 ###############################################################################
 #
@@ -123,16 +100,26 @@
 #
 ###############################################################################
 
-O                := @o@
-EXE              := @exe@
-SHARE_EXT        := @share_ext@
-LOAD_EXT         := @load_ext@
-A                := @a@
-LD_SHARE_FLAGS   := @ld_share_flags@
-LD_LOAD_FLAGS    := @ld_load_flags@
+O                = @o@
+EXE              = @exe@
+SHARE_EXT        = @share_ext@
+LOAD_EXT         = @load_ext@
+A                = @a@
+LD_SHARE_FLAGS   = @ld_share_flags@
+LD_LOAD_FLAGS    = @ld_load_flags@
 
 # generated by config/init/headers.pm
-NONGEN_HEADERS   := @TEMP_nongen_headers@
+NONGEN_HEADERS   = @TEMP_nongen_headers@
+
+include compilers/imcc/Defines.mak
+include compilers/pirc/Defines.mak
+include compilers/tge/Defines.mak
+include compilers/nqp/Defines.mak
+include compilers/pge/Defines.mak
+include compilers/pct/Defines.mak
+include ext/nqp-rx/Defines.mak
+include compilers/data_json/Defines.mak
+include compilers/json/Defines.mak
 
 ###############################################################################
 #
@@ -146,23 +133,16 @@
 #
 ###############################################################################
 
-GEN_MAKEFILES := \
+GEN_MAKEFILES = \
     Makefile \
     docs/Makefile \
-    compilers/data_json/Makefile \
-    compilers/json/Makefile \
     compilers/ncigen/Makefile \
-    compilers/nqp/Makefile \
-    compilers/pct/Makefile \
-    compilers/pge/Makefile \
-    compilers/tge/Makefile \
     editor/Makefile \
     ext/Makefile \
-    ext/nqp-rx/Makefile \
     src/dynoplibs/Makefile \
     src/dynpmc/Makefile
 
-GEN_CONFIGS := \
+GEN_CONFIGS = \
     $(INC_DIR)/config.h \
     $(INC_DIR)/platform.h \
     $(INC_DIR)/platform_interface.h \
@@ -170,25 +150,25 @@
     $(INC_DIR)/has_header.h \
     $(INC_DIR)/feature.h \
     $(INC_DIR)/core_pmcs.h \
-    $(SRC_DIR)/exec_dep.c \
-    $(SRC_DIR)/exec_dep.h \
+    src/exec_dep.c \
+    src/exec_dep.h \
     lib/Parrot/Config/Generated.pm \
     lib/Parrot/PMC.pm \
     runtime/parrot/include/config.fpmc \
-    runtime/parrot/library/config.pir \
-    $(SRC_DIR)/platform.c \
-#IF(platform_asm):    $(SRC_DIR)/platform_asm.s \
+    $(LIBRARY_DIR)/config.pir \
+    src/platform.c \
+#IF(platform_asm):    src/platform_asm.s \
 #IF(has_opengl):    config/gen/call_list/opengl.in \
-#IF(has_glut):    $(SRC_DIR)/glut_callbacks.c \
-    $(SRC_DIR)/core_pmcs.c \
-#IF(has_crypto):    $(SRC_DIR)/dynpmc/md2.pmc \
-#IF(has_crypto):    $(SRC_DIR)/dynpmc/md4.pmc \
-#IF(has_crypto):    $(SRC_DIR)/dynpmc/md5.pmc \
-#IF(has_crypto):    $(SRC_DIR)/dynpmc/ripemd160.pmc \
-#IF(has_crypto):    $(SRC_DIR)/dynpmc/sha.pmc \
-#IF(has_crypto):    $(SRC_DIR)/dynpmc/sha1.pmc \
-#IF(has_crypto):    $(SRC_DIR)/dynpmc/sha256.pmc \
-#IF(has_crypto):    $(SRC_DIR)/dynpmc/sha512.pmc \
+#IF(has_glut):    src/glut_callbacks.c \
+    src/core_pmcs.c \
+#IF(has_crypto):    src/dynpmc/md2.pmc \
+#IF(has_crypto):    src/dynpmc/md4.pmc \
+#IF(has_crypto):    src/dynpmc/md5.pmc \
+#IF(has_crypto):    src/dynpmc/ripemd160.pmc \
+#IF(has_crypto):    src/dynpmc/sha.pmc \
+#IF(has_crypto):    src/dynpmc/sha1.pmc \
+#IF(has_crypto):    src/dynpmc/sha256.pmc \
+#IF(has_crypto):    src/dynpmc/sha512.pmc \
 #IF(has_crypto):    t/dynpmc/md2.t \
 #IF(has_crypto):    t/dynpmc/md4.t \
 #IF(has_crypto):    t/dynpmc/md5.t \
@@ -198,33 +178,59 @@
 #IF(has_crypto):    t/dynpmc/sha256.t \
 #IF(has_crypto):    t/dynpmc/sha512.t \
     CFLAGS \
-    $(IMCC_DIR)/CFLAGS \
+    compilers/imcc/CFLAGS \
     config_lib.pasm \
-    $(BUILD_TOOLS_DIR)/dynpmc.pl \
-    $(BUILD_TOOLS_DIR)/dynoplibs.pl \
     parrot.pc \
-    $(IMCC_DIR)/imcc.y.flag \
-    $(OPS_DIR)/core_ops.c \
-    $(OPS_DIR)/core_ops_switch.c
-
-# most of these are generated by config/gen/parrot_include.pm
-
-GEN_PASM_INCLUDES := \
-    runtime/parrot/include/signal.pasm \
-#IF(has_opengl):    runtime/parrot/include/opengl_defines.pasm \
-#IF(has_opengl):    runtime/parrot/library/OpenGL_funcs.pir \
-    @TEMP_gen_pasm_includes@
+    compilers/imcc/imcc.y.flag \
+    compilers/imcc/imcc.l.flag \
+    src/ops/core_ops.c \
+    src/ops/core_ops_switch.c
+
+GEN_PASM_INCLUDES = \
+	runtime/parrot/include/cclass.pasm \
+	runtime/parrot/include/datatypes.pasm \
+	runtime/parrot/include/iterator.pasm \
+	runtime/parrot/include/call_bits.pasm \
+	runtime/parrot/include/io_thr_msg.pasm \
+	runtime/parrot/include/timer.pasm \
+	runtime/parrot/include/except_types.pasm \
+	runtime/parrot/include/except_severity.pasm \
+	runtime/parrot/include/hash_key_type.pasm \
+	runtime/parrot/include/interpflags.pasm \
+	runtime/parrot/include/interpdebug.pasm \
+	runtime/parrot/include/interptrace.pasm \
+	runtime/parrot/include/interpcores.pasm \
+	runtime/parrot/include/cloneflags.pasm \
+	runtime/parrot/include/iglobals.pasm \
+	runtime/parrot/include/sysinfo.pasm \
+	runtime/parrot/include/stdio.pasm \
+	runtime/parrot/include/socket.pasm \
+	runtime/parrot/include/libpaths.pasm \
+	runtime/parrot/include/longopt.pasm \
+	runtime/parrot/include/packfile_segments.pasm \
+	runtime/parrot/include/packfile_constants.pasm \
+	runtime/parrot/include/packfile_annotation_key_type.pasm \
+	runtime/parrot/include/stat.pasm \
+	runtime/parrot/include/stringinfo.pasm \
+	runtime/parrot/include/warnings.pasm \
+	runtime/parrot/include/errors.pasm \
+	runtime/parrot/include/interpinfo.pasm \
+	runtime/parrot/include/tm.pasm \
+	runtime/parrot/include/pmctypes.pasm \
+
+GEN_PM_INCLUDES = \
+	lib/Parrot/Pmc2c/PCCMETHOD_BITS.pm
 
-CONFIGURE_GENERATED_FILES := \
+CONFIGURE_GENERATED_FILES = \
     $(GEN_CONFIGS) \
     $(GEN_MAKEFILES) \
     ext/Parrot-Embed/Makefile.PL \
     myconfig  \
-    $(GEN_PASM_INCLUDES) \
-    $(SRC_DIR)/call_list.txt \
+    src/call_list.txt \
     MANIFEST.configure.generated \
     .configure_trace.sto \
-    .parrot_current_rev
+    .parrot_current_rev \
+    runtime/parrot/include/signal.pasm
 
 
 ###############################################################################
@@ -237,9 +243,9 @@
 #
 ###############################################################################
 
-GEN_OPSFILES :=
+GEN_OPSFILES =
 
-GEN_HEADERS := \
+GEN_HEADERS = \
     $(INC_DIR)/vtable.h \
     $(INC_DIR)/oplib/core_ops.h \
     $(INC_DIR)/oplib/ops.h \
@@ -247,19 +253,19 @@
     $(INC_DIR)/extend_vtable.h \
     $(INC_DIR)/pbcversion.h
 
-GEN_SOURCES := \
-    $(SRC_DIR)/core_ops.c \
-    $(SRC_DIR)/nci.c \
-    $(SRC_DIR)/core_ops_switch.c \
-    $(SRC_DIR)/parrot_config.c \
-    $(SRC_DIR)/null_config.c \
-    $(SRC_DIR)/install_config.c \
-    $(SRC_DIR)/extend_vtable.c
+GEN_SOURCES = \
+    src/core_ops.c \
+    src/nci.c \
+    src/core_ops_switch.c \
+    src/parrot_config.c \
+    src/null_config.c \
+    src/install_config.c \
+    src/extend_vtable.c
 
-GEN_MODULES := \
+GEN_MODULES = \
     lib/Parrot/OpLib/core.pm
 
-GEN_LIBRARY := \
+GEN_LIBRARY = \
     $(LIBRARY_DIR)/CGI/QueryHash.pbc \
     $(LIBRARY_DIR)/Crow.pbc \
     $(LIBRARY_DIR)/config.pbc \
@@ -275,6 +281,7 @@
     $(LIBRARY_DIR)/Getopt/Obj.pbc \
     $(LIBRARY_DIR)/Iter.pbc \
     $(LIBRARY_DIR)/JSON.pbc \
+    $(LIBRARY_DIR)/data_json.pbc \
     $(LIBRARY_DIR)/Math/Random/mt19937ar.pbc \
     $(LIBRARY_DIR)/Math/Rand.pbc \
     $(LIBRARY_DIR)/MIME/Base64.pbc \
@@ -324,13 +331,13 @@
     $(LIBRARY_DIR)/libpcre.pbc \
     $(LIBRARY_DIR)/postgres.pbc
 
-FLUID_FILES_1 := \
+FLUID_FILES_1 = \
     $(GEN_OPSFILES) \
     $(GEN_HEADERS) \
     $(GEN_SOURCES) \
     $(GEN_MODULES) \
 
-FLUID_FILES_2 := \
+FLUID_FILES_2 = \
     $(GEN_LIBRARY) \
     runtime/parrot/include/parrotlib.pbc
 
@@ -341,32 +348,8 @@
 #
 ###############################################################################
 
-# these are private to the IMCC subsystem
-IMCC_O_FILES := \
-    $(IMCC_DIR)/imcparser$(O) \
-    $(IMCC_DIR)/imclexer$(O) \
-    $(IMCC_DIR)/imc$(O) \
-    $(IMCC_DIR)/main$(O) \
-    $(IMCC_DIR)/symreg$(O) \
-    $(IMCC_DIR)/instructions$(O) \
-    $(IMCC_DIR)/cfg$(O) \
-    $(IMCC_DIR)/reg_alloc$(O) \
-    $(IMCC_DIR)/sets$(O) \
-    $(IMCC_DIR)/debug$(O) \
-    $(IMCC_DIR)/optimizer$(O) \
-    $(IMCC_DIR)/pbc$(O) \
-    $(IMCC_DIR)/parser_util$(O) \
-    $(IMCC_DIR)/pcc$(O)
-
-# these are private to the PIRC subsystem
-PIRC_O_FILES := \
-    $(PIRC_DIR)/src/bcgen$(O) \
-    $(PIRC_DIR)/src/pircapi$(O) \
-    $(PIRC_DIR)/src/pirerr$(O) \
-    $(PIRC_DIR)/src/pirop$(O)
-
 # parrot.h and all the includes it causes to be included
-PARROT_H_HEADERS := \
+PARROT_H_HEADERS = \
         $(INC_DIR)/parrot.h \
         $(INC_DIR)/config.h \
         $(INC_DIR)/settings.h \
@@ -424,114 +407,105 @@
         $(INC_DIR)/core_pmcs.h \
         $(INC_DIR)/compiler.h \
         $(INC_DIR)/cclass.h \
-        $(PMC_INC_DIR)/pmc/pmc_callcontext.h
+        include/pmc/pmc_callcontext.h
 
 # generated list of header files
-GENERAL_H_FILES   := $(NONGEN_HEADERS) $(GEN_HEADERS) @TEMP_cg_h@
+GENERAL_H_FILES   = $(NONGEN_HEADERS) $(GEN_HEADERS) @TEMP_cg_h@
 
-CHARSET_O_FILES   := @TEMP_charset_o@
-CLASS_PMC_FILES   := @TEMP_pmc_classes_pmc@
-CLASS_O_FILES     := @TEMP_pmc_classes_o@
-CLASS_STR_FILES   := @TEMP_pmc_classes_str@
-ENCODING_O_FILES  := @TEMP_encoding_o@
-
-
-IO_O_FILES := \
-    $(IO_DIR)/core$(O) \
-    $(IO_DIR)/api$(O) \
-    $(IO_DIR)/utf8$(O) \
-    $(IO_DIR)/buffer$(O) \
-    $(IO_DIR)/unix$(O) \
-    $(IO_DIR)/win32$(O) \
-    $(IO_DIR)/portable$(O) \
-    $(IO_DIR)/filehandle$(O) \
-    $(IO_DIR)/socket_api$(O) \
-    $(IO_DIR)/socket_unix$(O) \
-    $(IO_DIR)/socket_win32$(O)
+CHARSET_O_FILES   = @TEMP_charset_o@
+CLASS_PMC_FILES   = @TEMP_pmc_classes_pmc@
+CLASS_O_FILES     = @TEMP_pmc_classes_o@
+CLASS_STR_FILES   = @TEMP_pmc_classes_str@
+ENCODING_O_FILES  = @TEMP_encoding_o@
+
+IO_O_FILES = \
+    src/io/core$(O) \
+    src/io/api$(O) \
+    src/io/utf8$(O) \
+    src/io/buffer$(O) \
+    src/io/unix$(O) \
+    src/io/win32$(O) \
+    src/io/portable$(O) \
+    src/io/filehandle$(O) \
+    src/io/socket_api$(O) \
+    src/io/socket_unix$(O) \
+    src/io/socket_win32$(O)
 
-INTERP_O_FILES := \
-    $(SRC_DIR)/string/api$(O) \
+INTERP_O_FILES = \
+    src/string/api$(O) \
     \
-    $(OPS_DIR)/core_ops$(O) \
-    $(OPS_DIR)/core_ops_switch$(O) \
+    src/ops/core_ops$(O) \
+    src/ops/core_ops_switch$(O) \
     \
-#IF(i386_has_gcc_cmpxchg):    $(SRC_DIR)/atomic/gcc_x86$(O) \
-    $(SRC_DIR)/byteorder$(O) \
-    $(SRC_DIR)/string/charset$(O) \
-    $(SRC_DIR)/core_pmcs$(O) \
-    $(SRC_DIR)/datatypes$(O) \
-    $(SRC_DIR)/debug$(O) \
-    $(SRC_DIR)/dynext$(O) \
-    $(SRC_DIR)/embed$(O) \
-    $(SRC_DIR)/string/encoding$(O) \
-    $(SRC_DIR)/events$(O) \
-    $(SRC_DIR)/exceptions$(O) \
-    $(SRC_DIR)/exit$(O) \
-    $(SRC_DIR)/extend$(O) \
-    $(SRC_DIR)/extend_vtable$(O) \
-    $(SRC_DIR)/gc/alloc_memory$(O) \
-    $(SRC_DIR)/gc/api$(O) \
-    $(SRC_DIR)/gc/gc_ms$(O) \
-    $(SRC_DIR)/gc/gc_inf$(O) \
-    $(SRC_DIR)/gc/mark_sweep$(O) \
-    $(SRC_DIR)/gc/system$(O) \
-    $(SRC_DIR)/global$(O) \
-    $(SRC_DIR)/global_setup$(O) \
-    $(SRC_DIR)/hash$(O) \
-    $(SRC_DIR)/hll$(O) \
-    $(SRC_DIR)/call/pcc$(O)  \
-    $(SRC_DIR)/call/args$(O)  \
-    $(SRC_DIR)/interp/inter_cb$(O)  \
-    $(SRC_DIR)/interp/inter_create$(O)  \
-    $(SRC_DIR)/interp/inter_misc$(O)  \
-    $(SRC_DIR)/call/ops$(O)  \
-    $(SRC_DIR)/call/context$(O) \
-    $(SRC_DIR)/call/context_accessors$(O) \
-    $(SRC_DIR)/key$(O) \
-    $(SRC_DIR)/library$(O) \
-    $(SRC_DIR)/list$(O) \
-    $(SRC_DIR)/longopt$(O) \
-    $(SRC_DIR)/misc$(O) \
-    $(SRC_DIR)/multidispatch$(O) \
-    $(SRC_DIR)/frame_builder$(O) \
-    $(SRC_DIR)/nci$(O) \
-    $(SRC_DIR)/oo$(O) \
-    $(SRC_DIR)/packfile$(O) \
-    $(SRC_DIR)/packout$(O) \
-    $(SRC_DIR)/platform$(O) \
-    $(SRC_DIR)/pmc_freeze$(O) \
-    $(SRC_DIR)/pmc$(O) \
-    $(SRC_DIR)/runcore/main$(O)  \
-    $(SRC_DIR)/runcore/cores$(O) \
-    $(SRC_DIR)/runcore/profiling$(O) \
-    $(SRC_DIR)/scheduler$(O) \
-    $(SRC_DIR)/spf_render$(O) \
-    $(SRC_DIR)/spf_vtable$(O) \
-    $(SRC_DIR)/string/primitives$(O) \
-    $(SRC_DIR)/sub$(O) \
-    $(SRC_DIR)/thread$(O) \
-    $(SRC_DIR)/runcore/trace$(O) \
-    $(SRC_DIR)/tsq$(O) \
-    $(SRC_DIR)/utils$(O) \
-    $(SRC_DIR)/vtables$(O) \
-    $(SRC_DIR)/warnings$(O) \
+#IF(i386_has_gcc_cmpxchg):    src/atomic/gcc_x86$(O) \
+    src/byteorder$(O) \
+    src/string/charset$(O) \
+    src/core_pmcs$(O) \
+    src/datatypes$(O) \
+    src/debug$(O) \
+    src/dynext$(O) \
+    src/embed$(O) \
+    src/string/encoding$(O) \
+    src/events$(O) \
+    src/exceptions$(O) \
+    src/exit$(O) \
+    src/extend$(O) \
+    src/extend_vtable$(O) \
+    src/gc/alloc_memory$(O) \
+    src/gc/api$(O) \
+    src/gc/gc_ms$(O) \
+    src/gc/gc_inf$(O) \
+    src/gc/mark_sweep$(O) \
+    src/gc/system$(O) \
+    src/global$(O) \
+    src/global_setup$(O) \
+    src/hash$(O) \
+    src/hll$(O) \
+    src/call/pcc$(O)  \
+    src/call/args$(O)  \
+    src/interp/inter_cb$(O)  \
+    src/interp/inter_create$(O)  \
+    src/interp/inter_misc$(O)  \
+    src/call/ops$(O)  \
+    src/call/context$(O) \
+    src/call/context_accessors$(O) \
+    src/key$(O) \
+    src/library$(O) \
+    src/list$(O) \
+    src/longopt$(O) \
+    src/misc$(O) \
+    src/multidispatch$(O) \
+    src/frame_builder$(O) \
+    src/nci$(O) \
+    src/oo$(O) \
+    src/packfile$(O) \
+    src/packout$(O) \
+    src/platform$(O) \
+    src/pmc_freeze$(O) \
+    src/pmc$(O) \
+    src/runcore/main$(O)  \
+    src/runcore/cores$(O) \
+    src/runcore/profiling$(O) \
+    src/scheduler$(O) \
+    src/spf_render$(O) \
+    src/spf_vtable$(O) \
+    src/string/primitives$(O) \
+    src/sub$(O) \
+    src/thread$(O) \
+    src/runcore/trace$(O) \
+    src/tsq$(O) \
+    src/utils$(O) \
+    src/vtables$(O) \
+    src/warnings$(O) \
     \
-    $(PF_DIR)/pf_items$(O) \
+    src/packfile/pf_items$(O) \
     \
     @TEMP_cg_o@ \
     @TEMP_atomic_o@ \
     @TEMP_gc_o@ \
-#IF(platform_asm):    $(SRC_DIR)/platform_asm$(O) \
-
-O_FILES := \
-    $(INTERP_O_FILES) \
-    $(CHARSET_O_FILES) \
-    $(IO_O_FILES) \
-    $(CLASS_O_FILES) \
-    $(ENCODING_O_FILES) \
-    $(IMCC_O_FILES)
+#IF(platform_asm):    src/platform_asm$(O) \
 
-OPS_FILES := @ops@ $(GEN_OPSFILES)
+OPS_FILES = @ops@ $(GEN_OPSFILES)
 
 ###############################################################################
 #
@@ -540,45 +514,45 @@
 ###############################################################################
 
 # Executables
-PARROT              := $(CUR_DIR)/@test_prog@$(EXE)
-MINIPARROT          := $(CUR_DIR)/miniparrot$(EXE)
-DIS                 := $(CUR_DIR)/pbc_disassemble$(EXE)
-PDUMP               := $(CUR_DIR)/pbc_dump$(EXE)
-PBCMERGE            := $(CUR_DIR)/pbc_merge$(EXE)
-PDB                 := $(CUR_DIR)/parrot_debugger$(EXE)
-PBC_TO_EXE          := $(CUR_DIR)/pbc_to_exe$(EXE)
-PARROT_CONFIG       := $(CUR_DIR)/parrot_config$(EXE)
-PIRC                := $(CUR_DIR)/pirc$(EXE)
-NQP                 := $(CUR_DIR)/parrot-nqp$(EXE)
+PARROT              = ./@test_prog@$(EXE)
+MINIPARROT          = ./miniparrot$(EXE)
+DIS                 = ./pbc_disassemble$(EXE)
+PDUMP               = ./pbc_dump$(EXE)
+PBCMERGE            = ./pbc_merge$(EXE)
+PDB                 = ./parrot_debugger$(EXE)
+PBC_TO_EXE          = ./pbc_to_exe$(EXE)
+PARROT_CONFIG       = ./parrot_config$(EXE)
+PIRC                = ./pirc$(EXE)
+NQP_RX              = ./parrot-nqp$(EXE)
 
 # Installable executables
-INSTALLABLEPARROT   := $(CUR_DIR)/installable_parrot$(EXE)
-INSTALLABLEDIS      := $(CUR_DIR)/installable_pbc_disassemble$(EXE)
-INSTALLABLEPDUMP    := $(CUR_DIR)/installable_pbc_dump$(EXE)
-INSTALLABLEPBCMERGE := $(CUR_DIR)/installable_pbc_merge$(EXE)
-INSTALLABLEPBCTOEXE := $(CUR_DIR)/installable_pbc_to_exe$(EXE)
-INSTALLABLEPDB      := $(CUR_DIR)/installable_parrot_debugger$(EXE)
-INSTALLABLECONFIG   := $(CUR_DIR)/installable_parrot_config$(EXE)
-INSTALLABLENQP      := $(CUR_DIR)/installable_parrot-nqp$(EXE)
+INSTALLABLEPARROT   = ./installable_parrot$(EXE)
+INSTALLABLEDIS      = ./installable_pbc_disassemble$(EXE)
+INSTALLABLEPDUMP    = ./installable_pbc_dump$(EXE)
+INSTALLABLEPBCMERGE = ./installable_pbc_merge$(EXE)
+INSTALLABLEPBCTOEXE = ./installable_pbc_to_exe$(EXE)
+INSTALLABLEPDB      = ./installable_parrot_debugger$(EXE)
+INSTALLABLECONFIG   = ./installable_parrot_config$(EXE)
+INSTALLABLENQP      = ./installable_parrot-nqp$(EXE)
 
 # Libraries
-LIBPARROT_STATIC    := @blib_dir@/@libparrot_static@
+LIBPARROT_STATIC    = @blib_dir@/@libparrot_static@
 #IF(darwin):export DYLD_LIBRARY_PATH := @blib_dir@:$(DYLD_LIBRARY_PATH)
-#IF(win32):LIBPARROT_SHARED  := @libparrot_shared@
-#ELSE:LIBPARROT_SHARED  := @blib_dir@/@libparrot_shared@
+#IF(win32):LIBPARROT_SHARED  = @libparrot_shared@
+#ELSE:LIBPARROT_SHARED  = @blib_dir@/@libparrot_shared@
 
 # This line controls whether a static or shared library is built
 # by Parrot's make.  It is not useful otherwise (e.g., in
 # lib/Parrot/Config/Generated.pm or config_lib.pasm).
-LIBPARROT           := @libparrot_for_makefile_only@
+LIBPARROT           = @libparrot_for_makefile_only@
 
-#IF(has_icu):ICU_SHARED  := @icu_shared@
-ALL_PARROT_LIBS     := @libparrot_linkflags@ $(ICU_SHARED) $(C_LIBS)
+#IF(has_icu):ICU_SHARED  = @icu_shared@
+ALL_PARROT_LIBS     = @libparrot_linkflags@ $(ICU_SHARED) $(C_LIBS)
 
 # dynamic extensions
-DYNEXT_DIR          := runtime/parrot/dynext
-LIBNCI_TEST_SO      := $(DYNEXT_DIR)/libnci_test$(LOAD_EXT)
-LIBGLUTCB_SO        := $(DYNEXT_DIR)/libglutcb$(LOAD_EXT)
+DYNEXT_DIR          = runtime/parrot/dynext
+LIBNCI_TEST_SO      = $(DYNEXT_DIR)/libnci_test$(LOAD_EXT)
+LIBGLUTCB_SO        = $(DYNEXT_DIR)/libglutcb$(LOAD_EXT)
 
 ###############################################################################
 #
@@ -589,7 +563,7 @@
 # This is set to MAKE=$make if your $make command doesn't
 # do it for you.
 @make_set_make@
-MAKE := @make_c@
+MAKE = @make_c@
 
 # These need to be above lines that define suffix rules to be portable
 # (certainly FreeBSD make doesn't grok the pir.pbc rule otherwise)
@@ -602,25 +576,18 @@
 # arguments (etc) injected in the middle.
 # There is probably a better way to do this, but I can't work it out right now.
 .c$(O) : # suffix rule (limited support)
-	@$(PERL) tools/dev/cc_flags.pl $(CUR_DIR)/CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
+	@$(PERL) tools/dev/cc_flags.pl ./CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
 
 # XXX probably should detect assembler, but right now this is only used on Sparc
 
 .s$(O) : # suffix rule (limited support)
-	@$(PERL) tools/dev/cc_flags.pl $(CUR_DIR)/CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
+	@$(PERL) tools/dev/cc_flags.pl ./CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
 #UNLESS(win32).S$(O) : # suffix rule (limited support)
-#UNLESS(win32)	@$(PERL) tools/dev/cc_flags.pl $(CUR_DIR)/CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
-
-# XXX These obviously require parrot: had trouble adding parrot as a dependency
-# here, though. Ignored on Mac OS X, at least.
+#UNLESS(win32)	@$(PERL) tools/dev/cc_flags.pl ./CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
 
 .pir.pbc : # suffix rule (limited support)
 	$(PARROT) -o $@ $<
 
-.pbc$(O) : # suffix rule (limited support)
-	$(PARROT) -o $@ $<
-
-
 ###############################################################################
 #
 # USER TARGETS:
@@ -633,17 +600,22 @@
     corevm \
     docs \
 #IF(has_glut):    $(LIBGLUTCB_SO) \
-    compilers \
     $(DIS) \
     $(PARROT_CONFIG) \
     $(PBC_TO_EXE) \
     $(PBCMERGE) \
     $(PDB) \
     $(PDUMP) \
-    $(NQP)
+    $(NQP_RX) \
+    $(TGE_LIB_PBCS) \
+    $(PGE_LIB_PBCS) \
+    $(PCT_LIB_PBCS) \
+    $(JSON_LIB_PBCS) \
+    $(NQP_LIB_PBCS)
 
 corevm : \
     flags_dummy \
+	$(GEN_PM_INCLUDES) \
     PARROT_LIBS \
     $(PARROT) \
     runtime/parrot/include/parrotlib.pbc \
@@ -651,55 +623,57 @@
     $(LIBNCI_TEST_SO) \
     $(GEN_LIBRARY) \
     dynpmc \
-    dynoplibs \
+    dynoplibs
 
-$(GEN_LIBRARY) : $(PARROT)
+$(GEN_LIBRARY) : $(PARROT) $(GEN_PASM_INCLUDES)
 
 # constant string support
 .c.str : # suffix rule (limited support)
 	$(PERL) $(BUILD_TOOLS_DIR)/c2str.pl $< > $@
 
-STR_FILES := \
-    $(SRC_DIR)/debug.str \
-    $(SRC_DIR)/dynext.str \
-    $(SRC_DIR)/events.str \
-    $(SRC_DIR)/exceptions.str \
-    $(SRC_DIR)/global.str \
-    $(SRC_DIR)/global_setup.str \
-    $(SRC_DIR)/hll.str \
-    $(SRC_DIR)/call/pcc.str \
-    $(SRC_DIR)/call/args.str \
-    $(SRC_DIR)/interp/inter_cb.str \
-    $(SRC_DIR)/interp/inter_create.str \
-    $(SRC_DIR)/interp/inter_misc.str \
-    $(SRC_DIR)/io/api.str \
-    $(SRC_DIR)/key.str \
-    $(SRC_DIR)/library.str \
-    $(SRC_DIR)/multidispatch.str \
-    $(SRC_DIR)/frame_builder.str \
-    $(SRC_DIR)/nci.str \
-    $(SRC_DIR)/packfile.str \
-    $(SRC_DIR)/pmc.str \
-    $(SRC_DIR)/pmc_freeze.str \
-    $(SRC_DIR)/oo.str \
-    $(SRC_DIR)/runcore/cores.str \
-    $(SRC_DIR)/runcore/main.str \
-    $(SRC_DIR)/runcore/profiling.str \
-    $(SRC_DIR)/scheduler.str \
-    $(SRC_DIR)/spf_render.str \
-    $(SRC_DIR)/spf_vtable.str \
-    $(SRC_DIR)/string/api.str \
-    $(SRC_DIR)/sub.str \
+STR_FILES = \
+    src/debug.str \
+    src/dynext.str \
+    src/events.str \
+    src/exceptions.str \
+    src/global.str \
+    src/global_setup.str \
+    src/hll.str \
+    src/call/pcc.str \
+    src/call/args.str \
+    src/interp/inter_cb.str \
+    src/interp/inter_create.str \
+    src/interp/inter_misc.str \
+    src/io/api.str \
+    src/key.str \
+    src/library.str \
+    src/multidispatch.str \
+    src/frame_builder.str \
+    src/nci.str \
+    src/packfile.str \
+    src/pmc.str \
+    src/pmc_freeze.str \
+    src/oo.str \
+    src/runcore/cores.str \
+    src/runcore/main.str \
+    src/runcore/profiling.str \
+    src/scheduler.str \
+    src/spf_render.str \
+    src/spf_vtable.str \
+    src/string/api.str \
+    src/sub.str \
     \
     $(CLASS_STR_FILES)
 
-$(SRC_DIR)/string/private_cstring.h : $(STR_FILES) $(BUILD_TOOLS_DIR)/c2str.pl
+src/string/private_cstring.h : $(STR_FILES) $(BUILD_TOOLS_DIR)/c2str.pl
 	$(PERL) $(BUILD_TOOLS_DIR)/c2str.pl --all
 
+H2INC = $(BUILD_TOOLS_DIR)/h2inc.pl
+
 # classes PMC build utils and rules
-PMC2CD := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --dump @no_lines_flag@
-PMC2CC := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --c @no_lines_flag@
-PMC2CV := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --vtable @no_lines_flag@
+PMC2CD = $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --dump @no_lines_flag@
+PMC2CC = $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --c @no_lines_flag@
+PMC2CV = $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --vtable @no_lines_flag@
 
 .pmc.dump : # suffix rule (limited support)
 	$(PMC2CD) $<
@@ -707,11 +681,7 @@
 .pmc.c : # suffix rule (limited support)
 	$(PMC2CC) $<
 
-# not all makes might understand this, so the rules are generated
-#src/pmc/pmc_%.h : src/pmc/%.c
-#	$(PMC2CC) $<
-
-vtable.dump : src/vtable.tbl
+vtable.dump : src/vtable.tbl lib/Parrot/Pmc2c/PCCMETHOD_BITS.pm
 	$(PMC2CV)
 
 # This is a listing of all targets meant to be called by users
@@ -799,13 +769,10 @@
 	@echo "  dynoplibs-test:    Proxy for target 'test' of src/dynoplibs/Makefile"
 	@echo "  dynoplibs-clean:   Proxy for target 'clean' of src/dynoplibs/Makefile"
 	@echo ""
-	@echo "Language implementations:"
-	@echo "  compilers:         Proxy for default target of pge and tge compilers"
-	@echo ""
 	@echo "Fetch from source repository:"
 	@echo "  update:            svn update."
 	@echo "  status:            svn status."
-	@echo "  patch:             Create a patch for sending to bugs-parrot."
+	@echo "  patch:             Create a patch to attach to https:////trac.parrot.org/"
 	@echo ""
 	@echo "Development:"
 	@echo "  lint:              An alias for sunlint."
@@ -838,19 +805,19 @@
 
 flags_dummy :
 	@echo "Compiling with:"
-	@$(PERL) tools/dev/cc_flags.pl $(CUR_DIR)/CFLAGS echo $(CC) $(CFLAGS) -I$(@D) @cc_o_out@ xx$(O) -c xx.c
+	@$(PERL) tools/dev/cc_flags.pl ./CFLAGS echo $(CC) $(CFLAGS) -I$(@D) @cc_o_out@ xx$(O) -c xx.c
 
-runtime/parrot/include/parrotlib.pbc: runtime/parrot/library/parrotlib.pir $(PARROT)
+runtime/parrot/include/parrotlib.pbc: runtime/parrot/library/parrotlib.pir $(PARROT) $(GEN_PASM_INCLUDES)
 	$(PARROT) -o $@ runtime/parrot/library/parrotlib.pir
 
 runtime/parrot/include/config.fpmc : myconfig config_lib.pasm $(MINIPARROT)
 	$(MINIPARROT) config_lib.pasm > $@
 
-$(PARROT) : $(SRC_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) CFLAGS \
-    lib/Parrot/OpLib/core.pm $(SRC_DIR)/parrot_config$(O) \
+$(PARROT) : src/main$(O) $(GEN_HEADERS) $(LIBPARROT) CFLAGS \
+    lib/Parrot/OpLib/core.pm src/parrot_config$(O) \
     $(MINIPARROT)
 	$(LINK) @ld_out@$@ \
-	$(SRC_DIR)/main$(O) $(SRC_DIR)/parrot_config$(O) \
+	src/main$(O) src/parrot_config$(O) \
 	@rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
 #IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
@@ -862,76 +829,73 @@
 	$(PARROT) -o parrot_config.pbc tools/util/parrot-config.pir
 	$(PARROT) pbc_to_exe.pbc parrot_config.pbc
 
-#IF(win32):pirc : $(PIRC)
-
-$(PIRC) : $(PARROT)
-	$(MAKE) compilers/pirc
-	$(CP) compilers/pirc/pirc$(EXE) $(PIRC)
-	$(CHMOD) 0755 $(PIRC)
-
-$(NQP) : $(PBC_TO_EXE) compilers.dummy
-	$(CP) runtime/parrot/library/nqp-rx.pbc parrot-nqp.pbc
-	$(PBC_TO_EXE) parrot-nqp.pbc
-
-$(MINIPARROT) : $(SRC_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
-    lib/Parrot/OpLib/core.pm $(SRC_DIR)/null_config$(O)
-	$(LINK) @ld_out@$@ $(SRC_DIR)/main$(O) $(SRC_DIR)/null_config$(O) \
+$(MINIPARROT) : src/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
+    lib/Parrot/OpLib/core.pm src/null_config$(O)
+	$(LINK) @ld_out@$@ src/main$(O) src/null_config$(O) \
 	@rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
 #IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
-$(INSTALLABLEPARROT) : $(SRC_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
-    lib/Parrot/OpLib/core.pm $(SRC_DIR)/install_config$(O) \
+$(INSTALLABLEPARROT) : src/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
+    lib/Parrot/OpLib/core.pm src/install_config$(O) \
     $(PARROT)
 	$(LINK) @ld_out@$@ \
-    $(SRC_DIR)/main$(O) $(SRC_DIR)/install_config$(O) \
+    src/main$(O) src/install_config$(O) \
     @rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
 #IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
-$(INC_DIR)/context.h : $(PMC_INC_DIR)/pmc/pmc_callcontext.h
+$(INC_DIR)/context.h : include/pmc/pmc_callcontext.h
 
 $(INC_DIR)/pbcversion.h :
 	$(PERL) $(BUILD_TOOLS_DIR)/pbcversion_h.pl > $(INC_DIR)/pbcversion.h
 
-$(SRC_DIR)/parrot_config.c :  runtime/parrot/include/config.fpmc \
+src/parrot_config.c :  runtime/parrot/include/config.fpmc \
     $(BUILD_TOOLS_DIR)/parrot_config_c.pl
 	$(PERL) $(BUILD_TOOLS_DIR)/parrot_config_c.pl > \
-    $(SRC_DIR)/parrot_config.c
+    src/parrot_config.c
 
-$(SRC_DIR)/install_config.c :  install_config.fpmc \
+src/install_config.c :  install_config.fpmc \
     $(BUILD_TOOLS_DIR)/parrot_config_c.pl
 	$(PERL) $(BUILD_TOOLS_DIR)/parrot_config_c.pl --install > \
-    $(SRC_DIR)/install_config.c
+    src/install_config.c
 
-$(SRC_DIR)/null_config.c : myconfig $(BUILD_TOOLS_DIR)/parrot_config_c.pl
+src/null_config.c : myconfig $(BUILD_TOOLS_DIR)/parrot_config_c.pl
 	$(PERL) $(BUILD_TOOLS_DIR)/parrot_config_c.pl --mini > \
-    $(SRC_DIR)/null_config.c
+    src/null_config.c
 
 install_config.fpmc : myconfig config_lib.pasm $(PARROT)
 	@echo "Invoking Parrot to generate install_config.fpmc"
 	$(PARROT) config_lib.pasm --install > $@
 
-$(SRC_DIR)/parrot_config$(O) : $(PARROT_H_HEADERS)
+src/parrot_config$(O) : $(PARROT_H_HEADERS)
 
-$(SRC_DIR)/install_config$(O) : $(PARROT_H_HEADERS)
+src/install_config$(O) : $(PARROT_H_HEADERS)
 
-$(SRC_DIR)/null_config$(O) : $(PARROT_H_HEADERS)
+src/null_config$(O) : $(PARROT_H_HEADERS)
 
-$(SRC_DIR)/oo$(O) : $(PARROT_H_HEADERS) $(PMC_INC_DIR)/pmc/pmc_class.h $(PMC_INC_DIR)/pmc/pmc_object.h $(SRC_DIR)/oo.str $(INC_DIR)/oo_private.h
+src/oo$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_class.h include/pmc/pmc_object.h src/oo.str $(INC_DIR)/oo_private.h
 
-$(SRC_DIR)/scheduler$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/scheduler.str \
-        $(PMC_INC_DIR)/pmc/pmc_scheduler.h $(PMC_INC_DIR)/pmc/pmc_task.h \
-        $(PMC_INC_DIR)/pmc/pmc_timer.h \
+src/scheduler$(O) : $(PARROT_H_HEADERS) src/scheduler.str \
+        include/pmc/pmc_scheduler.h include/pmc/pmc_task.h \
+        include/pmc/pmc_timer.h \
         $(INC_DIR)/scheduler_private.h
 
-$(IO_DIR)/core$(O) : $(PARROT_H_HEADERS) $(IO_DIR)/io_private.h
+src/io/core$(O) : $(PARROT_H_HEADERS) src/io/io_private.h
 
-$(IO_DIR)/socket_api$(O) : $(PARROT_H_HEADERS) $(IO_DIR)/io_private.h $(IO_DIR)/api.str $(PMC_INC_DIR)/pmc/pmc_socket.h
+src/io/socket_api$(O) : $(PARROT_H_HEADERS) src/io/io_private.h src/io/api.str include/pmc/pmc_socket.h
 
-$(IO_DIR)/socket_unix$(O) : $(PARROT_H_HEADERS) $(PMC_INC_DIR)/pmc/pmc_socket.h $(IO_DIR)/io_private.h
+src/io/socket_unix$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_socket.h src/io/io_private.h
 
-$(IO_DIR)/socket_win32$(O) : $(PARROT_H_HEADERS) \
-        $(IO_DIR)/io_private.h \
-        $(PMC_INC_DIR)/pmc/pmc_socket.h
+src/io/socket_win32$(O) : $(PARROT_H_HEADERS) \
+        src/io/io_private.h \
+        include/pmc/pmc_socket.h
+
+O_FILES = \
+    $(INTERP_O_FILES) \
+    $(CHARSET_O_FILES) \
+    $(IO_O_FILES) \
+    $(CLASS_O_FILES) \
+    $(ENCODING_O_FILES) \
+    $(IMCC_O_FILES)
 
 lib_deps_object : $(O_FILES)
 	$(PERL) tools/dev/lib_deps.pl object $(O_FILES)
@@ -966,22 +930,18 @@
 #IF(libparrot_shared_alias):	( cd @blib_dir@ ; ln -sf @libparrot_shared@ @libparrot_shared_alias@ )
 
 
-$(INSTALLABLECONFIG) : $(SRC_DIR)/install_config$(O) $(PARROT_CONFIG) $(PBC_TO_EXE)
+$(INSTALLABLECONFIG) : src/install_config$(O) $(PARROT_CONFIG) $(PBC_TO_EXE)
 	$(PARROT) -o parrot_config.pbc tools/util/parrot-config.pir
 	$(PBC_TO_EXE) parrot_config.pbc --install
 
-$(INSTALLABLEPBCTOEXE) : $(PBC_TO_EXE) $(SRC_DIR)/install_config$(O)
+$(INSTALLABLEPBCTOEXE) : $(PBC_TO_EXE) src/install_config$(O)
 	$(PBC_TO_EXE) pbc_to_exe.pbc --install
 
-$(INSTALLABLENQP) : runtime/parrot/library/nqp-rx.pbc $(SRC_DIR)/install_config$(O) $(PBC_TO_EXE)
-	$(CP) runtime/parrot/library/nqp-rx.pbc parrot-nqp.pbc
-	$(PBC_TO_EXE) parrot-nqp.pbc --install
-
 #
 # Parrot Debugger
 #
 
-$(SRC_DIR)/parrot_debugger$(O) : $(INC_DIR)/embed.h \
+src/parrot_debugger$(O) : $(INC_DIR)/embed.h \
         $(INC_DIR)/runcore_api.h \
         compilers/imcc/imc.h $(PARROT_H_HEADERS) compilers/imcc/parser.h \
         compilers/imcc/cfg.h \
@@ -993,17 +953,17 @@
         compilers/imcc/unit.h \
         $(INC_DIR)/oplib/ops.h
 
-$(PDB) : $(SRC_DIR)/parrot_debugger$(O) $(SRC_DIR)/parrot_config$(O) $(LIBPARROT)
+$(PDB) : src/parrot_debugger$(O) src/parrot_config$(O) $(LIBPARROT)
 	$(LINK) @ld_out@$@ \
-    $(SRC_DIR)/parrot_debugger$(O) \
-    $(SRC_DIR)/parrot_config$(O) \
+    src/parrot_debugger$(O) \
+    src/parrot_config$(O) \
     @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
 #IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
-$(INSTALLABLEPDB) : $(SRC_DIR)/parrot_debugger$(O) $(LIBPARROT) $(SRC_DIR)/parrot_config$(O)
+$(INSTALLABLEPDB) : src/parrot_debugger$(O) $(LIBPARROT) src/parrot_config$(O)
 	$(LINK) @ld_out@$@ \
-    $(SRC_DIR)/parrot_debugger$(O) \
-    $(SRC_DIR)/parrot_config$(O) \
+    src/parrot_debugger$(O) \
+    src/parrot_config$(O) \
     @rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
 #IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
@@ -1011,40 +971,40 @@
 # Parrot Disassembler
 #
 
-$(SRC_DIR)/pbc_disassemble$(O) : $(INC_DIR)/embed.h $(PARROT_H_HEADERS)
+src/pbc_disassemble$(O) : $(INC_DIR)/embed.h $(PARROT_H_HEADERS)
 
-$(DIS) : $(SRC_DIR)/pbc_disassemble$(O) $(LIBPARROT)
+$(DIS) : src/pbc_disassemble$(O) $(LIBPARROT)
 	$(LINK) @ld_out@$@ \
-    $(SRC_DIR)/pbc_disassemble$(O) \
+    src/pbc_disassemble$(O) \
     @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
 #IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
-$(INSTALLABLEDIS) : $(SRC_DIR)/pbc_disassemble$(O) \
-	$(SRC_DIR)/install_config$(O) $(LIBPARROT)
+$(INSTALLABLEDIS) : src/pbc_disassemble$(O) \
+	src/install_config$(O) $(LIBPARROT)
 	$(LINK) @ld_out@$@ \
-    $(SRC_DIR)/pbc_disassemble$(O) \
+    src/pbc_disassemble$(O) \
     @rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
 #IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
 #
 # Parrot Dump
 #
-$(SRC_DIR)/packdump$(O) : $(PARROT_H_HEADERS) $(PMC_INC_DIR)/pmc/pmc_sub.h $(PMC_INC_DIR)/pmc/pmc_key.h
+src/packdump$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_sub.h include/pmc/pmc_key.h
 
-$(PDUMP) : $(SRC_DIR)/pbc_dump$(O) $(SRC_DIR)/packdump$(O) $(LIBPARROT)
+$(PDUMP) : src/pbc_dump$(O) src/packdump$(O) $(LIBPARROT)
 	$(LINK) @ld_out@$@ \
-    $(SRC_DIR)/pbc_dump$(O) \
-    $(SRC_DIR)/packdump$(O) @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
+    src/pbc_dump$(O) \
+    src/packdump$(O) @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
 #IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
-$(SRC_DIR)/pbc_dump$(O) : $(INC_DIR)/embed.h  $(INC_DIR)/oplib/ops.h \
+src/pbc_dump$(O) : $(INC_DIR)/embed.h  $(INC_DIR)/oplib/ops.h \
         $(PARROT_H_HEADERS)
 
-$(INSTALLABLEPDUMP) : $(SRC_DIR)/pbc_dump$(O) $(SRC_DIR)/packdump$(O) \
-	$(SRC_DIR)/install_config$(O) $(LIBPARROT)
+$(INSTALLABLEPDUMP) : src/pbc_dump$(O) src/packdump$(O) \
+	src/install_config$(O) $(LIBPARROT)
 	$(LINK) @ld_out@$@ \
-    $(SRC_DIR)/pbc_dump$(O) \
-    $(SRC_DIR)/packdump$(O) \
+    src/pbc_dump$(O) \
+    src/packdump$(O) \
     @rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
 #IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
@@ -1054,17 +1014,17 @@
 # Parrot Bytecode File Merger
 #
 
-$(PBCMERGE) : $(SRC_DIR)/pbc_merge$(O) $(LIBPARROT) $(SRC_DIR)/parrot_config$(O)
+$(PBCMERGE) : src/pbc_merge$(O) $(LIBPARROT) src/parrot_config$(O)
 	$(LINK) @ld_out@$@ \
-    $(SRC_DIR)/pbc_merge$(O) \
-    $(SRC_DIR)/parrot_config$(O) \
+    src/pbc_merge$(O) \
+    src/parrot_config$(O) \
     @rpath_blib@ $(ALL_PARROT_LIBS) $(LINK_DYNAMIC) $(LINKFLAGS)
 #IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
-$(INSTALLABLEPBCMERGE) : $(SRC_DIR)/pbc_merge$(O) $(LIBPARROT) $(INSTALLABLECONFIG)
+$(INSTALLABLEPBCMERGE) : src/pbc_merge$(O) $(LIBPARROT) $(INSTALLABLECONFIG)
 	$(LINK) @ld_out@$@ \
-    $(SRC_DIR)/pbc_merge$(O) \
-    $(SRC_DIR)/install_config$(O) \
+    src/pbc_merge$(O) \
+    src/install_config$(O) \
     @rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
 #IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
 
@@ -1075,8 +1035,93 @@
 #
 ###############################################################################
 
-$(INC_DIR)/oplib/ops.h lib/Parrot/OpLib/core.pm : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2pm.pl \
-    lib/Parrot/OpsFile.pm lib/Parrot/Op.pm $(OPS_DIR)/ops.num $(OPS_DIR)/ops.skip
+
+runtime/parrot/include/interpflags.pasm : $(INC_DIR)/interpreter.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/interpreter.h $@
+runtime/parrot/include/interpdebug.pasm : $(INC_DIR)/interpreter.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/interpreter.h $@
+runtime/parrot/include/interptrace.pasm : $(INC_DIR)/interpreter.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/interpreter.h $@
+runtime/parrot/include/interpcores.pasm : $(INC_DIR)/interpreter.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/interpreter.h $@
+runtime/parrot/include/cloneflags.pasm  : $(INC_DIR)/interpreter.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/interpreter.h $@
+runtime/parrot/include/iglobals.pasm    : $(INC_DIR)/interpreter.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/interpreter.h $@
+runtime/parrot/include/sysinfo.pasm     : $(INC_DIR)/interpreter.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/interpreter.h $@
+
+runtime/parrot/include/interpinfo.pasm : $(INC_DIR)/gc_api.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/gc_api.h $@
+
+runtime/parrot/include/timer.pasm : $(INC_DIR)/scheduler.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/scheduler.h $@
+
+runtime/parrot/include/pmctypes.pasm : $(INC_DIR)/core_pmcs.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/core_pmcs.h $@
+
+runtime/parrot/include/stdio.pasm  : $(INC_DIR)/io.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/io.h $@
+runtime/parrot/include/socket.pasm : $(INC_DIR)/io.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/io.h $@
+
+runtime/parrot/include/io_thr_msg.pasm : $(INC_DIR)/events.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/events.h $@
+
+runtime/parrot/include/hash_key_type.pasm : $(INC_DIR)/hash.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/hash.h $@
+
+runtime/parrot/include/iterator.pasm : $(INC_DIR)/enums.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/enums.h $@
+runtime/parrot/include/call_bits.pasm : $(INC_DIR)/enums.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/enums.h $@
+lib/Parrot/Pmc2c/PCCMETHOD_BITS.pm : $(INC_DIR)/enums.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/enums.h $@
+
+runtime/parrot/include/libpaths.pasm : $(INC_DIR)/library.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/library.h $@
+
+runtime/parrot/include/datatypes.pasm : $(INC_DIR)/datatypes.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/datatypes.h $@
+
+runtime/parrot/include/stat.pasm : $(INC_DIR)/stat.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/stat.h $@
+
+runtime/parrot/include/stringinfo.pasm : $(INC_DIR)/string.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/string.h $@
+
+runtime/parrot/include/longopt.pasm : $(INC_DIR)/longopt.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/longopt.h $@
+
+runtime/parrot/include/cclass.pasm : $(INC_DIR)/cclass.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/cclass.h $@
+
+runtime/parrot/include/packfile_segments.pasm : $(INC_DIR)/packfile.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/packfile.h $@
+runtime/parrot/include/packfile_constants.pasm : $(INC_DIR)/packfile.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/packfile.h $@
+runtime/parrot/include/packfile_annotation_key_type.pasm : $(INC_DIR)/packfile.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/packfile.h $@
+
+runtime/parrot/include/except_types.pasm : $(INC_DIR)/exceptions.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/exceptions.h $@
+runtime/parrot/include/except_severity.pasm : $(INC_DIR)/exceptions.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/exceptions.h $@
+
+runtime/parrot/include/warnings.pasm : $(INC_DIR)/warnings.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/warnings.h $@
+runtime/parrot/include/errors.pasm : $(INC_DIR)/warnings.h $(H2INC)
+	$(PERL) $(H2INC) $(INC_DIR)/warnings.h $@
+
+runtime/parrot/include/tm.pasm : src/utils.c $(H2INC)
+	$(PERL) $(H2INC) src/utils.c $@
+
+
+# ops.h is built by ops2pm.pl after it builds core.pm
+$(INC_DIR)/oplib/ops.h:  lib/Parrot/OpLib/core.pm
+
+lib/Parrot/OpLib/core.pm : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2pm.pl \
+    lib/Parrot/OpsFile.pm lib/Parrot/Op.pm src/ops/ops.num src/ops/ops.skip
 	$(PERL) $(BUILD_TOOLS_DIR)/ops2pm.pl @no_lines_flag@ $(OPS_FILES)
 
 ###############################################################################
@@ -1095,7 +1140,7 @@
 
 # hello
 hello: test_prep examples/pasm/hello$(EXE)
-	$(CUR_DIR)/examples/pasm/hello$(EXE) "from your friendly makefile"
+	./examples/pasm/hello$(EXE) "from your friendly makefile"
 
 examples/pasm/hello.pbc: examples/pasm/hello.pasm
 	$(PARROT) -o examples/pasm/hello.pbc examples/pasm/hello.pasm
@@ -1114,131 +1159,131 @@
 #
 ###############################################################################
 
-$(SRC_DIR)/byteorder$(O) : $(PARROT_H_HEADERS)
+src/byteorder$(O) : $(PARROT_H_HEADERS)
 
-$(SRC_DIR)/datatypes$(O) : $(PARROT_H_HEADERS)
+src/datatypes$(O) : $(PARROT_H_HEADERS)
 
-$(SRC_DIR)/extend_vtable$(O) : $(PARROT_H_HEADERS) \
+src/extend_vtable$(O) : $(PARROT_H_HEADERS) \
         $(INC_DIR)/extend.h $(INC_DIR)/extend_vtable.h
 
-$(SRC_DIR)/global_setup$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/global_setup.str
+src/global_setup$(O) : $(PARROT_H_HEADERS) src/global_setup.str
 
-$(SRC_DIR)/global$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/global.str \
-	$(PMC_INC_DIR)/pmc/pmc_sub.h
+src/global$(O) : $(PARROT_H_HEADERS) src/global.str \
+	include/pmc/pmc_sub.h
 
-$(SRC_DIR)/pmc$(O) : $(PMC_INC_DIR)/pmc/pmc_class.h \
-	$(SRC_DIR)/pmc.str $(PARROT_H_HEADERS)
+src/pmc$(O) : include/pmc/pmc_class.h \
+	src/pmc.str $(PARROT_H_HEADERS)
 
-$(SRC_DIR)/pmc_freeze$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/pmc_freeze.str
+src/pmc_freeze$(O) : $(PARROT_H_HEADERS) src/pmc_freeze.str
 
-$(SRC_DIR)/hash$(O) : $(PARROT_H_HEADERS) $(PMC_INC_DIR)/pmc/pmc_key.h
+src/hash$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_key.h
 
-$(SRC_DIR)/list$(O) : $(PARROT_H_HEADERS)
+src/list$(O) : $(PARROT_H_HEADERS)
 
-$(SRC_DIR)/library$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/library.str \
+src/library$(O) : $(PARROT_H_HEADERS) src/library.str \
         $(INC_DIR)/dynext.h
 
-$(INC_DIR)/extend_vtable.h $(SRC_DIR)/extend_vtable.c $(SRC_DIR)/vtable.h : src/vtable.tbl $(BUILD_TOOLS_DIR)/vtable_extend.pl lib/Parrot/Vtable.pm
+$(INC_DIR)/extend_vtable.h src/extend_vtable.c src/vtable.h : src/vtable.tbl $(BUILD_TOOLS_DIR)/vtable_extend.pl lib/Parrot/Vtable.pm
 	$(PERL) $(BUILD_TOOLS_DIR)/vtable_extend.pl
 
-$(SRC_DIR)/key$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/key.str \
-        $(PMC_INC_DIR)/pmc/pmc_key.h
+src/key$(O) : $(PARROT_H_HEADERS) src/key.str \
+        include/pmc/pmc_key.h
 
-$(SRC_DIR)/gc/mark_sweep$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/gc/gc_private.h
+src/gc/mark_sweep$(O) : $(PARROT_H_HEADERS) src/gc/gc_private.h
 
-$(SRC_DIR)/gc/gc_ms$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/gc/gc_private.h
+src/gc/gc_ms$(O) : $(PARROT_H_HEADERS) src/gc/gc_private.h
 
-$(SRC_DIR)/gc/gc_inf$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/gc/gc_private.h
+src/gc/gc_inf$(O) : $(PARROT_H_HEADERS) src/gc/gc_private.h
 
-$(SRC_DIR)/gc/api$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/gc/gc_private.h
+src/gc/api$(O) : $(PARROT_H_HEADERS) src/gc/gc_private.h
 
-$(SRC_DIR)/gc/alloc_resources$(O) : $(PARROT_H_HEADERS) \
-        $(SRC_DIR)/gc/gc_private.h
+src/gc/alloc_resources$(O) : $(PARROT_H_HEADERS) \
+        src/gc/gc_private.h
 
-$(SRC_DIR)/hll$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/hll.str $(INC_DIR)/dynext.h
+src/hll$(O) : $(PARROT_H_HEADERS) src/hll.str $(INC_DIR)/dynext.h
 
-$(SRC_DIR)/platform$(O) : $(PARROT_H_HEADERS)
+src/platform$(O) : $(PARROT_H_HEADERS)
 
-#IF(platform_asm):$(SRC_DIR)/platform_asm$(O) : $(PARROT_H_HEADERS)
+#IF(platform_asm):src/platform_asm$(O) : $(PARROT_H_HEADERS)
 #IF(platform_asm):
-$(SRC_DIR)/core_pmcs$(O) : $(PARROT_H_HEADERS)
+src/core_pmcs$(O) : $(PARROT_H_HEADERS)
 
-$(SRC_DIR)/runcore/trace$(O) : $(PMC_INC_DIR)/pmc/pmc_sub.h \
+src/runcore/trace$(O) : include/pmc/pmc_sub.h \
         $(INC_DIR)/oplib/ops.h $(INC_DIR)/runcore_trace.h \
         $(PARROT_H_HEADERS)
 
-$(SRC_DIR)/debug$(O) : $(INC_DIR)/embed.h $(INC_DIR)/extend.h \
+src/debug$(O) : $(INC_DIR)/embed.h $(INC_DIR)/extend.h \
         $(PARROT_H_HEADERS) \
         $(INC_DIR)/oplib/ops.h \
         $(INC_DIR)/runcore_api.h $(INC_DIR)/runcore_trace.h \
-        $(SRC_DIR)/debug.str $(PMC_INC_DIR)/pmc/pmc_key.h \
-        $(PMC_INC_DIR)/pmc/pmc_continuation.h \
+        src/debug.str include/pmc/pmc_key.h \
+        include/pmc/pmc_continuation.h \
         $(INC_DIR)/extend_vtable.h
 
-$(SRC_DIR)/sub$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/oplib/ops.h \
-        $(SRC_DIR)/sub.str \
-	$(PMC_INC_DIR)/pmc/pmc_sub.h $(PMC_INC_DIR)/pmc/pmc_continuation.h
+src/sub$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/oplib/ops.h \
+        src/sub.str \
+	include/pmc/pmc_sub.h include/pmc/pmc_continuation.h
 
-$(SRC_DIR)/string/api$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/string/api.str \
-        $(SRC_DIR)/string/private_cstring.h
+src/string/api$(O) : $(PARROT_H_HEADERS) src/string/api.str \
+        src/string/private_cstring.h
 
-$(SRC_DIR)/string/primitives$(O) : $(PARROT_H_HEADERS)
+src/string/primitives$(O) : $(PARROT_H_HEADERS)
 
-$(SRC_DIR)/longopt$(O) : $(PARROT_H_HEADERS)
+src/longopt$(O) : $(PARROT_H_HEADERS)
 
-$(SRC_DIR)/dynext$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/dynext.h \
-        $(SRC_DIR)/dynext.str $(PMC_INC_DIR)/pmc/pmc_parrotlibrary.h
+src/dynext$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/dynext.h \
+        src/dynext.str include/pmc/pmc_parrotlibrary.h
 
-$(SRC_DIR)/exceptions$(O) : $(PARROT_H_HEADERS) \
-        $(SRC_DIR)/exceptions.str \
-	$(PMC_INC_DIR)/pmc/pmc_continuation.h
+src/exceptions$(O) : $(PARROT_H_HEADERS) \
+        src/exceptions.str \
+	include/pmc/pmc_continuation.h
 
-$(SRC_DIR)/events$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/events.str
+src/events$(O) : $(PARROT_H_HEADERS) src/events.str
 
-$(SRC_DIR)/thread$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/atomic.h \
-        $(PMC_INC_DIR)/pmc/pmc_sub.h \
-	$(PMC_INC_DIR)/pmc/pmc_parrotinterpreter.h
+src/thread$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/atomic.h \
+        include/pmc/pmc_sub.h \
+	include/pmc/pmc_parrotinterpreter.h
 
-$(SRC_DIR)/extend$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/extend.h \
-	$(PMC_INC_DIR)/pmc/pmc_sub.h $(INC_DIR)/extend_vtable.h
+src/extend$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/extend.h \
+	include/pmc/pmc_sub.h $(INC_DIR)/extend_vtable.h
 
-$(SRC_DIR)/runcore/main$(O) : \
-	$(SRC_DIR)/runcore/main.str \
-	$(PMC_INC_DIR)/pmc/pmc_parrotlibrary.h \
+src/runcore/main$(O) : \
+	src/runcore/main.str \
+	include/pmc/pmc_parrotlibrary.h \
         $(INC_DIR)/dynext.h $(INC_DIR)/oplib/core_ops.h \
         $(INC_DIR)/oplib/core_ops_switch.h $(INC_DIR)/oplib/ops.h \
         $(PARROT_H_HEADERS) $(INC_DIR)/runcore_api.h \
         $(INC_DIR)/runcore_profiling.h
 
-$(SRC_DIR)/runcore/profiling$(O) : $(SRC_DIR)/runcore/profiling.str \
-	$(PMC_INC_DIR)/pmc/pmc_sub.h \
-	$(PMC_INC_DIR)/pmc/pmc_namespace.h \
+src/runcore/profiling$(O) : src/runcore/profiling.str \
+	include/pmc/pmc_sub.h \
+	include/pmc/pmc_namespace.h \
         $(INC_DIR)/oplib/core_ops.h $(INC_DIR)/runcore_api.h \
         $(INC_DIR)/runcore_profiling.h $(INC_DIR)/embed.h \
         $(PARROT_H_HEADERS)
 
-$(SRC_DIR)/call/args$(O) : \
+src/call/args$(O) : \
         $(PARROT_H_HEADERS) $(INC_DIR)/oplib/ops.h \
-	$(SRC_DIR)/call/args.str \
-	$(PMC_INC_DIR)/pmc/pmc_key.h \
-	$(PMC_INC_DIR)/pmc/pmc_fixedintegerarray.h
+	src/call/args.str \
+	include/pmc/pmc_key.h \
+	include/pmc/pmc_fixedintegerarray.h
 
-$(SRC_DIR)/call/context_accessors$(O): $(PARROT_H_HEADERS)
+src/call/context_accessors$(O): $(PARROT_H_HEADERS)
 
-$(SRC_DIR)/call/pcc$(O) : $(INC_DIR)/oplib/ops.h \
+src/call/pcc$(O) : $(INC_DIR)/oplib/ops.h \
         $(PARROT_H_HEADERS) \
         $(INC_DIR)/runcore_api.h \
-	$(SRC_DIR)/call/pcc.str \
-	$(PMC_INC_DIR)/pmc/pmc_key.h $(PMC_INC_DIR)/pmc/pmc_continuation.h
+	src/call/pcc.str \
+	include/pmc/pmc_key.h include/pmc/pmc_continuation.h
 
-$(SRC_DIR)/call/context$(O) : $(PARROT_H_HEADERS) \
-	$(PMC_INC_DIR)/pmc/pmc_sub.h
+src/call/context$(O) : $(PARROT_H_HEADERS) \
+	include/pmc/pmc_sub.h
 
-$(SRC_DIR)/interp/inter_cb$(O) : $(PARROT_H_HEADERS) \
-	$(SRC_DIR)/interp/inter_cb.str
+src/interp/inter_cb$(O) : $(PARROT_H_HEADERS) \
+	src/interp/inter_cb.str
 
-$(SRC_DIR)/interp/inter_misc$(O) : $(PARROT_H_HEADERS) \
-        $(SRC_DIR)/interp/inter_misc.str \
+src/interp/inter_misc$(O) : $(PARROT_H_HEADERS) \
+        src/interp/inter_misc.str \
 	compilers/imcc/imc.h \
 	compilers/imcc/cfg.h \
 	compilers/imcc/debug.h \
@@ -1249,9 +1294,9 @@
         $(INC_DIR)/oplib/ops.h \
         $(INC_DIR)/runcore_api.h
 
-$(SRC_DIR)/interp/inter_create$(O) : $(PARROT_H_HEADERS) \
+src/interp/inter_create$(O) : $(PARROT_H_HEADERS) \
 	$(INC_DIR)/oplib/core_ops.h \
-        $(SRC_DIR)/interp/inter_create.str \
+        src/interp/inter_create.str \
 	compilers/imcc/imc.h \
 	compilers/imcc/cfg.h \
 	compilers/imcc/debug.h \
@@ -1262,35 +1307,35 @@
         $(INC_DIR)/oplib/ops.h \
         $(INC_DIR)/runcore_api.h
 
-$(SRC_DIR)/call/ops$(O) : $(INC_DIR)/oplib/ops.h \
-	$(PARROT_H_HEADERS) $(PMC_INC_DIR)/pmc/pmc_continuation.h
+src/call/ops$(O) : $(INC_DIR)/oplib/ops.h \
+	$(PARROT_H_HEADERS) include/pmc/pmc_continuation.h
 
-$(IO_DIR)/api$(O) : $(PARROT_H_HEADERS) $(IO_DIR)/io_private.h \
-        $(IO_DIR)/api.str $(PMC_INC_DIR)/pmc/pmc_filehandle.h \
-        $(PMC_INC_DIR)/pmc/pmc_stringhandle.h
+src/io/api$(O) : $(PARROT_H_HEADERS) src/io/io_private.h \
+        src/io/api.str include/pmc/pmc_filehandle.h \
+        include/pmc/pmc_stringhandle.h
 
-$(IO_DIR)/buffer$(O) : $(PARROT_H_HEADERS) $(IO_DIR)/io_private.h
+src/io/buffer$(O) : $(PARROT_H_HEADERS) src/io/io_private.h
 
-$(IO_DIR)/portable$(O) : $(PARROT_H_HEADERS) $(IO_DIR)/io_private.h
+src/io/portable$(O) : $(PARROT_H_HEADERS) src/io/io_private.h
 
-$(IO_DIR)/unix$(O) : $(PARROT_H_HEADERS) $(IO_DIR)/io_private.h $(PMC_INC_DIR)/pmc/pmc_filehandle.h
+src/io/unix$(O) : $(PARROT_H_HEADERS) src/io/io_private.h include/pmc/pmc_filehandle.h
 
-$(IO_DIR)/utf8$(O) : $(PARROT_H_HEADERS) $(IO_DIR)/io_private.h $(SRC_DIR)/string/unicode.h
+src/io/utf8$(O) : $(PARROT_H_HEADERS) src/io/io_private.h src/string/unicode.h
 
-$(IO_DIR)/win32$(O) : $(PARROT_H_HEADERS) $(IO_DIR)/io_private.h $(PMC_INC_DIR)/pmc/pmc_filehandle.h
+src/io/win32$(O) : $(PARROT_H_HEADERS) src/io/io_private.h include/pmc/pmc_filehandle.h
 
-$(SRC_DIR)/gc/alloc_memory$(O) : $(PARROT_H_HEADERS)
+src/gc/alloc_memory$(O) : $(PARROT_H_HEADERS)
 
-$(SRC_DIR)/main$(O) : $(INC_DIR)/imcc.h $(PARROT_H_HEADERS) \
+src/main$(O) : $(INC_DIR)/imcc.h $(PARROT_H_HEADERS) \
         $(INC_DIR)/embed.h
 
-$(SRC_DIR)/multidispatch$(O) : \
-        $(SRC_DIR)/multidispatch.str \
+src/multidispatch$(O) : \
+        src/multidispatch.str \
         $(INC_DIR)/oplib/ops.h $(PARROT_H_HEADERS) \
-	$(PMC_INC_DIR)/pmc/pmc_nci.h $(PMC_INC_DIR)/pmc/pmc_sub.h
+	include/pmc/pmc_nci.h include/pmc/pmc_sub.h
 
-$(SRC_DIR)/packfile$(O) : $(SRC_DIR)/packfile.str \
-	$(PMC_INC_DIR)/pmc/pmc_sub.h $(PMC_INC_DIR)/pmc/pmc_key.h \
+src/packfile$(O) : src/packfile.str \
+	include/pmc/pmc_sub.h include/pmc/pmc_key.h \
         compilers/imcc/imc.h \
 	compilers/imcc/cfg.h \
 	compilers/imcc/debug.h \
@@ -1302,22 +1347,22 @@
         $(INC_DIR)/embed.h $(INC_DIR)/extend.h $(INC_DIR)/extend_vtable.h \
         $(PARROT_H_HEADERS) $(INC_DIR)/runcore_api.h
 
-$(PF_DIR)/pf_items$(O) : $(PARROT_H_HEADERS)
+src/packfile/pf_items$(O) : $(PARROT_H_HEADERS)
 
-$(SRC_DIR)/packout$(O) : $(PARROT_H_HEADERS) $(PMC_INC_DIR)/pmc/pmc_key.h
+src/packout$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_key.h
 
-$(SRC_DIR)/parrot$(O) : $(GENERAL_H_FILES)
+src/parrot$(O) : $(GENERAL_H_FILES)
 
-$(SRC_DIR)/runcore/cores$(O) : $(SRC_DIR)/runcore/cores.str \
-	$(PMC_INC_DIR)/pmc/pmc_sub.h \
+src/runcore/cores$(O) : src/runcore/cores.str \
+	include/pmc/pmc_sub.h \
         $(INC_DIR)/dynext.h $(INC_DIR)/embed.h $(INC_DIR)/oplib/core_ops.h \
         $(INC_DIR)/oplib/core_ops_switch.h $(INC_DIR)/oplib/ops.h \
         $(INC_DIR)/runcore_api.h $(INC_DIR)/runcore_trace.h \
         $(PARROT_H_HEADERS)
 
-$(SRC_DIR)/tsq$(O) : $(PARROT_H_HEADERS)
+src/tsq$(O) : $(PARROT_H_HEADERS)
 
-$(SRC_DIR)/embed$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/embed.h \
+src/embed$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/embed.h \
         $(INC_DIR)/oplib/ops.h $(INC_DIR)/runcore_api.h \
         compilers/imcc/imc.h \
         compilers/imcc/cfg.h \
@@ -1326,370 +1371,66 @@
         compilers/imcc/sets.h \
         compilers/imcc/symreg.h \
         compilers/imcc/unit.h \
-	$(PMC_INC_DIR)/pmc/pmc_sub.h
+	include/pmc/pmc_sub.h
 
-$(SRC_DIR)/dataypes$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/dataypes.c
+src/dataypes$(O) : $(GENERAL_H_FILES) src/dataypes.c
 
-$(SRC_DIR)/exit$(O) : $(PARROT_H_HEADERS)
+src/exit$(O) : $(PARROT_H_HEADERS)
 
-$(SRC_DIR)/nci$(O) : $(SRC_DIR)/nci.str \
+src/nci$(O) : src/nci.str \
         $(INC_DIR)/oplib/ops.h $(PARROT_H_HEADERS) \
-        $(SRC_DIR)/frame_builder.h \
-        $(PMC_INC_DIR)/pmc/pmc_managedstruct.h \
-        $(PMC_INC_DIR)/pmc/pmc_nci.h \
-        $(PMC_INC_DIR)/pmc/pmc_pointer.h
-
-$(SRC_DIR)/frame_builder$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/frame_builder.h \
-        $(PMC_INC_DIR)/pmc/pmc_fixedintegerarray.h \
-        $(PMC_INC_DIR)/pmc/pmc_unmanagedstruct.h \
-        $(PMC_INC_DIR)/pmc/pmc_managedstruct.h \
+        src/frame_builder.h \
+        include/pmc/pmc_managedstruct.h \
+        include/pmc/pmc_nci.h \
+        include/pmc/pmc_pointer.h
+
+src/frame_builder$(O) : $(PARROT_H_HEADERS) src/frame_builder.h \
+        include/pmc/pmc_fixedintegerarray.h \
+        include/pmc/pmc_unmanagedstruct.h \
+        include/pmc/pmc_managedstruct.h \
         $(INC_DIR)/oplib/ops.h
 
-$(SRC_DIR)/vtables$(O) : $(PARROT_H_HEADERS)
+src/vtables$(O) : $(PARROT_H_HEADERS)
 
-$(SRC_DIR)/gc/system$(O) : $(PARROT_H_HEADERS)  $(SRC_DIR)/gc/gc_private.h
-$(SRC_DIR)/gc/gc_private.h : $(INC_DIR)/settings.h
+src/gc/system$(O) : $(PARROT_H_HEADERS)  src/gc/gc_private.h
+src/gc/gc_private.h : $(INC_DIR)/settings.h
 
-$(SRC_DIR)/nci.c : $(SRC_DIR)/call_list.txt $(BUILD_TOOLS_DIR)/nativecall.pl \
-	$(PMC_INC_DIR)/pmc/pmc_nci.h
-	$(PERL) $(BUILD_TOOLS_DIR)/nativecall.pl $(SRC_DIR)/call_list.txt
-
-$(SRC_DIR)/warnings$(O) : $(PARROT_H_HEADERS)
-
-$(SRC_DIR)/misc$(O) : $(PARROT_H_HEADERS)
-
-$(SRC_DIR)/utils$(O) : $(PARROT_H_HEADERS) $(PMC_INC_DIR)/pmc/pmc_nci.h
-
-$(SRC_DIR)/spf_render$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/spf_render.str
-
-$(SRC_DIR)/spf_vtable$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/spf_vtable.str
-
-$(SRC_DIR)/string/encoding$(O) : $(PARROT_H_HEADERS)
-
-$(SRC_DIR)/string/charset$(O) : $(PARROT_H_HEADERS) \
-        $(SRC_DIR)/string/encoding/fixed_8.h \
-        $(SRC_DIR)/string/encoding/utf8.h \
-        $(SRC_DIR)/string/encoding/utf16.h \
-        $(SRC_DIR)/string/encoding/ucs2.h \
-        $(SRC_DIR)/string/charset/ascii.h \
-        $(SRC_DIR)/string/charset/binary.h \
-        $(SRC_DIR)/string/charset/iso-8859-1.h \
-        $(SRC_DIR)/string/charset/unicode.h
-
-$(SRC_DIR)/pbc_merge$(O) : $(INC_DIR)/embed.h \
-	$(PMC_INC_DIR)/pmc/pmc_sub.h $(INC_DIR)/oplib/ops.h $(PARROT_H_HEADERS)
-
-$(IO_DIR)/filehandle$(O) : $(PARROT_H_HEADERS) $(PMC_INC_DIR)/pmc/pmc_filehandle.h $(SRC_DIR)/io/io_private.h
-
-compilers/pirc/src/piremit$(O) : $(PARROT_H_HEADERS) \
-        compilers/pirc/src/piremit.h \
-        compilers/pirc/src/pircompunit.h \
-        compilers/pirc/src/pircompiler.h \
-        compilers/pirc/src/pirerr.h \
-        compilers/pirc/src/bcgen.h \
-        compilers/pirc/src/pirdefines.h \
-        compilers/pirc/src/pirmacro.h \
-        compilers/pirc/src/pirregalloc.h \
-        compilers/pirc/src/pirsymbol.h \
-        compilers/pirc/src/piryy.h \
-        $(INC_DIR)/embed.h \
-        $(INC_DIR)/oplib/ops.h
+src/nci.c : src/call_list.txt $(BUILD_TOOLS_DIR)/nativecall.pl \
+	include/pmc/pmc_nci.h
+	$(PERL) $(BUILD_TOOLS_DIR)/nativecall.pl src/call_list.txt
 
-compilers/imcc/pcc$(O) : compilers/imcc/imc.h $(PARROT_H_HEADERS) compilers/imcc/parser.h \
-  compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
-  compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
-  $(INC_DIR)/oplib/ops.h compilers/imcc/imcparser.h
-
-compilers/imcc/instructions$(O) : compilers/imcc/imc.h $(PARROT_H_HEADERS) compilers/imcc/pbc.h \
-  compilers/imcc/optimizer.h \
-  compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
-  compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
-  $(INC_DIR)/oplib/ops.h
+src/warnings$(O) : $(PARROT_H_HEADERS)
 
-src/dynpmc/subproxy$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/extend.h \
-  $(INC_DIR)/dynext.h $(PMC_INC_DIR)/pmc/pmc_subproxy.h \
-  $(PMC_INC_DIR)/pmc/pmc_sub.h $(PMC_INC_DIR)/pmc_default.h \
-  $(PMC_INC_DIR)/pmc/pmc_continuation.h $(PMC_INC_DIR)/pmc/pmc_callcontext.h \
-  $(PMC_INC_DIR)/pmc/pmc_default.h
-
-compilers/pirc/src/pirparser$(O) : $(PARROT_H_HEADERS) \
-        compilers/pirc/src/pircompiler.h \
-        compilers/pirc/src/pircompunit.h \
-        compilers/pirc/src/pirdefines.h \
-        compilers/pirc/src/pirparser.h \
-        compilers/pirc/src/piryy.h \
-        compilers/pirc/src/pirlexer.h \
-        compilers/pirc/src/pirerr.h \
-        compilers/pirc/src/pirop.h \
-        compilers/pirc/src/pirpcc.h \
-        compilers/pirc/src/pirmacro.h \
-        compilers/pirc/src/pirregalloc.h \
-        compilers/pirc/src/pirsymbol.h \
-        compilers/pirc/src/bcgen.h \
-        $(INC_DIR)/oplib/ops.h \
-        $(INC_DIR)/embed.h
+src/misc$(O) : $(PARROT_H_HEADERS)
 
-compilers/pirc/src/pirerr$(O) : $(PARROT_H_HEADERS) \
-        compilers/pirc/src/pircompiler.h \
-        compilers/pirc/src/pircompunit.h \
-        compilers/pirc/src/pirdefines.h \
-        compilers/pirc/src/pirparser.h \
-        compilers/pirc/src/piryy.h \
-        compilers/pirc/src/pirlexer.h \
-        compilers/pirc/src/pirerr.h \
-        compilers/pirc/src/pirmacro.h \
-        compilers/pirc/src/pirregalloc.h \
-        compilers/pirc/src/pirsymbol.h \
-        compilers/pirc/src/bcgen.h \
-        $(INC_DIR)/embed.h
+src/utils$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_nci.h
 
-compilers/imcc/parser.h : compilers/imcc/imcparser.h
+src/spf_render$(O) : $(PARROT_H_HEADERS) src/spf_render.str
 
-compilers/imcc/pbc$(O) : $(PARROT_H_HEADERS) \
-  compilers/imcc/imc.h \
-  compilers/imcc/pbc.h \
-  $(PMC_INC_DIR)/pmc/pmc_sub.h \
-  compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
-  compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
-  $(INC_DIR)/oplib/ops.h
-
-compilers/imcc/parser_util$(O) : compilers/imcc/imc.h $(PARROT_H_HEADERS) \
-        compilers/imcc/pbc.h \
-        compilers/imcc/parser.h \
-        compilers/imcc/optimizer.h \
-        $(INC_DIR)/dynext.h $(INC_DIR)/embed.h \
-        $(PMC_INC_DIR)/pmc/pmc_sub.h \
-  compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
-  compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
-  $(INC_DIR)/oplib/ops.h compilers/imcc/imcparser.h
-
-compilers/pirc/src/bcgen$(O) :  \
-  compilers/pirc/src/pirsymbol.h \
-  compilers/pirc/src/pircompiler.h \
-  compilers/pirc/src/pirregalloc.h \
-  compilers/pirc/src/pircompunit.h \
-  compilers/pirc/src/pirdefines.h \
-  compilers/pirc/src/pirmacro.h \
-  compilers/pirc/src/bcgen.h \
-  $(PARROT_H_HEADERS) \
-  $(INC_DIR)/embed.h \
-  $(PMC_INC_DIR)/pmc/pmc_sub.h \
-  $(PMC_INC_DIR)/pmc/pmc_namespace.h
-
-compilers/imcc/imc$(O) :  \
-  compilers/imcc/imc.h $(PARROT_H_HEADERS) \
-  compilers/imcc/optimizer.h \
-  compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
-  compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
-  $(INC_DIR)/oplib/ops.h
-
-compilers/pirc/src/pirregalloc$(O) : $(PARROT_H_HEADERS) \
-        compilers/pirc/src/pircompiler.h \
-        compilers/pirc/src/pircompunit.h \
-        compilers/pirc/src/pirdefines.h \
-        compilers/pirc/src/pirmacro.h \
-        compilers/pirc/src/pirregalloc.h \
-        compilers/pirc/src/pirsymbol.h \
-        compilers/pirc/src/bcgen.h \
-        $(INC_DIR)/embed.h
+src/spf_vtable$(O) : $(PARROT_H_HEADERS) src/spf_vtable.str
 
-compilers/imcc/cfg$(O) : \
-  compilers/imcc/imc.h $(PARROT_H_HEADERS) compilers/imcc/optimizer.h \
-  compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
-  compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
-  $(INC_DIR)/oplib/ops.h
-
-compilers/imcc/debug$(O) : \
-  compilers/imcc/imc.h $(PARROT_H_HEADERS) \
-  compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h  \
-  compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
-  $(INC_DIR)/oplib/ops.h
-
-compilers/imcc/imclexer$(O) : \
-  compilers/imcc/imc.h $(PARROT_H_HEADERS) compilers/imcc/parser.h \
-  compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
-  compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
-  $(INC_DIR)/oplib/ops.h compilers/imcc/imcparser.h
-
-compilers/imcc/imcparser$(O) : \
-  compilers/imcc/imc.h $(PARROT_H_HEADERS) compilers/imcc/parser.h compilers/imcc/pbc.h \
-  compilers/imcc/optimizer.h \
-  $(INC_DIR)/dynext.h \
-  compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/imcparser.h \
-  compilers/imcc/instructions.h \
-  compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
-  $(INC_DIR)/oplib/ops.h
-
-compilers/imcc/main$(O) : \
-  compilers/imcc/imc.h $(PARROT_H_HEADERS) \
-  compilers/imcc/parser.h compilers/imcc/pbc.h \
-  $(INC_DIR)/embed.h  \
-  $(INC_DIR)/imcc.h $(INC_DIR)/runcore_api.h \
-  compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
-  compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
-  $(INC_DIR)/oplib/ops.h compilers/imcc/imcparser.h
-
-compilers/imcc/optimizer$(O) : \
-  compilers/imcc/imc.h $(PARROT_H_HEADERS) \
-  compilers/imcc/pbc.h compilers/imcc/optimizer.h \
-  compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
-  compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
-  $(INC_DIR)/oplib/ops.h
-
-compilers/imcc/reg_alloc$(O) : compilers/imcc/imc.h $(PARROT_H_HEADERS) compilers/imcc/optimizer.h \
-  compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
-  compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
-  $(INC_DIR)/oplib/ops.h
-
-compilers/imcc/sets$(O) : compilers/imcc/imc.h $(PARROT_H_HEADERS) compilers/imcc/sets.h \
-  compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
-  compilers/imcc/symreg.h compilers/imcc/unit.h \
-  $(INC_DIR)/oplib/ops.h
-
-compilers/imcc/symreg$(O) : compilers/imcc/imc.h $(PARROT_H_HEADERS) \
-  compilers/imcc/sets.h \
-  compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
-  compilers/imcc/symreg.h compilers/imcc/unit.h \
-  $(INC_DIR)/oplib/ops.h
-compilers/pirc/heredoc/heredocmain$(O) : $(PARROT_H_HEADERS)
-
-compilers/pirc/macro/macrolexer$(O) : $(PARROT_H_HEADERS) \
-        compilers/pirc/macro/macro.h  \
-        compilers/pirc/macro/lexer.h  \
-        compilers/pirc/macro/macroparser.h
-
-compilers/pirc/macro/macroparser$(O) : $(PARROT_H_HEADERS) \
-        compilers/pirc/macro/macro.h  \
-        compilers/pirc/macro/lexer.h  \
-        compilers/pirc/macro/macroparser.h \
-        compilers/pirc/macro/macrolexer.h
+src/string/encoding$(O) : $(PARROT_H_HEADERS)
 
-compilers/pirc/src/hdocprep$(O) : $(PARROT_H_HEADERS) \
-        $(INC_DIR)/embed.h compilers/pirc/src/pirheredoc.h
+src/string/charset$(O) : $(PARROT_H_HEADERS) \
+        src/string/encoding/fixed_8.h \
+        src/string/encoding/utf8.h \
+        src/string/encoding/utf16.h \
+        src/string/encoding/ucs2.h \
+        src/string/charset/ascii.h \
+        src/string/charset/binary.h \
+        src/string/charset/iso-8859-1.h \
+        src/string/charset/unicode.h
 
-compilers/pirc/src/main$(O) : \
-        $(PARROT_H_HEADERS) \
-        $(INC_DIR)/embed.h \
-        compilers/pirc/src/bcgen.h \
-        compilers/pirc/src/pirparser.h \
-        compilers/pirc/src/pircompiler.h \
-        compilers/pirc/src/pircompunit.h \
-        compilers/pirc/src/pirmacro.h \
-        compilers/pirc/src/pirdefines.h \
-        compilers/pirc/src/piremit.h \
-        compilers/pirc/src/piryy.h \
-        compilers/pirc/src/pirlexer.h \
-        compilers/pirc/src/pirheredoc.h \
-        compilers/pirc/src/pirsymbol.h \
-        compilers/pirc/src/pirregalloc.h \
-        compilers/pirc/src/pircapi.h
-
-compilers/pirc/src/pircapi$(O) : \
-        $(PARROT_H_HEADERS) \
-        compilers/pirc/src/bcgen.h \
-        compilers/pirc/src/pircompiler.h \
-        compilers/pirc/src/pirparser.h \
-        compilers/pirc/src/pircompunit.h \
-        compilers/pirc/src/pirsymbol.h \
-        compilers/pirc/src/pirregalloc.h \
-        compilers/pirc/src/pirmacro.h \
-        compilers/pirc/src/pirdefines.h \
-        compilers/pirc/src/piremit.h \
-        compilers/pirc/src/piryy.h \
-        compilers/pirc/src/pirlexer.h \
-        compilers/pirc/src/pircapi.h \
-        $(INC_DIR)/embed.h
+src/pbc_merge$(O) : $(INC_DIR)/embed.h \
+	include/pmc/pmc_sub.h $(INC_DIR)/oplib/ops.h $(PARROT_H_HEADERS)
 
-compilers/pirc/src/pircompiler$(O) : \
-        compilers/pirc/src/pircompiler.h \
-        $(PARROT_H_HEADERS) \
-        compilers/pirc/src/piryy.h \
-        compilers/pirc/src/pirmacro.h \
-        compilers/pirc/src/pirregalloc.h \
-        compilers/pirc/src/pirerr.h \
-        compilers/pirc/src/bcgen.h \
-        compilers/pirc/src/pircompunit.h \
-        compilers/pirc/src/pirsymbol.h \
-        compilers/pirc/src/pirdefines.h \
-        $(INC_DIR)/embed.h
+src/io/filehandle$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_filehandle.h src/io/io_private.h
 
-compilers/pirc/src/pircompunit$(O) : $(PARROT_H_HEADERS) \
-  compilers/pirc/src/pircompunit.h \
-  compilers/pirc/src/pircompiler.h \
-  compilers/pirc/src/pirsymbol.h \
-  compilers/pirc/src/piryy.h \
-  compilers/pirc/src/pirdefines.h \
-  compilers/pirc/src/pirregalloc.h \
-  compilers/pirc/src/pirpcc.h \
-  compilers/pirc/src/pirerr.h \
-  compilers/pirc/src/pirmacro.h \
-  compilers/pirc/src/pirop.h \
-  compilers/pirc/src/bcgen.h \
-  $(INC_DIR)/oplib/ops.h \
-  $(INC_DIR)/dynext.h \
-  $(INC_DIR)/embed.h
-
-compilers/pirc/src/pirlexer$(O) : $(PARROT_H_HEADERS) \
-  compilers/pirc/src/pirparser.h \
-  compilers/pirc/src/pirmacro.h \
-  compilers/pirc/src/pirerr.h \
-  compilers/pirc/src/pircompunit.h \
-  compilers/pirc/src/pircompiler.h \
-  compilers/pirc/src/pirsymbol.h \
-  compilers/pirc/src/piryy.h \
-  compilers/pirc/src/pirdefines.h \
-  compilers/pirc/src/pirregalloc.h \
-  compilers/pirc/src/bcgen.h \
-  $(INC_DIR)/embed.h
-
-compilers/pirc/src/pirmacro$(O) : $(PARROT_H_HEADERS) \
-  compilers/pirc/src/pirmacro.h \
-  compilers/pirc/src/pircompunit.h \
-  compilers/pirc/src/pircompiler.h \
-  compilers/pirc/src/pirsymbol.h \
-  compilers/pirc/src/pirdefines.h \
-  compilers/pirc/src/pirregalloc.h \
-  compilers/pirc/src/bcgen.h \
-  $(INC_DIR)/embed.h
-
-compilers/pirc/src/pirop$(O) : $(PARROT_H_HEADERS) \
-  compilers/pirc/src/pircompiler.h \
-  compilers/pirc/src/pircompunit.h \
-  compilers/pirc/src/pirop.h \
-  compilers/pirc/src/pirerr.h \
-  compilers/pirc/src/pirsymbol.h \
-  compilers/pirc/src/piryy.h \
-  compilers/pirc/src/pirdefines.h \
-  compilers/pirc/src/pirregalloc.h \
-  compilers/pirc/src/pirmacro.h \
-  compilers/pirc/src/bcgen.h \
-  $(INC_DIR)/embed.h
-
-compilers/pirc/src/pirpcc$(O) : $(PARROT_H_HEADERS) \
-  compilers/pirc/src/pirpcc.h \
-  compilers/pirc/src/pircompiler.h \
-  compilers/pirc/src/pirerr.h \
-  compilers/pirc/src/pircompunit.h \
-  compilers/pirc/src/pirsymbol.h \
-  compilers/pirc/src/piryy.h \
-  compilers/pirc/src/pirdefines.h \
-  compilers/pirc/src/pirregalloc.h \
-  compilers/pirc/src/pirmacro.h \
-  compilers/pirc/src/bcgen.h \
-  $(INC_DIR)/oplib/ops.h \
-  $(INC_DIR)/embed.h
-
-compilers/pirc/src/pirsymbol$(O) : $(PARROT_H_HEADERS) \
-  compilers/pirc/src/pircompiler.h \
-  compilers/pirc/src/pirsymbol.h \
-  compilers/pirc/src/piryy.h \
-  compilers/pirc/src/pirerr.h \
-  compilers/pirc/src/pircompunit.h \
-  compilers/pirc/src/pirdefines.h \
-  compilers/pirc/src/pirregalloc.h \
-  compilers/pirc/src/pirmacro.h \
-  compilers/pirc/src/bcgen.h \
-  $(INC_DIR)/embed.h
+src/dynpmc/subproxy$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/extend.h \
+  $(INC_DIR)/dynext.h include/pmc/pmc_subproxy.h \
+  include/pmc/pmc_sub.h include/pmc_default.h \
+  include/pmc/pmc_continuation.h include/pmc/pmc_callcontext.h \
+  include/pmc/pmc_default.h
 
 src/gc/malloc_trace$(O) : src/gc/malloc.c
 
@@ -1697,10 +1438,10 @@
 
 src/atomic/gcc_x86$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/atomic/gcc_x86.h
 
-$(OPS_DIR)/core_ops$(O) : $(OPS_DIR)/core_ops.c \
-	$(PMC_INC_DIR)/pmc/pmc_callcontext.h \
-	$(PMC_INC_DIR)/pmc/pmc_continuation.h \
-        $(PMC_INC_DIR)/pmc/pmc_parrotlibrary.h \
+src/ops/core_ops$(O) : src/ops/core_ops.c \
+	include/pmc/pmc_callcontext.h \
+	include/pmc/pmc_continuation.h \
+        include/pmc/pmc_parrotlibrary.h \
         src/io/io_private.h $(INC_DIR)/dynext.h $(INC_DIR)/embed.h \
         $(INC_DIR)/oplib/core_ops.h $(INC_DIR)/runcore_api.h
 
@@ -1708,20 +1449,20 @@
 # updates to config.h's version numbers
 
 # .h files are built along with .c
-$(INC_DIR)/oplib/core_ops.h: $(OPS_DIR)/core_ops.c
+$(INC_DIR)/oplib/core_ops.h: src/ops/core_ops.c
 
-$(OPS_DIR)/core_ops.c : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2c.pl \
+src/ops/core_ops.c : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2c.pl \
 	lib/Parrot/OpsFile.pm lib/Parrot/Op.pm $(INC_DIR)/config.h \
 	lib/Parrot/OpLib/core.pm lib/Parrot/OpTrans/C.pm \
-	$(PMC_INC_DIR)/pmc/pmc_continuation.h
+	include/pmc/pmc_continuation.h
 	$(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl C --core @no_lines_flag@
 
-$(OPS_DIR)/core_ops_switch$(O) : $(GENERAL_H_FILES) $(OPS_DIR)/core_ops_switch.c \
-	$(PMC_INC_DIR)/pmc/pmc_parrotlibrary.h
+src/ops/core_ops_switch$(O) : $(GENERAL_H_FILES) src/ops/core_ops_switch.c \
+	include/pmc/pmc_parrotlibrary.h
 
-$(INC_DIR)/oplib/core_ops_switch.h : $(OPS_DIR)/core_ops_switch.c
+$(INC_DIR)/oplib/core_ops_switch.h : src/ops/core_ops_switch.c
 
-$(OPS_DIR)/core_ops_switch.c : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2c.pl \
+src/ops/core_ops_switch.c : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2c.pl \
 	lib/Parrot/OpsFile.pm lib/Parrot/Op.pm $(INC_DIR)/config.h \
 	lib/Parrot/OpLib/core.pm lib/Parrot/OpTrans/CSwitch.pm \
 	lib/Parrot/OpTrans/CPrederef.pm
@@ -1743,23 +1484,6 @@
 $(INC_DIR)/vtable.h : src/vtable.tbl $(BUILD_TOOLS_DIR)/vtable_h.pl lib/Parrot/Vtable.pm
 	$(PERL) $(BUILD_TOOLS_DIR)/vtable_h.pl
 
-# imcc file dependencies
-#
-# The .flag files are needed because we keep some derived files in SVN,
-# which does not keep accurate timestamps on the files, relative to each other.
-# Note that YACC or LEX may be null commands, so we must `touch` all the
-# target files, instead of just the .flag files.
-
-$(IMCC_DIR)/imcc.y.flag $(IMCC_DIR)/imcparser.c $(IMCC_DIR)/imcparser.h : $(IMCC_DIR)/imcc.y
-	$(YACC) $(IMCC_DIR)/imcc.y -d -o $(IMCC_DIR)/imcparser.c
-	$(PERL) $(BUILD_TOOLS_DIR)/fixup_gen_file.pl -noheaderizer $(IMCC_DIR)/imcparser.c $(IMCC_DIR)/imcc.y
-	$(PERL) $(BUILD_TOOLS_DIR)/fixup_gen_file.pl -noheaderizer $(IMCC_DIR)/imcparser.h $(IMCC_DIR)/imcc.y
-	$(TOUCH) $(IMCC_DIR)/imcc.y.flag $(IMCC_DIR)/imcparser.c $(IMCC_DIR)/imcparser.h
-
-$(IMCC_DIR)/imcc.l.flag $(IMCC_DIR)/imclexer.c : $(IMCC_DIR)/imcc.l
-	$(LEX) -o$(IMCC_DIR)/imclexer.c $(IMCC_DIR)/imcc.l
-	$(TOUCH) $(IMCC_DIR)/imcc.l.flag $(IMCC_DIR)/imclexer.c
-
 ###############################################################################
 #
 # Documentation targets:
@@ -1844,33 +1568,8 @@
 #
 ###############################################################################
 
-compilers : compilers.dummy
-
-compilers.dummy : $(PARROT) $(GEN_LIBRARY)
-	$(MAKE) compilers/pct
-	$(MAKE) compilers/pge
-	$(MAKE) compilers/tge
-	$(MAKE) compilers/nqp
-	$(MAKE) compilers/json
-	$(MAKE) compilers/data_json
-	$(MAKE) ext/nqp-rx
-
-compilers-clean :
-	$(MAKE) compilers/pct clean
-	$(MAKE) compilers/pge clean
-	$(MAKE) compilers/tge clean
-	$(MAKE) compilers/nqp clean
-	$(MAKE) compilers/json clean
-	$(MAKE) compilers/data_json clean
-	$(MAKE) compilers/pirc clean
-
 ext-clean:
-	$(MAKE) ext/nqp-rx clean
-	$(RM_RF) runtime/parrot/library/HLL.pbc \
-  runtime/parrot/library/P6Regex.pbc \
-  runtime/parrot/library/Regex.pbc \
-  runtime/parrot/library/nqp-rx.pbc \
-  parrot-nqp*
+	$(RM_RF) $(NQPRX_LIB_PBCS) parrot-nqp*
 
 ###############################################################################
 #
@@ -1889,43 +1588,43 @@
 
 # The --running-make-test argument is currently used by long-running tests
 # to disable GC_DEBUG.
-EXTRA_TEST_ARGS := --gc-debug --running-make-test
-DISTRO_TEST_FILES := \
+EXTRA_TEST_ARGS = --gc-debug
+DISTRO_TEST_FILES = \
     t/distro/*.t
-BENCHMARK_TEST_FILES := \
+BENCHMARK_TEST_FILES = \
     t/benchmark/*.t
-PERL_TEST_FILES := \
+PERL_TEST_FILES = \
     t/perl/*.t
-CODINGSTD_TEST_FILES := \
+CODINGSTD_TEST_FILES = \
     t/codingstd/*.t
-RUN_TEST_FILES := \
+RUN_TEST_FILES = \
     t/run/*.t
-RUNCORE_TEST_FILES := \
+RUNCORE_TEST_FILES = \
     --runcore-tests
-SRC_TEST_FILES := \
+SRC_TEST_FILES = \
     t/src/*.t
-TOOLS_TEST_FILES := \
+TOOLS_TEST_FILES = \
     t/tools/*.t
-LIBRARY_TEST_FILES := @library_tests@
-PMC2CUTILS_DIR := t/tools/pmc2cutils
-OPS2PMUTILS_DIR := t/tools/ops2pm
-OPS2CUTILS_DIR := t/tools/ops2cutils
-REVISIONUTILS_DIR := t/tools/revision
-HARNESS_DIR := t/pharness
-BUILDTOOLS_TEST_FILES := \
+LIBRARY_TEST_FILES = @library_tests@
+PMC2CUTILS_DIR = t/tools/pmc2cutils
+OPS2PMUTILS_DIR = t/tools/ops2pm
+OPS2CUTILS_DIR = t/tools/ops2cutils
+REVISIONUTILS_DIR = t/tools/revision
+HARNESS_DIR = t/pharness
+BUILDTOOLS_TEST_FILES = \
     $(PMC2CUTILS_DIR)/*.t \
     $(OPS2PMUTILS_DIR)/*.t \
     $(OPS2CUTILS_DIR)/*.t \
     $(REVISIONUTILS_DIR)/*.t \
     $(HARNESS_DIR)/*.t
-MANIFEST_DIR := t/manifest
-INSTALL_TOOLS_DIR := t/tools/install
-MANIFEST_TEST_FILES := \
+MANIFEST_DIR = t/manifest
+INSTALL_TOOLS_DIR = t/tools/install
+MANIFEST_TEST_FILES = \
     $(MANIFEST_DIR)/*.t \
     $(INSTALL_TOOLS_DIR)/*.t
-EXAMPLES_TEST_FILES := \
+EXAMPLES_TEST_FILES = \
     t/examples/*.t
-CONFIGURE_TEST_FILES := \
+CONFIGURE_TEST_FILES = \
     t/configure/*.t \
     t/steps/*.t
 
@@ -1946,8 +1645,8 @@
 	$(PERL) t/harness $(EXTRA_TEST_ARGS)
 
 # Test the NQP compiler
-nqp_test : test_prep
-	$(MAKE) compilers/nqp test
+nqp_test : test_prep compilers/nqp/nqp.pbc
+	$(PERL) compilers/nqp/t/harness
 
 # run the test suite, create a TAP archive and send it off to smolder
 smolder_test : test_prep
@@ -2002,6 +1701,10 @@
 testg : test_prep
 	$(PERL) t/harness $(EXTRA_TEST_ARGS) -g $(RUNCORE_TEST_FILES)
 
+# gcdebug core
+testgcd : test_prep
+	$(PERL) t/harness $(EXTRA_TEST_ARGS) -G $(RUNCORE_TEST_FILES)
+
 # JIT core - target retained, but falls back to standard core
 testj : test_prep
 	$(PERL) t/harness $(EXTRA_TEST_ARGS) $(RUNCORE_TEST_FILES)
@@ -2049,7 +1752,7 @@
 warnings_tests:
 	$(PERL) t/harness $(EXTRA_TEST_ARGS) -w $(RUNCORE_TEST_FILES)
 
-buildtools_tests :
+buildtools_tests : corevm
 	$(PERL) t/harness $(BUILDTOOLS_TEST_FILES)
 
 manifest_tests :
@@ -2093,8 +1796,6 @@
     dynpmc-clean \
     dynoplibs-clean \
     examples-clean \
-    imcc-clean \
-    compilers-clean \
     ext-clean \
 #UNLESS(win32):    cover-clean \
     editor-clean
@@ -2103,6 +1804,9 @@
 	$(RM_F) $(FLUID_FILES_1)
 	$(RM_F) $(FLUID_FILES_2)
 	$(RM_RF) lib/Parrot/OpLib
+	$(RM_F) $(NQP_CLEANUPS) $(PGE_CLEANUPS) $(TGE_CLEANUPS) $(JSON_CLEANUPS)
+	$(RM_F) $(PIRC_CLEANUPS) $(PCT_CLEANUPS)
+	$(RM_F) $(GEN_PASM_INCLUDES) $(GEN_PM_INCLUDES)
 
 prog-clean :
 	$(RM_F) \
@@ -2120,25 +1824,25 @@
     $(INSTALLABLENQP) \
     pbc_to_exe.pbc pbc_to_exe.c pbc_to_exe$(O) pbc_to_exe$(EXE) \
     parrot_config$(EXE) parrot_config.c parrot_config$(O) parrot_config.pbc \
-    $(IMCC_DIR)/main$(O) \
-    $(PDUMP) $(SRC_DIR)/pbc_dump$(O) $(SRC_DIR)/packdump$(O) \
-    $(PDB) $(SRC_DIR)/parrot_debugger$(O) \
-    $(PBCMERGE) $(SRC_DIR)/pbc_merge$(O) \
-    $(DIS) $(SRC_DIR)/pbc_disassemble$(O)
+    compilers/imcc/main$(O) \
+    $(PDUMP) src/pbc_dump$(O) src/packdump$(O) \
+    $(PDB) src/parrot_debugger$(O) \
+    $(PBCMERGE) src/pbc_merge$(O) \
+    $(DIS) src/pbc_disassemble$(O)
 	$(RM_F) \
-    $(SRC_DIR)/main$(O) \
-    $(SRC_DIR)/null_config$(O) \
-    $(SRC_DIR)/parrot_config$(O) \
-    $(SRC_DIR)/install_config$(O) \
-    $(SRC_DIR)/nci_test$(O) \
+    src/main$(O) \
+    src/null_config$(O) \
+    src/parrot_config$(O) \
+    src/install_config$(O) \
+    src/nci_test$(O) \
     $(LIBNCI_TEST_SO) \
-    $(SRC_DIR)/glut_callbacks$(O) \
+    src/glut_callbacks$(O) \
     $(LIBGLUTCB_SO) \
     install_config.fpmc
 	$(PERL) $(BUILD_TOOLS_DIR)/c2str.pl --init
 	$(RM_F) \
     $(STR_FILES) \
-    $(SRC_DIR)/string/private_cstring.h "src/pmc/*.c" "include/pmc/pmc_*.h" \
+    src/string/private_cstring.h "src/pmc/*.c" "include/pmc/pmc_*.h" \
     "src/pmc/*.dump" vtable.dump "*.def" "*.lib" "*.exp"
 
 archclean: dynoplibs-clean dynpmc-clean dynext-clean
@@ -2155,21 +1859,21 @@
     $(INSTALLABLEPDB) \
     $(INSTALLABLECONFIG) \
     $(INSTALLABLENQP) \
-    $(IMCC_DIR)/main$(O) \
-    $(PDUMP) $(SRC_DIR)/pbc_dump$(O) $(SRC_DIR)/packdump$(O) \
-    $(PDB) $(SRC_DIR)/parrot_debugger$(O) \
-    $(PBCMERGE) $(SRC_DIR)/pbc_merge$(O) \
-    $(DIS) $(SRC_DIR)/pbc_disassemble$(O) \
+    compilers/imcc/main$(O) \
+    $(PDUMP) src/pbc_dump$(O) src/packdump$(O) \
+    $(PDB) src/parrot_debugger$(O) \
+    $(PBCMERGE) src/pbc_merge$(O) \
+    $(DIS) src/pbc_disassemble$(O) \
     $(PARROT_CONFIG) parrot_config$(O) parrot_config.c \
-    $(SRC_DIR)/parrot_config$(O) parrot_config.pbc \
+    src/parrot_config$(O) parrot_config.pbc \
     pbc_to_exe$(EXE) pbc_to_exe$(O) pbc_to_exe.pbc \
-    $(SRC_DIR)/null_config$(O) \
-    $(SRC_DIR)/parrot_config$(O) \
-    $(SRC_DIR)/install_config$(O) \
+    src/null_config$(O) \
+    src/parrot_config$(O) \
+    src/install_config$(O) \
     install_config.fpmc \
-    $(SRC_DIR)/nci_test$(O) \
+    src/nci_test$(O) \
     $(LIBNCI_TEST_SO) \
-    $(SRC_DIR)/glut_callbacks$(O) \
+    src/glut_callbacks$(O) \
     $(LIBGLUTCB_SO) \
     $(LIBPARROT_STATIC) \
     $(LIBPARROT_SHARED)
@@ -2240,15 +1944,8 @@
      "parrot_test_run.tar.gz" \
 	 ".pod_examinable*.sto"
 
-imcc-clean:
-	$(RM_F) \
-    $(IMCC_DIR)/core \
-    "$(IMCC_DIR)/*$(O)" \
-    $(IMCC_DIR)/imcparser.output
-
 # a failing step of cleaning, usually doesn't concern the following steps
 realclean : clean
-	-$(MAKE) compilers/pirc  realclean
 	$(RM_RF) \
     $(CONFIGURE_GENERATED_FILES) \
     blib \
@@ -2271,7 +1968,7 @@
 	$(PERL) tools/dev/opsrenumber.pl $(OPS_FILES)
 
 pmcrenumber :
-	$(PERL) tools/dev/pmcrenumber.pl $(SRC_DIR)/pmc/pmc.num
+	$(PERL) tools/dev/pmcrenumber.pl src/pmc/pmc.num
 
 ###############################################################################
 #
@@ -2288,16 +1985,16 @@
 patch :
 	svn diff
 
-LINTABLE_CFILES := `echo $(SRC_DIR)/main$(O) $(O_FILES) $(SRC_DIR)/parrot_config$(O) | $(PERL) -pe @PQ at s/\.o/\.c/g at PQ@`
+LINTABLE_CFILES = `echo src/main$(O) $(O_FILES) src/parrot_config$(O) | $(PERL) -pe @PQ at s/\.o/\.c/g at PQ@`
 
 lint : sunlint
 
-SUNLINT := lint
+SUNLINT = lint
 
 # This target does sneaky magic to get the $(NOTE) fields to work.  It's
 # doing replaces in $(NOTE), which is empty, of strings that will never match.
-NOTE :=
-SUNLINT_HUSH_OPTS := \
+NOTE =
+SUNLINT_HUSH_OPTS = \
     $(NOTE:% Errors that will never be silenced, and we must always hush =%)\
     -erroff=E_ARGUMENT_CONVERT          $(NOTE:% implicit integer-to-long conversion =%) \
     -erroff=E_BAD_PTR_CAST                    $(NOTE:% pointer casts may be troublesome =%) \
@@ -2318,10 +2015,10 @@
     -erroff=E_CASE_FALLTHRU                    $(NOTE:% case fallthru =%) \
     -erroff=E_STATIC_UNUSED                    $(NOTE:% Static function not used =%) \
 
-SUNLINT_OPTS_FOR_THE_FUTURE := -b -m -Xc
+SUNLINT_OPTS_FOR_THE_FUTURE = -b -m -Xc
 
 # Lint options at: http:////docs.sun.com//app//docs//doc//819-5265//6n7c29cli?a=view
-SUNLINTOPTS := \
+SUNLINTOPTS = \
     -b \
     -p \
     -fd \
@@ -2338,7 +2035,7 @@
 	rm -f *.ln
 	$(SUNLINT) $(CC_INC) "-Iinclude/pmc" $(SUNLINTOPTS) $(LINTABLE_CFILES)
 
-BSD_LINT_FLAGS := -a -aa -b -c -e -h -n -p -r -u -x -z -F -H -V
+BSD_LINT_FLAGS = -a -aa -b -c -e -h -n -p -r -u -x -z -F -H -V
 
 # 132: conversion from '...' may lose accuracy
 # 135: possible pointer alignment problem
@@ -2351,7 +2048,7 @@
 # 265: ANSI C does not support 'long long'
 # 277: initialisation of '...' with '...'
 # 278: combination of '...' and '...', arg #...
-BSD_LINT_EXCLUSIONS := -X132,135,236,241,247,249,259,265,277,278
+BSD_LINT_EXCLUSIONS = -X132,135,236,241,247,249,259,265,277,278
 
 bsdlint : $(PARROT)
 	rm -f *.ln
@@ -2359,11 +2056,11 @@
 
 # For checking with splint see also http:////www.perlfoundation.org//parrot//index.cgi?splint
 # Splint: http:////splint.org
-SPLINT := splint
+SPLINT = splint
 
 # Temp directory for splint.  Add +keep to splintflags if you want work files
 # kept in there after completion.
-SPLINT_TMP := $(TEMPDIR)/splint
+SPLINT_TMP = $(TEMPDIR)/splint
 
 # Splint flags: http://splint.org/manual/html/appB.html
 # The dashes in the names don't make any difference to Splint, but I've
@@ -2398,7 +2095,7 @@
     -include-nest 10
 
 # Memory safety checks
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
     +bufferoverflow \
     +bufferoverflowhigh \
     +read-only-strings \
@@ -2408,7 +2105,7 @@
     +use-released \
 
 # Macro safety checks
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
     +macro-assign \
     +macro-empty \
     +macro-parens \
@@ -2417,25 +2114,25 @@
     +macro-unrecog \
 
 # Watch for unsafe comparisons
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
     +bool-compare \
     +ptr-compare \
     +real-compare \
     +unsigned-compare
 
 # But allow us some slop in boolean comparisons
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
     -pred-bool-int \
     -pred-bool-ptr \
     -pred-bool-others \
     -boolops \
 
 # Report qualifier mismatches only if dangerous
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
     +relax-quals
 
 # Memory checking
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
     -must-free \
     -mustfreefresh \
     -mustfreeonly \
@@ -2447,33 +2144,33 @@
     -zero-ptr \
 
 # Transfer errors are too tough for us right now
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
     -mem-trans
 
 # Symbol definitions
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
     +decl-undef \
     +incon-defs \
     +incon-defs-lib \
 
 # Check for conflicts with C++ compilers
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
     +cpp-names \
 
 # Format codes
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
     +format-code \
     +format-type \
 
 # Problems with evaluation and control structions
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
     +controlnestdepth 15 \
     +duplicate-case \
     +eval-order \
     +eval-order-uncon \
 
 # Types and stuff
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
     +char-index \
     +char-int \
     +enum-members \
@@ -2492,13 +2189,13 @@
 # added to splint target to simplify experimentation,
 # ex: make SPLINTFLAGS_TEST='-posixstrictlib +posixlib' splint
 
-SPLINT_SOURCE := `echo $(O_FILES) | $(PERL) -pe @PQ at s/\.o/\.c/g at PQ@`
+SPLINT_SOURCE = `echo $(O_FILES) | $(PERL) -pe @PQ at s/\.o/\.c/g at PQ@`
 
 splint-all : $(PARROT)
 	$(MKPATH) $(SPLINT_TMP)
 	$(SPLINT) $(CC_INC) "-Iinclude/pmc" "-Icompilers/ast" $(SPLINTFLAGS) $(SPLINTFLAGS_TEST) \
 	$(SPLINT_SOURCE) \
-	$(SPLINT) $(CC_INC) $(SPLINTFLAGS) $(SPLINTFLAGS_TEST) $(IMCC_DIR)/main.c
+	$(SPLINT) $(CC_INC) $(SPLINTFLAGS) $(SPLINTFLAGS_TEST) compilers/imcc/main.c
 
 # "splint" is the less-thorough splint target.  For cage cleaning work,
 # you'll probably want to specify SPLINT_SOURCE rather than work on the
@@ -2512,25 +2209,25 @@
 	$(SPLINT_SOURCE) \
 		| grep -v 'Source code error generation point'
 
-COVER_FLAGS := -fprofile-arcs -ftest-coverage
-COVER_DIRS := \
-    $(SRC_DIR) \
-    $(SRC_DIR)/call \
-    $(SRC_DIR)/dynoplibs \
-    $(SRC_DIR)/dynpmc \
-    $(SRC_DIR)/gc \
-    $(SRC_DIR)/interp \
-    $(SRC_DIR)/ops \
-    $(SRC_DIR)/packfile \
-    $(SRC_DIR)/pmc \
-    $(SRC_DIR)/runcore \
-    $(SRC_DIR)/string \
-    $(SRC_DIR)/string/charset \
-    $(SRC_DIR)/string/encoding \
+COVER_FLAGS = -fprofile-arcs -ftest-coverage
+COVER_DIRS = \
+    src \
+    src/call \
+    src/dynoplibs \
+    src/dynpmc \
+    src/gc \
+    src/interp \
+    src/ops \
+    src/packfile \
+    src/pmc \
+    src/runcore \
+    src/string \
+    src/string/charset \
+    src/string/encoding \
     $(BUILD_DIR) \
     $(BUILD_DIR)/t/perl \
-    $(IO_DIR) \
-    $(IMCC_DIR)
+    src/io \
+    compilers/imcc
 
 cover: \
     cover.dummy \
@@ -2670,7 +2367,7 @@
 ###############################################################################
 
 release : MANIFEST MANIFEST.generated
-	[ -d parrot-$(VERSION) ] || ln -s $(CUR_DIR) parrot-$(VERSION)
+	[ -d parrot-$(VERSION) ] || ln -s . parrot-$(VERSION)
 	@$(RM_F) MANIFEST.real
 	mv MANIFEST MANIFEST.real
 	grep -v DEVELOPING MANIFEST.real > MANIFEST
@@ -2689,24 +2386,24 @@
 #
 ###############################################################################
 
-exec : $(SRC_DIR)/parrot_config$(O) $(LIBPARROT)
-	$(LINK) @ld_out@$(EXEC)$(EXE) $(EXEC)$(O) $(SRC_DIR)/parrot_config$(O) @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
+exec : src/parrot_config$(O) $(LIBPARROT)
+	$(LINK) @ld_out@$(EXEC)$(EXE) $(EXEC)$(O) src/parrot_config$(O) @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
 
 ###### OS depend targets ##########
 
 # for use by t/pmc/nci.t
-$(SRC_DIR)/nci_test$(O): $(PARROT_H_HEADERS)
+src/nci_test$(O): $(PARROT_H_HEADERS)
 
-$(LIBNCI_TEST_SO): $(SRC_DIR)/nci_test$(O) $(LIBPARROT)
+$(LIBNCI_TEST_SO): src/nci_test$(O) $(LIBPARROT)
 	$(LD) $(LD_LOAD_FLAGS) @ncilib_link_extra@ $(LDFLAGS) \
-    @ld_out@$@ $(SRC_DIR)/nci_test$(O) $(C_LIBS)
+    @ld_out@$@ src/nci_test$(O) $(C_LIBS)
 
 # for use by runtime/parrot/library/OpenGL.pir
-$(SRC_DIR)/glut_callbacks$(O): $(GENERAL_H_FILES)
+src/glut_callbacks$(O): $(GENERAL_H_FILES)
 
-$(LIBGLUTCB_SO): $(LIBPARROT) $(SRC_DIR)/glut_callbacks$(O)
+$(LIBGLUTCB_SO): $(LIBPARROT) src/glut_callbacks$(O)
 	$(LD) $(LD_LOAD_FLAGS) $(LDFLAGS) \
-    @ld_out@$@ $(SRC_DIR)/glut_callbacks$(O) \
+    @ld_out@$@ src/glut_callbacks$(O) \
     $(ALL_PARROT_LIBS) @opengl_lib@
 
 # emacs etags
@@ -2719,12 +2416,12 @@
         -R --exclude=blib --exclude=.svn  \
         --languages=c,perl --langmap=c:+.h,c:+.pmc,c:+.ops \
         -I NOTNULL,NULLOK,ARGIN,ARGMOD,ARGOUT,ARGINOUT,ARGIN_NULLOK,ARGOUT_NULLOK,ARGMOD_NULLOK \
-        $(CUR_DIR)
+        .
 
 # this works with an old etags (XEmacs 21.5*)
 tags-xemacs: tags.emacs.dummy
 	$(RM_F) TAGS
-	find $(CUR_DIR) \
+	find . \
         -name \*.c -o -name \*.h -o -name \*.pmc -o -name \*.ops | etags -l c - -o TAGS
 
 tags.emacs.dummy:
@@ -2739,12 +2436,12 @@
     -R --exclude=blib --exclude=.svn  \
     --languages=c,perl --langmap=c:+.h,c:+.pmc,c:+.ops \
     -I NOTNULL,NULLOK,ARGIN,ARGMOD,ARGOUT,ARGINOUT,ARGIN_NULLOK,ARGOUT_NULLOK,ARGMOD_NULLOK \
-    $(CUR_DIR)
+    .
 	$(PERL) $(BUILD_TOOLS_DIR)/addopstags.pl $(OPS_FILES)
 
 tags.vi.dummy:
 
-CRITIC_FILES := 'lib/Parrot'
+CRITIC_FILES = 'lib/Parrot'
 
 perlcritic:
 	perlcritic --profile tools/util/perlcritic.conf $(CRITIC_FILES)
@@ -2758,21 +2455,32 @@
 # is not PARROT_EXPORT but should be, then put PARROT_EXPORT in the C file and
 # run "make headerizer".  The .h file will get updated.
 
-HEADERIZER_O_FILES := \
+HEADERIZER_O_FILES = \
     $(O_FILES) \
     src/packdump$(O) \
     src/pbc_merge$(O) \
     $(PIRC_O_FILES)
 
-headerizer : $(SRC_DIR)/core_pmcs.c
-	$(PERL) $(BUILD_TOOLS_DIR)/headerizer.pl $(HEADERIZER_O_FILES) $(IMCC_DIR)/imcc.y
+headerizer : src/core_pmcs.c
+	$(PERL) $(BUILD_TOOLS_DIR)/headerizer.pl $(HEADERIZER_O_FILES) compilers/imcc/imcc.y
 
-apilist: $(SRC_DIR)/core_pmcs.c
+apilist: src/core_pmcs.c
 	$(PERL) $(BUILD_TOOLS_DIR)/headerizer.pl --macro=PARROT_EXPORT $(HEADERIZER_O_FILES)
 
-malloclist: $(SRC_DIR)/core_pmcs.c
+malloclist: src/core_pmcs.c
 	$(PERL) $(BUILD_TOOLS_DIR)/headerizer.pl --macro=PARROT_MALLOC $(HEADERIZER_O_FILES)
 
+include runtime/parrot/library/Rules.mak
+include compilers/imcc/Rules.mak
+include compilers/pirc/Rules.mak
+include compilers/nqp/Rules.mak
+include compilers/pge/Rules.mak
+include compilers/pct/Rules.mak
+include compilers/tge/Rules.mak
+include compilers/data_json/Rules.mak
+include compilers/json/Rules.mak
+include ext/nqp-rx/Rules.mak
+
 # Local variables:
 #   mode: makefile
 # End:

Deleted: branches/gc_encapsulate/config/gen/makefiles/tge.in
==============================================================================
--- branches/gc_encapsulate/config/gen/makefiles/tge.in	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,61 +0,0 @@
-# Copyright (C) 2005-2009, Parrot Foundation.
-# $Id$
-
-# Setup some commands
-PERL     := @perl@
-RM_F     := @rm_f@
-PARROT   := ../../parrot at exe@
-
-# Where to put things
-PARROT_LIBRARY    := ../../runtime/parrot/library
-PERL6GRAMMAR      := $(PARROT_LIBRARY)/PGE/Perl6Grammar.pbc
-
-# the default target
-all: $(PARROT_LIBRARY)/TGE.pbc
-
-$(PARROT_LIBRARY)/TGE.pbc: TGE.pir TGE/Rule.pir TGE/Parser.pir TGE/Grammar.pir TGE/Compiler.pir TGE/Tree.pir
-	$(PARROT) -o $(PARROT_LIBRARY)/TGE.pbc --output-pbc TGE.pir
-
-TGE/Parser.pir: TGE/Parser.pg
-	$(PARROT) $(PERL6GRAMMAR) --output=TGE/Parser.pir TGE/Parser.pg
-
-# This is a listing of all targets, that are meant to be called by users
-help:
-	@echo ""
-	@echo "Following targets are available for the user:"
-	@echo ""
-	@echo "  all:               TGE.pbc"
-	@echo "                     This is the default."
-	@echo "Testing:"
-	@echo "  test:              Run the test suite."
-	@echo "  testclean:         Clean up test results."
-	@echo ""
-	@echo "Cleaning:"
-	@echo "  clean:             Basic cleaning up."
-	@echo "  realclean:         Removes also files generated by 'Configure.pl'"
-	@echo "  distclean:         Removes also anything built, in theory"
-	@echo ""
-	@echo "Misc:"
-	@echo "  help:              Print this help message."
-	@echo ""
-
-test: all
-	prove -r ../../t/compilers/tge
-
-testclean:
-	$(RM_F) "../../t/compilers/tge/*.pir"
-
-clean: testclean
-	$(RM_F) \
-	    $(PARROT_LIBRARY)/TGE.pbc \
-	    TGE/Parser.pir
-
-realclean: clean
-	$(RM_F) Makefile
-
-distclean: realclean
-
-# Local variables:
-#   mode: makefile
-# End:
-# vim: ft=make:

Deleted: branches/gc_encapsulate/config/gen/parrot_include.pm
==============================================================================
--- branches/gc_encapsulate/config/gen/parrot_include.pm	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,241 +0,0 @@
-# Copyright (C) 2001-2007, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-config/gen/parrot_include.pm - Runtime Includes
-
-=head1 DESCRIPTION
-
-Generates the F<runtime/parrot/include> files.
-
-=cut
-
-package gen::parrot_include;
-
-use strict;
-use warnings;
-
-use base qw(Parrot::Configure::Step);
-
-use Parrot::Configure::Utils ':gen';
-
-
-sub _init {
-    my $self = shift;
-    my %data;
-    $data{description} = q{Generate runtime/parrot/include};
-    $data{result} = q{};
-    $data{source_files} = [ qw(
-        include/parrot/cclass.h
-        include/parrot/datatypes.h
-        include/parrot/enums.h
-        include/parrot/events.h
-        include/parrot/scheduler.h
-        include/parrot/exceptions.h
-        include/parrot/hash.h
-        include/parrot/interpreter.h
-        include/parrot/io.h
-        include/parrot/library.h
-        include/parrot/longopt.h
-        include/parrot/multidispatch.h
-        include/parrot/packfile.h
-        include/parrot/stat.h
-        include/parrot/string.h
-        include/parrot/pmc.h
-        include/parrot/warnings.h
-        include/parrot/gc_api.h
-        src/pmc/timer.pmc
-        src/utils.c
-    ) ];
-    $data{generated_files} = [ qw(
-        include/parrot/vtable.h
-        include/parrot/core_pmcs.h
-    ) ];
-    $data{destdir} = 'runtime/parrot/include';
-    return \%data;
-}
-
-sub runstep {
-    my ( $self, $conf ) = @_;
-    my $verbose = $conf->options->get('verbose');
-
-    # need vtable.h now
-    system( $^X, "tools/build/vtable_h.pl" );
-
-    my @generated;
-    for my $file ( @{ $self->{source_files} }, @{ $self->{generated_files} } ) {
-        open my $fh, '<', $file or die "Can't open $file: $!\n";
-        my @directives = parse_file($file, $fh);
-        close $fh;
-        for my $d (@directives) {
-            my @defs = perform_directive($d);
-            for my $target ( @{ $d->{files} } ) {
-                $verbose and print "$target ";
-                my $gen;
-                if ( $target =~ /\.pm$/ ) {
-                    $gen = join "\n", &const_to_perl(@defs);
-                    $gen .= "\n1;";
-                }
-                else {
-                    $gen = join "\n", &const_to_parrot(@defs);
-                }
-                $conf->append_configure_log(qq{$self->{destdir}/$target});
-                my $target_tmp = "$target.tmp";
-                open my $out, '>', $target_tmp or die "Can't open $target_tmp: $!\n";
-
-                print $out <<"EOF";
-# DO NOT EDIT THIS FILE.
-#
-# This file is generated automatically from
-# $file by config/gen/parrot_include.pm
-#
-# Any changes made here will be lost.
-#
-$gen
-EOF
-                close $out or die "Can't write $target_tmp: $!\n";
-                $target =~ m[/] or $target = "$self->{destdir}/$target";
-                move_if_diff( $target_tmp, $target );
-                push @generated, $target;
-            }
-        }
-    }
-    $conf->data->set( TEMP_gen_pasm_includes => join( " \\\n    ", @generated ) );
-
-    return 1;
-}
-
-sub const_to_parrot {
-    map ".macro_const $_->[0]\t$_->[1]", @_;
-}
-
-sub const_to_perl {
-    map "use constant $_->[0] => $_->[1];", @_;
-}
-
-sub transform_name {
-    my $action = shift;
-
-    return map { [ $action->( $_->[0] ), $_->[1] ] } @_;
-}
-
-sub prepend_prefix {
-    my $prefix = shift;
-
-    transform_name( sub { $prefix . $_[0] }, @_ );
-}
-
-sub perform_directive {
-    my ($d) = @_;
-
-    my @defs = prepend_prefix $d->{prefix}, @{ $d->{defs} };
-    if ( my $subst = $d->{subst} ) {
-        @defs = transform_name( sub { local $_ = shift; eval $subst; $_ }, @defs );
-    }
-    @defs;
-}
-
-sub parse_file {
-    my ( $file, $fh ) = @_;
-
-    my ( @d, %values, $last_val, $cur, $or_continues );
-    while ( my $line = <$fh> ) {
-        if (
-            $line =~ m!
-            &gen_from_(enum|def) \( ( [^)]* ) \)
-            (?: \s+ prefix \( (\w+) \) )?
-            (?: \s+ subst \( (s/.*?/.*?/[eig]?) \) )?
-            !x
-            )
-        {
-            $cur and die "Missing '&end_gen' in $file\n";
-            $cur = {
-                type   => $1,
-                files  => [ split ' ', $2 ],
-                prefix => defined $3 ? $3 : '',
-                defined $4 ? ( subst => $4 ) : (),
-            };
-            $last_val = -1;
-        }
-        elsif ( $line =~ /&end_gen\b/ ) {
-            $cur or die "Missing &gen_from_(enum|def) in $file\n";
-            push @d, $cur;
-            $cur = undef;
-        }
-
-        $cur or next;
-
-        if ( $cur->{type} eq 'def' && $line =~ /^\s*#define\s+(\w+)\s+(-?\w+|"[^"]*")/ ) {
-            push @{ $cur->{defs} }, [ $1, $2 ];
-        }
-        elsif ( $cur->{type} eq 'enum' ) {
-            # Special case: enum value is or'd combination of other values
-            if ( $or_continues ) {
-                $or_continues = 0;
-                my $last_def = $cur->{defs}->[-1];
-                my ($k, $v) = @{$last_def};
-                my @or_values = grep {defined $_} $line =~ /^\s*(-?\w+)(?:\s*\|\s*(-?\w+))*/;
-                for my $or (@or_values) {
-                    if ( defined $values{$or} ) {
-                        $v |= $values{$or};
-                    }
-                    elsif ( $or =~ /^0/ ) {
-                        $v |= oct $or;
-                    }
-                }
-                if ($line =~ /\|\s*$/) {
-                    $or_continues = 1;
-                }
-                $values{$k} = $last_val = $v;
-                $cur->{defs}->[-1]->[1] = $v;
-            }
-            elsif ( $line =~ /^\s*(\w+)\s*=\s*(-?\w+)\s*\|/ ) {
-                my ( $k, $v ) = ( $1, $2 );
-                my @or_values = ($v, $line =~ /\|\s*(-?\w+)/g);
-                $v = 0;
-                for my $or (@or_values) {
-                    if ( defined $values{$or} ) {
-                        $v |= $values{$or};
-                    }
-                    elsif ( $or =~ /^0/ ) {
-                        $v |= oct $or;
-                    }
-                }
-                if ($line =~ /\|\s*$/) {
-                    $or_continues = 1;
-                }
-                $values{$k} = $last_val = $v;
-                push @{ $cur->{defs} }, [ $k, $v ];
-            }
-            elsif ( $line =~ /^\s*(\w+)\s*=\s*(-?\w+)/ ) {
-                my ( $k, $v ) = ( $1, $2 );
-                if ( defined $values{$v} ) {
-                    $v = $values{$v};
-                }
-                elsif ( $v =~ /^0/ ) {
-                    $v = oct $v;
-                }
-                $values{$k} = $last_val = $v;
-                push @{ $cur->{defs} }, [ $k, $v ];
-            }
-            elsif ( $line =~ m!^\s*(\w+)\s*(?:,\s*)?(?:/\*|$)! ) {
-                my $k = $1;
-                my $v = $values{$k} = ++$last_val;
-                push @{ $cur->{defs} }, [ $k, $v ];
-            }
-        }
-    }
-    $cur and die "Missing '&end_gen' in $file\n";
-
-    return @d;
-}
-
-1;
-
-# Local Variables:
-#   mode: cperl
-#   cperl-indent-level: 4
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:

Modified: branches/gc_encapsulate/config/gen/platform/platform_interface.h
==============================================================================
--- branches/gc_encapsulate/config/gen/platform/platform_interface.h	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/config/gen/platform/platform_interface.h	Thu Jan 28 09:35:26 2010	(r43633)
@@ -49,26 +49,6 @@
 #  define mem_realloc_executable(a, b, c) mem_sys_realloc((a), (c))
 #endif
 
-void* Parrot_memcpy_aligned(void*, void*, size_t);
-
-#if defined(PARROT_HAS_I386_SSE)
-
-typedef void* (*Parrot_memcpy_func_t)(void *dest, const void *src, size_t);
-extern Parrot_memcpy_func_t Parrot_memcpy_aligned_sse;
-
-#  define Parrot_memcpy_aligned(d, s, l) Parrot_memcpy_aligned_sse((d), (s), (l))
-
-#elif defined(PARROT_HAS_I386_MMX)
-
-typedef void* (*Parrot_memcpy_func_t)(void *dest, const void *src, size_t);
-extern Parrot_memcpy_func_t Parrot_memcpy_aligned_mmx;
-
-#  define Parrot_memcpy_aligned(d, s, l) Parrot_memcpy_aligned_mmx((d), (s), (l))
-
-#else
-#  define Parrot_memcpy_aligned(d, s, l) mem_sys_memcopy((d), (s), (l))
-#endif
-
 /*
 ** Time
 */

Modified: branches/gc_encapsulate/config/init/hints/openbsd.pm
==============================================================================
--- branches/gc_encapsulate/config/init/hints/openbsd.pm	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/config/init/hints/openbsd.pm	Thu Jan 28 09:35:26 2010	(r43633)
@@ -37,7 +37,7 @@
         $conf->data->set( as => 'as -mregnames' );
     }
 
-    $conf->data->set( clock_best => '-DCLOCK_BEST=CLOCK_MONOTONIC' );
+    $conf->data->set( clock_best => '-D_POSIX_TIMERS -DCLOCK_BEST=CLOCK_MONOTONIC' );
 }
 
 1;

Modified: branches/gc_encapsulate/docs/book/pir/ch06_subroutines.pod
==============================================================================
--- branches/gc_encapsulate/docs/book/pir/ch06_subroutines.pod	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/docs/book/pir/ch06_subroutines.pod	Thu Jan 28 09:35:26 2010	(r43633)
@@ -643,7 +643,7 @@
 
 =begin PIR_FRAGMENT
 
-      .local int foo
+      .local pmc foo
       .lex 'foo', foo
 
 =end PIR_FRAGMENT

Modified: branches/gc_encapsulate/docs/embed.pod
==============================================================================
--- branches/gc_encapsulate/docs/embed.pod	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/docs/embed.pod	Thu Jan 28 09:35:26 2010	(r43633)
@@ -362,10 +362,6 @@
 
 Call a Parrot subroutine that returns an integer using the supplied signature.
 
-=item [DEPRECATED] C<Parrot_Float Parrot_call_sub_ret_float(PARROT_INTERP, Parrot_PMC sub, const_char *signature)>
-
-Call a Parrot subroutine that returns an float using the supplied signature.
-
 =back
 
 =head2 Objects
@@ -605,16 +601,8 @@
 
 =item C<Parrot_ext_call>
 
-=item [DEPRECATED] C<Parrot_call_method>
-
-=item [DEPRECATED] C<Parrot_call_method_ret_float>
-
-=item [DEPRECATED] C<Parrot_call_method_ret_int>
-
 =item [DEPRECATED] C<Parrot_call_sub>
 
-=item [DEPRECATED] C<Parrot_call_sub_ret_float>
-
 =item [DEPRECATED] C<Parrot_call_sub_ret_int>
 
 =item C<Parrot_char_digit_value>

Modified: branches/gc_encapsulate/docs/extend.pod
==============================================================================
--- branches/gc_encapsulate/docs/extend.pod	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/docs/extend.pod	Thu Jan 28 09:35:26 2010	(r43633)
@@ -34,16 +34,7 @@
 
 =head2 Functions
 
-=over 4
-
-=item C<Parrot_call_method(PARROT_INTERP, Parrot_PMC sub
-       Parrot_PMC object, Parrot_String method, const char *signature, ...)>
-
-Calls a method on C<object> with the given signature and arguments. C<sub> is
-the method that's being called, and C<method> is the name of the method in the
-call stack. This is useful for calling aliased methods.
-
-=back
+TODO
 
 =head1 SEE ALSO
 

Modified: branches/gc_encapsulate/docs/intro.pod
==============================================================================
--- branches/gc_encapsulate/docs/intro.pod	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/docs/intro.pod	Thu Jan 28 09:35:26 2010	(r43633)
@@ -145,7 +145,7 @@
 Substituting make for the name of the make program on your platform. The output
 will look something like this:
 
- C:\Perl\bin\perl.exe t\harness --gc-debug --running-make-test
+ C:\Perl\bin\perl.exe t\harness --gc-debug 
    t\library\*.t  t\op\*.t  t\pmc\*.t  t\run\*.t  t\native_pbc\*.t
    imcc\t\*\*.t  t\dynpmc\*.t  t\p6rules\*.t t\src\*.t t\perl\*.t
  t\library\dumper...............ok

Modified: branches/gc_encapsulate/docs/parrothist.pod
==============================================================================
--- branches/gc_encapsulate/docs/parrothist.pod	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/docs/parrothist.pod	Thu Jan 28 09:35:26 2010	(r43633)
@@ -102,4 +102,6 @@
  Barney      1.8.0          2009-Nov-17     "Zygodactyly"
  Gerd        1.9.0          2009-Dec-15     "Blue-fronted Amazon"
 
+ chromatic   2.0.0 *        2010-Jan-19     "Inevitable"
+
 =cut

Modified: branches/gc_encapsulate/docs/pdds/draft/pdd11_extending.pod
==============================================================================
--- branches/gc_encapsulate/docs/pdds/draft/pdd11_extending.pod	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/docs/pdds/draft/pdd11_extending.pod	Thu Jan 28 09:35:26 2010	(r43633)
@@ -281,14 +281,6 @@
 up Parrot's registers in line with the Parrot calling conventions; see
 L<pdd03_calling_conventions.pod> for more details.
 
-=item C<Parrot_call_method(PARROT_INTERP, Parrot_PMC sub, Parrot_PMC obj,
-    Parrot_String method, ARGIN(const char *signature), ...)>
-
-Call the parrot subroutine C<sub> as a method on PMC object C<obj>. The method
-should have the name C<method> as a Parrot_string, and should have a function
-signature C<signature>. Any arguments to the method can be passed at the end
-as a variadic argument list.
-
 =back
 
 =head3 API - Group 2: Internals aware

Modified: branches/gc_encapsulate/docs/pdds/draft/pdd16_native_call.pod
==============================================================================
--- branches/gc_encapsulate/docs/pdds/draft/pdd16_native_call.pod	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/docs/pdds/draft/pdd16_native_call.pod	Thu Jan 28 09:35:26 2010	(r43633)
@@ -55,9 +55,7 @@
 
 Void. As a return type it indicates that there I<is> no return type.
 
-As a parameter it indicates that there are no parameters (this use is now
-deprecated - use an empty parameter string to indicate that there are no
-parameters). Can't be mixed with other parameter types.
+Not valid as a parameter type.
 
 =item c
 

Modified: branches/gc_encapsulate/docs/pmc/subs.pod
==============================================================================
--- branches/gc_encapsulate/docs/pmc/subs.pod	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/docs/pmc/subs.pod	Thu Jan 28 09:35:26 2010	(r43633)
@@ -167,6 +167,86 @@
 PIR source or bytecode.  Note that it is possible to mark a sub with both
 B<:load> and B<:init>.
 
+=head2 Defining subs
+
+A sub is defined by a block of code starting with C<.sub> and ending with
+C<.end>. Parameters which the sub can be called with are defined by C<.param>:
+
+=begin PIR
+
+    .sub do_something
+      .param pmc a_pmc
+      .param string some_string
+      #do something
+    .end
+
+=end PIR
+
+The set of C<.param> instructions are converted to a single C<get_params>
+instruction. The compiler will decide which registers to use.
+
+=begin PIR_FRAGMENT
+    
+    get_params '(0,0)', $P0, $S0
+
+=end PIR_FRAGMENT
+
+A parameter can be declared optional with the C<:optional> command. If an
+optional parameter is followed by parameter declared C<:opt_flag>, this
+parameter will store an integer indicating whether the optional parameter
+was used.
+
+=begin PIR_FRAGMENT
+
+    .param string maybe :optional
+    .param int has_maybe :opt_flag
+    unless has_maybe goto no_maybe
+    #do something with maybe
+    no_maybe:
+    #don't use maybe
+
+=end PIR_FRAGMENT
+
+A sub can accept an arbitrary number of parameters by declaring a C<:slurpy>
+parameter.  This creates a pmc containing an array of all parameters passed to
+the sub, these can be accessed like so:
+
+=begin PIR_FRAGMENT
+
+    .param pmc all_params :slurpy
+
+    $P0 = all_params[0]
+    $S0 = all_params[1]
+
+=end PIR_FRAGMENT
+
+A slurpy parameter can also be defined after a set of positional parameters, in
+which case it will only hold any additional parameters passed.
+
+A parameter may also be declared C<:named>, giving them a string which can be
+used when calling the sub to explicitly assign a parameter, ignoring position.
+
+=begin PIR_FRAGMENT
+
+    .param int counter :named("counter")
+
+=end PIR_FRAGMENT
+
+This can be combined with C<:optional> as well as C<:opt_flag>, so that the
+parameter need only be passed when necessary.
+
+If a parameter is declared with C<:slurpy> and C<:named> (with no string), it
+creates an associative array containing all named parameters which can be
+accessed like so:
+
+=begin PIR_FRAGMENT
+
+    .param pmc all_params :slurpy :named
+    $S0 = all_params['name']
+    $I0 = all_params['counter']
+
+=end PIR_FRAGMENT
+
 =head2 Calling the sub
 
 PIR sub invocation syntax is similar to HLL syntax:
@@ -205,6 +285,16 @@
 values get the same register type coercion as sub parameters.  This is all
 described in much more detail in L<docs/pdds/pdd03_calling_conventions.pod>.
 
+Named parameters can be explicity called in one of two ways:
+
+=begin PIR_FRAGMENT
+
+    $P5 = do_something($I6 :named("counter"), $S4 :named("name"))
+    #or equivalently
+    $P5 = do_something("counter" => $I6, "name" => $S4)
+
+=end PIR_FRAGMENT
+
 To receive multiple values, put the register names in parentheses:
 
 =begin PIR_FRAGMENT
@@ -224,37 +314,36 @@
 
 =end PIR_FRAGMENT_INVALID
 
-Both of these affect only the signature provided via C<get_results>.
-
-[should also describe :flat, :slurpy, :named, ..., or at least provide a
-reference.  -- rgr, 25-May-08.]
+A C<:slurpy> value can be declared, as in parameter declarations, to catch an
+arbitrary number of return values:
 
 =begin PIR_FRAGMENT
 
-    # Call the sub in $P8, with continuation (created earlier) in $P9.
-    invoke $P8, $P9
+    ($P12, $P13 :slurpy) = do_something($P1, $S3)
 
 =end PIR_FRAGMENT
 
-=head2 Returning from a sub
+Note that the parameters stored in a C<:slurpy>, or C<:slurpy> C<:named> array
+can be used as parameters for another call using the C<:flat> declaration:
 
-PIR supports a convenient syntax for returning any number of values from a sub
-or closure:
+=begin PIR_FRAGMENT
 
+    ($P14, $P15) = do_something($P13 :flat)
 
-To test whether a value was returned, declare it C<:optional>, and follow it
-with an integer register declared C<:opt_val>:
+=end PIR_FRAGMENT
 
-=begin PIR_FRAGMENT_INVALID
+Subs may also return C<:named> values, which can be explicitly accessed similar
+to parameter declarations:
 
-    ($P10 :optional, $I10 :opt_val) = do_something($P1, $S3)
+=begin PIR_FRAGMENT
 
-=end PIR_FRAGMENT_INVALID
+    ($I11 :named("counter"), $S4 :named("name")) = do_something($P1, $S3)
 
-Both of these affect only the signature provided via C<get_results>.
+=end PIR_FRAGMENT
+
+All of these affect only the signature provided via C<get_results>.
 
-[should also describe :flat, :slurpy, :named, ..., or at least provide a
-reference.  -- rgr, 25-May-08.]
+[not sure what this is for, leaving it alone for now -aninhumer]
 
 =begin PIR_FRAGMENT
 
@@ -281,7 +370,7 @@
 
 =begin PIR_FRAGMENT
 
-    get_results '(0,0,0)', $P0, $I1, $S3
+    set_returns '(0,0,0)', $P0, $I1, $S3
     returncc	# return by calling the current continuation
 
 =end PIR_FRAGMENT
@@ -290,6 +379,9 @@
 array that describes the register types; it is replaced internally with C<[2,
 0, 1]>, which means "three arguments, of type PMC, integer, and string".
 
+All of the declarations allowed for calls to a sub can also be used with
+return values. (C<:named>, C<:flat>)
+
 Another way to return from a sub is to use tail-calling, which calls a new sub
 with the current continuation, so that the new sub returns directly to the
 caller of the old sub (i.e. without first returning to the old sub).  This

Modified: branches/gc_encapsulate/docs/project/release_manager_guide.pod
==============================================================================
--- branches/gc_encapsulate/docs/project/release_manager_guide.pod	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/docs/project/release_manager_guide.pod	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2009, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
 # $Id$
 
 =head1 Release Instructions
@@ -42,7 +42,7 @@
 On the Saturday before a release you should notify other developers to stop
 committing non-release related code to trunk.  This will help avoid
 complications. They are of course free to commit to branches as much as
-they like. You might also set the topic in #parrot, announcing the 
+they like. You might also set the topic in #parrot, announcing the
 time when you plan on starting the release procedure. This will help
 the committers with timing their last minute commits.
 
@@ -137,8 +137,10 @@
 policy. (Those changes are all included within the major version number
 increase for the supported release.)
 
-Once you've updated PBC_COMPAT, run C<tools/dev/mk_native_pbc> to update the
-pbc files used in the native pbc tests.
+Once you've updated PBC_COMPAT, run C<sh tools/dev/mk_native_pbc> to update the
+pbc files used in the native pbc tests.  Note that you must have Parrot already
+built for this to work, and that this script will reconfigure and rebuild
+Parrot with various primitive size options.
 
 =item h
 
@@ -391,10 +393,9 @@
 visible at
 L<http://www.google.com/calendar/render?cid=ldhctdamsgfg5a1cord52po9h8@group.calendar.google.com>.
 
- - Jan 19, 2010      - 2.0* - chromatic
  - Feb 16, 2010      - 2.1  - darbelo
  - Mar 16, 2010      - 2.2  - cotto
- - Apr 20, 2010      - 2.3  - gerd
+ - Apr 20, 2010      - 2.3* - gerd
 
 =cut
 

Modified: branches/gc_encapsulate/docs/submissions.pod
==============================================================================
--- branches/gc_encapsulate/docs/submissions.pod	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/docs/submissions.pod	Thu Jan 28 09:35:26 2010	(r43633)
@@ -11,8 +11,8 @@
 
 =head1 How To Submit A Bug Report
 
-If you encounter an error while working with Parrot, and don't understand what
-is causing it, then create a bug report using the F<parrotbug> utility. The
+If you encounter an error while working with Parrot and don't understand what
+is causing it, create a bug report using the F<parrotbug> utility. The
 simplest way to use it is to run
 
     % ./parrotbug
@@ -22,18 +22,12 @@
 However, if you do know how to fix the problem you encountered, then think
 about submitting a patch, or (see below) getting commit privileges.
 
-=head1 How To Submit A Patch
+=head1 How To Create A Patch
 
 Try to keep your patches specific to a single change, and ensure that your
 change does not break any tests.  Do this by running C<make test>.  If there is
 no test for the fixed bug, please provide one.
 
-=over
-
-=item 1
-
-Create the patch.
-
 In the following examples, F<parrot> contains the Parrot distribution, and
 F<workingdir> contains F<parrot>. The name F<workingdir> is just a placeholder
 for whatever the distribution's parent directory is called on your machine.
@@ -97,21 +91,31 @@
 
 =back
 
-=item 2
+=head1 How To Submit A Patch
+
+=over 4
+
+=item 1
 
 Go to Parrot's ticket tracking system at
 L<https://trac.parrot.org/parrot/>. Log in, or create an account if you
 don't have one yet.
 
+=item 2
+
+If there is already a ticket for the bug or feature that your patch relates
+to, just attach the patch directly to the ticket.
+
 =item 3
 
-Select "New Ticket" L<https://trac.parrot.org/parrot/newticket>.
+Otherwise select "New Ticket" at the top of the site.
+L<https://trac.parrot.org/parrot/newticket>
 
 =item 4
 
-Give a clear and concise Summary.
-
-Prefix it with a C<[PATCH]> identifier.
+Give a clear and concise Summary.  You do B<NOT> need to prefix the Summary
+with a C<[PATCH]> identifier.  Instead, in the lower-right corner of the
+F<newticket> page, select status C<new> in the F<Patch status> drop-down box.
 
 =item 5
 
@@ -124,13 +128,13 @@
 
 Set the Type of the ticket to "patch". Set other relevant drop-down
 menus, such as Version (the version of Parrot where you encountered the
-problem), Platform, or Severity.
+problem), Platform, or Severity.  As mentioned above, select status C<new> in
+the F<Patch status> drop-down box.
 
 =item 7
 
-Check the box for "I have files to attach to this ticket"
-
-Double-check that you've actually done this, because it's easy to forget.
+Check the box for "I have files to attach to this ticket". Double-check
+that you've actually done this, because it's easy to forget.
 
 B<DO NOT> paste the patch file content into the Description.
 
@@ -247,26 +251,22 @@
 
 =head1 What Happens Next?
 
-Trac creates a ticket for the submission, and you will receive an automatic reply
-with details of the ticket identifier. This identifier should be used in all
-further correspondence concerning the submission.
+If you created a new ticket for the submission, you will be taken to the page
+for the new ticket and can check on the progress of your submission there.
+This identifier should be used in all correspondence concerning the submission.
 
-Everyone on the list sees the submission, and can comment on it. A developer
-with SVN commit authority will commit it to SVN once it is clear that it is the
+Everyone on Trac sees the submission and can comment on it. A developer with
+SVN commit authority can commit it to SVN once it is clear that it is the
 right thing to do.
 
-Even developers with SVN commit authority stick to this scheme for larger or
-more complex changes, to allow time for peer review.
-
-You can check the progress of your submission at the Parrot bugs page
-L<http://bugs6.perl.org/>. If you have trouble logging in try username C<guest>
-with password C<guest>.
+However developers with SVN commit authority may not commit your changes
+immediately if they are large or complex, as we need time for peer review.
 
-A Parrot Bug Summary page is also available from
-L<https://rt.perl.org/rt3/NoAuth/parrot/Overview.html>
+A list of active tickets can be found here:
+L<http://trac.parrot.org/parrot/report/1>
 
-A list of all the unresolved patches is at
-L<http://www.parrotcode.org/openpatches.html>
+A list of all the unresolved patches is at:
+L<http://trac.parrot.org/parrot/report/15>
 
 =head1 Patches for the Parrot website
 
@@ -302,8 +302,8 @@
 =item 4
 
 Request commit access via the C<parrot-dev> mailing list, or via IRC
-(#parrot on irc.parrot.org).  The existing committers will discuss your request in
-the next couple of weeks.
+(#parrot on irc.parrot.org). The existing committers will discuss your
+request in the next couple of weeks.
 
 If approved, a metacommitter will update the permissions to allow you to commit
 to Parrot; see C<RESPONSIBLE_PARTIES> for the current list.  Welcome aboard!

Modified: branches/gc_encapsulate/docs/user/pir/intro.pod
==============================================================================
--- branches/gc_encapsulate/docs/user/pir/intro.pod	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/docs/user/pir/intro.pod	Thu Jan 28 09:35:26 2010	(r43633)
@@ -373,7 +373,7 @@
 
 Whereas the following is not:
 
-=begin PIR_INVALID
+=begin PIR
 
   .sub main
     .param int a :named("name")
@@ -381,24 +381,24 @@
     # ...
   .end
 
-=begin PIR_INVALID
+=end PIR
 
 It's also possible to use named syntax when returning values from
 subroutines. Into the C<.return> command I'll use:
 
-=begin PIR
+=begin PIR_FRAGMENT
 
   .return ( "bar" => 20, "foo" => 10)
 
-=end PIR
+=end PIR_FRAGMENT
 
 and when calling the function, I will do:
 
-=begin PIR
+=begin PIR_FRAGMENT
 
   ("foo" => $I0, "bar" => $I1) = func()
 
-=end PIR
+=end PIR_FRAGMENT
 
 And C<$I0> will yield 10, and C<$I1> will yield 20, as expected.
 
@@ -410,22 +410,22 @@
 pass it a string register or variable where you wish the characters
 read to be placed and the number of characters you wish to read:
 
-=begin PIR
+=begin PIR_FRAGMENT
 
   read $S1, 100
 
-=end PIR
+=end PIR_FRAGMENT
 
 This line will read 100 characters (or until the end of the line) and
 put the read string into C<$S1>. In case you need a number, just
 assign the string to the correct register type:
 
-=begin PIR
+=begin PIR_FRAGMENT
 
   read $S1, 100
   $I1 = $S1
 
-=end PIR
+=end PIR_FRAGMENT
 
 With the PIR syntax shown in this article you should be able to start
 writing simple programs. Next article we will look into available

Modified: branches/gc_encapsulate/examples/config/file/configcompiler
==============================================================================
--- branches/gc_encapsulate/examples/config/file/configcompiler	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/examples/config/file/configcompiler	Thu Jan 28 09:35:26 2010	(r43633)
@@ -74,7 +74,6 @@
 gen::config_h
 gen::core_pmcs
 gen::crypto
-gen::parrot_include
 gen::opengl
 gen::call_list
 gen::languages

Modified: branches/gc_encapsulate/examples/config/file/configwithfatalstep
==============================================================================
--- branches/gc_encapsulate/examples/config/file/configwithfatalstep	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/examples/config/file/configwithfatalstep	Thu Jan 28 09:35:26 2010	(r43633)
@@ -66,7 +66,6 @@
 gen::config_h
 gen::core_pmcs
 gen::crypto
-gen::parrot_include
 gen::opengl
 gen::call_list
 gen::languages

Added: branches/gc_encapsulate/ext/nqp-rx/Defines.mak
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gc_encapsulate/ext/nqp-rx/Defines.mak	Thu Jan 28 09:35:26 2010	(r43633)
@@ -0,0 +1,8 @@
+NQPRX_LIB_PBCS = \
+    $(LIBRARY_DIR)/Regex.pbc \
+    $(LIBRARY_DIR)/HLL.pbc \
+    $(LIBRARY_DIR)/P6Regex.pbc \
+    $(LIBRARY_DIR)/nqp-rx.pbc \
+    $(LIBRARY_DIR)/P6object.pbc \
+    $(LIBRARY_DIR)/PCT/HLLCompiler.pbc \
+    $(LIBRARY_DIR)/PCT/PAST.pbc

Added: branches/gc_encapsulate/ext/nqp-rx/Rules.mak
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gc_encapsulate/ext/nqp-rx/Rules.mak	Thu Jan 28 09:35:26 2010	(r43633)
@@ -0,0 +1,23 @@
+## XXX does not cover .includes of core .pasm files
+
+$(LIBRARY_DIR)/Regex.pbc: ext/nqp-rx/src/stage0/Regex-s0.pir $(PARROT)
+	$(PARROT) -o $@ ext/nqp-rx/src/stage0/Regex-s0.pir
+
+$(LIBRARY_DIR)/HLL.pbc: ext/nqp-rx/src/stage0/HLL-s0.pir $(PARROT)
+	$(PARROT) -o $@ ext/nqp-rx/src/stage0/HLL-s0.pir
+
+$(LIBRARY_DIR)/P6Regex.pbc: ext/nqp-rx/src/stage0/P6Regex-s0.pir $(PARROT)
+	$(PARROT) -o $@ ext/nqp-rx/src/stage0/P6Regex-s0.pir
+
+$(LIBRARY_DIR)/nqp-rx.pbc: ext/nqp-rx/src/stage0/NQP-s0.pir $(PARROT)
+	$(PARROT) -o $@ ext/nqp-rx/src/stage0/NQP-s0.pir
+
+## TT #1398 - pbc_to_exe cannot generate a specified target file
+parrot-nqp.pbc : $(LIBRARY_DIR)/nqp-rx.pbc
+	$(CP) $(LIBRARY_DIR)/nqp-rx.pbc $@
+
+$(NQP_RX) : $(NQPRX_LIB_PBCS) $(PBC_TO_EXE) parrot-nqp.pbc
+	$(PBC_TO_EXE) parrot-nqp.pbc
+
+$(INSTALLABLENQP) : $(NQPRX_LIB_PBCS) src/install_config$(O) $(PBC_TO_EXE) parrot-nqp.pbc
+	$(PBC_TO_EXE) parrot-nqp.pbc --install

Modified: branches/gc_encapsulate/include/parrot/extend.h
==============================================================================
--- branches/gc_encapsulate/include/parrot/extend.h	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/include/parrot/extend.h	Thu Jan 28 09:35:26 2010	(r43633)
@@ -64,38 +64,6 @@
 PARROT_EXPORT
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
-void * Parrot_call_method(PARROT_INTERP,
-    Parrot_PMC sub_pmc,
-    Parrot_PMC obj,
-    Parrot_String method,
-    ARGIN(const char *signature),
-    ...)
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(5);
-
-PARROT_EXPORT
-Parrot_Float Parrot_call_method_ret_float(PARROT_INTERP,
-    Parrot_PMC sub_pmc,
-    Parrot_PMC obj,
-    Parrot_String method,
-    ARGIN(const char *signature),
-    ...)
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(5);
-
-PARROT_EXPORT
-Parrot_Int Parrot_call_method_ret_int(PARROT_INTERP,
-    Parrot_PMC sub_pmc,
-    Parrot_PMC obj,
-    Parrot_String method,
-    ARGIN(const char *signature),
-    ...)
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(5);
-
-PARROT_EXPORT
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
 void * Parrot_call_sub(PARROT_INTERP,
     Parrot_PMC sub_pmc,
     ARGIN(const char *signature),
@@ -104,14 +72,6 @@
         __attribute__nonnull__(3);
 
 PARROT_EXPORT
-Parrot_Float Parrot_call_sub_ret_float(PARROT_INTERP,
-    Parrot_PMC sub_pmc,
-    ARGIN(const char *signature),
-    ...)
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(3);
-
-PARROT_EXPORT
 Parrot_Int Parrot_call_sub_ret_int(PARROT_INTERP,
     Parrot_PMC sub_pmc,
     ARGIN(const char *signature),
@@ -452,21 +412,9 @@
         __attribute__nonnull__(2)
         __attribute__nonnull__(3);
 
-#define ASSERT_ARGS_Parrot_call_method __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(signature))
-#define ASSERT_ARGS_Parrot_call_method_ret_float __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(signature))
-#define ASSERT_ARGS_Parrot_call_method_ret_int __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(signature))
 #define ASSERT_ARGS_Parrot_call_sub __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(signature))
-#define ASSERT_ARGS_Parrot_call_sub_ret_float __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(signature))
 #define ASSERT_ARGS_Parrot_call_sub_ret_int __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(signature))

Modified: branches/gc_encapsulate/include/parrot/hash.h
==============================================================================
--- branches/gc_encapsulate/include/parrot/hash.h	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/include/parrot/hash.h	Thu Jan 28 09:35:26 2010	(r43633)
@@ -80,6 +80,16 @@
 
 typedef void (*value_free)(void *);
 
+/* To avoid creating OrderedHashItem PMC we reuse FixedPMCArray PMC */
+/* So, there is indexes to avoid using of "magick constants" */
+enum ORDERED_HASH_ITEM_PART {
+    ORDERED_HASH_ITEM_KEY   = 0,
+    ORDERED_HASH_ITEM_VALUE = 1,
+    ORDERED_HASH_ITEM_PREV  = 2,
+    ORDERED_HASH_ITEM_NEXT  = 3,
+    ORDERED_HASH_ITEM_MAX   = 4,
+};
+
 /* HEADERIZER BEGIN: src/hash.c */
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 

Modified: branches/gc_encapsulate/include/parrot/list.h
==============================================================================
--- branches/gc_encapsulate/include/parrot/list.h	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/include/parrot/list.h	Thu Jan 28 09:35:26 2010	(r43633)
@@ -220,11 +220,11 @@
 PARROT_EXPORT
 void Parrot_pmc_array_visit(PARROT_INTERP,
     ARGIN(List *list),
-    ARGMOD(void *pinfo))
+    ARGMOD(visit_info *info))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         __attribute__nonnull__(3)
-        FUNC_MODIFIES(*pinfo);
+        FUNC_MODIFIES(*info);
 
 PARROT_WARN_UNUSED_RESULT
 PARROT_PURE_FUNCTION
@@ -284,7 +284,7 @@
 #define ASSERT_ARGS_Parrot_pmc_array_visit __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(list) \
-    , PARROT_ASSERT_ARG(pinfo))
+    , PARROT_ASSERT_ARG(info))
 #define ASSERT_ARGS_Parrot_pmc_array_length __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(list))
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */

Modified: branches/gc_encapsulate/include/parrot/packfile.h
==============================================================================
--- branches/gc_encapsulate/include/parrot/packfile.h	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/include/parrot/packfile.h	Thu Jan 28 09:35:26 2010	(r43633)
@@ -67,6 +67,7 @@
 #  define PFOPT_ALIGN 8
 #  define PFOPT_VALUE 16
 #endif
+#define PFOPT_PMC_FREEZE_ONLY 32
 
 #if TRACE_PACKFILE
 /* Here we pass multipe args to a macro so the args may not be bracketed here! */

Modified: branches/gc_encapsulate/include/parrot/parrot.h
==============================================================================
--- branches/gc_encapsulate/include/parrot/parrot.h	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/include/parrot/parrot.h	Thu Jan 28 09:35:26 2010	(r43633)
@@ -259,8 +259,8 @@
 #include "parrot/string.h"
 #include "parrot/string_primitives.h"
 #include "parrot/hash.h"
-#include "parrot/list.h"
 #include "parrot/pmc_freeze.h"
+#include "parrot/list.h"
 #include "parrot/vtable.h"
 #include "parrot/context.h"
 #include "parrot/exceptions.h"

Modified: branches/gc_encapsulate/include/parrot/pmc_freeze.h
==============================================================================
--- branches/gc_encapsulate/include/parrot/pmc_freeze.h	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/include/parrot/pmc_freeze.h	Thu Jan 28 09:35:26 2010	(r43633)
@@ -11,69 +11,137 @@
  */
 
 #ifndef PARROT_PMC_FREEZE_H_GUARD
-#define      PARROT_PMC_FREEZE_H_GUARD
+#define PARROT_PMC_FREEZE_H_GUARD
 
 struct _visit_info;
 typedef void (*visit_f)(PARROT_INTERP, ARGIN_NULLOK(PMC*), ARGIN(struct _visit_info*));
 
 typedef enum {
-    VISIT_FREEZE_NORMAL,
-    VISIT_FREEZE_AT_DESTRUCT,
-    VISIT_FREEZE_SIZE,
-    VISIT_THAW_NORMAL,
-    VISIT_THAW_CONSTANTS,
-    VISIT_CLONE,
-    VISIT_DESTRUCTION_ORDER
-} visit_enum_type;
-
-struct _image_io;
-#define IMAGE_IO struct _image_io
-typedef void (*push_integer_f)       (PARROT_INTERP, IMAGE_IO*, INTVAL);
-typedef void (*push_string_f)        (PARROT_INTERP, IMAGE_IO*, STRING*);
-typedef void (*push_number_f)        (PARROT_INTERP, IMAGE_IO*, FLOATVAL);
-typedef INTVAL (*shift_integer_f)    (PARROT_INTERP, IMAGE_IO*);
-typedef STRING* (*shift_string_f)    (PARROT_INTERP, IMAGE_IO*);
-typedef FLOATVAL (*shift_number_f)   (PARROT_INTERP, IMAGE_IO*);
+    VISIT_HOW_PMC_TO_VISITOR     = 0x00, /* push to visitor */
+    VISIT_HOW_VISITOR_TO_PMC     = 0x01, /* shift from visitor */
+    VISIT_HOW_PMC_TO_PMC         = 0x02, /* push to visitor; then shift from visitor */
+    VISIT_HOW_VISITOR_TO_VISITOR = 0x03, /* shift from visitor; then push to visitor */
+} visit_how_enum_t;
+
+#define VISIT_HOW_MASK 0x03
+
+typedef enum {
+    VISIT_WHAT_PMC      = 0x04,
+    VISIT_WHAT_STRING   = 0x08,
+    VISIT_WHAT_FLOATVAL = 0x10,
+    VISIT_WHAT_INTVAL   = 0x20,
+} visit_what_enum_t;
+
+#define VISIT_WHAT_MASK 0x3c
+
+/* backwards-compat defns */
+#define visit_enum_type      INTVAL
+#define VISIT_FREEZE_NORMAL  (VISIT_HOW_PMC_TO_VISITOR | VISIT_WHAT_PMC)
+#define VISIT_THAW_NORMAL    (VISIT_HOW_VISITOR_TO_PMC | VISIT_WHAT_PMC)
+#define VISIT_THAW_CONSTANTS VISIT_THAW_NORMAL
+
+struct _visit_info;
+typedef INTVAL   (*get_integer_f)   (PARROT_INTERP, struct _visit_info*);
+typedef void     (*push_integer_f)  (PARROT_INTERP, struct _visit_info*, INTVAL);
+typedef void     (*push_string_f)   (PARROT_INTERP, struct _visit_info*, STRING*);
+typedef void     (*push_number_f)   (PARROT_INTERP, struct _visit_info*, FLOATVAL);
+typedef void     (*push_pmc_f)      (PARROT_INTERP, struct _visit_info*, PMC*);
+typedef INTVAL   (*shift_integer_f) (PARROT_INTERP, struct _visit_info*);
+typedef STRING*  (*shift_string_f)  (PARROT_INTERP, struct _visit_info*);
+typedef FLOATVAL (*shift_number_f)  (PARROT_INTERP, struct _visit_info*);
+typedef PMC*     (*shift_pmc_f)     (PARROT_INTERP, struct _visit_info*);
 
 typedef struct _image_funcs {
+    get_integer_f       get_integer;
     push_integer_f      push_integer;
     push_string_f       push_string;
     push_number_f       push_float;
+    push_pmc_f          push_pmc;
     shift_integer_f     shift_integer;
     shift_string_f      shift_string;
     shift_number_f      shift_float;
+    shift_pmc_f         shift_pmc;
 } image_funcs;
 
-typedef struct _image_io {
-    STRING *image;
-    struct PackFile *pf;
-    const image_funcs *vtable;
-} image_io;
-
 typedef enum {
     EXTRA_IS_NULL,
-    EXTRA_IS_UNUSED,
     EXTRA_IS_PROP_HASH,
-    EXTRA_CLASS_EXISTS
 } extra_flags_enum;
 
 typedef struct _visit_info {
     visit_f             visit_pmc_now;
-    visit_f             visit_action;   /* freeze, thaw ... */
+    size_t              pos;            /* current read/write position in buffer */
+    Buffer             *buffer;
+    size_t              input_length;   /* */
     INTVAL              what;
-    STRING             *image;
     PMC               **thaw_ptr;       /* where to thaw a new PMC */
-    INTVAL              last_type;
     PMC                *seen;           /* seen hash */
     PMC                *todo;           /* todo list */
     PMC                *id_list;        /* seen list used by thaw */
     UINTVAL             id;             /* freze ID of PMC */
-    void               *extra;          /* PMC specific */
     INTVAL              extra_flags;    /* concerning to extra */
-    PMC                *thaw_result;    /* 1st thawed */
-    IMAGE_IO           *image_io;
+    struct PackFile    *pf;
+    const image_funcs  *vtable;
+    struct _visit_info *image_io;       /* dummy backwards-compat pointer. */
 } visit_info;
 
+#define IMAGE_IO visit_info
+
+#define VISIT_PMC(interp, visit, pmc) do {\
+    const INTVAL _visit_pmc_flags = VTABLE_get_integer((interp), (visit)); \
+    if (_visit_pmc_flags & VISIT_WHAT_PMC) { \
+        switch (_visit_pmc_flags & VISIT_HOW_MASK) { \
+          case VISIT_HOW_PMC_TO_VISITOR: \
+            VTABLE_push_pmc((interp), (visit), (pmc)); \
+            break; \
+          case VISIT_HOW_VISITOR_TO_PMC: \
+            (pmc) = VTABLE_shift_pmc((interp), (visit)); \
+            break; \
+          case VISIT_HOW_PMC_TO_PMC: \
+            VTABLE_push_pmc((interp), (visit), (pmc)); \
+            (pmc) = VTABLE_shift_pmc((interp), (visit)); \
+            break; \
+          case VISIT_HOW_VISITOR_TO_VISITOR: \
+            (pmc) = VTABLE_shift_pmc((interp), (visit)); \
+            VTABLE_push_pmc((interp), (visit), (pmc)); \
+            break; \
+          default: \
+            do_panic((interp), "Bad VISIT_HOW in VISIT_PMC", __FILE__, __LINE__); \
+        } \
+    } \
+} while (0)
+
+#define VISIT_PMC_ATTR(interp, visit, self, pmclass, attr_name) do {\
+    const INTVAL _visit_pmc_attr_flags = VTABLE_get_integer((interp), (visit)); \
+    if (_visit_pmc_attr_flags & VISIT_WHAT_PMC) { \
+        PMC *_visit_pmc_attr; \
+        switch (_visit_pmc_attr_flags & VISIT_HOW_MASK) { \
+          case VISIT_HOW_PMC_TO_VISITOR: \
+            GETATTR_ ## pmclass ## _ ## attr_name((interp), (self), _visit_pmc_attr); \
+            VTABLE_push_pmc((interp), (visit), _visit_pmc_attr); \
+            break; \
+          case VISIT_HOW_VISITOR_TO_PMC: \
+            _visit_pmc_attr = VTABLE_shift_pmc((interp), (visit)); \
+            SETATTR_ ## pmclass ## _ ## attr_name((interp), (self), _visit_pmc_attr); \
+            break; \
+          case VISIT_HOW_PMC_TO_PMC: \
+            GETATTR_ ## pmclass ## _ ## attr_name((interp), (self), _visit_pmc_attr); \
+            VTABLE_push_pmc((interp), (visit), _visit_pmc_attr); \
+            _visit_pmc_attr = VTABLE_shift_pmc((interp), (visit)); \
+            SETATTR_ ## pmclass ## _ ## attr_name((interp), (self), _visit_pmc_attr); \
+            break; \
+          case VISIT_HOW_VISITOR_TO_VISITOR: \
+            _visit_pmc_attr = VTABLE_shift_pmc((interp), (visit)); \
+            SETATTR_ ## pmclass ## _ ## attr_name((interp), (self), _visit_pmc_attr); \
+            GETATTR_ ## pmclass ## _ ## attr_name((interp), (self), _visit_pmc_attr); \
+            VTABLE_push_pmc((interp), (visit), _visit_pmc_attr); \
+            break; \
+          default: \
+            do_panic((interp), "Bad VISIT_HOW in VISIT_PMC_ATTR", __FILE__, __LINE__); \
+        } \
+    } \
+} while (0)
+
 /*
  * public interfaces
  */

Modified: branches/gc_encapsulate/include/parrot/string_funcs.h
==============================================================================
--- branches/gc_encapsulate/include/parrot/string_funcs.h	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/include/parrot/string_funcs.h	Thu Jan 28 09:35:26 2010	(r43633)
@@ -291,6 +291,17 @@
 
 PARROT_EXPORT
 PARROT_WARN_UNUSED_RESULT
+PARROT_MALLOC
+PARROT_CANNOT_RETURN_NULL
+STRING * Parrot_str_new_from_buffer(PARROT_INTERP,
+    ARGMOD(Buffer *buffer),
+    const UINTVAL len)
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2)
+        FUNC_MODIFIES(*buffer);
+
+PARROT_EXPORT
+PARROT_WARN_UNUSED_RESULT
 PARROT_CANNOT_RETURN_NULL
 STRING * Parrot_str_new_init(PARROT_INTERP,
     ARGIN_NULLOK(const char *buffer),
@@ -629,6 +640,9 @@
 #define ASSERT_ARGS_Parrot_str_new_COW __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(s))
+#define ASSERT_ARGS_Parrot_str_new_from_buffer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(buffer))
 #define ASSERT_ARGS_Parrot_str_new_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(encoding) \

Modified: branches/gc_encapsulate/lib/Parrot/Configure/Compiler.pm
==============================================================================
--- branches/gc_encapsulate/lib/Parrot/Configure/Compiler.pm	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/lib/Parrot/Configure/Compiler.pm	Thu Jan 28 09:35:26 2010	(r43633)
@@ -250,20 +250,20 @@
 
 For instance:
 
-  #IF(win32): $(SRC_DIR)/atomic/gcc_x86$(O)
+  #IF(win32): src/atomic/gcc_x86$(O)
 
 will be included if the platform is win32.
 
-  #IF(cpuarch==i386): $(SRC_DIR)/atomic/gcc_x86$(O)
+  #IF(cpuarch==i386): src/atomic/gcc_x86$(O)
 
 will be included if the value of the config key "cpuarch" is "i386".
 
-  #IF(cpuarch==i386): $(SRC_DIR)/atomic/gcc_x86$(O)
-  #ELSIF(cpuarch==sparcv9): $(SRC_DIR)/atomic/sparc_v9.s
+  #IF(cpuarch==i386): src/atomic/gcc_x86$(O)
+  #ELSIF(cpuarch==sparcv9): src/atomic/sparc_v9.s
   #ELSE:
 
-will include " $(SRC_DIR)/atomic/gcc_x86$(O)" if the config key "cpuarch" is
-ste to "i386", will include " $(SRC_DIR)/atomic/sparc_v9.s" instead if
+will include " src/atomic/gcc_x86$(O)" if the config key "cpuarch" is
+ste to "i386", will include " src/atomic/sparc_v9.s" instead if
 "cpuarch" is set to "sparcv9", and will include an empty line otherwise.
 
   #IF(win32 and glut and not cygwin):
@@ -380,7 +380,6 @@
         if ( $options{file_type} eq 'makefile' ) {
             $options{replace_slashes}   = 1;
             $options{conditioned_lines} = 1;
-            $options{no_simply_expanded_var} = ! $conf->data->get('gmake_version');
         }
     }
 
@@ -564,11 +563,6 @@
             $line =~ s{(\\\*)}{\\$1}g;
         }
 
-        if ( $options{no_simply_expanded_var} ) {
-            # replace := with =
-            $line =~ s{:=}{=};
-        }
-
         print $out $line;
     }
 

Modified: branches/gc_encapsulate/lib/Parrot/Configure/Options/Test/Prepare.pm
==============================================================================
--- branches/gc_encapsulate/lib/Parrot/Configure/Options/Test/Prepare.pm	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/lib/Parrot/Configure/Options/Test/Prepare.pm	Thu Jan 28 09:35:26 2010	(r43633)
@@ -36,9 +36,6 @@
     my @postconfiguration_tests = (
         @steps_tests,
         glob("t/postconfigure/*.t"),
-        glob("t/tools/pmc2cutils/*.t"),
-        glob("t/tools/ops2cutils/*.t"),
-        glob("t/tools/ops2pm/*.t"),
         glob("t/pharness/*.t"),
     );
     return @postconfiguration_tests;

Modified: branches/gc_encapsulate/lib/Parrot/Configure/Step/List.pm
==============================================================================
--- branches/gc_encapsulate/lib/Parrot/Configure/Step/List.pm	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/lib/Parrot/Configure/Step/List.pm	Thu Jan 28 09:35:26 2010	(r43633)
@@ -31,7 +31,6 @@
     inter::types
     auto::ops
     auto::pmc
-    auto::alignptrs
     auto::headers
     auto::sizes
     auto::byteorder
@@ -67,7 +66,6 @@
     gen::config_h
     gen::core_pmcs
     gen::crypto
-    gen::parrot_include
     gen::opengl
     gen::call_list
     gen::makefiles

Modified: branches/gc_encapsulate/lib/Parrot/Docs/Section/Tools.pm
==============================================================================
--- branches/gc_encapsulate/lib/Parrot/Docs/Section/Tools.pm	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/lib/Parrot/Docs/Section/Tools.pm	Thu Jan 28 09:35:26 2010	(r43633)
@@ -55,7 +55,6 @@
             '',
             $self->new_item( '', 'docs/configuration.pod' ),
             $self->new_item( '', 'tools/build/c2str.pl' ),
-            $self->new_item( '', 'tools/build/dynoplibs.pl' ),
             $self->new_item( '', 'tools/build/dynpmc.pl' ),
             $self->new_item( '', 'tools/build/ops2c.pl' ),
             $self->new_item( '', 'tools/build/ops2pm.pl' ),

Added: branches/gc_encapsulate/lib/Parrot/H2inc.pm
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gc_encapsulate/lib/Parrot/H2inc.pm	Thu Jan 28 09:35:26 2010	(r43633)
@@ -0,0 +1,358 @@
+package Parrot::H2inc;
+# Copyright (C) 2010, Parrot Foundation.
+# $Id$
+
+use strict;
+use warnings;
+use Exporter;
+our @ISA = qw( Exporter );
+our @EXPORT_OK = qw(
+    parse_file
+    perform_directive
+    generate_text
+    print_generated_file
+);
+
+=head1 NAME
+
+Parrot::H2inc - Subroutines used in F<tools/build/h2inc.pl>
+
+=head1 DESCRIPTION
+
+This package exports on demand only four subroutines used in
+F<tools/build/h2inc.pl>.
+
+=head1 SUBROUTINES
+
+=head2 C<parse_file()>
+
+=over 4
+
+=item * Arguments
+
+    $directive = parse_file($in_file, $out_file);
+
+List of 2 elements: string holding name of incoming file; string holding name of outgoing file.
+
+=item * Return Value
+
+If successful, returns a hash reference.
+
+=back
+
+=cut
+
+sub parse_file {
+    my ( $in_file, $out_file) = @_;
+    $out_file =~ s/\\/\//g; # transform Windows backslash
+
+    my ( @directives, %values, $last_val, $cur, $or_continues );
+    open my $fh, '<', $in_file or die "Can't open $in_file: $!\n";
+    while ( my $line = <$fh> ) {
+        if (
+            $line =~ m!
+            &gen_from_(enum|def) \( ( [^)]* ) \)
+            (?: \s+ prefix \( (\w+) \) )?
+            (?: \s+ subst \( (s/.*?/.*?/[eig]?) \) )?
+            !x
+            )
+        {
+            $cur and die "Missing '&end_gen' in $in_file\n";
+            my $file;
+            foreach (split ' ', $2) {
+                $file = $_ if $out_file =~ /$_$/;
+            }
+            $cur = {
+                type   => $1,
+                file   => $file,
+                prefix => defined $3 ? $3 : '',
+                defined $4 ? ( subst => $4 ) : (),
+            };
+            $last_val = -1;
+        }
+        elsif ( $line =~ /&end_gen\b/ ) {
+            $cur or die "Missing &gen_from_(enum|def) in $in_file\n";
+            return $cur if defined $cur->{file};
+            $cur = undef;
+        }
+
+        $cur or next;
+
+        if ( $cur->{type} eq 'def' && $line =~ /^\s*#define\s+(\w+)\s+(-?\w+|"[^"]*")/ ) {
+            push @{ $cur->{defs} }, [ $1, $2 ];
+        }
+        elsif ( $cur->{type} eq 'enum' ) {
+            # Special case: enum value is or'd combination of other values
+            if ( $or_continues ) {
+                $or_continues = 0;
+                my $last_def = $cur->{defs}->[-1];
+                my ($k, $v) = @{$last_def};
+                my @or_values = grep {defined $_} $line =~ /^\s*(-?\w+)(?:\s*\|\s*(-?\w+))*/;
+                for my $or (@or_values) {
+                    if ( defined $values{$or} ) {
+                        $v |= $values{$or};
+                    }
+                    elsif ( $or =~ /^0/ ) {
+                        $v |= oct $or;
+                    }
+                }
+                if ($line =~ /\|\s*$/) {
+                    $or_continues = 1;
+                }
+                $values{$k} = $last_val = $v;
+                $cur->{defs}->[-1]->[1] = $v;
+            }
+            elsif ( $line =~ /^\s*(\w+)\s*=\s*(-?\w+)\s*\|/ ) {
+                my ( $k, $v ) = ( $1, $2 );
+                my @or_values = ($v, $line =~ /\|\s*(-?\w+)/g);
+                $v = 0;
+                for my $or (@or_values) {
+                    if ( defined $values{$or} ) {
+                        $v |= $values{$or};
+                    }
+                    elsif ( $or =~ /^0/ ) {
+                        $v |= oct $or;
+                    }
+                }
+                if ($line =~ /\|\s*$/) {
+                    $or_continues = 1;
+                }
+                $values{$k} = $last_val = $v;
+                push @{ $cur->{defs} }, [ $k, $v ];
+            }
+            elsif ( $line =~ /^\s*(\w+)\s*=\s*(-?\w+)/ ) {
+                my ( $k, $v ) = ( $1, $2 );
+                if ( defined $values{$v} ) {
+                    $v = $values{$v};
+                }
+                elsif ( $v =~ /^0/ ) {
+                    $v = oct $v;
+                }
+                $values{$k} = $last_val = $v;
+                push @{ $cur->{defs} }, [ $k, $v ];
+            }
+            elsif ( $line =~ m!^\s*(\w+)\s*(?:,\s*)?(?:/\*|$)! ) {
+                my $k = $1;
+                my $v = $values{$k} = ++$last_val;
+                push @{ $cur->{defs} }, [ $k, $v ];
+            }
+        }
+    }
+    $cur and die "Missing '&end_gen' in $in_file\n";
+    close $fh or die "Could not close handle to $in_file after reading: $!";
+
+    return;
+}
+
+=head2 C<perform_directive()>
+
+=over 4
+
+=item * Arguments
+
+    $defs_ref = perform_directive($directive);
+
+Single hash reference (which is the return value from a successful run of
+C<parse_file()>.
+
+=item * Return Value
+
+Array reference.
+
+=back
+
+=cut
+
+sub perform_directive {
+    my ($d) = @_;
+
+    my @defs = prepend_prefix( $d->{prefix}, @{ $d->{defs} } );
+    if ( my $subst = $d->{subst} ) {
+        @defs = transform_name( sub { local $_ = shift; eval $subst; $_ }, @defs );
+    }
+    return \@defs;
+}
+
+=head2 C<const_to_parrot()>
+
+=over 4
+
+=item * Arguments
+
+    $gen = join "\n", const_to_parrot(@defs);
+
+List.
+
+=item * Return Value
+
+String.
+
+=back
+
+=cut
+
+sub const_to_parrot {
+
+    my $keylen = (sort { $a <=> $b } map { length($_->[0]) } @_ )[-1] ;
+    my $vallen = (sort { $a <=> $b } map { length($_->[1]) } @_ )[-1] ;
+
+    map {sprintf ".macro_const %-${keylen}s %${vallen}s", $_->[0], $_->[1]} @_;
+}
+
+=head2 C<const_to_perl()>
+
+=over 4
+
+=item * Arguments
+
+    $gen = join "\n", const_to_perl(@defs);
+
+List.
+
+=item * Return Value
+
+String.
+
+=back
+
+=cut
+
+sub const_to_perl {
+
+    my $keylen = (sort { $a <=> $b } map { length($_->[0]) } @_ )[-1] ;
+
+    map {sprintf "use constant %-${keylen}s => %s;", $_->[0], $_->[1]} @_;
+}
+
+=head2 C<transform_name()>
+
+=over 4
+
+=item * Arguments
+
+    transform_name( sub { $prefix . $_[0] }, @_ );
+
+List of two or more elements, the first element of which is a subroutine
+reference.
+
+=item * Return Value
+
+List which is a mapping of the transformations executed by the first argument
+upon the remaining arguments.
+
+=back
+
+=cut
+
+sub transform_name {
+    my $action = shift;
+
+    return map { [ $action->( $_->[0] ), $_->[1] ] } @_;
+}
+
+=head2 C<prepend_prefix()>
+
+=over 4
+
+=item * Arguments
+
+    @defs = prepend_prefix $d->{prefix}, @{ $d->{defs} };
+
+List of two or more elements, the first element of which is a string.
+
+=item * Return Value
+
+List.
+
+=back
+
+=cut
+
+sub prepend_prefix {
+    my $prefix = shift;
+
+    transform_name( sub { $prefix . $_[0] }, @_ );
+}
+
+=head2 C<generate_text()>
+
+=over 4
+
+=item * Argument
+
+    $generated_text = generate_text($directive, \@defs);
+
+List of two arguments: Directive hashref; reference to array of definitions.
+
+=item * Return Value
+
+String holding main text to be printed to new file.
+
+=back
+
+=cut
+
+sub generate_text {
+    my ($directive, $defs_ref) = @_;
+
+    my $target  = $directive->{file};
+    my $generated_text;
+    if ($target =~ /\.pm$/) {
+        $generated_text = join "\n", const_to_perl(@{ $defs_ref });
+        $generated_text .= "\n1;";
+    }
+    else {
+        $generated_text = join "\n", const_to_parrot(@{ $defs_ref });
+    }
+    return $generated_text;
+}
+
+=head2 C<print_generated_file()>
+
+=over 4
+
+=item * Argument
+
+    print_generated_file( {
+        in      => $in_file,
+        out     => $out_file,
+        script  => $0,
+        gen     => $generated_text,
+    } );
+
+Hash reference.  Elements pertain to file being read, file being created,
+calling program (typically, F<tools/build/h2inc.pl>) and string of text to be
+printed to file.
+
+=item * Return Value
+
+Implicitly returns true upon success.
+
+=back
+
+=cut
+
+sub print_generated_file {
+    my $args = shift;
+    open my $out_fh, '>', $args->{out} or die "Can't open $args->{out}: $!\n";
+    print $out_fh <<"EOF";
+# DO NOT EDIT THIS FILE.
+#
+# This file is generated automatically from
+# $args->{in} by $args->{script}
+#
+# Any changes made here will be lost.
+#
+$args->{gen}
+EOF
+    close $out_fh;
+}
+
+1;
+
+# Local Variables:
+#   mode: cperl
+#   cperl-indent-level: 4
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:

Modified: branches/gc_encapsulate/lib/Parrot/Harness/Options.pm
==============================================================================
--- branches/gc_encapsulate/lib/Parrot/Harness/Options.pm	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/lib/Parrot/Harness/Options.pm	Thu Jan 28 09:35:26 2010	(r43633)
@@ -28,9 +28,6 @@
     my @argv = @_;
 
     my %longopts;
-    $longopts{running_make_test} = grep { $_ eq '--running-make-test' } @argv;
-    @argv = grep { $_ ne '--running-make-test' } @argv;
-
     $longopts{gc_debug} = grep { $_ eq '--gc-debug' } @argv;
     @argv = grep { $_ ne '--gc-debug' } @argv;
 
@@ -92,6 +89,7 @@
     my %remap      = (
         'j' => '-runcore=fast',
         'g' => '-runcore=cgoto',
+        'G' => '-runcore=gcdebug',
         'C' => '-runcore=cgp',
         'S' => '-runcore=switch',
         'b' => '-runcore=bounds',
@@ -129,7 +127,6 @@
     -r         ... assemble to PBC run PBC
     -O[012]    ... optimize
     -D[number] ... pass debug flags to parrot interpreter
-    --running-make-test
     --gc-debug
     --core-tests
     --runcore-tests

Deleted: branches/gc_encapsulate/ports/fedora/parrot-1.x.0.patch
==============================================================================
--- branches/gc_encapsulate/ports/fedora/parrot-1.x.0.patch	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,38 +0,0 @@
---- tools/dev/install_files.pl	2009-07-13 10:26:40.000000000 +0200
-+++ tools/dev/install_files.pl	2009-07-13 13:37:49.000000000 +0200
-@@ -163,7 +163,7 @@
-             # libdir as it is typically done with automake installed packages.
-             # If there is a use case to make this configurable we'll add a
-             # seperate --pkgconfigdir option.
--            $filehash->{DestDirs} = ['pkgconfig', $parrotdir];
-+            $filehash->{DestDirs} = ['pkgconfig'];
-             return($filehash);
-         },
-     },
---- config/gen/makefiles/parrot_pc.in	2009-06-06 16:33:32.000000000 +0200
-+++ config/gen/makefiles/parrot_pc.in.new	2009-07-13 23:09:45.000000000 +0200
-@@ -7,4 +7,4 @@
- Description: virtual machine to execute bytecode for interpreted languages
- Version: @VERSION@
- Libs: -L${libdir} -lparrot @icu_shared@ @libs@
--Cflags: -I${includedir}
-+Cflags: -I${includedir}@versiondir@
---- lib/Parrot/Install.pm	2009-06-01 09:29:57.000000000 +0200
-+++ lib/Parrot/Install.pm	2009-06-03 08:41:22.000000000 +0200
-@@ -220,6 +220,16 @@
-         else {
-             next unless -e $src;
-             next if $^O eq 'cygwin' and -e "$src.exe"; # stat works, copy not
-+            if (-l $src) { 
-+                # check if the system supports symbolic linking 
-+                use Config; 
-+                if ($Config{d_symlink} && $Config{d_readlink}) { 
-+                # copy as symbolic link 
-+                    symlink(readlink($src), $dest); 
-+                    print "$dest\n"; 
-+                    next; 
-+                } 
-+            } 
-             copy( $src, $dest ) or die "Error: couldn't copy $src to $dest: $!\n";
-             print "$dest\n";
-         }

Copied and modified: branches/gc_encapsulate/ports/fedora/parrot.patch (from r43481, branches/gc_encapsulate/ports/fedora/parrot-1.x.0.patch)
==============================================================================

Modified: branches/gc_encapsulate/ports/fedora/parrot.spec.fedora
==============================================================================
--- branches/gc_encapsulate/ports/fedora/parrot.spec.fedora	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/ports/fedora/parrot.spec.fedora	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,18 +1,18 @@
 Name:           parrot
-Version:        1.4.0
-Release:        9%{?dist}
-Summary:        Parrot is a virtual machine
+Version:        2.0.0
+Release:        1%{?dist}
+Summary:        a virtual machine
 License:        Artistic 2.0
 Group:          Development/Libraries
 URL:            http://www.parrot.org/
 
 Source0:        ftp://ftp.parrot.org/pub/parrot/releases/stable/%{version}/parrot-%{version}.tar.gz
 
-Patch0:         parrot-1.x.0.patch
-# patches file:           tools/dev/install_files.pl
+Patch0:         parrot.patch
+# patched file:           tools/dev/install_files.pl
 # It is responsible to have no subdirectory under pkgconfig.
 #
-# patches file:           config/gen/makefiles/parrot_pc.in
+# patched file:           config/gen/makefiles/parrot_pc.in
 # So "pkg-config parrot --cflags" works correct
 #
 # see for upstream:       https://trac.parrot.org/parrot/ticket/509
@@ -32,6 +32,7 @@
 BuildRequires:  ctags
 BuildRequires:  openssl-devel
 BuildRequires:  flex
+BuildRequires:  bison
  
 
 %package docs
@@ -92,8 +93,6 @@
 %setup -q
 %patch0 -p0
 
-%{__perl} -pi -e "s,'/usr/lib','%{_libdir}'," tools/dev/install_files.pl
-
 
 cat << \EOF > %{name}-prov
 #!/bin/sh
@@ -125,11 +124,9 @@
     --optimize="$RPM_OPT_FLAGS" \
     --parrot_is_shared \
     --disable-rpath \
-    --lex=%{_bindir}/flex \
-    --yacc=%{_bindir}/yacc \
-    --libs='-lcurses -lm'
+    --lex=%{_bindir}/flex
 
-# The LDD_LIBRARY_PATH hack is needed for "miniparrot"
+# The LD_LIBRARY_PATH hack is needed for "miniparrot"
 # to find his parrot-library in "blib/lib" 
 export LD_LIBRARY_PATH=$( pwd )/blib/lib
 
@@ -143,14 +140,26 @@
 %install
 rm -rf $RPM_BUILD_ROOT
 
-# This hack is needed for "miniparrot" to find his parrot-library in "blib/lib" 
+# The LD_LIBRARY_PATH hack is needed for the command "pbc_to_exe parrot-nqp.pbc"
+# to find his parrot-library in "blib/lib" 
 export LD_LIBRARY_PATH=$( pwd )/blib/lib
 
-# install-dev: Same as 'install' taget but also install support for development.
+# install-dev: Same as 'install' taget but also install support for 
+#              language development 
 make install-dev DESTDIR=$RPM_BUILD_ROOT
 
-%define RPM_PAR_LIB_DIR $RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}/
-
+# Creating man-pages
+%{__install} -d $RPM_BUILD_ROOT%{_mandir}/man1
+for var in 'parrot docs/running.pod' 'parrot_debugger src/parrot_debugger.c' \
+           'pbc_disassemble src/pbc_disassemble.c' 'pbc_dump src/pbc_dump.c' \
+           'pbc_merge src/pbc_merge.c' 'pbc_to_exe tools/dev/pbc_to_exe.pir' \
+           'parrot_config tools/build/parrot_config_c.pl' \
+           'parrot-nqp compilers/nqp/README.pod'
+do
+    MAN_NAME=`echo $var | %{__perl} -na -e 'print $F[0]'`
+    MAN_SOURCE=`echo $var | %{__perl} -na -e 'print $F[1]'`
+    pod2man --section=1 --name=$MAN_NAME $MAN_SOURCE | %{__gzip} -c > $RPM_BUILD_ROOT%{_mandir}/man1/${MAN_NAME}.1.gz
+done
 
 # Drop the docs so rpm can pick them up itself.
 rm -rf $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}
@@ -159,6 +168,10 @@
 find docs examples -type d -exec chmod 755 {} \;
 find docs examples -type f -exec chmod 644 {} \;
 
+
+%define RPM_PAR_LIB_DIR $RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}/
+
+
 # Force permissions on shared versioned libs so they get stripped.
 # The parrot-install-script don't set the permissions right
 # With changed permissions the dependencies will be found
@@ -180,22 +193,24 @@
 
 # Remove doc-files with zero-length
 find docs/html -type f -size 0 -exec rm -f {} \;
+find docs -wholename 'docs/doc-prep' -type f -size 0 -exec rm -f {} \;
 
 # Set path for installed programs in docs package
 find examples/json -type f -name "*.pir" \
     -exec %{__sed} -i -e '1 s&#!../../parrot&#!/usr/bin/parrot&' {} \;
-find examples -type f -name "*.pl" \
-    -exec %{__sed} -i -e '1 s&#! perl&#!/usr/bin/perl&' {} \;
-find examples -wholename 'examples/pir/befunge/t/basic.t' \
+find examples -type f -path 'examples/*/*/setup.pir' \
+    -exec %{__sed} -i -e '1 s&#! ../../../parrot&#!/usr/bin/parrot&' {} \;
+find examples -type f \( -name '*.pl' -o \
+                         -wholename 'examples/pir/befunge/t/basic.t' -o  \
+                         -path 'examples/languages/*/harness'               \) \
     -exec %{__sed} -i -e '1 s&#! perl&#!/usr/bin/perl&' {} \;
 find examples -type f -name "*.py" \
     -exec %{__sed} -i -e '1 s&#! python&#!/usr/bin/python&' {} \;
 find examples -type f -name "*.rb" \
     -exec %{__sed} -i -e '1 s&#! ruby&#!/usr/bin/ruby&' {} \;
 
-find examples -type f -name "*.pir" \
-    -exec %{__sed} -i -e '1 s&#!./parrot&#!/usr/bin/parrot&' {} \;
-find examples/shootout -type f -name "random.pasm" \
+find examples -type f \( -name "*.pir" -o \
+                         -wholename 'examples/shootout/random.pasm' \)  \
     -exec %{__sed} -i -e '1 s&#!./parrot&#!/usr/bin/parrot&' {} \;
 
 find examples -wholename 'examples/languages/abc/t/01-tests.t' \
@@ -206,15 +221,6 @@
 find examples -wholename 'examples/languages/abc/t/harness' \
     -exec %{__perl} -pi -e 's/\r$//' {} \;
 
-find examples/languages -type f -name harness \
-    -exec %{__sed} -i -e '1 s&#! perl&#!/usr/bin/perl&' {} \;
-for file in docs/book/draft/ch05_pge.pod docs/memory_internals.pod; do
-        %{__mv} $file timestamp
-        iconv -f ISO-8859-1 -t UTF-8 -o $file timestamp
-        touch -r timestamp $file
-done
-%{__rm} -f timestamp
-
 
 %check
 # 'make fulltest' is done by default; it take a lot of time
@@ -240,6 +246,7 @@
 %exclude %{_libdir}/parrot/%{version}/tools
 %exclude %{_libdir}/parrot/%{version}/VERSION
 %{_libdir}/libparrot.so.*
+%{_mandir}/man1/parrot.1.gz
 
 %files docs
 %defattr(-,root,root,-)
@@ -249,8 +256,8 @@
 %defattr(-,root,root,-)
 %{_bindir}/parrot_config
 %{_bindir}/parrot_debugger
+%{_bindir}/parrot-nqp
 %{_bindir}/pbc_disassemble
-%{_bindir}/pbc_info
 %{_bindir}/pbc_merge
 %{_bindir}/pbc_to_exe
 %{_bindir}/pbc_dump
@@ -258,6 +265,13 @@
 %{_libdir}/libparrot.so
 %exclude %{_libdir}/libparrot.a
 %{_libdir}/pkgconfig/*
+%{_mandir}/man1/parrot_config.1.gz
+%{_mandir}/man1/parrot_debugger.1.gz
+%{_mandir}/man1/pbc_disassemble.1.gz
+%{_mandir}/man1/pbc_merge.1.gz
+%{_mandir}/man1/pbc_to_exe.1.gz
+%{_mandir}/man1/pbc_dump.1.gz
+%{_mandir}/man1/parrot-nqp.1.gz
 
 %files tools
 %defattr(-,root,root,-)
@@ -268,16 +282,20 @@
 
 
 %changelog
-* Sat Aug 1 2009 Gerd Pokorra <gp at zimt.uni-siegen.de> 1.4.0-9
-- ppc test included again
-- include the necessary module Parrot::Oplib::core
-- change the place of header files to /usr/include/parrrot/<version>
-- install the files /usr/src/parrot/*
+* Wed Jan 20 2010 Gerd Pokorra <gp at zimt.uni-siegen.de> 2.0.0-1
+- new upstream version
+- add the parrot-nqp binary, with generating of the man-page
 
-* Sat Jul 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.0-4
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+* Sat Aug 22 2009 Tomas Mraz <tmraz at redhat.com> 1.5.0-2
+- rebuilt with new openssl
 
-* Tue Jul 21 2009 Gerd Pokorra <gp at zimt.uni-siegen.de> 1.4.0-1
+* Fri Aug 21 2009 Gerd Pokorra <gp at zimt.uni-siegen.de> 1.5.0-1
+- add man pages
+
+* Sat Aug 1 2009 Gerd Pokorra <gp at zimt.uni-siegen.de> 1.4.0-9
+- include the necessary module Parrot::OpLib::core
+- change the place of header files to /usr/include/parrot/<version>
+- install the files /usr/src/parrot/*
 - add the new disable-rpath configure option
 
 * Wed Mar 25 2009 Gerd Pokorra <gp at zimt.uni-siegen.de> 1.0.0-6
@@ -308,16 +326,12 @@
 - updated to 1.0.0
 
 * Tue Jan 23 2009 Reini Urban <rurban at x-ray.at> 0.9.0
-- added make installable, perl6 is still not installable
+- added make installable
 - added parrot_utils to devel
-- fixed Source0 url
 
 * Tue Dec 16 2008 Whiteknight <wknight8111 at gmail.com> 0.8.2
 - updated to 0.8.2
 
-* Tue Mar 18 2008 Bernhard Schmalhofer <Bernhard.Schmalhofer at gmx.de> 0.6.0
-- Update to 0.5.3.
-
 * Wed Feb 20 2008 Patrick Michaud <pmichaud at pobox.com> 0.5.3
 - Update to 0.5.3.
 

Modified: branches/gc_encapsulate/runtime/parrot/library/Getopt/Obj.pir
==============================================================================
--- branches/gc_encapsulate/runtime/parrot/library/Getopt/Obj.pir	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/runtime/parrot/library/Getopt/Obj.pir	Thu Jan 28 09:35:26 2010	(r43633)
@@ -71,22 +71,22 @@
 
 .sub __load :anon :load
     .local pmc obj, spec, pns, ns
-    obj = newclass "Getopt::Obj"
+    obj = newclass ['Getopt';'Obj']
     addattribute obj, "Specs"
     addattribute obj, "notOptStop"
 
-    spec = newclass "Getopt::Obj::Spec"
+    spec = newclass ['Getopt';'Obj';'Spec']
     addattribute spec, "name"
     addattribute spec, "long"
     addattribute spec, "short"
     addattribute spec, "type"
     addattribute spec, "optarg"
 
-    ns = get_hll_namespace ["Getopt::Obj"]
+    ns = get_hll_namespace ['Getopt';'Obj']
     $P0 = get_hll_namespace
     pns = $P0.'make_namespace'('Getopt')
     pns.'add_namespace'('Obj', ns)
-    ns = get_hll_namespace ["Getopt::Obj::Spec"]
+    ns = get_hll_namespace ['Getopt';'Obj';'Spec']
     pns = get_hll_namespace ['Getopt';'Obj']
     pns.'add_namespace'('Spec', ns)
 .end
@@ -101,7 +101,7 @@
 
 =cut
 
-.namespace ["Getopt::Obj"]
+.namespace ['Getopt';'Obj']
 
 =item C<init()>
 
@@ -462,7 +462,7 @@
 
 .sub "add" :method
     .local pmc spec, specs
-    spec = new "Getopt::Obj::Spec"
+    spec = new ['Getopt';'Obj';'Spec']
     specs = getattribute self, "Specs"
     push specs, spec
     .return(spec)
@@ -568,14 +568,14 @@
 
 =head2 Class Getopt::Obj::Spec
 
-Internal use only, at least don't do any new "Getopt::Obj::Spec" yourself...
+Internal use only, at least don't do any C<new ['Getopt';'Obj';'Spec'> yourself...
 This makes an easy holder for each possible match.
 
 =over 4
 
 =cut
 
-.namespace ["Getopt::Obj::Spec"]
+.namespace ['Getopt';'Obj';'Spec']
 
 =item C<init()>
 

Added: branches/gc_encapsulate/runtime/parrot/library/Rules.mak
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gc_encapsulate/runtime/parrot/library/Rules.mak	Thu Jan 28 09:35:26 2010	(r43633)
@@ -0,0 +1,23 @@
+# Track static dependencies 
+
+# XXX only a partial mapping.
+
+$(LIBRARY_DIR)/PGE/Hs.pbc : \
+    $(LIBRARY_DIR)/PGE.pbc
+
+$(LIBRARY_DIR)/PGE/Glob.pbc : \
+    $(LIBRARY_DIR)/PGE.pbc \
+    $(LIBRARY_DIR)/PGE/Dumper.pbc
+
+$(LIBRARY_DIR)/PGE/Perl6Grammar.pbc : \
+    $(LIBRARY_DIR)/PGE.pbc \
+    $(LIBRARY_DIR)/PGE/Text.pbc \
+    $(LIBRARY_DIR)/PGE/Util.pbc \
+    $(LIBRARY_DIR)/PCT/HLLCompiler.pbc
+
+$(LIBRARY_DIR)/Tcl/Glob.pbc : \
+    $(LIBRARY_DIR)/PGE.pbc \
+    $(LIBRARY_DIR)/PCT/HLLCompiler.pbc
+
+$(LIBRARY_DIR)/P6Object.pbc : \
+    $(LIBRARY_DIR)/dumper.pbc

Modified: branches/gc_encapsulate/runtime/parrot/library/distutils.pir
==============================================================================
--- branches/gc_encapsulate/runtime/parrot/library/distutils.pir	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/runtime/parrot/library/distutils.pir	Thu Jan 28 09:35:26 2010	(r43633)
@@ -880,11 +880,11 @@
     $S0 = config['gccversion']
     unless $S0 goto L1
     unless has_cflags goto L2
-    $I0 = index cflags, '-g '
+    $I0 = index cflags, '-g'
     unless $I0 < 0 goto L1
   L2:
     $S0 = config['cflags']
-    $I0 = index $S0, '-g '
+    $I0 = index $S0, '-g'
     unless $I0 < 0 goto L1
     .return (1)
   L1:

Modified: branches/gc_encapsulate/src/embed.c
==============================================================================
--- branches/gc_encapsulate/src/embed.c	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/embed.c	Thu Jan 28 09:35:26 2010	(r43633)
@@ -726,8 +726,7 @@
 set_current_sub(PARROT_INTERP)
 {
     ASSERT_ARGS(set_current_sub)
-    Parrot_Sub_attributes *sub_pmc_sub;
-    PMC        *sub_pmc;
+    PMC *sub_pmc;
 
     PackFile_ByteCode   * const cur_cs = interp->code;
     PackFile_FixupTable * const ft     = cur_cs->fixups;
@@ -761,11 +760,10 @@
         }
     }
 
-    /* if we didn't find anything, put a dummy PMC into current_sub */
-
+    /* If we didn't find anything, put a dummy PMC into current_sub.
+       The default values set by SUb.init are appropiate for the
+       dummy, don't need additional settings. */
     sub_pmc                      = pmc_new(interp, enum_class_Sub);
-    PMC_get_sub(interp, sub_pmc, sub_pmc_sub);
-    sub_pmc_sub->start_offs      = 0;
     Parrot_pcc_set_sub(interp, CURRENT_CONTEXT(interp), sub_pmc);
 
     return sub_pmc;

Modified: branches/gc_encapsulate/src/extend.c
==============================================================================
--- branches/gc_encapsulate/src/extend.c	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/extend.c	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1172,199 +1172,6 @@
 
 /*
 
-=item C<Parrot_Float Parrot_call_sub_ret_float(PARROT_INTERP, Parrot_PMC
-sub_pmc, const char *signature, ...)>
-
-Like C<Parrot_call_sub>, with Parrot_Float return result.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-Parrot_Float
-Parrot_call_sub_ret_float(PARROT_INTERP, Parrot_PMC sub_pmc,
-                 ARGIN(const char *signature), ...)
-{
-    ASSERT_ARGS(Parrot_call_sub_ret_float)
-    va_list         args;
-    PMC            *sig_object;
-    Parrot_Float    result;
-    char            return_sig  = signature[0];
-    const char     *arg_sig     = signature;
-    Parrot_sub     *sub;
-
-    arg_sig++;
-    va_start(args, signature);
-    sig_object = Parrot_pcc_build_sig_object_from_varargs(interp, PMCNULL, arg_sig, args);
-    va_end(args);
-
-    /* Add the return argument onto the call signature object (a bit
-     * hackish, added for backward compatibility in deprecated API function,
-     * see TT #1145). */
-    Parrot_pcc_append_result(interp, sig_object, Parrot_str_new_constant(interp, "N"), &result);
-    PMC_get_sub(interp, sub_pmc, sub);
-    Parrot_pcc_set_constants(interp, CURRENT_CONTEXT(interp), sub->seg->const_table->constants);
-    Parrot_pcc_invoke_from_sig_object(interp, sub_pmc, sig_object);
-
-    return result;
-}
-
-/*
-
-=item C<void * Parrot_call_method(PARROT_INTERP, Parrot_PMC sub_pmc, Parrot_PMC
-obj, Parrot_String method, const char *signature, ...)>
-
-Call the parrot subroutine C<sub> as a method on PMC object C<obj>. The method
-should have the name C<method> as a Parrot_string, and should have a function
-signature C<signature>. Any arguments to the method can be passed at the end
-as a variadic argument list.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-void *
-Parrot_call_method(PARROT_INTERP, Parrot_PMC sub_pmc, Parrot_PMC obj,
-                        Parrot_String method, ARGIN(const char *signature), ...)
-{
-    ASSERT_ARGS(Parrot_call_method)
-    va_list args;
-    PMC  *sig_object;
-    void *result = NULL;
-    char  return_sig = signature[0];
-    char *arg_sig = (char*)malloc(strlen(signature)+2);
-    Parrot_sub *sub;
-    arg_sig[0] = 'P';
-    arg_sig[1] = 'i';
-    arg_sig[2] = 0;
-    strcat(arg_sig, signature);
-
-    va_start(args, signature);
-    sig_object = Parrot_pcc_build_sig_object_from_varargs(interp, obj, arg_sig, args);
-    va_end(args);
-    free(arg_sig);
-
-    /* Add the return argument onto the call signature object (a bit
-     * hackish, added for backward compatibility in deprecated API function,
-     * see TT #1145). */
-    switch (return_sig) {
-        case 'v':
-        {
-            Parrot_String full_sig = VTABLE_get_string(interp, sig_object);
-            Parrot_str_concat(interp, full_sig,
-                    Parrot_str_new_constant(interp, "->"), 0);
-            break;
-        }
-        case 'V':
-        case 'P':
-        {
-            Parrot_pcc_append_result(interp, sig_object, Parrot_str_new_constant(interp, "P"),
-                    &result);
-            break;
-        }
-        default:
-            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
-                        "Dispatch: invalid return type %c!", return_sig);
-    }
-
-    PMC_get_sub(interp, sub_pmc, sub);
-    Parrot_pcc_set_constants(interp, CURRENT_CONTEXT(interp), sub->seg->const_table->constants);
-    Parrot_pcc_invoke_from_sig_object(interp, sub_pmc, sig_object);
-
-    return result;
-}
-
-/*
-
-=item C<Parrot_Int Parrot_call_method_ret_int(PARROT_INTERP, Parrot_PMC sub_pmc,
-Parrot_PMC obj, Parrot_String method, const char *signature, ...)>
-
-Call the parrot subroutine C<sub> as a method on PMC object C<obj>. The method
-should have the name C<method> as a Parrot_string, and should have a function
-signature C<signature>. Any arguments to the method can be passed at the end
-as a variadic argument list.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-Parrot_Int
-Parrot_call_method_ret_int(PARROT_INTERP, Parrot_PMC sub_pmc,
-        Parrot_PMC obj, Parrot_String method, ARGIN(const char *signature), ...)
-{
-    ASSERT_ARGS(Parrot_call_method_ret_int)
-    va_list args;
-    PMC  *sig_object;
-    Parrot_Int result = 0;
-    char  return_sig = signature[0];
-    char *arg_sig = (char*)malloc(strlen(signature)+2);
-    Parrot_sub *sub;
-    arg_sig[0] = 'P';
-    arg_sig[1] = 'i';
-    arg_sig[2] = 0;
-    strcat(arg_sig, signature);
-
-    va_start(args, signature);
-    sig_object = Parrot_pcc_build_sig_object_from_varargs(interp, obj, arg_sig, args);
-    va_end(args);
-    free(arg_sig);
-
-    Parrot_pcc_append_result(interp, sig_object, Parrot_str_new_constant(interp, "I"), &result);
-    PMC_get_sub(interp, sub_pmc, sub);
-    Parrot_pcc_set_constants(interp, CURRENT_CONTEXT(interp), sub->seg->const_table->constants);
-    Parrot_pcc_invoke_from_sig_object(interp, sub_pmc, sig_object);
-
-    return result;
-}
-
-/*
-
-=item C<Parrot_Float Parrot_call_method_ret_float(PARROT_INTERP, Parrot_PMC
-sub_pmc, Parrot_PMC obj, Parrot_String method, const char *signature, ...)>
-
-Call a parrot method for the given object.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-Parrot_Float
-Parrot_call_method_ret_float(PARROT_INTERP, Parrot_PMC sub_pmc,
-        Parrot_PMC obj, Parrot_String method, ARGIN(const char *signature), ...)
-{
-    ASSERT_ARGS(Parrot_call_method_ret_float)
-    va_list args;
-    PMC  *sig_object;
-    Parrot_Float result = 0.0;
-    char  return_sig = signature[0];
-    char *arg_sig = (char*)malloc(strlen(signature)+2);
-    Parrot_sub *sub;
-    arg_sig[0] = 'P';
-    arg_sig[1] = 'i';
-    arg_sig[2] = 0;
-    strcat(arg_sig, signature);
-
-    va_start(args, signature);
-    sig_object = Parrot_pcc_build_sig_object_from_varargs(interp, obj, arg_sig, args);
-    va_end(args);
-    free(arg_sig);
-
-    Parrot_pcc_append_result(interp, sig_object, Parrot_str_new_constant(interp, "N"), &result);
-    PMC_get_sub(interp, sub_pmc, sub);
-    Parrot_pcc_set_constants(interp, CURRENT_CONTEXT(interp), sub->seg->const_table->constants);
-    Parrot_pcc_invoke_from_sig_object(interp, sub_pmc, sig_object);
-
-    return result;
-}
-
-/*
-
 =item C<Parrot_Int Parrot_get_intreg(PARROT_INTERP, Parrot_Int regnum)>
 
 Return the value of an integer register.

Modified: branches/gc_encapsulate/src/frame_builder.h
==============================================================================
--- branches/gc_encapsulate/src/frame_builder.h	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/frame_builder.h	Thu Jan 28 09:35:26 2010	(r43633)
@@ -647,19 +647,19 @@
 #else /* NUMVAL_SIZE */
 
 #  define jit_emit_fload_m_n(interp, pc, address) \
-      emitm_fldt((pc), emit_None, emit_None, emit_None, (address))
+      emitm_fldt((interp), (pc), emit_None, emit_None, emit_None, (address))
 
 #  define jit_emit_fload_mb_n(interp, pc, base, offs) \
-      emitm_fldt((pc), (base), emit_None, 1, (offs))
+      emitm_fldt((interp), (pc), (base), emit_None, 1, (offs))
 
 #  define jit_emit_fstore_m_n(pc, address) \
-      emitm_fstpt((pc), emit_None, emit_None, emit_None, (address))
+      emitm_fstpt((interp), (pc), emit_None, emit_None, emit_None, (address))
 
 #  define jit_emit_fstore_mb_n(interp, pc, base, offs) \
-      emitm_fstpt((pc), (base), emit_None, 1, (offs))
+      emitm_fstpt((interp), (pc), (base), emit_None, 1, (offs))
 
 #  define jit_emit_fst_mb_n(interp, pc, base, offs) \
-      emitm_fstt((pc), (base), emit_None, 1, (offs))
+      emitm_fstt((interp), (pc), (base), emit_None, 1, (offs))
 
 #endif /* NUMVAL_SIZE */
 

Modified: branches/gc_encapsulate/src/hash.c
==============================================================================
--- branches/gc_encapsulate/src/hash.c	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/hash.c	Thu Jan 28 09:35:26 2010	(r43633)
@@ -555,7 +555,6 @@
 hash_thaw(PARROT_INTERP, ARGMOD(Hash *hash), ARGMOD(visit_info *info))
 {
     ASSERT_ARGS(hash_thaw)
-    IMAGE_IO * const io         = info->image_io;
 
     /* during thaw, info->extra is the key/value count */
     const size_t     num_entries = (size_t) hash->entries;
@@ -569,13 +568,13 @@
         switch (hash->key_type) {
           case Hash_key_type_STRING:
             {
-                STRING * const s_key = VTABLE_shift_string(interp, io);
+                STRING * const s_key = VTABLE_shift_string(interp, info);
                 b = parrot_hash_put(interp, hash, s_key, NULL);
             }
             break;
           case Hash_key_type_int:
             {
-                const INTVAL i_key = VTABLE_shift_integer(interp, io);
+                const INTVAL i_key = VTABLE_shift_integer(interp, info);
                 b = parrot_hash_put(interp, hash, (void*)i_key, NULL);
             }
             break;
@@ -588,15 +587,13 @@
         switch (hash->entry_type) {
           case enum_hash_pmc:
             {
-                /* this looks awful, but it avoids type-punning warnings */
-                void **ptr     = &b->value;
-                info->thaw_ptr = (PMC **)ptr;
-                (info->visit_pmc_now)(interp, NULL, info);
+                PMC *p   = VTABLE_shift_pmc(interp, info);
+                b->value = (void *)p;
                 break;
             }
           case enum_hash_int:
             {
-                const INTVAL i = VTABLE_shift_integer(interp, io);
+                const INTVAL i = VTABLE_shift_integer(interp, info);
                 b->value       = (void *)i;
                 break;
             }
@@ -629,7 +626,6 @@
 hash_freeze(PARROT_INTERP, ARGIN(const Hash * const hash), ARGMOD(visit_info *info))
 {
     ASSERT_ARGS(hash_freeze)
-    IMAGE_IO * const io = info->image_io;
     size_t           i;
 
     for (i = 0; i < hash->entries; i++) {
@@ -637,10 +633,10 @@
 
         switch (hash->key_type) {
           case Hash_key_type_STRING:
-            VTABLE_push_string(interp, io, (STRING *)b->key);
+            VTABLE_push_string(interp, info, (STRING *)b->key);
             break;
           case Hash_key_type_int:
-            VTABLE_push_integer(interp, io, (INTVAL)b->key);
+            VTABLE_push_integer(interp, info, (INTVAL)b->key);
             break;
           default:
             Parrot_ex_throw_from_c_args(interp, NULL, 1,
@@ -650,10 +646,10 @@
 
         switch (hash->entry_type) {
           case enum_hash_pmc:
-            (info->visit_pmc_now)(interp, (PMC *)b->value, info);
+            VTABLE_push_pmc(interp, info, (PMC *)b->value);
             break;
           case enum_hash_int:
-            VTABLE_push_integer(interp, io, (INTVAL)b->value);
+            VTABLE_push_integer(interp, info, (INTVAL)b->value);
             break;
           default:
             Parrot_ex_throw_from_c_args(interp, NULL, 1,
@@ -683,13 +679,11 @@
     ASSERT_ARGS(parrot_hash_visit)
     visit_info* const info = (visit_info*) pinfo;
 
-    switch (info->what) {
+    switch (VTABLE_get_integer(interp, info)) {
       case VISIT_THAW_NORMAL:
-      case VISIT_THAW_CONSTANTS:
         hash_thaw(interp, hash, info);
         break;
       case VISIT_FREEZE_NORMAL:
-      case VISIT_FREEZE_AT_DESTRUCT:
         hash_freeze(interp, hash, info);
         break;
       default:

Modified: branches/gc_encapsulate/src/io/buffer.c
==============================================================================
--- branches/gc_encapsulate/src/io/buffer.c	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/io/buffer.c	Thu Jan 28 09:35:26 2010	(r43633)
@@ -565,7 +565,6 @@
 Parrot_io_write_buffer(PARROT_INTERP, ARGMOD(PMC *filehandle), ARGIN(STRING *s))
 {
     ASSERT_ARGS(Parrot_io_write_buffer)
-    void          * const buffer       = s->strstart;
     unsigned char * const buffer_start = Parrot_io_get_buffer_start(interp, filehandle);
     unsigned char *       buffer_next  = Parrot_io_get_buffer_next(interp, filehandle);
     const size_t          buffer_size  = Parrot_io_get_buffer_size(interp, filehandle);
@@ -596,7 +595,7 @@
 
     if (Parrot_io_get_flags(interp, filehandle) & PIO_F_LINEBUF) {
         /* scan from end, it's likely that EOL is at end of string */
-        const char *p = (char*)buffer + len - 1;
+        const char *p = (char*)(s->strstart) + len - 1;
         size_t      i;
 
         for (i = 0; i < len; ++i, --p) {
@@ -633,7 +632,7 @@
         buffer_flags |= PIO_BF_WRITEBUF;
         Parrot_io_set_buffer_flags(interp, filehandle, buffer_flags);
 
-        memmove(buffer_next, buffer, len);
+        memmove(buffer_next, s->strstart, len);
         buffer_next += len;
         Parrot_io_set_buffer_next(interp, filehandle, buffer_next);
         Parrot_io_set_file_position(interp, filehandle, (len +
@@ -647,7 +646,7 @@
         Parrot_io_set_buffer_flags(interp, filehandle, buffer_flags);
 
         /* Fill remainder, flush, then try to buffer more */
-        memmove(buffer_next, buffer, avail);
+        memmove(buffer_next, s->strstart, avail);
         buffer_next += avail;
         Parrot_io_set_buffer_next(interp, filehandle, buffer_next);
         Parrot_io_set_file_position(interp, filehandle, (avail +
@@ -658,7 +657,7 @@
         Parrot_io_set_buffer_flags(interp, filehandle, buffer_flags);
 
         buffer_next = Parrot_io_get_buffer_next(interp, filehandle);
-        memmove(buffer_start, ((const char *)buffer + avail), diff);
+        memmove(buffer_start, (s->strstart + avail), diff);
 
         buffer_next += diff;
         Parrot_io_set_buffer_next(interp, filehandle, buffer_next);

Modified: branches/gc_encapsulate/src/list.c
==============================================================================
--- branches/gc_encapsulate/src/list.c	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/list.c	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1635,7 +1635,8 @@
 
 /*
 
-=item C<void Parrot_pmc_array_visit(PARROT_INTERP, List *list, void *pinfo)>
+=item C<void Parrot_pmc_array_visit(PARROT_INTERP, List *list, visit_info
+*info)>
 
 This is used by freeze/thaw to visit the contents of the list.
 
@@ -1647,11 +1648,10 @@
 
 PARROT_EXPORT
 void
-Parrot_pmc_array_visit(PARROT_INTERP, ARGIN(List *list), ARGMOD(void *pinfo))
+Parrot_pmc_array_visit(PARROT_INTERP, ARGIN(List *list), ARGMOD(visit_info *info))
 {
     ASSERT_ARGS(Parrot_pmc_array_visit)
     List_chunk        *chunk;
-    visit_info * const info = (visit_info*) pinfo;
     UINTVAL            idx;
 
     const UINTVAL n = Parrot_pmc_array_length(interp, list);
@@ -1662,9 +1662,7 @@
         if (!(chunk->flags & sparse)) {
             UINTVAL i;
             for (i = 0; i < chunk->items && idx < n; i++, idx++) {
-                PMC ** const pos = ((PMC **) Buffer_bufstart(&chunk->data)) + i;
-                info->thaw_ptr   = pos;
-                (info->visit_pmc_now)(interp, *pos, info);
+                VISIT_PMC(interp, info, ((PMC **)Buffer_bufstart(&chunk->data))[i]);
             }
         }
         /*

Modified: branches/gc_encapsulate/src/nci_test.c
==============================================================================
--- branches/gc_encapsulate/src/nci_test.c	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/nci_test.c	Thu Jan 28 09:35:26 2010	(r43633)
@@ -99,7 +99,7 @@
 PARROT_DYNEXT_EXPORT char * nci_t(void);
 PARROT_DYNEXT_EXPORT char * nci_tb(void *);
 PARROT_DYNEXT_EXPORT char * nci_tB(void **);
-PARROT_DYNEXT_EXPORT char * nci_tt(void *);
+PARROT_DYNEXT_EXPORT char * nci_tt(char *);
 PARROT_DYNEXT_EXPORT void   nci_v(void);
 PARROT_DYNEXT_EXPORT void   nci_vP(void *);
 PARROT_DYNEXT_EXPORT void   nci_vpii(Outer *, int, int);
@@ -150,8 +150,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT char
-nci_c(void)>
+=item C<PARROT_DYNEXT_EXPORT char nci_c(void)>
 
 Returns the value of the variable C<nci_dlvar_char>, which is set to 22 by
 default.
@@ -167,8 +166,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT char
-nci_csc(short l1, char l2)>
+=item C<PARROT_DYNEXT_EXPORT char nci_csc(short l1, char l2)>
 
 Multiplies C<l1> and C<l2> together and returns the first byte of the result.
 
@@ -184,8 +182,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT double
-nci_d(void)>
+=item C<PARROT_DYNEXT_EXPORT double nci_d(void)>
 
 Multiplies the current value of C<nci_dlvar_double> by 10.0, and returns
 the new value.
@@ -204,8 +201,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT double
-nci_dd(double d)>
+=item C<PARROT_DYNEXT_EXPORT double nci_dd(double d)>
 
 Returns the value C<d> multiplied by 2.0.
 
@@ -221,8 +217,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT float
-nci_f(void)>
+=item C<PARROT_DYNEXT_EXPORT float nci_f(void)>
 
 Multiplies the value C<nci_dlvar_float> by 10.0 and returns the new
 value.
@@ -241,8 +236,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT float
-nci_fff(float l1, float l2)>
+=item C<PARROT_DYNEXT_EXPORT float nci_fff(float l1, float l2)>
 
 Returns the result of C<l1> / C<l2>.
 
@@ -258,8 +252,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT int
-nci_i(void)>
+=item C<PARROT_DYNEXT_EXPORT int nci_i(void)>
 
 Returns the current value of <nci_dlvar_int>.
 
@@ -275,8 +268,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT int
-nci_isc(short l1, char l2)>
+=item C<PARROT_DYNEXT_EXPORT int nci_isc(short l1, char l2)>
 
 Returns the int product of C<l1 * l2>.
 
@@ -292,8 +284,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT int
-nci_ip(void *p)>
+=item C<PARROT_DYNEXT_EXPORT int nci_ip(void *p)>
 
 Performs a series of operations on values stored at pointer C<p>.
 
@@ -319,10 +310,9 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT int
-nci_it(void *p)>
+=item C<PARROT_DYNEXT_EXPORT int nci_it(void *p)>
 
-test calls this with a string
+Prints the first two characters in C<p>, in reversed order.  Returns 2.
 
 =cut
 
@@ -339,8 +329,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT long
-nci_l(void)>
+=item C<PARROT_DYNEXT_EXPORT long nci_l(void)>
 
 Returns the value of C<nci_dlvar_long>.
 
@@ -356,8 +345,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT int *
-nci_p(void)>
+=item C<PARROT_DYNEXT_EXPORT int * nci_p(void)>
 
 Returns the address of C<nci_dlvar_int>.
 
@@ -373,8 +361,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT char *
-nci_t(void)>
+=item C<PARROT_DYNEXT_EXPORT char * nci_t(void)>
 
 Returns the value of C<nci_dlvar_cstring>.
 
@@ -390,10 +377,9 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT char *
-nci_tb(void *p)>
+=item C<PARROT_DYNEXT_EXPORT char * nci_tb(void *p)>
 
-Prints "xx worked", where "xx" is replaced with the first two character values
+Returns "xx worked", where "xx" is replaced with the first two character values
 of C<p>, in reverse order.
 
 =cut
@@ -413,10 +399,9 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT char *
-nci_tt(void *p)>
+=item C<PARROT_DYNEXT_EXPORT char * nci_tt(char *p)>
 
-Prints "xx worked", where "xx" is replaced with the first two character values
+Returns "xx worked", where "xx" is replaced with the first two character values
 of C<p>, in reverse order.
 
 =cut
@@ -426,20 +411,19 @@
 static char s[] = "xx worked\n";
 
 PARROT_DYNEXT_EXPORT char *
-nci_tt(void *p)
+nci_tt(char *p)
 {
-    s[0] = ((char*) p)[1];
-    s[1] = ((char*) p)[0];
+    s[0] = p[1];
+    s[1] = p[0];
 
     return s;
 }
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT char *
-nci_tB(void **p)>
+=item C<PARROT_DYNEXT_EXPORT char * nci_tB(void **p)>
 
-Prints "xx done", where "xx" is replaced with the first two character values
+Returns "xx done", where "xx" is replaced with the first two character values
 of C<p>, in reverse order.
 
 =cut
@@ -459,8 +443,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT void *
-nci_pp(void *p)>
+=item C<PARROT_DYNEXT_EXPORT void * nci_pp(void *p)>
 
 Returns the value C<p> directly.
 
@@ -476,10 +459,10 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT int
-nci_iiii(int i1, int i2, int i3)>
+=item C<PARROT_DYNEXT_EXPORT int nci_iiii(int i1, int i2, int i3)>
 
 Prints three integers separated by whitespace to C<stderr>.
+Returns 2.
 
 =cut
 
@@ -496,8 +479,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT int
-nci_i4i(long * l, int i)>
+=item C<PARROT_DYNEXT_EXPORT int nci_i4i(long * l, int i)>
 
 Returns the product of C<*l> and C<i>, as an int.
 
@@ -514,8 +496,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT int
-nci_ii3(int a, int *bp)>
+=item C<PARROT_DYNEXT_EXPORT int nci_ii3(int a, int *bp)>
 
 Multiplies C<a> and C<*bp> together and returns the result. Updates C<*bp>
 to the value  4711.
@@ -535,8 +516,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT int
-call_back(const char *str)>
+=item C<PARROT_DYNEXT_EXPORT int call_back(const char *str)>
 
 writes the string C<str> to stdout and returns the value 4711.
 
@@ -555,8 +535,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT void *
-nci_pi(int test)>
+=item C<PARROT_DYNEXT_EXPORT void * nci_pi(int test)>
 
 Performs one from a series of tests, depending on the value given for C<test>.
 
@@ -704,8 +683,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT short
-nci_s(void)>
+=item C<PARROT_DYNEXT_EXPORT short nci_s(void)>
 
 Returns the value of C<nci_dlvar_short>.
 
@@ -721,8 +699,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT short
-nci_ssc(short l1, char l2)>
+=item C<PARROT_DYNEXT_EXPORT short nci_ssc(short l1, char l2)>
 
 Returns the product of C<l1 * l2>.
 
@@ -738,8 +715,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT void
-nci_vP(void *pmc)>
+=item C<PARROT_DYNEXT_EXPORT void nci_vP(void *pmc)>
 
 Prints "ok" if C<PMC> is not null, prints "got null" otherwise.
 
@@ -750,7 +726,8 @@
 PARROT_DYNEXT_EXPORT void
 nci_vP(void *pmc)
 {
-    /* Disable this test until someone figures a way to check for
+    /* TODO:
+     * Disable this test until someone figures a way to check for
      * PMCNULL without using libparrot.
     if (!PMC_IS_NULL(pmc))
         puts("ok");
@@ -774,8 +751,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT void
-nci_cb_C1(cb_C1_func cb, void* user_data)>
+=item C<PARROT_DYNEXT_EXPORT void nci_cb_C1(cb_C1_func cb, void* user_data)>
 
 Calls C<cb> function with the string "result" and the given C<user_data>.
 No return value.
@@ -796,10 +772,10 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT void
-nci_cb_C2(cb_C2_func cb, void* user_data)>
+=item C<PARROT_DYNEXT_EXPORT void nci_cb_C2(cb_C2_func cb, void* user_data)>
 
-Calls the function C<cb> with the pointer C<user_data>. No return value.
+Calls the function C<cb> with the integer 77 and the given C<user_data>.
+No return value.
 
 =cut
 
@@ -816,10 +792,10 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT void
-nci_cb_C3(cb_C3_func cb, void* user_data)>
+=item C<PARROT_DYNEXT_EXPORT void nci_cb_C3(cb_C3_func cb, void* user_data)>
 
-Calls function C<cb> with data C<user_data>. No return value.
+Calls function C<cb> with C<&int_cb_C3> and the givn C<user_data>.
+No return value.
 
 =cut
 
@@ -838,10 +814,10 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT void
-nci_cb_D1(cb_D1_func cb, void* user_data)>
+=item C<PARROT_DYNEXT_EXPORT void nci_cb_D1(cb_D1_func cb, void* user_data)>
 
-Calls function C<cb> with data C<user_data>. No return value.
+Calls function C<cb> with data C<user_data> and the string "succeeded".
+No return value.
 
 =cut
 
@@ -859,10 +835,10 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT void
-nci_cb_D2(cb_D2_func cb, void* user_data)>
+=item C<PARROT_DYNEXT_EXPORT void nci_cb_D2(cb_D2_func cb, void* user_data)>
 
-Calls function C<cb> with data C<user_data>.
+Calls function C<cb> with data C<user_data> and the integer 88.
+No return value.
 
 =cut
 
@@ -879,10 +855,10 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT void
-nci_cb_D3(cb_D3_func cb, void* user_data)>
+=item C<PARROT_DYNEXT_EXPORT void nci_cb_D3(cb_D3_func cb, void* user_data)>
 
-Calls function C<cb> with data C<user_data>.
+Calls function C<cb> with data C<user_data> and C<&int_cb_D3>.
+No return value.
 
 =cut
 
@@ -901,10 +877,12 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT void
-nci_cb_D4(cb_D4_func times_ten, void* user_data)>
+=item C<PARROT_DYNEXT_EXPORT void nci_cb_D4(cb_D4_func times_ten, void*
+user_data)>
 
-Calls function C<times_ten> with data C<user_data> 10 times in a loop.
+Calls function C<times_ten> with data C<user_data> and C<&int_cb_D4> 10 times
+in a loop, incrementing C<int_cb_D4> after every call.
+No return value.
 
 =cut
 
@@ -925,8 +903,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT void
-nci_pip(int count, Rect_Like *rects)>
+=item C<PARROT_DYNEXT_EXPORT void nci_pip(int count, Rect_Like *rects)>
 
 Prints a count integer and the coordinates of 4 rectangles.
 
@@ -946,10 +923,9 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT int
-nci_i33(int *double_me, int *triple_me)>
+=item C<PARROT_DYNEXT_EXPORT int nci_i33(int *double_me, int *triple_me)>
 
-Returns the result C<*double_me * 2 + *triple_me * 3>.
+Doubles C<double_me> and triples C<triple_me>. Returns their sum.
 
 =cut
 
@@ -966,8 +942,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT void
-nci_vpii(Outer *my_data, int my_x, int my_y)>
+=item C<PARROT_DYNEXT_EXPORT void nci_vpii(Outer *my_data, int my_x, int my_y)>
 
 Updates data in structure pointer C<my_data> with the given data C<my_x> and
 C<my_y>.
@@ -985,8 +960,8 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT void *
-nci_piiii(int alpha, int beta, int gamma, int delta)>
+=item C<PARROT_DYNEXT_EXPORT void * nci_piiii(int alpha, int beta, int gamma,
+int delta)>
 
 Stores 4 integer values into an array structure, and returns the address
 of that structure.
@@ -1019,8 +994,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT void *
-nci_pii(int fac1, int fac2)>
+=item C<PARROT_DYNEXT_EXPORT void * nci_pii(int fac1, int fac2)>
 
 Returns the address of global variable C<nci_dlvar_int> whose value is set
 to the product of C<fac1 * fac2>.
@@ -1039,8 +1013,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT void
-nci_v(void)>
+=item C<PARROT_DYNEXT_EXPORT void nci_v(void)>
 
 Multiplies the global variable C<nci_dlvar_int> times 10.
 
@@ -1056,8 +1029,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT void
-nci_vv(void)>
+=item C<PARROT_DYNEXT_EXPORT void nci_vv(void)>
 
 Multiplies the global variable C<nci_dlvar_int> by 3.
 
@@ -1073,8 +1045,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT void
-nci_vVi(Opaque**, int)>
+=item C<PARROT_DYNEXT_EXPORT void nci_vVi(Opaque **outOpaque, int x)>
 
 Test an NCI opaque struct out value.
 
@@ -1092,8 +1063,7 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT int
-nci_vp(Opaque*)>
+=item C<PARROT_DYNEXT_EXPORT void nci_vp(Opaque *inOpaque)>
 
 Test that a previously generated opaque struct gets passed back
 to an NCI function correctly.
@@ -1113,10 +1083,9 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT char *
-nci_ttt(void *p)>
+=item C<PARROT_DYNEXT_EXPORT char * nci_ttt(char *s1, char *s2)>
 
-Prints "s2, s1, s1d"
+Prints and returns "s2, s2, s1"
 
 =cut
 
@@ -1125,14 +1094,15 @@
 PARROT_DYNEXT_EXPORT char *
 nci_ttt(char *s1, char *s2)
 {
-    char* s = (char*) malloc(strlen(s2) + (2 * strlen(s1)) + 5);
+    char* s = (char*) malloc((2 * strlen(s2)) + strlen(s1) + 5);
     sprintf(s, "%s, %s, %s", s2, s2, s1);
     printf("%s\n", s);
     return s;
 }
 
 
-static void validate_float(float f, double checkval) {
+static void
+validate_float(float f, double checkval) {
     int valid;
     double error_ratio;
     error_ratio = (((double)f) - checkval) / checkval;
@@ -1142,10 +1112,10 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT float
-nci_fff(float l1, float l2)>
+=item C<PARROT_DYNEXT_EXPORT void nci_vfff(float l1, float l2, float l3)>
 
-Returns the result of C<l1> / C<l2>.
+Checks that C<[ l1, l2, l3 ]> = C<[ 3456.54, 10.1999, 14245.567 ]> within an
+error of 0.01.
 
 =cut
 
@@ -1162,10 +1132,9 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT float
-nci_fff(float l1, float l2)>
+=item C<PARROT_DYNEXT_EXPORT void nci_vV(const char **ptr)>
 
-Returns the result of C<l1> / C<l2>.
+Sets C<*ptr> to "Hello bright new world\n".
 
 =cut
 
@@ -1179,10 +1148,11 @@
 
 /*
 
-=item C<PARROT_DYNEXT_EXPORT float
-nci_fff(float l1, float l2)>
+=item C<PARROT_DYNEXT_EXPORT void nci_vVVV(const char **ptr1, const char **ptr2,
+const char **ptr3)>
 
-Returns the result of C<l1> / C<l2>.
+Sets C<*ptr1> to "Hello bright new world!\n", C<*ptr2> to "It is a beautiful
+day!\n", and C<*ptr3> to "Go suck a lemon.\n".
 
 =cut
 
@@ -1203,8 +1173,7 @@
 
 /*
 
-=item C<int
-main(void)>
+=item C<int main(void)>
 
 Calls test functions C<nci_ssc> and C<nci_fff> and prints their results.
 

Modified: branches/gc_encapsulate/src/packfile.c
==============================================================================
--- branches/gc_encapsulate/src/packfile.c	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/packfile.c	Thu Jan 28 09:35:26 2010	(r43633)
@@ -981,6 +981,13 @@
     PackFile        * const pf  = self;
 #endif
 
+    if (packed_size < PACKFILE_HEADER_BYTES) {
+        Parrot_io_eprintf(NULL, "PackFile_unpack: "
+            "Buffer length %d is shorter than PACKFILE_HEADER_BYTES %d\n",
+            packed_size, PACKFILE_HEADER_BYTES);
+        return 0;
+    }
+
     self->src  = packed;
     self->size = packed_size;
 
@@ -1045,13 +1052,21 @@
         /* No UUID; fine, nothing more to do. */
     }
     else if (header->uuid_type == 1) {
+        if (packed_size < (size_t) PACKFILE_HEADER_BYTES + header->uuid_size) {
+            Parrot_io_eprintf(NULL, "PackFile_unpack: "
+                    "Buffer length %d is shorter than PACKFILE_HEADER_BYTES + uuid_size %d\n",
+                    packed_size, PACKFILE_HEADER_BYTES + header->uuid_size);
+            return 0;
+        }
+
+
         /* Read in the UUID. We'll put it in a NULL-terminated string, just in
          * case people use it that way. */
         header->uuid_data = (unsigned char *)
             mem_sys_allocate(header->uuid_size + 1);
 
         memcpy(header->uuid_data, packed + PACKFILE_HEADER_BYTES,
-            header->uuid_size);
+                header->uuid_size);
 
         /* NULL terminate */
         header->uuid_data[header->uuid_size] = '\0';
@@ -1072,6 +1087,9 @@
     /* Set what transforms we need to do when reading the rest of the file. */
     PackFile_assign_transforms(self);
 
+    if (self->options & PFOPT_PMC_FREEZE_ONLY)
+        return cursor - packed;
+
     /* Directory format. */
     header->dir_format = PF_fetch_opcode(self, &cursor);
 

Modified: branches/gc_encapsulate/src/pmc/array.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/array.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/array.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1184,9 +1184,8 @@
 */
 
     VTABLE void freeze(visit_info *info) {
-        IMAGE_IO * const io = info->image_io;
         SUPER(info);
-        VTABLE_push_integer(INTERP, io, VTABLE_elements(INTERP, SELF));
+        VTABLE_push_integer(INTERP, info, VTABLE_elements(INTERP, SELF));
     }
 
 /*
@@ -1200,13 +1199,9 @@
 */
 
     VTABLE void thaw(visit_info *info) {
-        IMAGE_IO * const io = info->image_io;
-
         SUPER(info);
-        if (info->extra_flags == EXTRA_IS_NULL) {
-            SELF.set_integer_native(VTABLE_shift_integer(INTERP, io));
+        SELF.set_integer_native(VTABLE_shift_integer(INTERP, info));
     }
-}
 
 /*
 

Modified: branches/gc_encapsulate/src/pmc/class.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/class.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/class.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1432,38 +1432,23 @@
 */
 
     VTABLE void visit(visit_info *info) {
-        Parrot_Class_attributes * const class_data = PARROT_CLASS(SELF);
-        PMC **pos;
-
         /* 1) visit the attribute description hash */
-        pos            = &class_data->attrib_metadata;
-        info->thaw_ptr = pos;
-        (info->visit_pmc_now)(INTERP, *pos, info);
+        VISIT_PMC_ATTR(INTERP, info, SELF, Class, attrib_metadata);
 
         /* 2) visit list of parents */
-        pos            = &class_data->parents;
-        info->thaw_ptr = pos;
-        (info->visit_pmc_now)(INTERP, *pos, info);
+        VISIT_PMC_ATTR(INTERP, info, SELF, Class, parents);
 
         /* 3) visit list of roles */
-        pos            = &class_data->roles;
-        info->thaw_ptr = pos;
-        (info->visit_pmc_now)(INTERP, *pos, info);
+        VISIT_PMC_ATTR(INTERP, info, SELF, Class, roles);
 
         /* 4) visit hash of methods */
-        pos            = &class_data->methods;
-        info->thaw_ptr = pos;
-        (info->visit_pmc_now)(INTERP, *pos, info);
+        VISIT_PMC_ATTR(INTERP, info, SELF, Class, methods);
 
         /* 5) visit hash of vtable overrides */
-        pos            = &class_data->vtable_overrides;
-        info->thaw_ptr = pos;
-        (info->visit_pmc_now)(INTERP, *pos, info);
+        VISIT_PMC_ATTR(INTERP, info, SELF, Class, vtable_overrides);
 
         /* 6) visit list of resolve methods */
-        pos            = &class_data->resolve_method;
-        info->thaw_ptr = pos;
-        (info->visit_pmc_now)(INTERP, *pos, info);
+        VISIT_PMC_ATTR(INTERP, info, SELF, Class, resolve_method);
     }
 
 /*
@@ -1477,15 +1462,14 @@
 */
 
     VTABLE void freeze(visit_info *info) {
-        IMAGE_IO     * const io         = info->image_io;
         Parrot_Class_attributes * const class_data = PARROT_CLASS(SELF);
         STRING       *serial_namespace = CONST_STRING(interp, "");
 
         /* 1) freeze class id */
-        VTABLE_push_integer(INTERP, io, class_data->id);
+        VTABLE_push_integer(INTERP, info, class_data->id);
 
         /* 2) freeze class name */
-        VTABLE_push_string(INTERP, io, class_data->name);
+        VTABLE_push_string(INTERP, info, class_data->name);
 
         /* 3) serialize namespace name, including HLL */
         if (!PMC_IS_NULL(class_data->_namespace)) {
@@ -1494,7 +1478,7 @@
             if (!PMC_IS_NULL(names))
                 serial_namespace = Parrot_str_join(interp, CONST_STRING(interp, ";"), names);
         }
-        VTABLE_push_string(INTERP, io, serial_namespace);
+        VTABLE_push_string(INTERP, info, serial_namespace);
     }
 
 /*
@@ -1512,46 +1496,39 @@
          * anonymous class and later decide whether to link it into the
          * namespace.  */
 
-        if (info->extra_flags == EXTRA_IS_PROP_HASH) {
-            SUPER(info);
-        }
-        else if (info->extra_flags == EXTRA_IS_NULL) {
-            IMAGE_IO * const io = info->image_io;
-
-            /* 1) thaw class id */
-            const INTVAL id = VTABLE_shift_integer(INTERP, io);
+        /* 1) thaw class id */
+        const INTVAL id = VTABLE_shift_integer(INTERP, info);
 
-            /* 2) thaw class name */
-            STRING * const name = VTABLE_shift_string(INTERP, io);
+        /* 2) thaw class name */
+        STRING * const name = VTABLE_shift_string(INTERP, info);
 
-            /* 3) deserialize namespace name, including HLL */
-            STRING * const serial_namespace = VTABLE_shift_string(INTERP, io);
-            STRING * const semicolon_str = CONST_STRING(INTERP, ";");
-            PMC    * const namespace_array =
-                Parrot_str_split(INTERP, semicolon_str, serial_namespace);
-            PMC *ns = Parrot_get_namespace_keyed(interp,
+        /* 3) deserialize namespace name, including HLL */
+        STRING * const serial_namespace = VTABLE_shift_string(INTERP, info);
+        STRING * const semicolon_str = CONST_STRING(INTERP, ";");
+        PMC    * const namespace_array =
+            Parrot_str_split(INTERP, semicolon_str, serial_namespace);
+        PMC *ns = Parrot_get_namespace_keyed(interp,
+                INTERP->root_namespace, namespace_array);
+
+        /* If the namespace doesn't exist, we create it, and initialize
+         * ourselves in it */
+        if (PMC_IS_NULL(ns)) {
+            ns = Parrot_make_namespace_keyed(interp,
                     INTERP->root_namespace, namespace_array);
+            SELF.init_pmc(ns);
+        }
+        /* If the namespace exists already, we point to it, but otherwise
+         * act as an anonymous class. */
+        else {
+            SELF.init();
+            PARROT_CLASS(SELF)->_namespace = ns;
+        }
 
-            /* If the namespace doesn't exist, we create it, and initialize
-             * ourselves in it */
-            if (PMC_IS_NULL(ns)) {
-                ns = Parrot_make_namespace_keyed(interp,
-                        INTERP->root_namespace, namespace_array);
-                SELF.init_pmc(ns);
-            }
-            /* If the namespace exists already, we point to it, but otherwise
-             * act as an anonymous class. */
-            else {
-                SELF.init();
-                PARROT_CLASS(SELF)->_namespace = ns;
-            }
-
-            /* Set the class's short name to the frozen name */
-            PARROT_CLASS(SELF)->name = name;
+        /* Set the class's short name to the frozen name */
+        PARROT_CLASS(SELF)->name = name;
 
-            /* Set the class's id the frozen id */
-            PARROT_CLASS(SELF)->id = id;
-        }
+        /* Set the class's id the frozen id */
+        PARROT_CLASS(SELF)->id = id;
     }
 
 /*

Modified: branches/gc_encapsulate/src/pmc/continuation.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/continuation.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/continuation.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -64,14 +64,14 @@
 */
 
     VTABLE void init() {
-        Parrot_Continuation_attributes * const attrs = PARROT_CONTINUATION(SELF);
+        PMC * const to_ctx = CURRENT_CONTEXT(INTERP);
 
-        attrs->to_ctx           = CURRENT_CONTEXT(interp);
-        attrs->to_call_object   = Parrot_pcc_get_signature(INTERP, attrs->to_ctx);
-        attrs->from_ctx         = CURRENT_CONTEXT(interp);
-        attrs->runloop_id       = 0;
-        attrs->seg              = interp->code;
-        attrs->address          = NULL;
+        SET_ATTR_to_ctx(INTERP, SELF, to_ctx);
+        SET_ATTR_to_call_object(INTERP, SELF, Parrot_pcc_get_signature(INTERP, to_ctx));
+        SET_ATTR_from_ctx(INTERP, SELF, CURRENT_CONTEXT(INTERP));
+        SET_ATTR_runloop_id(INTERP, SELF, 0);
+        SET_ATTR_seg(INTERP, SELF, INTERP->code);
+        SET_ATTR_address(INTERP, SELF, NULL);
 
         PObj_custom_mark_SET(SELF);
 
@@ -87,15 +87,22 @@
 
     /*if they pass in a PMC to initialize with*/
     VTABLE void init_pmc(PMC *values) {
-        Parrot_Continuation_attributes * const attrs  = PARROT_CONTINUATION(SELF);
-        Parrot_Continuation_attributes * const theirs = PARROT_CONTINUATION(values);
+        PMC               *to_ctx;
+        opcode_t          *address;
+        PackFile_ByteCode *seg;
+
+        GET_ATTR_to_ctx(INTERP, values, to_ctx);
+        SET_ATTR_to_ctx(INTERP, SELF, to_ctx);
+        SET_ATTR_to_call_object(INTERP, SELF, Parrot_pcc_get_signature(INTERP, to_ctx));
 
-        attrs->to_ctx           = theirs->to_ctx;
-        attrs->to_call_object   = Parrot_pcc_get_signature(INTERP, attrs->to_ctx);
-        attrs->from_ctx         = CURRENT_CONTEXT(interp);
-        attrs->runloop_id       = 0;
-        attrs->seg              = theirs->seg;
-        attrs->address          = theirs->address;
+        SET_ATTR_from_ctx(INTERP, SELF, CURRENT_CONTEXT(INTERP));
+        SET_ATTR_runloop_id(INTERP, SELF, 0);
+
+        GET_ATTR_seg(INTERP, values, seg);
+        SET_ATTR_seg(INTERP, SELF, seg);
+
+        GET_ATTR_address(INTERP, values, address);
+        SET_ATTR_address(INTERP, SELF, address);
 
         PObj_custom_mark_SET(SELF);
 
@@ -122,15 +129,20 @@
 */
 
     VTABLE void mark() {
-        Parrot_Continuation_attributes * const cc = PARROT_CONTINUATION(SELF);
+        PMC *tmp;
 
         /* If Continuation wasn't fully constructed yet */
-        if (!cc)
+        if (!PMC_data(SELF))
             return;
 
-        Parrot_gc_mark_PMC_alive(INTERP, cc->to_ctx);
-        Parrot_gc_mark_PMC_alive(INTERP, cc->to_call_object);
-        Parrot_gc_mark_PMC_alive(INTERP, cc->from_ctx);
+        GET_ATTR_to_ctx(INTERP, SELF, tmp);
+        Parrot_gc_mark_PMC_alive(INTERP, tmp);
+
+        GET_ATTR_to_call_object(INTERP, SELF, tmp);
+        Parrot_gc_mark_PMC_alive(INTERP, tmp);
+
+        GET_ATTR_from_ctx(INTERP, SELF, tmp);
+        Parrot_gc_mark_PMC_alive(INTERP, tmp);
     }
 
 /*
@@ -145,9 +157,7 @@
 
     VTABLE PMC *clone() {
         /* Start to prepare for subclassable continuations */
-        INTVAL type = SELF->vtable->base_type;
-        PMC * ret = pmc_new_init(interp, type, SELF);
-        return ret;
+        return pmc_new_init(INTERP, SELF->vtable->base_type, SELF);
     }
 
 /*
@@ -160,10 +170,8 @@
 
 */
     VTABLE void set_pmc(PMC *src) {
-        Parrot_Continuation_attributes * const cc_self = PARROT_CONTINUATION(SELF);
-        Parrot_Continuation_attributes * const cc_src  = PARROT_CONTINUATION(src);
-
-        STRUCT_COPY(cc_self, cc_src);
+        STRUCT_COPY((Parrot_Continuation_attributes *)PMC_data(SELF),
+                (Parrot_Continuation_attributes *)PMC_data(src));
     }
 /*
 
@@ -177,11 +185,8 @@
 */
 
     VTABLE void set_pointer(void *value) {
-        opcode_t                       * const pos = (opcode_t *)value;
-        Parrot_Continuation_attributes * const cc  = PARROT_CONTINUATION(SELF);
-
-        cc->address    = pos;
-        cc->runloop_id = INTERP->current_runloop_id;
+        SET_ATTR_address(INTERP, SELF, (opcode_t *)value);
+        SET_ATTR_runloop_id(INTERP, SELF, INTERP->current_runloop_id);
     }
 
 /*
@@ -195,7 +200,11 @@
 */
 
     VTABLE void *get_pointer() {
-        return PARROT_CONTINUATION(SELF)->address;
+        opcode_t          *address;
+
+        GET_ATTR_address(INTERP, SELF, address);
+
+        return address;
     }
 
 /*
@@ -211,11 +220,19 @@
 */
 
     VTABLE INTVAL defined() {
-        return PARROT_CONTINUATION(SELF)->address != NULL;
+        opcode_t          *address;
+
+        GET_ATTR_address(INTERP, SELF, address);
+
+        return address != NULL;
     }
 
     VTABLE INTVAL get_bool() {
-        return PARROT_CONTINUATION(SELF)->address != NULL;
+        opcode_t          *address;
+
+        GET_ATTR_address(INTERP, SELF, address);
+
+        return address != NULL;
     }
 
 /*
@@ -230,19 +247,22 @@
 */
 
     VTABLE opcode_t *invoke(void *next) {
-        Parrot_Continuation_attributes * const cc = PARROT_CONTINUATION(SELF);
-        PMC      *from_ctx = CURRENT_CONTEXT(interp);
-        PMC      *to_ctx   = cc->to_ctx;
-        opcode_t *pc       = cc->address;
-        PMC      *call_obj = cc->to_call_object;
-        PMC      *from_obj = Parrot_pcc_get_signature(interp, from_ctx);
+        PMC * const        from_obj = Parrot_pcc_get_signature(INTERP, CURRENT_CONTEXT(INTERP));
+        PMC               *to_ctx, *call_obj;
+        opcode_t          *pc;
+        PackFile_ByteCode *seg;
         UNUSED(next)
 
-        Parrot_continuation_check(interp, SELF);
-        Parrot_continuation_rewind_environment(interp, SELF);
+        GET_ATTR_seg(INTERP, SELF, seg);
+        GET_ATTR_address(INTERP, SELF, pc);
+        GET_ATTR_to_ctx(INTERP, SELF, to_ctx);
+        GET_ATTR_to_call_object(INTERP, SELF, call_obj);
+
+        Parrot_continuation_check(INTERP, SELF);
+        Parrot_continuation_rewind_environment(INTERP, SELF);
 
         if (!PMC_IS_NULL(from_obj)) {
-            STRING *string_sig = VTABLE_get_string(INTERP, from_obj);
+            STRING * const string_sig = VTABLE_get_string(INTERP, from_obj);
             /* If there is no string - there is no args */
             if (string_sig) {
                 PMC *raw_sig, *invalid_sig;
@@ -253,13 +273,13 @@
                     call_obj = Parrot_pcc_build_sig_object_returns_from_op(INTERP, call_obj,
                         Parrot_pcc_get_pmc_constant(INTERP, to_ctx, pc[1]), pc);
 
-                Parrot_pcc_fill_returns_from_continuation(interp, call_obj, raw_sig, from_obj);
+                Parrot_pcc_fill_returns_from_continuation(INTERP, call_obj, raw_sig, from_obj);
             }
         }
 
         /* switch segment */
-        if (INTERP->code != cc->seg)
-            Parrot_switch_to_cs(INTERP, cc->seg, 1);
+        if (INTERP->code != seg)
+            Parrot_switch_to_cs(INTERP, seg, 1);
 
         return pc;
     }
@@ -275,7 +295,11 @@
 */
 
     VTABLE STRING *get_string() {
-        return Parrot_Context_infostr(INTERP, PARROT_CONTINUATION(SELF)->to_ctx);
+        PMC *to_ctx;
+
+        GET_ATTR_to_ctx(INTERP, SELF, to_ctx);
+
+        return Parrot_Context_infostr(INTERP, to_ctx);
     }
 
 /*
@@ -289,8 +313,11 @@
 */
 
     METHOD caller() {
-        Parrot_Continuation_attributes * const cc = PARROT_CONTINUATION(SELF);
-        PMC *caller = Parrot_pcc_get_sub(interp, cc->to_ctx);
+        PMC *to_ctx, *caller;
+
+        GET_ATTR_to_ctx(INTERP, SELF, to_ctx);
+
+        caller = Parrot_pcc_get_sub(INTERP, to_ctx);
 
         if (!caller)
             caller = PMCNULL;
@@ -315,8 +342,11 @@
 */
 
     METHOD continuation() {
-        Parrot_Continuation_attributes * const cc = PARROT_CONTINUATION(SELF);
-        PMC * const cont = Parrot_pcc_get_continuation(interp, cc->to_ctx);
+        PMC *to_ctx, *cont;
+
+        GET_ATTR_to_ctx(INTERP, SELF, to_ctx);
+
+        cont = Parrot_pcc_get_continuation(INTERP, to_ctx);
 
         if (cont)
             RETURN(PMC *cont);

Modified: branches/gc_encapsulate/src/pmc/coroutine.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/coroutine.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/coroutine.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -35,21 +35,23 @@
 static void
 print_sub_name(PARROT_INTERP, PMC *sub_pmc)
 {
-    /* It's actually a Parrot_coro, but this avoids casting warnings. */
-    Parrot_Sub_attributes *co = PARROT_SUB(sub_pmc);
-    Interp      * const tracer = (interp->pdb && interp->pdb->debugger) ?
-        interp->pdb->debugger :
-        interp;
+    /* It's actually a Parrot_coroutine, but this avoids casting warnings. */
+    PMC           *ctx;
+    Interp * const tracer = (interp->pdb && interp->pdb->debugger) ?
+            interp->pdb->debugger :
+            interp;
 
-    Parrot_io_eprintf(tracer, "# %s coro '%Ss'",
+    GETATTR_Coroutine_ctx(interp, sub_pmc, ctx);
+
+    Parrot_io_eprintf(tracer, "# %s coroutine '%Ss'",
         !(PObj_get_FLAGS(sub_pmc) & SUB_FLAG_CORO_FF) ?
         "Calling" : "yielding from",
         Parrot_full_sub_name(interp, sub_pmc));
 
-    if (co->ctx && (PObj_get_FLAGS(sub_pmc) & SUB_FLAG_CORO_FF)) {
+    if (ctx && (PObj_get_FLAGS(sub_pmc) & SUB_FLAG_CORO_FF)) {
         Parrot_io_eprintf(tracer, " to '%Ss'",
                 Parrot_full_sub_name(interp,
-                    Parrot_pcc_get_sub(interp, Parrot_pcc_get_caller_ctx(interp, co->ctx))));
+                    Parrot_pcc_get_sub(interp, Parrot_pcc_get_caller_ctx(interp, ctx))));
     }
 
     Parrot_io_eprintf(tracer, "\n# ");
@@ -57,9 +59,9 @@
 }
 
 pmclass Coroutine extends Sub auto_attrs {
+    ATTR INTVAL             yield;      /* yield in process */
+    ATTR opcode_t          *address;    /* next address to run - toggled each time */
     ATTR PackFile_ByteCode *caller_seg; /* bytecode segment */
-    ATTR opcode_t *address;             /* next address to run - toggled each time */
-    ATTR INTVAL yield;                  /* yield in process */
 
 /*
 
@@ -76,10 +78,8 @@
 */
 
     VTABLE void init() {
-        Parrot_Coroutine_attributes *attrs = PARROT_COROUTINE(SELF);
-
-        attrs->seg = INTERP->code;
-        attrs->ctx = PMCNULL;
+        SET_ATTR_seg(INTERP, SELF, INTERP->code);
+        SET_ATTR_ctx(INTERP, SELF, PMCNULL);
 
         PObj_custom_mark_destroy_SETALL(SELF);
     }
@@ -96,15 +96,17 @@
 */
 
     VTABLE PMC *clone() {
+        STRING     *name;
         PMC * const ret = pmc_new(INTERP, SELF->vtable->base_type);
-        Parrot_Coroutine_attributes * const sub      = PARROT_COROUTINE(SELF);
-        Parrot_Coroutine_attributes * const coro_sub = PARROT_COROUTINE(ret);
 
         PObj_custom_mark_destroy_SETALL(ret);
 
-        memcpy(coro_sub, sub, sizeof (Parrot_Coroutine_attributes));
+        memcpy((Parrot_Coroutine_attributes *)PMC_data(ret),
+                (Parrot_Coroutine_attributes *)PMC_data(SELF),
+                sizeof (Parrot_Coroutine_attributes));
 
-        coro_sub->name = Parrot_str_copy(INTERP, coro_sub->name);
+        GET_ATTR_name(INTERP, ret, name);
+        SET_ATTR_name(INTERP, ret, Parrot_str_copy(INTERP, name));
 
         return ret;
     }
@@ -134,92 +136,124 @@
 */
 
     VTABLE opcode_t *invoke(void *next) {
+        PMC               *ctx;
+        opcode_t          *dest;
         PackFile_ByteCode *wanted_seg;
-        Parrot_Coroutine_attributes * const co = PARROT_COROUTINE(SELF);
-        opcode_t * dest = co->address;
-        opcode_t * const next_op = (opcode_t *)next;
-
+        opcode_t * const   next_op = (opcode_t *)next;
+        
         if (Interp_trace_TEST(INTERP, PARROT_TRACE_SUB_CALL_FLAG))
             print_sub_name(INTERP, SELF);
 
-        if (PMC_IS_NULL(co->ctx)) {
-            PMC * const caller_ctx = CURRENT_CONTEXT(interp);
-            PMC *ctx;
-            PMC *ccont = INTERP->current_cont;
+        GET_ATTR_ctx(INTERP, SELF, ctx);
+
+        if (PMC_IS_NULL(ctx)) {
+            PackFile_ByteCode *seg;
+            size_t             start_offs;
+            const UINTVAL     *n_regs_used;
+            PMC               *lex_info;
+            PMC * const        caller_ctx = CURRENT_CONTEXT(INTERP);
+            PMC               *ctx        = Parrot_pcc_get_signature(INTERP, caller_ctx);
+            PMC               *ccont      = INTERP->current_cont;
 
             if (ccont == NEED_CONTINUATION)
-                ccont = (PMC *)new_ret_continuation_pmc(interp, next_op);
+                ccont = (PMC *)new_ret_continuation_pmc(INTERP, next_op);
 
             if (PObj_get_FLAGS(ccont) & SUB_FLAG_TAILCALL)
                 Parrot_ex_throw_from_c_args(INTERP, NULL, CONTROL_ERROR,
-                        "tail call to coro not allowed");
+                        "tail call to coroutine not allowed");
 
             /* first time set current sub, cont, object */
-            ctx = Parrot_pcc_get_signature(INTERP, caller_ctx);
             if (PMC_IS_NULL(ctx))
                 ctx = pmc_new(INTERP, enum_class_CallContext);
+
             CURRENT_CONTEXT(INTERP) = ctx;
-            Parrot_pcc_allocate_registers(INTERP, ctx, co->n_regs_used);
+
+            GET_ATTR_n_regs_used(INTERP, SELF, n_regs_used);
+            Parrot_pcc_allocate_registers(INTERP, ctx, n_regs_used);
             Parrot_pcc_set_caller_ctx(INTERP, ctx, caller_ctx);
             Parrot_pcc_init_context(INTERP, ctx, caller_ctx);
 
-            co->ctx = ctx;
+            SET_ATTR_ctx(INTERP, SELF, ctx);
+
+            SETATTR_Continuation_from_ctx(INTERP, ccont, ctx);
 
-            PARROT_CONTINUATION(ccont)->from_ctx = ctx;
             Parrot_pcc_set_sub(INTERP, ctx, SELF);
             Parrot_pcc_set_continuation(INTERP, ctx, ccont);
-            Parrot_pcc_set_object(interp, ctx, PMCNULL);
+            Parrot_pcc_set_object(INTERP, ctx, PMCNULL);
+
             INTERP->current_object = PMCNULL;
             INTERP->current_cont   = PMCNULL;
 
+            GET_ATTR_lex_info(INTERP, SELF, lex_info);
+
             /* create pad if needed */
-            if (!PMC_IS_NULL(co->lex_info)) {
-                const INTVAL hlltype = Parrot_get_ctx_HLL_type(interp, enum_class_LexPad);
-                PMC * const lexpad = pmc_new_init(INTERP, hlltype, co->lex_info);
+            if (!PMC_IS_NULL(lex_info)) {
+                const INTVAL hlltype = Parrot_get_ctx_HLL_type(INTERP, enum_class_LexPad);
+                PMC * const lexpad = pmc_new_init(INTERP, hlltype, lex_info);
                 Parrot_pcc_set_lex_pad(INTERP, ctx, lexpad);
                 VTABLE_set_pointer(INTERP, lexpad, ctx);
             }
 
+            GET_ATTR_seg(INTERP, SELF, seg);
             PObj_get_FLAGS(SELF) |= SUB_FLAG_CORO_FF;
-            wanted_seg            = co->seg;
-            co->caller_seg        = INTERP->code;
-            co->address           = co->seg->base.data + co->start_offs;
+            wanted_seg            = seg;
+
+            GET_ATTR_start_offs(INTERP, SELF, start_offs);
+            SET_ATTR_caller_seg(INTERP, SELF, INTERP->code);
+            SET_ATTR_address(INTERP, SELF, seg->base.data + start_offs);
         }
 
         /* if calling the Coro we need the segment of the Coro */
         else if (!(PObj_get_FLAGS(SELF) & SUB_FLAG_CORO_FF)) {
-            PMC * const ctx   = co->ctx;
-            PMC * const ccont = Parrot_pcc_get_continuation(INTERP, ctx);
+            PackFile_ByteCode *seg;
+            PMC               *ctx;
+            PMC               *ccont;
+
+            GET_ATTR_ctx(INTERP, SELF, ctx);
+            ccont = Parrot_pcc_get_continuation(INTERP, ctx);
 
             PObj_get_FLAGS(SELF) |= SUB_FLAG_CORO_FF;
-            wanted_seg            = co->seg;
+
+            GET_ATTR_seg(INTERP, SELF, seg);
+            wanted_seg            = seg;
 
             /* remember segment of caller */
-            co->caller_seg        = INTERP->code;
+            SET_ATTR_caller_seg(INTERP, SELF, INTERP->code);
+
+
 
             /* and the recent call context */
-            PARROT_CONTINUATION(ccont)->to_ctx = CURRENT_CONTEXT(interp);
-            Parrot_pcc_set_caller_ctx(interp, ctx, CURRENT_CONTEXT(interp));
+            SETATTR_Continuation_to_ctx(INTERP, ccont, CURRENT_CONTEXT(INTERP));
+            Parrot_pcc_set_caller_ctx(INTERP, ctx, CURRENT_CONTEXT(INTERP));
 
-            /* set context to coro context */
-            CURRENT_CONTEXT(interp) = ctx;
+            /* set context to coroutine context */
+            CURRENT_CONTEXT(INTERP) = ctx;
         }
         else {
-            PMC * const ccont = Parrot_pcc_get_continuation(INTERP, co->ctx);
-            PMC * const ctx   = PARROT_CONTINUATION(ccont)->to_ctx;
-            INTVAL yield;
+            INTVAL             yield;
+            PMC               *ccont, *ctx, *to_ctx;
+            PackFile_ByteCode *caller_seg;
+
             GET_ATTR_yield(INTERP, SELF, yield);
-            if (! yield)
+
+            if (!yield)
                 Parrot_ex_throw_from_c_args(INTERP, NULL, CONTROL_ERROR,
                                "Cannot resume dead coroutine.");
+
             SET_ATTR_yield(INTERP, SELF, 0);
 
+            GET_ATTR_ctx(INTERP, SELF, ctx);
+            ccont = Parrot_pcc_get_continuation(INTERP, ctx);
+
+            GETATTR_Continuation_to_ctx(INTERP, ccont, to_ctx);
+
             PObj_get_FLAGS(SELF) &= ~SUB_FLAG_CORO_FF;
-            /* switch back to last remembered code seg and context */
+            GET_ATTR_caller_seg(INTERP, SELF, caller_seg);
 
-            wanted_seg            = co->caller_seg;
+            /* switch back to last remembered code seg and context */
+            wanted_seg = caller_seg;
 
-            if (PMC_IS_NULL(ctx)) {
+            if (PMC_IS_NULL(to_ctx)) {
                 /* This still isn't quite right, but it beats segfaulting.  See
                    the "Call an exited coroutine" case in t/pmc/coroutine.t; the
                    problem is that the defunct coroutine yields up one more
@@ -230,12 +264,12 @@
                                "Cannot resume dead coroutine.");
             }
 
-            CURRENT_CONTEXT(interp) = ctx;
+            CURRENT_CONTEXT(INTERP) = to_ctx;
         }
 
         /* toggle address */
-        dest        = co->address;
-        co->address = (opcode_t *)next;
+        GET_ATTR_address(INTERP, SELF, dest);
+        SET_ATTR_address(INTERP, SELF, (opcode_t *)next);
 
         if (INTERP->code != wanted_seg)
             Parrot_switch_to_cs(INTERP, wanted_seg, 1);

Modified: branches/gc_encapsulate/src/pmc/default.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/default.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/default.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -370,10 +370,10 @@
 */
 
     VTABLE PMC *getprop(STRING *key) {
-        if (PMC_metadata(SELF))
-            return VTABLE_get_pmc_keyed_str(INTERP, PMC_metadata(SELF), key);
-        else
+        if (PMC_IS_NULL(PMC_metadata(SELF)))
             return check_get_std_props(interp, SELF, key);
+        else
+            return VTABLE_get_pmc_keyed_str(INTERP, PMC_metadata(SELF), key);
     }
 
 /*
@@ -390,13 +390,10 @@
         if (check_set_std_props(INTERP, SELF, key, value))
             return;
 
-        if (PMC_metadata(SELF))
-            VTABLE_set_pmc_keyed_str(INTERP, PMC_metadata(SELF), key, value);
-        else {
-            PMC * const prop = make_prop_hash(INTERP, SELF);
+        if (PMC_IS_NULL(PMC_metadata(SELF)))
+            make_prop_hash(INTERP, SELF);
 
-            VTABLE_set_pmc_keyed_str(INTERP, prop, key, value);
-        }
+        VTABLE_set_pmc_keyed_str(INTERP, PMC_metadata(SELF), key, value);
     }
 
 /*
@@ -410,7 +407,7 @@
 */
 
     VTABLE void delprop(STRING *key) {
-        if (PMC_metadata(SELF))
+        if (!PMC_IS_NULL(PMC_metadata(SELF)))
             VTABLE_delete_keyed_str(INTERP, PMC_metadata(SELF), key);
     }
 
@@ -425,7 +422,7 @@
 */
 
     VTABLE PMC *getprops() {
-        if (!PMC_metadata(SELF)) {
+        if (PMC_IS_NULL(PMC_metadata(SELF))) {
             if (has_pending_std_props(SELF))
                 return make_prop_hash(INTERP, SELF);
             else
@@ -1055,18 +1052,6 @@
 */
 
     VTABLE void visit(visit_info *info) {
-        /* default - mark prop hash */
-        if (PMC_metadata(SELF) &&
-            info->extra_flags != EXTRA_IS_PROP_HASH) {
-            info->extra_flags = EXTRA_IS_PROP_HASH;
-            info->extra       = PMC_metadata(SELF);
-
-            /* place escape mark */
-            (info->visit_pmc_now)(INTERP, SELF, info);
-
-            /* place and the prop hash */
-            (info->visit_pmc_now)(INTERP, PMC_metadata(SELF), info);
-        }
     }
 
 /*
@@ -1110,12 +1095,7 @@
 
     VTABLE void thaw(visit_info *info) {
         /* default - initialize the PMC */
-        if (info->extra_flags == EXTRA_IS_PROP_HASH) {
-            info->thaw_ptr  = &PMC_metadata(SELF);
-            (info->visit_pmc_now)(INTERP, PMC_metadata(SELF), info);
-        }
-        else
-            SELF.init();
+        SELF.init();
     }
 
 /*

Modified: branches/gc_encapsulate/src/pmc/eval.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/eval.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/eval.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -333,16 +333,14 @@
 */
 
     VTABLE void freeze(visit_info *info) {
-        IMAGE_IO *io     = info->image_io;
         STRING   *packed = SELF.get_string();
-        VTABLE_push_string(INTERP, io, packed);
+        VTABLE_push_string(INTERP, info, packed);
 
         SUPER(info);
     }
 
     VTABLE void thaw(visit_info *info) {
-        IMAGE_IO         *io     = info->image_io;
-        STRING           *packed = VTABLE_shift_string(INTERP, io);
+        STRING           *packed = VTABLE_shift_string(INTERP, info);
         PackFile         *pf;
         PackFile_Segment *seg;
         Parrot_Sub_attributes *sub;

Modified: branches/gc_encapsulate/src/pmc/fixedbooleanarray.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/fixedbooleanarray.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/fixedbooleanarray.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -516,7 +516,6 @@
     VTABLE void freeze(visit_info *info) {
         UINTVAL          size, resize_threshold;
         unsigned char  * bit_array;
-        IMAGE_IO * const io = info->image_io;
         STRING   *       s;
         GET_ATTR_size(INTERP, SELF, size);
         GET_ATTR_resize_threshold(INTERP, SELF, resize_threshold);
@@ -525,8 +524,8 @@
         s = Parrot_str_new(INTERP, (char*)bit_array,
                 (resize_threshold / BITS_PER_CHAR));
 
-        VTABLE_push_integer(INTERP, io, size);
-        VTABLE_push_string(INTERP, io, s);
+        VTABLE_push_integer(INTERP, info, size);
+        VTABLE_push_string(INTERP, info, s);
     }
 
 /*
@@ -539,14 +538,13 @@
 
 */
     VTABLE void thaw(visit_info *info) {
-        IMAGE_IO * const io = info->image_io;
         SUPER(info);
 
-        if (info->extra_flags == EXTRA_IS_NULL) {
+        {
             unsigned char * bit_array;
             UINTVAL         threshold;
-            const INTVAL    size      = VTABLE_shift_integer(INTERP, io);
-            STRING * const  s         = VTABLE_shift_string(INTERP, io);
+            const INTVAL    size      = VTABLE_shift_integer(INTERP, info);
+            STRING * const  s         = VTABLE_shift_string(INTERP, info);
 
             bit_array = (unsigned char *)Parrot_str_to_cstring(INTERP, s);
             threshold = Parrot_str_byte_length(interp, s) * BITS_PER_CHAR;

Modified: branches/gc_encapsulate/src/pmc/fixedintegerarray.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/fixedintegerarray.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/fixedintegerarray.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -560,43 +560,37 @@
     }*/
 
     VTABLE void freeze(visit_info *info) {
-        IMAGE_IO *io = info->image_io;
         INTVAL   *int_array;
         INTVAL    i, n;
 
         SUPER(info);
 
         GET_ATTR_size(INTERP, SELF, n);
-        VTABLE_push_integer(INTERP, io, n);
+        VTABLE_push_integer(INTERP, info, n);
         GET_ATTR_int_array(INTERP, SELF, int_array);
 
         for (i = 0; i < n; ++i)
-            VTABLE_push_integer(INTERP, io, int_array[i]);
+            VTABLE_push_integer(INTERP, info, int_array[i]);
     }
 
     VTABLE void thaw(visit_info *info) {
-        PObj_custom_destroy_SET(SELF);
+        INTVAL n;
 
-        if (info->extra_flags == EXTRA_IS_NULL) {
-            IMAGE_IO * const io = info->image_io;
-            const INTVAL n = VTABLE_shift_integer(INTERP, io);
+        SUPER(info);
 
-            SET_ATTR_size(INTERP, SELF, 0);
-            SET_ATTR_int_array(INTERP, SELF, NULL);
+        SET_ATTR_size(INTERP, SELF, 0);
+        SET_ATTR_int_array(INTERP, SELF, NULL);
 
-            if (n) {
-                INTVAL  i;
-                INTVAL *int_array;
+        if ((n = VTABLE_shift_integer(INTERP, info))) {
+            INTVAL  i;
+            INTVAL *int_array;
 
-                SELF.set_integer_native(n);
-                GET_ATTR_int_array(INTERP, SELF, int_array);
+            SELF.set_integer_native(n);
+            GET_ATTR_int_array(INTERP, SELF, int_array);
 
-                for (i = 0; i < n; ++i)
-                    int_array[i] = VTABLE_shift_integer(INTERP, io);
-            }
+            for (i = 0; i < n; ++i)
+                int_array[i] = VTABLE_shift_integer(INTERP, info);
         }
-        else
-            SUPER(info);
     }
 }
 

Modified: branches/gc_encapsulate/src/pmc/fixedpmcarray.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/fixedpmcarray.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/fixedpmcarray.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2001-2009, Parrot Foundation.
+Copyright (C) 2001-2010, Parrot Foundation.
 $Id$
 
 =head1 NAME
@@ -53,6 +53,7 @@
             else
                 Parrot_quicksort(interp, (void **)PMC_array(SELF), n, cmp_func);
         }
+        RETURN(PMC *SELF);
     }
 
 /*
@@ -721,16 +722,13 @@
     }
 
     VTABLE void freeze(visit_info *info) {
-        IMAGE_IO * const io = info->image_io;
         SUPER(info);
-        VTABLE_push_integer(INTERP, io, VTABLE_elements(INTERP, SELF));
+        VTABLE_push_integer(INTERP, info, VTABLE_elements(INTERP, SELF));
     }
 
     VTABLE void thaw(visit_info *info) {
-        IMAGE_IO * const io = info->image_io;
         SUPER(info);
-        if (info->extra_flags == EXTRA_IS_NULL)
-            SELF.set_integer_native(VTABLE_shift_integer(INTERP, io));
+        SELF.set_integer_native(VTABLE_shift_integer(INTERP, info));
     }
 
 /*

Modified: branches/gc_encapsulate/src/pmc/fixedstringarray.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/fixedstringarray.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/fixedstringarray.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -567,16 +567,15 @@
 
 */
     VTABLE void freeze(visit_info *info) {
-        IMAGE_IO * const   io  = info->image_io;
         STRING           **str_array;
         UINTVAL            size, i;
 
         GET_ATTR_size(INTERP, SELF, size);
         GET_ATTR_str_array(INTERP, SELF, str_array);
-        VTABLE_push_integer(INTERP, io, size);
+        VTABLE_push_integer(INTERP, info, size);
 
         for (i = 0; i < size; ++i)
-            VTABLE_push_string(INTERP, io, str_array[i]);
+            VTABLE_push_string(INTERP, info, str_array[i]);
     }
 
 /*
@@ -589,22 +588,18 @@
 
 */
     VTABLE void thaw(visit_info *info) {
-        IMAGE_IO * const io = info->image_io;
+        UINTVAL  i, size;
+        STRING **str_array;
+
+        SELF.init();
         SUPER(info);
 
-        if (info->extra_flags == EXTRA_IS_NULL) {
-            UINTVAL  i, size;
-            STRING **str_array;
-
-            SELF.init();
-
-            size   = VTABLE_shift_integer(INTERP, io);
-            SELF.set_integer_native((INTVAL)size);
-            GET_ATTR_str_array(INTERP, SELF, str_array);
-
-            for (i = 0; i < size; ++i)
-                str_array[i] = VTABLE_shift_string(INTERP, io);
-        }
+        size   = VTABLE_shift_integer(INTERP, info);
+        SELF.set_integer_native((INTVAL)size);
+        GET_ATTR_str_array(INTERP, SELF, str_array);
+
+        for (i = 0; i < size; ++i)
+            str_array[i] = VTABLE_shift_string(INTERP, info);
     }
 }
 

Modified: branches/gc_encapsulate/src/pmc/float.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/float.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/float.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -352,9 +352,8 @@
 
 */
     VTABLE void freeze(visit_info *info) {
-        IMAGE_IO * const io = info->image_io;
         SUPER(info);
-        VTABLE_push_float(INTERP, io, SELF.get_number());
+        VTABLE_push_float(INTERP, info, SELF.get_number());
     }
 
 /*
@@ -367,10 +366,8 @@
 
 */
     VTABLE void thaw(visit_info *info) {
-        IMAGE_IO * const io = info->image_io;
         SUPER(info);
-        if (info->extra_flags == EXTRA_IS_NULL)
-            SET_ATTR_fv(INTERP, SELF, VTABLE_shift_float(INTERP, io));
+        SET_ATTR_fv(INTERP, SELF, VTABLE_shift_float(INTERP, info));
     }
 /*
 

Modified: branches/gc_encapsulate/src/pmc/hash.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/hash.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/hash.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1102,13 +1102,12 @@
 */
 
     VTABLE void freeze(visit_info *info) {
-        IMAGE_IO * const io   = info->image_io;
         Hash     * const hash = (Hash *)SELF.get_pointer();;
 
         SUPER(info);
-        VTABLE_push_integer(INTERP, io, VTABLE_elements(INTERP, SELF));
-        VTABLE_push_integer(INTERP, io, (INTVAL)hash->key_type);
-        VTABLE_push_integer(INTERP, io, hash->entry_type);
+        VTABLE_push_integer(INTERP, info, VTABLE_elements(INTERP, SELF));
+        VTABLE_push_integer(INTERP, info, (INTVAL)hash->key_type);
+        VTABLE_push_integer(INTERP, info, hash->entry_type);
     }
 
 /*
@@ -1122,13 +1121,12 @@
 */
 
     VTABLE void thaw(visit_info *info) {
-        IMAGE_IO * const io = info->image_io;
-
         SUPER(info);
-        if (info->extra_flags == EXTRA_IS_NULL) {
-            const INTVAL elems  = VTABLE_shift_integer(INTERP, io);
-            const INTVAL k_type = VTABLE_shift_integer(INTERP, io);
-            const INTVAL v_type = VTABLE_shift_integer(INTERP, io);
+
+        {
+            const INTVAL elems  = VTABLE_shift_integer(INTERP, info);
+            const INTVAL k_type = VTABLE_shift_integer(INTERP, info);
+            const INTVAL v_type = VTABLE_shift_integer(INTERP, info);
             Hash        *hash;
 
             if (k_type == Hash_key_type_int && v_type == enum_hash_int) {

Modified: branches/gc_encapsulate/src/pmc/integer.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/integer.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/integer.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1312,9 +1312,8 @@
 
 */
     VTABLE void freeze(visit_info *info) {
-        IMAGE_IO * const io = info->image_io;
         SUPER(info);
-        VTABLE_push_integer(INTERP, io, SELF.get_integer());
+        VTABLE_push_integer(INTERP, info, SELF.get_integer());
     }
 
 
@@ -1328,10 +1327,8 @@
 
 */
     VTABLE void thaw(visit_info *info) {
-        IMAGE_IO * const io = info->image_io;
         SUPER(info);
-        if (info->extra_flags == EXTRA_IS_NULL)
-            SELF.set_integer_native(VTABLE_shift_integer(INTERP, io));
+        SELF.set_integer_native(VTABLE_shift_integer(INTERP, info));
     }
 }
 

Modified: branches/gc_encapsulate/src/pmc/key.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/key.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/key.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -304,43 +304,34 @@
 */
 
     VTABLE void visit(visit_info *info) {
-
-        Parrot_Key_attributes *attrs;
-        /* at end a PMCNULL is written during thaw, which should stop visiting
-         * the key */
-
         /* Sometimes visit gets an uninitialized Key.  Initialize it. */
         if (!PMC_data(SELF))
             SELF.init();
 
-        attrs = (Parrot_Key_attributes *)PMC_data(SELF);
-        info->thaw_ptr  = &attrs->next_key;
-        (info->visit_pmc_now)(INTERP, attrs->next_key, info);
+        VISIT_PMC_ATTR(INTERP, info, SELF, Key, next_key);
     }
 
     void freeze(visit_info *info) {
-        IMAGE_IO * const io = info->image_io;
-
         /* write flags */
         const INTVAL flags  = (PObj_get_FLAGS(SELF) & KEY_type_FLAGS);
 
         /* write the contents of a register - else thaw can't restore
          * the register state */
-        VTABLE_push_integer(INTERP, io, flags & ~KEY_register_FLAG);
+        VTABLE_push_integer(INTERP, info, flags & ~KEY_register_FLAG);
 
         /* and contents of this key component */
         switch (flags) {
           case KEY_integer_FLAG:
           case KEY_integer_FLAG | KEY_register_FLAG:
-            VTABLE_push_integer(INTERP, io, key_integer(INTERP, SELF));
+            VTABLE_push_integer(INTERP, info, key_integer(INTERP, SELF));
             break;
           case KEY_number_FLAG:
           case KEY_number_FLAG | KEY_register_FLAG:
-            VTABLE_push_float(INTERP, io, key_number(INTERP, SELF));
+            VTABLE_push_float(INTERP, info, key_number(INTERP, SELF));
             break;
           case KEY_string_FLAG:
           case KEY_string_FLAG | KEY_register_FLAG:
-            VTABLE_push_string(INTERP, io, key_string(INTERP, SELF));
+            VTABLE_push_string(INTERP, info, key_string(INTERP, SELF));
             break;
           default:
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_KEY_NOT_FOUND,
@@ -350,8 +341,7 @@
     }
 
     void thaw(visit_info *info) {
-        IMAGE_IO * const io = info->image_io;
-        const INTVAL flags  = VTABLE_shift_integer(INTERP, io) & KEY_type_FLAGS;
+        const INTVAL flags  = VTABLE_shift_integer(INTERP, info) & KEY_type_FLAGS;
 
         PObj_get_FLAGS(SELF) |= flags;
         PObj_custom_mark_SET(SELF);
@@ -362,13 +352,13 @@
         /* get contents */
         switch (flags) {
           case KEY_integer_FLAG:
-            SET_ATTR_int_key(INTERP, SELF, VTABLE_shift_integer(INTERP, io));
+            SET_ATTR_int_key(INTERP, SELF, VTABLE_shift_integer(INTERP, info));
             break;
           case KEY_number_FLAG:
-            VTABLE_set_number_native(INTERP, SELF, VTABLE_shift_float(INTERP, io));
+            VTABLE_set_number_native(INTERP, SELF, VTABLE_shift_float(INTERP, info));
             break;
           case KEY_string_FLAG:
-            VTABLE_set_string_native(INTERP, SELF, VTABLE_shift_string(INTERP, io));
+            VTABLE_set_string_native(INTERP, SELF, VTABLE_shift_string(INTERP, info));
             break;
           default:
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_KEY_NOT_FOUND,

Modified: branches/gc_encapsulate/src/pmc/lexinfo.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/lexinfo.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/lexinfo.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -140,29 +140,22 @@
 
 
     VTABLE void thaw(visit_info *info) {
-        IMAGE_IO * const io = info->image_io;
-
-        if (info->extra_flags == EXTRA_IS_NULL) {
-            const INTVAL elems  = VTABLE_shift_integer(INTERP, io);
-            const INTVAL k_type = VTABLE_shift_integer(INTERP, io);
-            const INTVAL v_type = VTABLE_shift_integer(INTERP, io);
-            Hash        *hash;
-
-            UNUSED(k_type);
-            UNUSED(v_type);
-
-            PARROT_ASSERT(v_type == enum_hash_int);
-            /* TODO make a better interface for hash creation
-             * TODO create hash with needed types in the first place
-             */
-
-            SELF.init_pmc(NULL);
-            hash          = (Hash *)SELF.get_pointer();
-            hash->entries = elems;
-        }
-        else {
-            SUPER(info);
-        }
+        const INTVAL elems  = VTABLE_shift_integer(INTERP, info);
+        const INTVAL k_type = VTABLE_shift_integer(INTERP, info);
+        const INTVAL v_type = VTABLE_shift_integer(INTERP, info);
+        Hash        *hash;
+
+        UNUSED(k_type);
+        UNUSED(v_type);
+
+        PARROT_ASSERT(v_type == enum_hash_int);
+        /* TODO make a better interface for hash creation
+         * TODO create hash with needed types in the first place
+         */
+
+        SELF.init_pmc(NULL);
+        hash          = (Hash *)SELF.get_pointer();
+        hash->entries = elems;
     }
 }
 

Modified: branches/gc_encapsulate/src/pmc/object.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/object.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/object.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -761,9 +761,7 @@
 */
 
     VTABLE void thaw(visit_info *info) {
-        if (info->extra_flags == EXTRA_IS_PROP_HASH) {
-            SUPER(info);
-        }
+        return;
     }
 
 /*

Modified: branches/gc_encapsulate/src/pmc/orderedhash.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/orderedhash.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/orderedhash.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2001-2009, Parrot Foundation.
+Copyright (C) 2001-2010, Parrot Foundation.
 $Id$
 
 =head1 NAME
@@ -8,28 +8,66 @@
 
 =head1 DESCRIPTION
 
-C<OrderedHash> extends C<Hash> to provide the interfaces of C<array> and
-C<hash>. To achieve ordering, hash there are a few restrictions:
-C<delete_keyed> never removes items; they are just nulled.
-
-Please note that if values are set via integer idx, these indices have to be in
-strict order. Using C<push_xx> simplifies this task.  This creates a key
-"\1idx" for C<idx> and is therefore not fully transparent.
+C<OrderedHash> provide the interfaces of C<array> and
+C<hash>.
 
-There are two iterator interfaces:
+Some limitations:
 
 =over 4
 
-=item * retrieve values (in creation order)
+=item *
 
-Please note that after a C<delete_keyed> operation, iterating over
-values doesn't work any more.  You'll get an error 'No such key'.
+Keys are always STRING*.
 
-=item * retrieve keys (in creation order)
+=item *
+
+Values are always PMC*.
 
 =back
 
-See F<t/pmc/orderedhash.t>.
+To archive ordering for each item we store:
+
+=over 4
+
+=item * C<key>
+
+Original key
+
+=item * C<value>
+
+Original value
+
+=item * C<next>
+
+Pointer to next C<item>
+
+=item * C<prev>
+
+Pointer to previous C<item>
+
+=back
+
+OrderedHash stores next things:
+
+=over 4
+
+=item * C<hash>
+
+Lookup hash for values.
+
+=item * C<first>
+
+Pointer to first inserted value.
+
+=item * C<last>
+
+Pointer to last inserter value.
+
+=back
+
+See F<t/pmc/orderedhash.t> for test cases.
+
+Overall design heavily inspired by C<Tie::StoredOrderHash>.
 
 =head2 Methods
 
@@ -39,39 +77,127 @@
 
 */
 
-pmclass OrderedHash extends Hash provides array provides hash {
+/* Create new stored item. FixedPMCArray of (key, value, prev, next). */
+static PMC*
+create_item(PARROT_INTERP, ARGIN(PMC *key), ARGIN(PMC *value)) {
+    PMC *ret = pmc_new(interp, enum_class_FixedPMCArray);
+    VTABLE_set_integer_native(interp, ret, ORDERED_HASH_ITEM_MAX);
+
+    VTABLE_set_pmc_keyed_int(interp, ret, ORDERED_HASH_ITEM_KEY, key);
+    VTABLE_set_pmc_keyed_int(interp, ret, ORDERED_HASH_ITEM_VALUE, value);
+    return ret;
+}
+
+/* Get list_item by index */
+static PMC*
+get_list_item(PARROT_INTERP, ARGIN(PMC *self), INTVAL idx) {
+    Parrot_OrderedHash_attributes *attrs = PARROT_ORDEREDHASH(self);
+    INTVAL                         n = VTABLE_elements(interp, attrs->hash);
+    INTVAL                         pos;
+    PMC                           *list_entry = attrs->first;
+
+    if (idx < -n)
+        idx = -idx - n - 1;
+    else if (idx < 0)
+        idx += n;
+
+    /* Iterate over linked list to get list_item */
+    for (pos = 0; pos < idx; ++pos) {
+        list_entry = VTABLE_get_pmc_keyed_int(interp, list_entry, ORDERED_HASH_ITEM_NEXT);
+    }
+    return list_entry;
+}
+
+/* Find first/last in cloned/thawed OrderedHash */
+/* Parameter C<pmc_hash> is Hash, not OrderedHash */
+static void
+find_bounds(PARROT_INTERP, PMC *pmc_hash, PMC **first, PMC **last) {
+    PMC *iter = VTABLE_get_iter(interp, pmc_hash);
+    while (VTABLE_get_bool(interp, iter)) {
+        PMC *item  = VTABLE_shift_pmc(interp, iter);
+        PMC *entry = VTABLE_get_pmc_keyed(interp, pmc_hash, item);
+        /* First entry doesn't have prev */
+        PMC *tmp   = VTABLE_get_pmc_keyed_int(interp, entry, ORDERED_HASH_ITEM_PREV);
+        if (PMC_IS_NULL(tmp))
+            *first = entry;
+        /* Last entry doesn't have next */
+        tmp   = VTABLE_get_pmc_keyed_int(interp, entry, ORDERED_HASH_ITEM_NEXT);
+        if (PMC_IS_NULL(tmp))
+            *last = entry;
+    }
+}
+
+/* Helpers for boxing values */
+static PMC*
+box_string(PARROT_INTERP, STRING *str) {
+    PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
+                enum_class_String));
+    VTABLE_set_string_native(interp, ret, str);
+    return ret;
+}
+
+static PMC*
+box_integer(PARROT_INTERP, INTVAL val) {
+    PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
+                enum_class_Integer));
+    VTABLE_set_integer_native(interp, ret, val);
+    return ret;
+}
+
+static PMC*
+box_number(PARROT_INTERP, FLOATVAL val) {
+    PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
+                enum_class_Float));
+    VTABLE_set_number_native(interp, ret, val);
+    return ret;
+}
+
+
+pmclass OrderedHash need_ext provides array provides hash {
+    ATTR PMC    *hash;   /* key to item tuple */
+    ATTR PMC    *first;  /* Pointer to first inserted value  */
+    ATTR PMC    *last;   /* Pointer to last inserted value   */
 
 /*
 
-=item C<void mark()>
+=item C<void init()>
 
-Marks the OrderedHash as live.
+Create new instance of OrderedHash.
 
 =cut
 
 */
 
-    VTABLE void mark() {
-        Hash * const h = (Hash *)SELF.get_pointer();
-        INTVAL  i;
+    VTABLE void init() {
+        Parrot_OrderedHash_attributes * const attrs =
+                mem_allocate_zeroed_typed(Parrot_OrderedHash_attributes);
 
-        if (!h)
-            return;
+        PMC_data(SELF)  = attrs;
+        attrs->hash     = pmc_new(INTERP, enum_class_Hash);
+        attrs->first    = PMCNULL;
+        attrs->last     = PMCNULL;
 
-        for (i = h->mask; i >= 0; --i) {
-            HashBucket *b = h->bi[i];
+        PObj_custom_mark_destroy_SETALL(SELF);
+    }
 
-            while (b) {
+/*
 
-                if (b->key) {
-                    Parrot_gc_mark_PObj_alive(interp, (PObj *)b->key);
-                    if (b->value)
-                        Parrot_gc_mark_PObj_alive(interp, (PObj *)b->value);
-                }
+=item C<void mark()>
 
-                b = b->next;
-            }
-        }
+Marks the OrderedHash as live.
+
+=cut
+
+*/
+
+    VTABLE void mark() {
+        Parrot_OrderedHash_attributes * const attrs =
+                PARROT_ORDEREDHASH(SELF);
+
+        if (attrs->hash)
+            Parrot_gc_mark_PObj_alive(INTERP, (PObj *)attrs->hash);
+
+        /* Don't mark C<first> and C<last>. They are in lookup hash anyway */
     }
 
 /*
@@ -90,195 +216,253 @@
 
 /*
 
-=item C<PMC *get_pmc_keyed(PMC *key)>
+=item C<INTVAL elements()>
 
-=item C<PMC *get_pmc_keyed_int(INTVAL key)>
+=item C<INTVAL get_integer()>
 
-=item C<PMC *get_pmc_keyed_str(STRING *key)>
+=item C<FLOATVAL get_number()>
+
+Returns the size of the hash.
 
 =cut
 
 */
 
-    VTABLE PMC *get_pmc_keyed_int(INTVAL idx) {
-        Hash * const h = (Hash *)SELF.get_pointer();
-        const INTVAL n = h->entries;
-        HashBucket *b;
+    VTABLE INTVAL get_integer() {
+        return STATICSELF.elements();
+    }
 
-        if (idx < 0)
-            idx += n;
+    VTABLE FLOATVAL get_number() {
+        return SELF.get_integer();
+    }
 
-        if (idx < 0 || idx >= n)
-            Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_KEY_NOT_FOUND,
-                "OrderedHash: index out of bounds!");
+    VTABLE INTVAL elements() {
+        return VTABLE_elements(INTERP, PARROT_ORDEREDHASH(SELF)->hash);
+    }
 
-        b = h->bs + idx;
+/*
 
-        if (b->key)
-            return (PMC *)b->value;
+=item C<set_pmc_keyed(PMC *key, PMC *value)>
 
-        Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_KEY_NOT_FOUND,
-            "OrderedHash: No such key");
-    }
+Main set function.
 
-    VTABLE PMC *get_pmc_keyed(PMC *key) {
-        if ((PObj_get_FLAGS(key) & KEY_type_FLAGS) == KEY_integer_FLAG) {
-            PMC * const item = SELF.get_pmc_keyed_int(VTABLE_get_integer(INTERP, key));
-            PMC * const next = VTABLE_shift_pmc(INTERP, key);
+=cut
 
-            if (!next)
-                return item;
+*/
+    VTABLE void set_pmc_keyed(PMC *key, PMC *value) {
+        Parrot_OrderedHash_attributes *attrs =
+                PARROT_ORDEREDHASH(SELF);
 
-            return VTABLE_get_pmc_keyed(INTERP, item, next);
+        /* Check for old entry */
+        PMC *list_entry = VTABLE_get_pmc_keyed(INTERP, attrs->hash, key);
+        if (!PMC_IS_NULL(list_entry)) {
+            /* We have old entry. Just update value */
+            PMC *nextkey = key_next(INTERP, key);
+            if (nextkey) {
+                PMC *old_value = VTABLE_get_pmc_keyed_int(INTERP, list_entry,
+                        ORDERED_HASH_ITEM_VALUE);
+                VTABLE_set_pmc_keyed(INTERP, value, nextkey, value);
+            }
+            else
+                VTABLE_set_pmc_keyed_int(INTERP, list_entry, ORDERED_HASH_ITEM_VALUE, value);
+            return;
         }
 
-        return INTERP->vtables[enum_class_Hash]->get_pmc_keyed(INTERP, SELF, key);
-    }
+        /* Create new entry */
+        list_entry = pmc_new(INTERP, enum_class_FixedPMCArray);
+        VTABLE_set_integer_native(INTERP, list_entry, ORDERED_HASH_ITEM_MAX);
+        VTABLE_set_pmc_keyed_int(INTERP, list_entry, ORDERED_HASH_ITEM_VALUE, value);
+        VTABLE_set_pmc_keyed_int(INTERP, list_entry, ORDERED_HASH_ITEM_KEY, key);
+
+        /* .. and link it */
+        if (!PMC_IS_NULL(attrs->last)) {
+            VTABLE_set_pmc_keyed_int(INTERP, list_entry, ORDERED_HASH_ITEM_PREV, attrs->last);
+            VTABLE_set_pmc_keyed_int(INTERP, attrs->last, ORDERED_HASH_ITEM_NEXT, list_entry);
+        }
+        attrs->last = list_entry;
+        if (PMC_IS_NULL(attrs->first))
+            attrs->first = list_entry;
 
+        /* .. and store it */
+        VTABLE_set_pmc_keyed(INTERP, attrs->hash, key, list_entry);
+    }
 /*
 
-=item C<STRING *get_string_keyed(PMC *key)>
+=item C<void set_integer_keyed(INTVAL key, INTVAL value)>
 
-=item C<STRING *get_string_keyed_int(INTVAL key)>
+=item C<void set_number_keyed(INTVAL key, FLOATVAL value)>
 
-=item C<STRING *get_string_keyed_str(STRING *key)>
+=item C<void set_string_keyed(INTVAL key, STRING *value)>
+
+Sets the PMC value of the element at index C<key> to C<val>.
 
 =cut
 
 */
 
-    VTABLE STRING *get_string_keyed_int(INTVAL idx) {
-        Hash * const h = (Hash *)SELF.get_pointer();
-        const INTVAL n = h->entries;
+    VTABLE void set_integer_keyed(PMC *key, INTVAL value) {
+        PMC * const v = box_integer(INTERP, value);
+        SELF.set_pmc_keyed(key, v);
+    }
 
-        HashBucket *b;
+    VTABLE void set_number_keyed(PMC *key, FLOATVAL value) {
+        PMC * const v = box_number(INTERP, value);
+        SELF.set_pmc_keyed(key, v);
+    }
 
-        if (idx < 0)
-            idx += n;
+    VTABLE void set_string_keyed(PMC *key, STRING *value) {
+        PMC * const v = box_string(INTERP, value);
+        SELF.set_pmc_keyed(key, v);
+    }
 
-        if (idx < 0 || idx >= n)
-            Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_KEY_NOT_FOUND,
-                "OrderedHash: index out of bounds!");
+/*
 
-        b = h->bs + idx;
+=item C<void set_pmc_keyed_str(STRING *key, PMC *val)>
 
-        if (b->key)
-            return VTABLE_get_string(INTERP, (PMC *)b->value);
+=item C<void set_integer_keyed_str(STRING *key, INTVAL value)>
 
-        Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_KEY_NOT_FOUND,
-            "OrderedHash: No such key");
-    }
+=item C<void set_number_keyed_str(STRING *key, FLOATVAL value)>
 
-    VTABLE STRING *get_string_keyed(PMC *key) {
-        if ((PObj_get_FLAGS(key) & KEY_type_FLAGS) == KEY_integer_FLAG) {
-            PMC * const item = SELF.get_pmc_keyed_int(VTABLE_get_integer(INTERP, key));
-            PMC * const next = VTABLE_shift_pmc(INTERP, key);
+=item C<void set_string_keyed_str(STRING *key, STRING *value)>
 
-            if (!next)
-                return VTABLE_get_string(INTERP, item);
+Sets the PMC value of the element at index C<key> to C<val>.
 
-            return VTABLE_get_string_keyed(INTERP, item, next);
-        }
+=cut
 
-        return INTERP->vtables[enum_class_Hash]->get_string_keyed(INTERP, SELF, key);
+*/
+
+    VTABLE void set_pmc_keyed_str(STRING *key, PMC *value) {
+        /* Wallpapering problem with HLL Strings as keys */
+        /* Apparently HLL registry in Parrot uses OrderedHash */
+        /* Now we have chicken and egg problem during freeze/thaw */
+        /* When we try to thaw OrderedHash which stores HLL mapping */
+        /* Reported by François Perrad */
+        PMC *pkey = pmc_new(INTERP, enum_class_String);
+        VTABLE_set_string_native(INTERP, pkey, key);
+        VTABLE_set_pmc_keyed(INTERP, SELF, pkey, value);
+    }
+
+    VTABLE void set_string_keyed_str(STRING *key, STRING *value) {
+        PMC * const v = box_string(INTERP, value);
+        STATICSELF.set_pmc_keyed_str(key, v);
+    }
+
+    VTABLE void set_integer_keyed_str(STRING *key, INTVAL value) {
+        PMC * const v = box_integer(INTERP, value);
+        STATICSELF.set_pmc_keyed_str(key, v);
+    }
+
+    VTABLE void set_number_keyed_str(STRING *key, FLOATVAL value) {
+        PMC * const v = box_number(INTERP, value);
+        STATICSELF.set_pmc_keyed_str(key, v);
     }
-/*
 
-=item C<INTVAL get_integer_keyed(PMC *key)>
+/*
 
-=item C<INTVAL get_integer_keyed_str(STRING *key)>
+=item C<PMC *get_pmc_keyed(PMC *key)>
 
-=item C<INTVAL get_integer_keyed_int(INTVAL key)>
+=item C<PMC *get_pmc_keyed_int(INTVAL key)>
 
-Returns the integer value associated with C<key>.
+=item C<PMC *get_pmc_keyed_str(STRING *key)>
 
 =cut
 
 */
 
-    VTABLE INTVAL get_integer_keyed_int(INTVAL idx) {
-        Hash * const h = (Hash *)SELF.get_pointer();
-        const INTVAL n = h->entries;
-        HashBucket *b;
+    VTABLE PMC *get_pmc_keyed_int(INTVAL idx) {
+        PMC *list_entry = get_list_item(INTERP, SELF, idx);
 
-        if (idx < 0)
-            idx += n;
+        if (PMC_IS_NULL(list_entry))
+            return PMCNULL;
 
-        if (idx < 0 || idx >= n)
-            Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
-                "OrderedHash: index out of bounds!");
+        return VTABLE_get_pmc_keyed_int(INTERP, list_entry, ORDERED_HASH_ITEM_VALUE);
+    }
 
-        b = h->bs + idx;
+    VTABLE PMC *get_pmc_keyed(PMC *key) {
+        PMC * item;
+        /* Access by integer index */
+        if ((PObj_get_FLAGS(key) & KEY_type_FLAGS) == KEY_integer_FLAG) {
+            return SELF.get_pmc_keyed_int(VTABLE_get_integer(INTERP, key));
+        }
 
-        if (b->key)
-            return VTABLE_get_integer(INTERP, (PMC *)b->value);
+        item = VTABLE_get_pmc_keyed(INTERP, PARROT_ORDEREDHASH(SELF)->hash, key);
+        if (PMC_IS_NULL(item))
+            return PMCNULL;
+        return VTABLE_get_pmc_keyed_int(INTERP, item, ORDERED_HASH_ITEM_VALUE);
+    }
 
-        Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_KEY_NOT_FOUND,
-            "OrderedHash: No such key");
+    VTABLE PMC *get_pmc_keyed_str(STRING *key) {
+        PMC *pkey = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_String));
+        VTABLE_set_string_native(INTERP, pkey, key);
+        return STATICSELF.get_pmc_keyed(pkey);
     }
+/*
 
-    VTABLE INTVAL get_integer_keyed(PMC *key) {
+=item C<STRING *get_string_keyed(PMC *key)>
 
-        if ((PObj_get_FLAGS(key) & KEY_type_FLAGS) == KEY_integer_FLAG) {
-            PMC * const item = SELF.get_pmc_keyed_int(VTABLE_get_integer(INTERP, key));
-            PMC * const next = VTABLE_shift_pmc(INTERP, key);
+=item C<STRING *get_string_keyed_int(INTVAL key)>
 
-            if (!next)
-                return VTABLE_get_integer(INTERP, item);
+=item C<STRING *get_string_keyed_str(STRING *key)>
 
-            return VTABLE_get_integer_keyed(INTERP, item, next);
-        }
+=cut
 
-        return INTERP->vtables[enum_class_Hash]->get_integer_keyed(INTERP, SELF, key);
+*/
+
+    VTABLE STRING *get_string_keyed_int(INTVAL idx) {
+        PMC * const item = VTABLE_get_pmc_keyed_int(INTERP, SELF, idx);
+        return VTABLE_get_string(INTERP, item);
     }
 
+    VTABLE STRING *get_string_keyed(PMC *key) {
+        PMC * const item = VTABLE_get_pmc_keyed(INTERP, SELF, key);
+        return VTABLE_get_string(INTERP, item);
+    }
 /*
 
-=item C<FLOATVAL get_number_keyed(PMC *key)>
+=item C<INTVAL get_integer_keyed(PMC *key)>
 
-=item C<FLOATVAL get_number_keyed_int(INTVAL key)>
+=item C<INTVAL get_integer_keyed_str(STRING *key)>
 
-=item C<FLOATVAL get_number_keyed_str(STRING *key)>
+=item C<INTVAL get_integer_keyed_int(INTVAL key)>
 
-Returns the floating-point value for the element at C<key>.
+Returns the integer value associated with C<key>.
 
 =cut
 
 */
 
-    VTABLE FLOATVAL get_number_keyed_int(INTVAL idx) {
-        Hash * const h = (Hash *)SELF.get_pointer();
-        const INTVAL n = h->entries;
-        HashBucket *b;
+    VTABLE INTVAL get_integer_keyed_int(INTVAL idx) {
+        PMC * const item = VTABLE_get_pmc_keyed_int(INTERP, SELF, idx);
+        return VTABLE_get_integer(INTERP, item);
+    }
 
-        if (idx < 0)
-            idx += n;
+    VTABLE INTVAL get_integer_keyed(PMC *key) {
+        PMC * const item = VTABLE_get_pmc_keyed(INTERP, SELF, key);
+        return VTABLE_get_integer(INTERP, item);
+    }
 
-        if (idx < 0 || idx >= n)
-            Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
-                "OrderedHash: index out of bounds!");
+/*
 
-        b = h->bs + idx;
+=item C<FLOATVAL get_number_keyed(PMC *key)>
 
-        if (b->key)
-            return VTABLE_get_number(INTERP, (PMC *)b->value);
+=item C<FLOATVAL get_number_keyed_int(INTVAL key)>
 
-        Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_KEY_NOT_FOUND,
-            "OrderedHash: No such key");
-    }
+=item C<FLOATVAL get_number_keyed_str(STRING *key)>
 
-    VTABLE FLOATVAL get_number_keyed(PMC *key) {
-        if ((PObj_get_FLAGS(key) & KEY_type_FLAGS) == KEY_integer_FLAG) {
-            PMC * const item = SELF.get_pmc_keyed_int(VTABLE_get_integer(INTERP, key));
-            PMC * const next = VTABLE_shift_pmc(INTERP, key);
+Returns the floating-point value for the element at C<key>.
 
-            if (!next)
-                return VTABLE_get_number(INTERP, item);
+=cut
 
-            return VTABLE_get_number_keyed(INTERP, item, next);
-        }
+*/
 
-        return SUPER(key);
+    VTABLE FLOATVAL get_number_keyed_int(INTVAL idx) {
+        PMC * const item = VTABLE_get_pmc_keyed_int(INTERP, SELF, idx);
+        return VTABLE_get_number(INTERP, item);
+    }
+
+    VTABLE FLOATVAL get_number_keyed(PMC *key) {
+        PMC * const item = VTABLE_get_pmc_keyed(INTERP, SELF, key);
+        return VTABLE_get_number(INTERP, item);
     }
 
 /*
@@ -299,9 +483,10 @@
 */
 
     VTABLE void set_pmc_keyed_int(INTVAL idx, PMC *val) {
-        Hash * const     h = (Hash *)SELF.get_pointer();
-        const INTVAL     n = h->entries;
+        const INTVAL   n   = STATICSELF.elements();
         STRING * const fmt = CONST_STRING(INTERP, "\1%d");
+        PMC           *list_entry;
+        INTVAL         pos;
 
         if (idx < -n)
             idx = -idx - n - 1;
@@ -314,12 +499,9 @@
             SELF.set_pmc_keyed_str(key, val);
         }
         else {
-            HashBucket * const b = h->bs + idx;
-
-            if (!b->key)
-                b->key = Parrot_sprintf_s(INTERP, fmt, idx);
-
-            b->value     = val;
+            list_entry = get_list_item(INTERP, SELF, idx);
+            PARROT_ASSERT(!PMC_IS_NULL(list_entry));
+            VTABLE_set_pmc_keyed_int(INTERP, list_entry, ORDERED_HASH_ITEM_VALUE, val);
         }
     }
 
@@ -390,60 +572,26 @@
 */
 
     VTABLE INTVAL exists_keyed_int(INTVAL idx) {
-        Hash * const h = (Hash *)SELF.get_pointer();
-        const INTVAL n = h->entries;
-        HashBucket  *b;
-
-        if (idx < 0)
-            idx += n;
-
-        if (idx < 0 || idx >= n)
-            return 0;
-
-        b = h->bs + idx;
-
-        if (b->key)
-            return 1;
-
-        return 0;
+        return (idx >= 0) && (idx < STATICSELF.elements());
     }
 
     VTABLE INTVAL exists_keyed(PMC *key) {
-        if (PObj_get_FLAGS(key) & KEY_integer_FLAG) {
-            PMC        *item, *next;
-            HashBucket *b;
-            Hash       * const h   = (Hash *)SELF.get_pointer();
-            INTVAL             idx = VTABLE_get_integer(INTERP, key);
-            const INTVAL       n   = h->entries;
-
-            if (idx < 0)
-                idx += n;
-
-            if (idx < 0 || idx >= n)
-                return 0;
-
-            b = h->bs + idx;
-
-            if (!b->key)
-                return 0;
-
-            item = (PMC *)b->value;
-            next = VTABLE_shift_pmc(INTERP, key);
+        if ((PObj_get_FLAGS(key) & KEY_type_FLAGS) == KEY_integer_FLAG) {
+            /* Don't fetch item prematurely. It's costy */
+            INTVAL    intval = VTABLE_get_integer(INTERP, key);
+            PMC * const next = VTABLE_shift_pmc(INTERP, key);
 
             if (!next)
-                return 1;
+                return STATICSELF.exists_keyed_int(intval);
 
-            return VTABLE_exists_keyed(INTERP, item, next);
+            return VTABLE_exists_keyed(INTERP, STATICSELF.get_pmc_keyed_int(intval), next);
         }
 
-        return SUPER(key);
+        return VTABLE_exists_keyed_str(INTERP, SELF, VTABLE_get_string(INTERP, key));
     }
 
     VTABLE INTVAL exists_keyed_str(STRING *key) {
-        const Hash       * const h = (Hash *)SELF.get_pointer();
-        const HashBucket * const b = parrot_hash_get_bucket(INTERP, h, key);
-
-        return (b && b->key);
+        return VTABLE_exists_keyed_str(INTERP, PARROT_ORDEREDHASH(SELF)->hash, key);
     }
 
 /*
@@ -459,55 +607,32 @@
 */
 
     VTABLE INTVAL defined_keyed(PMC *key) {
-        if (PObj_get_FLAGS(key) & KEY_integer_FLAG) {
-            Hash * const h   = (Hash *)SELF.get_pointer();
-            INTVAL       idx = VTABLE_get_integer(INTERP, key);
-            const INTVAL n   = h->entries;
-
-            HashBucket *b;
-            PMC        *item, *next;
-
-            if (idx < 0)
-                idx += n;
-
-            /* XXX non-existent is undefined - is this correct */
-            if (idx < 0 || idx >= n)
-                return 0;
-
-            b = h->bs + idx;
-
-            if (!b->key)
-                return 0;
-
-            item = (PMC *)b->value;
-            next = VTABLE_shift_pmc(INTERP, key);
-
-            if (!next)
-                return VTABLE_defined(INTERP, item);
-
-            return VTABLE_defined_keyed(INTERP, item, next);
-        }
+        /* We store list_item (which is defined). So fetch original PMC and check it */
+        PMC * const item = STATICSELF.get_pmc_keyed(key);
+        if (PMC_IS_NULL(item))
+            return 0;
+        return VTABLE_defined(INTERP, item);
+    }
 
-        return SUPER(key);
+    VTABLE INTVAL defined_keyed_str(STRING *key) {
+        PMC * const item = STATICSELF.get_pmc_keyed_str(key);
+        if (PMC_IS_NULL(item))
+            return 0;
+        return VTABLE_defined(INTERP, item);
     }
 
     VTABLE INTVAL defined_keyed_int(INTVAL idx) {
-        Hash * const h = (Hash *)SELF.get_pointer();
-        const INTVAL n = h->entries;
-        HashBucket  *b;
-
-        if (idx < 0)
-            idx += n;
-
-        if (idx < 0 || idx >= n)
+        PMC * item;
+        /* If item doesn't exists it's undefined */
+        if (!STATICSELF.exists_keyed_int(idx))
             return 0;
 
-        b = h->bs + idx;
-
-        if (b->key)
-            return VTABLE_defined(INTERP, (PMC *)b->value);
+        /* Null is undefined */
+        item = STATICSELF.get_pmc_keyed_int(idx);
+        if (PMC_IS_NULL(item))
+            return 0;
 
-        return 0;
+        return VTABLE_defined(INTERP, item);
     }
 
 /*
@@ -525,56 +650,57 @@
 */
 
     VTABLE void delete_keyed(PMC *key) {
-        PMC * const next = key_next(INTERP, key);
+        Parrot_OrderedHash_attributes *attrs =
+                PARROT_ORDEREDHASH(SELF);
+        PMC *list_entry, *prev, *next;
+        if ((PObj_get_FLAGS(key) & KEY_type_FLAGS) == KEY_integer_FLAG) {
+            INTVAL    intval = VTABLE_get_integer(INTERP, key);
+            PMC * const next = VTABLE_shift_pmc(INTERP, key);
 
-        if (PObj_get_FLAGS(key) & KEY_integer_FLAG) {
-            if (next) {
-                PMC * const item = SELF.get_pmc_keyed_int(VTABLE_get_integer(INTERP, key));
-                VTABLE_delete_keyed(INTERP, item, next);
-                return;
-            }
+            if (next)
+                VTABLE_delete_keyed(INTERP, STATICSELF.get_pmc_keyed_int(intval), next);
+            else
+                STATICSELF.delete_keyed_int(intval);
 
-            SELF.delete_keyed_int(VTABLE_get_integer(INTERP, key));
-        }
-        else {
-            if (next) {
-                PMC * const item = SELF.get_pmc_keyed_str(VTABLE_get_string(INTERP, key));
-                VTABLE_delete_keyed(INTERP, item, next);
-                return;
-            }
-            SELF.delete_keyed_str(VTABLE_get_string(INTERP, key));
+            return;
         }
-    }
-
-    VTABLE void delete_keyed_int(INTVAL idx) {
-        Hash * const h = (Hash *)SELF.get_pointer();
-        const INTVAL n = h->entries;
-        HashBucket  *b;
-
-        if (idx < 0)
-            idx += n;
 
-        if (idx < 0 || idx >= n)
+        list_entry = VTABLE_get_pmc_keyed(INTERP, attrs->hash, key);
+        if (PMC_IS_NULL(list_entry))
             return;
 
-        b = h->bs + idx;
+        /* Unlink entry */
+        next = VTABLE_get_pmc_keyed_int(INTERP, list_entry, ORDERED_HASH_ITEM_NEXT);
+        prev = VTABLE_get_pmc_keyed_int(INTERP, list_entry, ORDERED_HASH_ITEM_PREV);
+
+        if (attrs->first == list_entry)
+            attrs->first = next;
+
+        if (attrs->last == list_entry)
+            attrs->last = prev;
+
+        /* C<prev> and C<next> are list entries (FPA) */
+        if (!PMC_IS_NULL(prev))
+            VTABLE_set_pmc_keyed_int(INTERP, prev, ORDERED_HASH_ITEM_NEXT, next);
+        if (!PMC_IS_NULL(next))
+            VTABLE_set_pmc_keyed_int(INTERP, next, ORDERED_HASH_ITEM_PREV, prev);
 
-        if (!b)
-            return;
-
-        b->key       = NULL;
-        b->value     = NULL;
+        /* And finally delete it */
+        VTABLE_delete_keyed(INTERP, PARROT_ORDEREDHASH(SELF)->hash, key);
     }
 
     VTABLE void delete_keyed_str(STRING *key) {
-        const Hash * const h = (Hash *)SELF.get_pointer();
-        HashBucket * const b = parrot_hash_get_bucket(INTERP, h, key);
+        STATICSELF.delete_keyed(box_string(INTERP, key));
+    }
 
-        if (!b)
+    VTABLE void delete_keyed_int(INTVAL idx) {
+        PMC *list_entry;
+        if (!STATICSELF.exists_keyed_int(idx))
             return;
 
-        b->key       = NULL;
-        b->value     = NULL;
+        list_entry = get_list_item(INTERP, SELF, idx);
+        STATICSELF.delete_keyed(
+            VTABLE_get_pmc_keyed_int(INTERP, list_entry, ORDERED_HASH_ITEM_KEY));
     }
 
 /*
@@ -590,18 +716,11 @@
 
     VTABLE PMC *clone() {
         PMC  * const dest   = pmc_new(INTERP, SELF->vtable->base_type);
-        Hash * const hash   = (Hash *)SELF.get_pointer();
-        Hash * const h_dest = (Hash *)VTABLE_get_pointer(INTERP, dest);
-        UINTVAL     i;
-
-        for (i = 0; i <= N_BUCKETS(hash->mask-1); i++) {
-            HashBucket * const b      = hash->bs + i;
-            void       * const key    = b->key;
-
-            if (key)
-                parrot_hash_put(INTERP, h_dest, key,
-                    (void *)VTABLE_clone(INTERP, (PMC *)b->value));
-        }
+        Parrot_OrderedHash_attributes *clone_attrs =
+                PARROT_ORDEREDHASH(dest);
+
+        clone_attrs->hash   = VTABLE_clone(INTERP, PARROT_ORDEREDHASH(SELF)->hash);
+        find_bounds(INTERP, clone_attrs->hash, &clone_attrs->first, &clone_attrs->last);
 
         return dest;
     }
@@ -619,46 +738,35 @@
 
 Used to unarchive the hash.
 
-Freeze/thaw are inherited from hash.  Only thaw.visit is special, as we have to
-preserve key/value order.
-
 =cut
 
 */
 
     VTABLE void visit(visit_info *info) {
-        switch (info->what) {
-          case VISIT_THAW_NORMAL:
-          case VISIT_THAW_CONSTANTS:
-            SUPER(info);
-            break;
-
-          case VISIT_FREEZE_NORMAL:
-          case VISIT_FREEZE_AT_DESTRUCT:
-            {
-                Hash     * const hash = (Hash *)SELF.get_pointer();
-                IMAGE_IO * const io   = info->image_io;
-                const UINTVAL entries = hash->entries;
-                UINTVAL i;
-
-                for (i = 0; i < entries; i++) {
-                    HashBucket * const b   = hash->bs + i;
-
-                    if (b) {
-                        STRING * const key = (STRING *)b->key;
-                        if (key) {
-                            VTABLE_push_string(interp, io, key);
-                            (info->visit_pmc_now)(interp, (PMC *)b->value, info);
-                        }
-                    }
-                }
-            }
-            break;
-          default:
-            Parrot_ex_throw_from_c_args(interp, NULL,
-                    EXCEPTION_INVALID_OPERATION,
-                    "unhandled visit action (%d)", info->what);
-        }
+        VISIT_PMC_ATTR(INTERP, info, SELF, OrderedHash, hash);
+        SUPER(info);
+    }
+
+    VTABLE void thawfinish(visit_info *info) {
+        Parrot_OrderedHash_attributes *attrs = PARROT_ORDEREDHASH(SELF);
+        find_bounds(INTERP, attrs->hash, &attrs->first, &attrs->last);
+        SUPER(info);
+    }
+
+/*
+
+=item C<get_pmc()>
+
+Get underlying regular Hash. Used in UnManagedStruct.
+
+=cut
+
+*/
+
+    VTABLE PMC* get_pmc() {
+        PMC *hash;
+        GET_ATTR_hash(INTERP, SELF, hash);
+        return hash;
     }
 }
 

Modified: branches/gc_encapsulate/src/pmc/orderedhashiterator.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/orderedhashiterator.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/orderedhashiterator.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -18,12 +18,12 @@
 
 */
 
-#include "pmc/pmc_hash.h"
+#include "pmc/pmc_orderedhash.h"
 #include "pmc/pmc_hashiteratorkey.h"
 
 pmclass OrderedHashIterator extends Iterator no_ro auto_attrs {
     ATTR PMC        *pmc_hash;      /* the Hash which this Iterator iterates */
-    ATTR Hash       *parrot_hash;   /* Underlying implementation of hash */
+    ATTR PMC        *next_entry;    /* Next entry to shift/pop */
     ATTR INTVAL      pos;           /* */
     ATTR INTVAL      elements;      /* How many elements left to iterate over */
     ATTR INTVAL      reverse;       /* Direction of iteration. 1 - for reverse iteration */
@@ -44,11 +44,10 @@
            (Parrot_OrderedHashIterator_attributes *) PMC_data(SELF);
 
         attrs->pmc_hash         = hash;
-        attrs->parrot_hash      = (Hash*)VTABLE_get_pointer(INTERP, hash);
         attrs->pos              = 0;
-        /* Will be decreased on initial advance_to_next */
-        /* XXX Do we really need to support this use-case ? */
-        attrs->elements         = attrs->parrot_hash->entries;
+        attrs->elements         = VTABLE_elements(INTERP, hash);
+        attrs->next_entry       = PARROT_ORDEREDHASH(hash)->first;
+        PMC_data(SELF)          = attrs;
 
         PObj_custom_mark_SET(SELF);
     }
@@ -91,15 +90,17 @@
                 PARROT_ORDEREDHASHITERATOR(SELF);
 
         /* Restart iterator */
-        attrs->elements         = attrs->parrot_hash->entries;
+        attrs->elements = VTABLE_elements(INTERP, attrs->pmc_hash);
         if (value == ITERATE_FROM_START || value == ITERATE_FROM_START_KEYS) {
-            attrs->pos      = 0;
-            attrs->reverse  = 0;
+            attrs->pos          = 0;
+            attrs->reverse      = 0;
+            attrs->next_entry   = PARROT_ORDEREDHASH(attrs->pmc_hash)->first;
             return;
         }
         else if (value == ITERATE_FROM_END) {
-            attrs->pos      = attrs->elements;
-            attrs->reverse  = 1;
+            attrs->pos          = attrs->elements;
+            attrs->reverse      = 1;
+            attrs->next_entry   = PARROT_ORDEREDHASH(attrs->pmc_hash)->last;
             return;
         }
 
@@ -168,22 +169,18 @@
                 PARROT_ORDEREDHASHITERATOR(SELF);
 
         PMC        *ret;
-        HashBucket *bucket;
 
         if (!attrs->elements)
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
                 "StopIteration");
 
         /* Get bucket and move to next bucket */
-        do {
-            bucket = attrs->parrot_hash->bs + attrs->pos++;
-            attrs->elements--;
-        } while (attrs->elements && !bucket->key);
-
-        /* Reuse HashIteratorKey */
-        ret = pmc_new(INTERP, enum_class_HashIteratorKey);
-        VTABLE_set_pointer_keyed_int(INTERP, ret, 0, attrs->parrot_hash);
-        VTABLE_set_pointer_keyed_int(INTERP, ret, 1, bucket);
+        ret               = VTABLE_get_pmc_keyed_int(INTERP, attrs->next_entry,
+                ORDERED_HASH_ITEM_KEY);
+        attrs->next_entry = VTABLE_get_pmc_keyed_int(INTERP, attrs->next_entry,
+                ORDERED_HASH_ITEM_NEXT);
+        attrs->pos++;
+        attrs->elements--;
 
         return ret;
     }
@@ -204,21 +201,18 @@
                 PARROT_ORDEREDHASHITERATOR(SELF);
 
         PMC        *ret;
-        HashBucket *bucket;
 
         if (!attrs->elements)
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
                 "StopIteration");
 
-        /* Get bucket and move to next bucket */
-        bucket = attrs->parrot_hash->bs + --attrs->pos;
+        ret               = VTABLE_get_pmc_keyed_int(INTERP, attrs->next_entry,
+                ORDERED_HASH_ITEM_KEY);
+        attrs->next_entry = VTABLE_get_pmc_keyed_int(INTERP, attrs->next_entry,
+                ORDERED_HASH_ITEM_PREV);
+        attrs->pos--;
         attrs->elements--;
 
-        /* Reuse HashIteratorKey */
-        ret = pmc_new(INTERP, enum_class_HashIteratorKey);
-        VTABLE_set_pointer_keyed_int(INTERP, ret, 0, attrs->parrot_hash);
-        VTABLE_set_pointer_keyed_int(INTERP, ret, 1, bucket);
-
         return ret;
     }
 

Modified: branches/gc_encapsulate/src/pmc/parrotinterpreter.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/parrotinterpreter.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/parrotinterpreter.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -708,8 +708,8 @@
          */
 
         /*  HLL_info */
-        if (info->what == VISIT_THAW_NORMAL ||
-                info->what == VISIT_THAW_CONSTANTS) {
+        if (VTABLE_get_integer(INTERP, info) == VISIT_THAW_NORMAL ||
+            VTABLE_get_integer(INTERP, info) == VISIT_THAW_CONSTANTS) {
             pos = &PMC_args(SELF);
         }
         else
@@ -720,21 +720,14 @@
     }
 
     VTABLE void thaw(visit_info *info) {
-        if (info->extra_flags == EXTRA_IS_PROP_HASH) {
-            SUPER(info);
+        if (!PMC_data(SELF)) {
+            Parrot_ParrotInterpreter_attributes *attrs =
+                mem_allocate_zeroed_typed(Parrot_ParrotInterpreter_attributes);
+            PMC_data(SELF) = attrs;
+            PObj_custom_destroy_SET(SELF);
         }
-        else if (info->extra_flags == EXTRA_IS_NULL) {
 
-            if (!PMC_data(SELF)) {
-                Parrot_ParrotInterpreter_attributes *attrs =
-                    mem_allocate_zeroed_typed(Parrot_ParrotInterpreter_attributes);
-                PMC_data(SELF) = attrs;
-                PObj_custom_destroy_SET(SELF);
-            }
-
-            PMC_interp(SELF) = INTERP;
-            info->what       = VISIT_THAW_CONSTANTS;
-        }
+        PMC_interp(SELF) = INTERP;
     }
 
     VTABLE void thawfinish(visit_info *info) {

Modified: branches/gc_encapsulate/src/pmc/parrotthread.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/parrotthread.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/parrotthread.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -47,12 +47,10 @@
 static void
 stop_GC(Interp *parent, Interp *thread)
 {
-#if 0
     Parrot_block_GC_mark(parent);
     Parrot_block_GC_mark(thread);
     Parrot_block_GC_sweep(parent);
     Parrot_block_GC_sweep(thread);
-#endif
 }
 
 /* XXX FIXME probably not the best interface [see also list post of

Modified: branches/gc_encapsulate/src/pmc/resizablebooleanarray.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/resizablebooleanarray.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/resizablebooleanarray.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -422,19 +422,18 @@
         STRING           *s;
         UINTVAL           tail_pos, rounded_size, head_pos;
         unsigned char    *bit_array;
-        IMAGE_IO * const  io = info->image_io;
 
         GET_ATTR_size(INTERP, SELF, tail_pos);
         GET_ATTR_resize_threshold(INTERP, SELF, head_pos);
         GET_ATTR_bit_array(INTERP, SELF, bit_array);
         rounded_size = ROUND_BYTES(tail_pos);
 
-        VTABLE_push_integer(INTERP, io, head_pos);
-        VTABLE_push_integer(INTERP, io, tail_pos);
+        VTABLE_push_integer(INTERP, info, head_pos);
+        VTABLE_push_integer(INTERP, info, tail_pos);
 
         s = Parrot_str_new(INTERP, (char*)bit_array, rounded_size);
 
-        VTABLE_push_string(INTERP, io, s);
+        VTABLE_push_string(INTERP, info, s);
     }
 
 /*
@@ -448,10 +447,9 @@
 */
     VTABLE void thaw(visit_info *info) {
         unsigned char   *bit_array;
-        IMAGE_IO * const io       = info->image_io;
-        const UINTVAL    head_pos = VTABLE_shift_integer(INTERP, io);
-        const UINTVAL    tail_pos = VTABLE_shift_integer(INTERP, io);
-        STRING * const   s        = VTABLE_shift_string(INTERP, io);
+        const UINTVAL    head_pos = VTABLE_shift_integer(INTERP, info);
+        const UINTVAL    tail_pos = VTABLE_shift_integer(INTERP, info);
+        STRING * const   s        = VTABLE_shift_string(INTERP, info);
 
         bit_array      = (unsigned char*)Parrot_str_to_cstring(INTERP, s);
         SET_ATTR_size(INTERP, SELF, tail_pos);

Modified: branches/gc_encapsulate/src/pmc/resizableintegerarray.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/resizableintegerarray.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/resizableintegerarray.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -292,7 +292,6 @@
 */
 
     VTABLE void freeze(visit_info *info) {
-        IMAGE_IO *io = info->image_io;
         INTVAL   *int_array;
         INTVAL    i, n, rt;
 
@@ -300,38 +299,33 @@
 
         n  = SELF.get_integer();
         GET_ATTR_resize_threshold(INTERP, SELF, rt);
-        VTABLE_push_integer(INTERP, io, n);
-        VTABLE_push_integer(INTERP, io, rt);
+        VTABLE_push_integer(INTERP, info, n);
+        VTABLE_push_integer(INTERP, info, rt);
 
         GET_ATTR_int_array(INTERP, SELF, int_array);
 
         for (i = 0; i < n; ++i)
-            VTABLE_push_integer(INTERP, io, int_array[i]);
+            VTABLE_push_integer(INTERP, info, int_array[i]);
     }
 
     VTABLE void thaw(visit_info *info) {
-        if (info->extra_flags == EXTRA_IS_NULL) {
-            IMAGE_IO * const io = info->image_io;
-            const INTVAL n = VTABLE_shift_integer(INTERP, io);
-            const INTVAL rt = VTABLE_shift_integer(INTERP, io);
-
-            SET_ATTR_size(INTERP, SELF, 0);
-            SET_ATTR_resize_threshold(INTERP, SELF, rt);
-            SET_ATTR_int_array(INTERP, SELF, NULL);
-
-            if (n) {
-                INTVAL  i;
-                INTVAL *int_array;
-
-                SELF.set_integer_native(n);
-                GET_ATTR_int_array(INTERP, SELF, int_array);
-
-                for (i = 0; i < n; ++i)
-                    int_array[i] = VTABLE_shift_integer(INTERP, io);
-            }
+        const INTVAL n = VTABLE_shift_integer(INTERP, info);
+        const INTVAL rt = VTABLE_shift_integer(INTERP, info);
+
+        SET_ATTR_size(INTERP, SELF, 0);
+        SET_ATTR_resize_threshold(INTERP, SELF, rt);
+        SET_ATTR_int_array(INTERP, SELF, NULL);
+
+        if (n) {
+            INTVAL  i;
+            INTVAL *int_array;
+
+            SELF.set_integer_native(n);
+            GET_ATTR_int_array(INTERP, SELF, int_array);
+
+            for (i = 0; i < n; ++i)
+                int_array[i] = VTABLE_shift_integer(INTERP, info);
         }
-        else
-            SUPER(info);
     }
 
 

Modified: branches/gc_encapsulate/src/pmc/scheduler.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/scheduler.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/scheduler.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -288,18 +288,11 @@
 */
 
     VTABLE void visit(visit_info *info) {
-        Parrot_Scheduler_attributes * const core_struct = PARROT_SCHEDULER(SELF);
-        PMC **pos;
-
         /* 1) visit task list */
-        pos            = &core_struct->task_list;
-        info->thaw_ptr = pos;
-        (info->visit_pmc_now)(INTERP, *pos, info);
+        VISIT_PMC_ATTR(INTERP, info, SELF, Scheduler, task_list);
 
         /* 2) visit the handlers */
-        pos            = &core_struct->handlers;
-        info->thaw_ptr = pos;
-        (info->visit_pmc_now)(INTERP, *pos, info);
+        VISIT_PMC_ATTR(INTERP, info, SELF, Scheduler, handlers);
     }
 
 
@@ -314,14 +307,13 @@
 */
 
     VTABLE void freeze(visit_info *info) {
-        IMAGE_IO *io = info->image_io;
         Parrot_Scheduler_attributes * const core_struct = PARROT_SCHEDULER(SELF);
 
         /* 1) freeze scheduler id */
-        VTABLE_push_integer(INTERP, io, core_struct->id);
+        VTABLE_push_integer(INTERP, info, core_struct->id);
 
         /* 2) freeze maximum task id */
-        VTABLE_push_integer(INTERP, io, core_struct->max_tid);
+        VTABLE_push_integer(INTERP, info, core_struct->max_tid);
     }
 
 
@@ -336,13 +328,11 @@
 */
 
     VTABLE void thaw(visit_info *info) {
-        IMAGE_IO * const io = info->image_io;
-
         /* 1. thaw scheduler id */
-        const INTVAL id = VTABLE_shift_integer(INTERP, io);
+        const INTVAL id = VTABLE_shift_integer(INTERP, info);
 
         /* 2. thaw maximum task id */
-        const INTVAL max_tid = VTABLE_shift_integer(INTERP, io);
+        const INTVAL max_tid = VTABLE_shift_integer(INTERP, info);
 
         /* Allocate the scheduler's core data struct and set custom flags. */
         SELF.init();

Modified: branches/gc_encapsulate/src/pmc/schedulermessage.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/schedulermessage.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/schedulermessage.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -238,15 +238,14 @@
 */
 
     VTABLE void freeze(visit_info *info) {
-        IMAGE_IO *io = info->image_io;
         Parrot_SchedulerMessage_attributes * const core_struct =
             PARROT_SCHEDULERMESSAGE(SELF);
 
         /* 1) freeze message id */
-        VTABLE_push_integer(INTERP, io, core_struct->id);
+        VTABLE_push_integer(INTERP, info, core_struct->id);
 
         /* 2) freeze message type */
-        VTABLE_push_string(INTERP, io, core_struct->type);
+        VTABLE_push_string(INTERP, info, core_struct->type);
     }
 
 /*
@@ -260,13 +259,11 @@
 */
 
     VTABLE void thaw(visit_info *info) {
-        IMAGE_IO * const io = info->image_io;
-
         /* 1. thaw message id */
-        const INTVAL id = VTABLE_shift_integer(INTERP, io);
+        const INTVAL id = VTABLE_shift_integer(INTERP, info);
 
         /* 2. thaw message type */
-        STRING * const type = VTABLE_shift_string(INTERP, io);
+        STRING * const type = VTABLE_shift_string(INTERP, info);
 
         /* Allocate the message's core data struct and set custom flags. */
         SELF.init();

Modified: branches/gc_encapsulate/src/pmc/string.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/string.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/string.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -786,9 +786,8 @@
 
 */
     VTABLE void freeze(visit_info *info) {
-        IMAGE_IO * const io = info->image_io;
         SUPER(info);
-        VTABLE_push_string(INTERP, io, VTABLE_get_string(INTERP, SELF));
+        VTABLE_push_string(INTERP, info, VTABLE_get_string(INTERP, SELF));
     }
 
 /*
@@ -801,10 +800,8 @@
 
 */
     VTABLE void thaw(visit_info *info) {
-        IMAGE_IO * const io = info->image_io;
         SUPER(info);
-        if (info->extra_flags == EXTRA_IS_NULL)
-            SET_ATTR_str_val(INTERP, SELF, VTABLE_shift_string(INTERP, io));
+        SET_ATTR_str_val(INTERP, SELF, VTABLE_shift_string(INTERP, info));
     }
 /*
 

Modified: branches/gc_encapsulate/src/pmc/sub.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/sub.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/sub.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -632,18 +632,11 @@
 */
 
     VTABLE void visit(visit_info *info) {
-        Parrot_Sub_attributes *sub;
-
-        PMC_get_sub(INTERP, SELF, sub);
+        VISIT_PMC_ATTR(INTERP, info, SELF, Sub, namespace_name);
 
-        info->thaw_ptr = &sub->namespace_name;
-        (info->visit_pmc_now)(INTERP, sub->namespace_name, info);
+        VISIT_PMC_ATTR(INTERP, info, SELF, Sub, multi_signature);
 
-        info->thaw_ptr = &sub->multi_signature;
-        (info->visit_pmc_now)(INTERP, sub->multi_signature, info);
-
-        info->thaw_ptr = &sub->outer_sub;
-        (info->visit_pmc_now)(INTERP, sub->outer_sub, info);
+        VISIT_PMC_ATTR(INTERP, info, SELF, Sub, outer_sub);
 
         /*
          * XXX visit_pmc_now is wrong, because it breaks
@@ -653,13 +646,12 @@
          *
          * Therefore the hash must be last during visit for now.
          */
-        info->thaw_ptr = &sub->lex_info;
-        (info->visit_pmc_now)(INTERP, sub->lex_info, info);
+        VISIT_PMC_ATTR(INTERP, info, SELF, Sub, lex_info);
+
         SUPER(info);
     }
 
     VTABLE void freeze(visit_info *info) {
-        IMAGE_IO       * const io  = info->image_io;
         Parrot_Sub_attributes *sub;
         STRING                *hll_name;
         int i;
@@ -684,35 +676,35 @@
          * - subid
          */
 
-        VTABLE_push_integer(INTERP, io, (INTVAL) sub->start_offs);
-        VTABLE_push_integer(INTERP, io, (INTVAL) sub->end_offs);
-        VTABLE_push_integer(INTERP, io,
+        VTABLE_push_integer(INTERP, info, (INTVAL) sub->start_offs);
+        VTABLE_push_integer(INTERP, info, (INTVAL) sub->end_offs);
+        VTABLE_push_integer(INTERP, info,
             (INTVAL)(PObj_get_FLAGS(pmc) & SUB_FLAG_PF_MASK));
 
-        VTABLE_push_string(INTERP, io, sub->name);
+        VTABLE_push_string(INTERP, info, sub->name);
 
         if (!sub->method_name)
             sub->method_name = CONST_STRING(INTERP, "");
-        VTABLE_push_string(INTERP, io, sub->method_name);
+        VTABLE_push_string(INTERP, info, sub->method_name);
 
         if (!sub->ns_entry_name)
             sub->ns_entry_name = CONST_STRING(INTERP, "");
-        VTABLE_push_string(INTERP, io, sub->ns_entry_name);
+        VTABLE_push_string(INTERP, info, sub->ns_entry_name);
 
         hll_name = Parrot_get_HLL_name(INTERP, sub->HLL_id);
         if (!hll_name)
             hll_name = CONST_STRING(INTERP, "");
-        VTABLE_push_string(INTERP, io, hll_name);
+        VTABLE_push_string(INTERP, info, hll_name);
 
-        VTABLE_push_integer(INTERP, io, (INTVAL)sub->comp_flags);
-        VTABLE_push_integer(INTERP, io, sub->vtable_index);
+        VTABLE_push_integer(INTERP, info, (INTVAL)sub->comp_flags);
+        VTABLE_push_integer(INTERP, info, sub->vtable_index);
 
         for (i = 0; i < 4; ++i)
-            VTABLE_push_integer(INTERP, io, sub->n_regs_used[i]);
+            VTABLE_push_integer(INTERP, info, sub->n_regs_used[i]);
 
         if (!sub->subid)
             sub->subid = CONST_STRING(INTERP, "");
-        VTABLE_push_string(INTERP, io, sub->subid);
+        VTABLE_push_string(INTERP, info, sub->subid);
     }
 
 /*
@@ -726,36 +718,33 @@
 */
 
     VTABLE void thaw(visit_info *info) {
-        IMAGE_IO * const io = info->image_io;
+        Parrot_Sub_attributes *sub;
+        INTVAL flags;
+        int    i;
+
         SUPER(info);
 
-        if (info->extra_flags == EXTRA_IS_NULL) {
-            Parrot_Sub_attributes *sub;
-            INTVAL flags;
-            int    i;
-
-            PMC_get_sub(INTERP, SELF, sub);
-
-            /* we get relative offsets */
-            sub->start_offs   = (size_t) VTABLE_shift_integer(INTERP, io);
-            sub->end_offs     = (size_t) VTABLE_shift_integer(INTERP, io);
-            flags             = VTABLE_shift_integer(INTERP, io);
-
-            PObj_get_FLAGS(SELF) |= flags & SUB_FLAG_PF_MASK;
-
-            sub->name           = VTABLE_shift_string(INTERP, io);
-            sub->method_name    = VTABLE_shift_string(INTERP, io);
-            sub->ns_entry_name  = VTABLE_shift_string(INTERP, io);
-            sub->HLL_id         = Parrot_get_HLL_id(INTERP,
-                VTABLE_shift_string(INTERP, io));
-            sub->comp_flags     = VTABLE_shift_integer(INTERP, io);
-            sub->vtable_index   = VTABLE_shift_integer(INTERP, io);
+        PMC_get_sub(INTERP, SELF, sub);
 
-            for (i = 0; i < 4; ++i)
-                sub->n_regs_used[i] = VTABLE_shift_integer(INTERP, io);
+        /* we get relative offsets */
+        sub->start_offs   = (size_t) VTABLE_shift_integer(INTERP, info);
+        sub->end_offs     = (size_t) VTABLE_shift_integer(INTERP, info);
+        flags             = VTABLE_shift_integer(INTERP, info);
+
+        PObj_get_FLAGS(SELF) |= flags & SUB_FLAG_PF_MASK;
+
+        sub->name           = VTABLE_shift_string(INTERP, info);
+        sub->method_name    = VTABLE_shift_string(INTERP, info);
+        sub->ns_entry_name  = VTABLE_shift_string(INTERP, info);
+        sub->HLL_id         = Parrot_get_HLL_id(INTERP,
+            VTABLE_shift_string(INTERP, info));
+        sub->comp_flags     = VTABLE_shift_integer(INTERP, info);
+        sub->vtable_index   = VTABLE_shift_integer(INTERP, info);
 
-            sub->subid        = VTABLE_shift_string(INTERP, io);
-        }
+        for (i = 0; i < 4; ++i)
+            sub->n_regs_used[i] = VTABLE_shift_integer(INTERP, info);
+
+        sub->subid        = VTABLE_shift_string(INTERP, info);
     }
 
 /*

Modified: branches/gc_encapsulate/src/pmc/task.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/task.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/task.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -396,13 +396,8 @@
 */
 
     VTABLE void visit(visit_info *info) {
-        Parrot_Task_attributes * const core_struct = PARROT_TASK(SELF);
-        PMC **pos;
-
         /* 1) visit code block */
-        pos            = &core_struct->codeblock;
-        info->thaw_ptr = pos;
-        (info->visit_pmc_now)(INTERP, *pos, info);
+        VISIT_PMC_ATTR(INTERP, info, SELF, Task, codeblock);
     }
 
 /*
@@ -416,26 +411,25 @@
 */
 
     VTABLE void freeze(visit_info *info) {
-        IMAGE_IO * const io = info->image_io;
         const Parrot_Task_attributes * const core_struct = PARROT_TASK(SELF);
 
         /* 1) freeze task id */
-        VTABLE_push_integer(INTERP, io, core_struct->id);
+        VTABLE_push_integer(INTERP, info, core_struct->id);
 
         /* 2) freeze task birthtime */
-        VTABLE_push_float(INTERP, io, core_struct->birthtime);
+        VTABLE_push_float(INTERP, info, core_struct->birthtime);
 
         /* 3) freeze task priority */
-        VTABLE_push_integer(INTERP, io, core_struct->priority);
+        VTABLE_push_integer(INTERP, info, core_struct->priority);
 
         /* 4) freeze task type */
-        VTABLE_push_string(INTERP, io, core_struct->type);
+        VTABLE_push_string(INTERP, info, core_struct->type);
 
         /* 5) freeze task subtype */
-        VTABLE_push_string(INTERP, io, core_struct->subtype);
+        VTABLE_push_string(INTERP, info, core_struct->subtype);
 
         /* 6) freeze task status */
-        VTABLE_push_string(INTERP, io, core_struct->status);
+        VTABLE_push_string(INTERP, info, core_struct->status);
     }
 
 /*
@@ -449,25 +443,23 @@
 */
 
     VTABLE void thaw(visit_info *info) {
-        IMAGE_IO * const io = info->image_io;
-
         /* 1. thaw task id */
-        const INTVAL id = VTABLE_shift_integer(INTERP, io);
+        const INTVAL id = VTABLE_shift_integer(INTERP, info);
 
         /* 2. thaw task birthtime */
-        const FLOATVAL birthtime = VTABLE_shift_float(INTERP, io);
+        const FLOATVAL birthtime = VTABLE_shift_float(INTERP, info);
 
         /* 3. thaw task priority */
-        const INTVAL priority = VTABLE_shift_integer(INTERP, io);
+        const INTVAL priority = VTABLE_shift_integer(INTERP, info);
 
         /* 4. thaw task type */
-        STRING * const type = VTABLE_shift_string(INTERP, io);
+        STRING * const type = VTABLE_shift_string(INTERP, info);
 
         /* 5. thaw task subtype */
-        STRING * const subtype = VTABLE_shift_string(INTERP, io);
+        STRING * const subtype = VTABLE_shift_string(INTERP, info);
 
         /* 6. thaw task status */
-        STRING * const status = VTABLE_shift_string(INTERP, io);
+        STRING * const status = VTABLE_shift_string(INTERP, info);
 
         /* Allocate the task's core data struct and set custom flags. */
         SELF.init();

Modified: branches/gc_encapsulate/src/pmc/unmanagedstruct.pmc
==============================================================================
--- branches/gc_encapsulate/src/pmc/unmanagedstruct.pmc	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc/unmanagedstruct.pmc	Thu Jan 28 09:35:26 2010	(r43633)
@@ -90,9 +90,10 @@
         PMC * const types = PARROT_UNMANAGEDSTRUCT(pmc)->init;
 
         if (types->vtable->base_type == enum_class_OrderedHash) {
-            Hash       * const hash = (Hash *)VTABLE_get_pointer(interp, types);
+            Hash       * const hash = (Hash *)VTABLE_get_pointer(interp,
+                    VTABLE_get_pmc(interp, types));
             HashBucket * const b    = parrot_hash_get_bucket(interp, hash,
-                VTABLE_get_string(interp, key));
+                    hash_key_from_string(interp, hash, VTABLE_get_string(interp, key)));
 
             if (!b)
                 Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_KEY_NOT_FOUND,
@@ -185,7 +186,6 @@
             /* now point ptr to the real data */
             if (*type == enum_type_struct_ptr) {
                 /* that is either a pointer */
-                PARROT_ASSERT((PTR2INTVAL(p) & (PARROT_PTR_ALIGNMENT - 1)) == 0);
                 VTABLE_set_pointer(interp, init, *(void**)p);
             }
 
@@ -199,7 +199,6 @@
              * p is the location of the struct pointer in the
              * outer struct, the inner is at PMC_data(init) */
 
-            PARROT_ASSERT((PTR2INTVAL(p) & (PARROT_PTR_ALIGNMENT - 1)) == 0);
             *(void **)p = VTABLE_get_pointer(interp, init);
         }
 

Modified: branches/gc_encapsulate/src/pmc_freeze.c
==============================================================================
--- branches/gc_encapsulate/src/pmc_freeze.c	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/pmc_freeze.c	Thu Jan 28 09:35:26 2010	(r43633)
@@ -18,7 +18,7 @@
 Container PMCs call a "todo-callback" for all contained PMCs. The
 individual action vtable (freeze/thaw) is then called for all todo-PMCs.
 
-In the current implementation C<IMAGE_IO> is a stand-in for some kind of
+In the current implementation C<visit_info> is a stand-in for some kind of
 serializer PMC which will eventually be written. It associates a Parrot
 C<STRING> with a vtable.
 
@@ -34,7 +34,7 @@
 /* HEADERIZER BEGIN: static */
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 
-static void create_image(PARROT_INTERP,
+static void create_buffer(PARROT_INTERP,
     ARGIN_NULLOK(PMC *pmc),
     ARGMOD(visit_info *info))
         __attribute__nonnull__(1)
@@ -42,152 +42,98 @@
         FUNC_MODIFIES(*info);
 
 PARROT_INLINE
-static void do_action(PARROT_INTERP,
-    ARGIN_NULLOK(PMC *pmc),
-    ARGIN(visit_info *info),
-    int seen,
-    UINTVAL id)
+static void ensure_buffer_size(PARROT_INTERP,
+    ARGIN(visit_info *io),
+    size_t len)
         __attribute__nonnull__(1)
-        __attribute__nonnull__(3);
+        __attribute__nonnull__(2);
 
-PARROT_INLINE
-static void do_thaw(PARROT_INTERP,
-    ARGIN_NULLOK(PMC *pmc),
-    ARGIN(visit_info *info))
+static INTVAL get_visit_integer(PARROT_INTERP, ARGIN(visit_info *io))
         __attribute__nonnull__(1)
-        __attribute__nonnull__(3);
+        __attribute__nonnull__(2);
 
 PARROT_INLINE
-static void freeze_pmc(PARROT_INTERP,
-    ARGIN_NULLOK(PMC *pmc),
-    ARGIN(visit_info *info),
-    int seen,
-    UINTVAL id)
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(3);
-
-static void ft_init(PARROT_INTERP, ARGIN(visit_info *info))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+static INTVAL INFO_HAS_DATA(ARGIN(visit_info *io))
+        __attribute__nonnull__(1);
 
 PARROT_INLINE
-static void op_check_size(PARROT_INTERP, ARGIN(STRING *s), size_t len)
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
+static INTVAL OUTPUT_LENGTH(ARGIN(visit_info *io))
+        __attribute__nonnull__(1);
 
 static void push_opcode_integer(PARROT_INTERP,
-    ARGIN(IMAGE_IO *io),
+    ARGIN(visit_info *io),
     INTVAL v)
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
 static void push_opcode_number(PARROT_INTERP,
-    ARGIN(IMAGE_IO *io),
+    ARGIN(visit_info *io),
     FLOATVAL v)
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
 static void push_opcode_string(PARROT_INTERP,
-    ARGIN(IMAGE_IO *io),
+    ARGIN(visit_info *io),
     ARGIN(STRING *v))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         __attribute__nonnull__(3);
 
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-static PMC* run_thaw(PARROT_INTERP,
-    ARGIN(STRING* image),
-    visit_enum_type what)
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
-
-static INTVAL shift_opcode_integer(SHIM_INTERP, ARGIN(IMAGE_IO *io))
+static INTVAL shift_opcode_integer(SHIM_INTERP, ARGIN(visit_info *io))
         __attribute__nonnull__(2);
 
-static FLOATVAL shift_opcode_number(SHIM_INTERP, ARGIN(IMAGE_IO *io))
+static FLOATVAL shift_opcode_number(SHIM_INTERP, ARGIN(visit_info *io))
         __attribute__nonnull__(2);
 
 PARROT_WARN_UNUSED_RESULT
 PARROT_CANNOT_RETURN_NULL
-static STRING* shift_opcode_string(PARROT_INTERP, ARGIN(IMAGE_IO *io))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
-
-PARROT_INLINE
-PARROT_CANNOT_RETURN_NULL
-static PMC* thaw_create_pmc(PARROT_INTERP,
-    ARGIN(const visit_info *info),
-    INTVAL type)
+static STRING* shift_opcode_string(PARROT_INTERP, ARGIN(visit_info *io))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
-PARROT_INLINE
-static int thaw_pmc(PARROT_INTERP,
-    ARGMOD(visit_info *info),
-    ARGOUT(UINTVAL *id),
-    ARGOUT(INTVAL *type))
+static void visit_info_init(PARROT_INTERP,
+    ARGOUT(visit_info *info),
+    visit_enum_type what,
+    ARGIN(STRING *input),
+    ARGIN(PMC *pmc))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
-        __attribute__nonnull__(3)
         __attribute__nonnull__(4)
-        FUNC_MODIFIES(*info)
-        FUNC_MODIFIES(*id)
-        FUNC_MODIFIES(*type);
-
-static void todo_list_init(PARROT_INTERP, ARGOUT(visit_info *info))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
+        __attribute__nonnull__(5)
         FUNC_MODIFIES(*info);
 
-PARROT_INLINE
-static int todo_list_seen(PARROT_INTERP,
-    ARGIN(PMC *pmc),
-    ARGMOD(visit_info *info),
-    ARGOUT(UINTVAL *id))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        __attribute__nonnull__(3)
-        __attribute__nonnull__(4)
-        FUNC_MODIFIES(*info)
-        FUNC_MODIFIES(*id);
-
 static void visit_loop_todo_list(PARROT_INTERP,
     ARGIN_NULLOK(PMC *current),
     ARGIN(visit_info *info))
         __attribute__nonnull__(1)
         __attribute__nonnull__(3);
 
-static void visit_todo_list(PARROT_INTERP,
+static void visit_todo_list_freeze(PARROT_INTERP,
     ARGIN_NULLOK(PMC* pmc),
     ARGIN(visit_info* info))
         __attribute__nonnull__(1)
         __attribute__nonnull__(3);
 
+PARROT_INLINE
 static void visit_todo_list_thaw(PARROT_INTERP,
-    ARGIN_NULLOK(PMC* old),
+    SHIM(PMC* pmc_not_used),
     ARGIN(visit_info* info))
         __attribute__nonnull__(1)
         __attribute__nonnull__(3);
 
-#define ASSERT_ARGS_create_image __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_create_buffer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(info))
-#define ASSERT_ARGS_do_action __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_ensure_buffer_size __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(info))
-#define ASSERT_ARGS_do_thaw __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(info))
-#define ASSERT_ARGS_freeze_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(info))
-#define ASSERT_ARGS_ft_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(info))
-#define ASSERT_ARGS_op_check_size __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+    , PARROT_ASSERT_ARG(io))
+#define ASSERT_ARGS_get_visit_integer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(s))
+    , PARROT_ASSERT_ARG(io))
+#define ASSERT_ARGS_INFO_HAS_DATA __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(io))
+#define ASSERT_ARGS_OUTPUT_LENGTH __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(io))
 #define ASSERT_ARGS_push_opcode_integer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(io))
@@ -198,9 +144,6 @@
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(io) \
     , PARROT_ASSERT_ARG(v))
-#define ASSERT_ARGS_run_thaw __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(image))
 #define ASSERT_ARGS_shift_opcode_integer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(io))
 #define ASSERT_ARGS_shift_opcode_number __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -208,26 +151,15 @@
 #define ASSERT_ARGS_shift_opcode_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(io))
-#define ASSERT_ARGS_thaw_create_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(info))
-#define ASSERT_ARGS_thaw_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_visit_info_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(info) \
-    , PARROT_ASSERT_ARG(id) \
-    , PARROT_ASSERT_ARG(type))
-#define ASSERT_ARGS_todo_list_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(info))
-#define ASSERT_ARGS_todo_list_seen __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(pmc) \
-    , PARROT_ASSERT_ARG(info) \
-    , PARROT_ASSERT_ARG(id))
+    , PARROT_ASSERT_ARG(input) \
+    , PARROT_ASSERT_ARG(pmc))
 #define ASSERT_ARGS_visit_loop_todo_list __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(info))
-#define ASSERT_ARGS_visit_todo_list __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_visit_todo_list_freeze __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(info))
 #define ASSERT_ARGS_visit_todo_list_thaw __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -256,8 +188,6 @@
 enum {
     enum_PackID_normal     = 0,
     enum_PackID_seen       = 1,
-    enum_PackID_prev_type  = 2,
-    enum_PackID_extra_info = 3
 };
 
 /*
@@ -266,7 +196,8 @@
 
 =over 4
 
-=item C<static void op_check_size(PARROT_INTERP, STRING *s, size_t len)>
+=item C<static void ensure_buffer_size(PARROT_INTERP, visit_info *io, size_t
+len)>
 
 Checks the size of the "stream" buffer to see if it can accommodate
 C<len> more bytes. If not, expands the buffer.
@@ -275,21 +206,35 @@
 
 */
 
+#define GET_VISIT_CURSOR(io) \
+    ((opcode_t *)(((char *)Buffer_bufstart((io)->buffer) + (io)->pos)))
+#define SET_VISIT_CURSOR(io, x) do {\
+    (io)->pos = ((char *)(x) - (char *)Buffer_bufstart((io)->buffer)); \
+} while (0)
+#define INC_VISIT_CURSOR(io, x) do {\
+    (io)->pos += (x); \
+} while (0)
+
+#define BYTECODE_SHIFT_OK(io) PARROT_ASSERT((io)->pos <= (io)->input_length)
+
+
 PARROT_INLINE
 static void
-op_check_size(PARROT_INTERP, ARGIN(STRING *s), size_t len)
+ensure_buffer_size(PARROT_INTERP, ARGIN(visit_info *io), size_t len)
 {
-    ASSERT_ARGS(op_check_size)
-    const size_t used      = s->bufused;
-    const int    need_free = (int)Buffer_buflen(s) - used - len;
+    ASSERT_ARGS(ensure_buffer_size)
+    Buffer *buf         = io->buffer;
+    const size_t used   = io->pos;
+    const int need_free = Buffer_buflen(buf) - used - len;
 
     /* grow by factor 1.5 or such */
     if (need_free <= 16) {
-        size_t new_size = (size_t) (Buffer_buflen(s) * 1.5);
-        if (new_size < Buffer_buflen(s) - need_free + 512)
-            new_size = Buffer_buflen(s) - need_free + 512;
-        Parrot_gc_reallocate_string_storage(interp, s, new_size);
-        PARROT_ASSERT(Buffer_buflen(s) - used - len >= 15);
+        size_t new_size = (size_t) (Buffer_buflen(buf) * 1.5);
+        if (new_size < Buffer_buflen(buf) - need_free + 512)
+            new_size = Buffer_buflen(buf) - need_free + 512;
+        Parrot_gc_reallocate_buffer_storage(interp, buf, new_size);
+
+        PARROT_ASSERT(Buffer_buflen(buf) - used - len >= 15);
     }
 
 #ifndef DISABLE_GC_DEBUG
@@ -298,10 +243,61 @@
 
 }
 
+/*
+
+=item C<static INTVAL OUTPUT_LENGTH(visit_info *io)>
+
+XXX TODO
+
+=cut
+
+*/
+
+PARROT_INLINE
+static INTVAL
+OUTPUT_LENGTH(ARGIN(visit_info *io)) {
+    ASSERT_ARGS(OUTPUT_LENGTH)
+    return io->pos;
+}
+
+/*
+
+=item C<static INTVAL INFO_HAS_DATA(visit_info *io)>
+
+XXX TODO
+
+=cut
+
+*/
+
+PARROT_INLINE
+static INTVAL
+INFO_HAS_DATA(ARGIN(visit_info *io)) {
+    ASSERT_ARGS(INFO_HAS_DATA)
+    return io->pos < io->input_length;
+}
+
 
 /*
 
-=item C<static void push_opcode_integer(PARROT_INTERP, IMAGE_IO *io, INTVAL v)>
+=item C<static INTVAL get_visit_integer(PARROT_INTERP, visit_info *io)>
+
+get the flags describing the visit action
+
+=cut
+
+*/
+
+static INTVAL
+get_visit_integer(PARROT_INTERP, ARGIN(visit_info *io)) {
+    ASSERT_ARGS(get_visit_integer)
+    return io->what;
+}
+
+/*
+
+=item C<static void push_opcode_integer(PARROT_INTERP, visit_info *io, INTVAL
+v)>
 
 Pushes the integer C<v> onto the end of the C<*io> "stream".
 
@@ -312,21 +308,19 @@
 */
 
 static void
-push_opcode_integer(PARROT_INTERP, ARGIN(IMAGE_IO *io), INTVAL v)
+push_opcode_integer(PARROT_INTERP, ARGIN(visit_info *io), INTVAL v)
 {
     ASSERT_ARGS(push_opcode_integer)
-    UINTVAL size = sizeof (opcode_t);
-    STRING   *op = Parrot_str_new_init(interp, (char *)&v, size,
-        Parrot_fixed_8_encoding_ptr, Parrot_binary_charset_ptr, 0);
-
-    PARROT_ASSERT(sizeof (opcode_t) == sizeof (INTVAL));
-    io->image = Parrot_str_append(interp, io->image, op);
+    size_t len = PF_size_integer() * sizeof (opcode_t);
+    ensure_buffer_size(interp, io, len);
+    SET_VISIT_CURSOR(io, PF_store_integer(GET_VISIT_CURSOR(io), v));
 }
 
 
 /*
 
-=item C<static void push_opcode_number(PARROT_INTERP, IMAGE_IO *io, FLOATVAL v)>
+=item C<static void push_opcode_number(PARROT_INTERP, visit_info *io, FLOATVAL
+v)>
 
 Pushes the number C<v> onto the end of the C<*io> "stream".
 
@@ -335,24 +329,19 @@
 */
 
 static void
-push_opcode_number(PARROT_INTERP, ARGIN(IMAGE_IO *io), FLOATVAL v)
+push_opcode_number(PARROT_INTERP, ARGIN(visit_info *io), FLOATVAL v)
 {
     ASSERT_ARGS(push_opcode_number)
-    UINTVAL   len    = PF_size_number() * sizeof (opcode_t);
-    opcode_t *buffer = (opcode_t *)mem_sys_allocate(len);
-    opcode_t *ignore = PF_store_number(buffer, &v);
-    STRING   *number = Parrot_str_new_init(interp, (char *)buffer, len,
-        Parrot_fixed_8_encoding_ptr, Parrot_binary_charset_ptr, 0);
-
-    UNUSED(ignore);
-    io->image = Parrot_str_append(interp, io->image, number);
-    mem_sys_free(buffer);
+    size_t len = PF_size_number() * sizeof (opcode_t);
+    ensure_buffer_size(interp, io, len);
+    SET_VISIT_CURSOR(io, PF_store_number(GET_VISIT_CURSOR(io), &v));
 }
 
 
 /*
 
-=item C<static void push_opcode_string(PARROT_INTERP, IMAGE_IO *io, STRING *v)>
+=item C<static void push_opcode_string(PARROT_INTERP, visit_info *io, STRING
+*v)>
 
 Pushes the string C<*v> onto the end of the C<*io> "stream".
 
@@ -361,25 +350,34 @@
 */
 
 static void
-push_opcode_string(PARROT_INTERP, ARGIN(IMAGE_IO *io), ARGIN(STRING *v))
+push_opcode_string(PARROT_INTERP, ARGIN(visit_info *io), ARGIN(STRING *v))
 {
     ASSERT_ARGS(push_opcode_string)
+    size_t len = PF_size_string(v) * sizeof (opcode_t);
+    ensure_buffer_size(interp, io, len);
+    SET_VISIT_CURSOR(io, PF_store_string(GET_VISIT_CURSOR(io), v));
+}
 
-    size_t    len    = PF_size_string(v) * sizeof (opcode_t);
-    opcode_t *buffer = (opcode_t *)mem_sys_allocate(len);
-    opcode_t *ignore = PF_store_string(buffer, v);
-    STRING   *number = Parrot_str_new_init(interp, (char *)buffer, len,
-        Parrot_fixed_8_encoding_ptr, Parrot_binary_charset_ptr, 0);
+/*
 
-    UNUSED(ignore);
-    io->image = Parrot_str_append(interp, io->image, number);
-    mem_sys_free(buffer);
-}
+=item C<static void push_opcode_pmc(PARROT_INTERP, visit_info *io, PMC *v)>
 
+Pushes a reference to pmc C<*v> onto the end of the C<*io> "stream". If C<*v>
+hasn't been seen yet, it is also pushed onto the todo list.
+
+=cut
+
+*/
+
+static void
+push_opcode_pmc(PARROT_INTERP, ARGIN(visit_info *io), ARGIN(PMC *v)) {
+    io->thaw_ptr = &v;
+    (io->visit_pmc_now)(interp, v, io);
+}
 
 /*
 
-=item C<static INTVAL shift_opcode_integer(PARROT_INTERP, IMAGE_IO *io)>
+=item C<static INTVAL shift_opcode_integer(PARROT_INTERP, visit_info *io)>
 
 Removes and returns an integer from the start of the C<*io> "stream".
 
@@ -388,26 +386,20 @@
 */
 
 static INTVAL
-shift_opcode_integer(SHIM_INTERP, ARGIN(IMAGE_IO *io))
+shift_opcode_integer(SHIM_INTERP, ARGIN(visit_info *io))
 {
     ASSERT_ARGS(shift_opcode_integer)
-    const char * const   start  = (char *)io->image->strstart;
-    char               **opcode = &io->image->strstart;
-    const INTVAL i              = PF_fetch_integer(io->pf,
-                                    (const opcode_t **)opcode);
-
-    io->image->bufused -= ((char *)io->image->strstart - start);
-    io->image->strlen  -= ((char *)io->image->strstart - start);
-
-    PARROT_ASSERT((int)io->image->bufused >= 0);
-
+    opcode_t *pos  = GET_VISIT_CURSOR(io);
+    const INTVAL i = PF_fetch_integer(io->pf, (const opcode_t **)&pos);
+    SET_VISIT_CURSOR(io, pos);
+    BYTECODE_SHIFT_OK(io);
     return i;
 }
 
 
 /*
 
-=item C<static FLOATVAL shift_opcode_number(PARROT_INTERP, IMAGE_IO *io)>
+=item C<static FLOATVAL shift_opcode_number(PARROT_INTERP, visit_info *io)>
 
 Removes and returns an number from the start of the C<*io> "stream".
 
@@ -416,27 +408,20 @@
 */
 
 static FLOATVAL
-shift_opcode_number(SHIM_INTERP, ARGIN(IMAGE_IO *io))
+shift_opcode_number(SHIM_INTERP, ARGIN(visit_info *io))
 {
     ASSERT_ARGS(shift_opcode_number)
-
-    const char * const   start  = (const char *)io->image->strstart;
-    char               **opcode = &io->image->strstart;
-    const FLOATVAL       f      = PF_fetch_number(io->pf,
-                                    (const opcode_t **)opcode);
-
-    io->image->bufused -= ((char *)io->image->strstart - start);
-    io->image->strlen  -= ((char *)io->image->strstart - start);
-
-    PARROT_ASSERT((int)io->image->bufused >= 0);
-
+    opcode_t *pos     = GET_VISIT_CURSOR(io);
+    const FLOATVAL f  = PF_fetch_number(io->pf, (const opcode_t **)&pos);
+    SET_VISIT_CURSOR(io, pos);
+    BYTECODE_SHIFT_OK(io);
     return f;
 }
 
 
 /*
 
-=item C<static STRING* shift_opcode_string(PARROT_INTERP, IMAGE_IO *io)>
+=item C<static STRING* shift_opcode_string(PARROT_INTERP, visit_info *io)>
 
 Removes and returns a string from the start of the C<*io> "stream".
 
@@ -444,27 +429,39 @@
 
 */
 
+
 PARROT_WARN_UNUSED_RESULT
 PARROT_CANNOT_RETURN_NULL
 static STRING*
-shift_opcode_string(PARROT_INTERP, ARGIN(IMAGE_IO *io))
+shift_opcode_string(PARROT_INTERP, ARGIN(visit_info *io))
 {
     ASSERT_ARGS(shift_opcode_string)
+    opcode_t *pos    = GET_VISIT_CURSOR(io);
+    STRING * const s = PF_fetch_string(interp, io->pf, (const opcode_t **)&pos);
+    SET_VISIT_CURSOR(io, pos);
+    BYTECODE_SHIFT_OK(io);
+    return s;
+}
 
-    char * const   start  = (char*)io->image->strstart;
-    char *         opcode = io->image->strstart;
-    STRING * const s      = PF_fetch_string(interp, io->pf,
-                                (const opcode_t **)&opcode);
-
-    io->image->strstart = opcode;
-    io->image->bufused -= (opcode - start);
-    io->image->strlen  -= (opcode - start);
+/*
 
-    PARROT_ASSERT((int)io->image->bufused >= 0);
+=item C<static PMC *shift_opcode_pmc(PARROT_INTERP, visit_info *io)>
 
-    return s;
-}
+Removes and returns a reference to a pmc from the start of the C<*io> "stream".
+
+=cut
 
+*/
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+static PMC *
+shift_opcode_pmc(PARROT_INTERP, ARGIN(visit_info *io)) {
+    PMC *result;
+    io->thaw_ptr = &result;
+    (io->visit_pmc_now)(interp, NULL, io);
+    return result;
+}
 
 /*
 
@@ -485,115 +482,107 @@
  */
 
 static image_funcs opcode_funcs = {
+    get_visit_integer,
     push_opcode_integer,
     push_opcode_string,
     push_opcode_number,
+    push_opcode_pmc,
     shift_opcode_integer,
     shift_opcode_string,
-    shift_opcode_number
+    shift_opcode_number,
+    shift_opcode_pmc
 };
 
 /*
 
-=item C<static void ft_init(PARROT_INTERP, visit_info *info)>
+=item C<static void visit_info_init(PARROT_INTERP, visit_info *info,
+visit_enum_type what, STRING *input, PMC *pmc)>
 
-Initializes the freeze/thaw subsystem.
+Initializes the C<*info> lists.
 
 =cut
 
 */
+#define GROW_TO_16_BYTE_BOUNDARY(size) ((size) + ((size) % 16 ? 16 - (size) % 16 : 0))
 
 static void
-ft_init(PARROT_INTERP, ARGIN(visit_info *info))
+visit_info_init(PARROT_INTERP, ARGOUT(visit_info *info),
+  visit_enum_type what, ARGIN(STRING *input), ARGIN(PMC *pmc))
 {
-    ASSERT_ARGS(ft_init)
-    STRING   *s = info->image;
-    PackFile *pf;
-
-    /* We want to store a 16-byte aligned header, but the actual
-     * header may be shorter. */
-    const unsigned int header_length = PACKFILE_HEADER_BYTES +
-        (PACKFILE_HEADER_BYTES % 16 ?
-         16 - PACKFILE_HEADER_BYTES % 16 : 0);
-
-    info->image_io         = mem_allocate_typed(IMAGE_IO);
-    info->image_io->image  = s = info->image;
-
-    info->image_io->vtable = &opcode_funcs;
-
-    pf = info->image_io->pf = PackFile_new(interp, 0);
-
-    if (info->what == VISIT_FREEZE_NORMAL
-    ||  info->what == VISIT_FREEZE_AT_DESTRUCT) {
-
-        op_check_size(interp, s, header_length);
-        mem_sys_memcopy(s->strstart, pf->header, PACKFILE_HEADER_BYTES);
-        s->bufused += header_length;
-        s->strlen  += header_length;
-    }
-    else {
-        if (Parrot_str_byte_length(interp, s) < header_length) {
-            Parrot_ex_throw_from_c_args(interp, NULL,
-                EXCEPTION_INVALID_STRING_REPRESENTATION,
-                "bad string to thaw");
-        }
-
-        /* TT #749: use the validation logic from Packfile_unpack */
-        if (pf->header->bc_major != PARROT_PBC_MAJOR
-        ||  pf->header->bc_minor != PARROT_PBC_MINOR)
+    ASSERT_ARGS(visit_info_init)
+    /* We want to store a 16-byte aligned header, but the actual * header may be shorter. */
+    const unsigned int header_length = GROW_TO_16_BYTE_BOUNDARY(PACKFILE_HEADER_BYTES);
+
+    PackFile *pf = info->pf = PackFile_new(interp, 0);
+    info->what = what;
+    info->vtable = &opcode_funcs;
+    info->image_io = info; /* backwards-compat hack */
+
+    if (info->what == VISIT_FREEZE_NORMAL) {
+        info->visit_pmc_now  = visit_todo_list_freeze;
+        create_buffer(interp, pmc, info);
+        ensure_buffer_size(interp, info, header_length);
+        mem_sys_memcopy(GET_VISIT_CURSOR(info), pf->header, PACKFILE_HEADER_BYTES);
+        INC_VISIT_CURSOR(info, header_length);
+    }
+    else { /* VISIT_THAW_ */
+        int unpacked_length;
+        info->visit_pmc_now    = visit_todo_list_thaw;
+        info->buffer = (Buffer *)input;
+        PARROT_ASSERT(input->_bufstart == input->strstart);
+        SET_VISIT_CURSOR(info, Buffer_bufstart(info->buffer));
+        info->input_length = input->strlen;
+
+        pf->options |= PFOPT_PMC_FREEZE_ONLY;
+        unpacked_length = PackFile_unpack(interp, pf, GET_VISIT_CURSOR(info), info->input_length);
+        if (!unpacked_length) {
+            PackFile_destroy(interp, info->pf);
             Parrot_ex_throw_from_c_args(interp, NULL,
                     EXCEPTION_INVALID_STRING_REPRESENTATION,
-                    "can't thaw a PMC from Parrot %d.%d", pf->header->bc_major,
-                    pf->header->bc_minor);
-
-        mem_sys_memcopy(pf->header, s->strstart, PACKFILE_HEADER_BYTES);
-        PackFile_assign_transforms(pf);
-
-        s->bufused -= header_length;
-        s->strlen  -= header_length;
-
-        LVALUE_CAST(char *, s->strstart) += header_length;
+                    "PackFile header failed during unpack");
+        }
+        else {
+            INC_VISIT_CURSOR(info, header_length);
+        }
     }
 
-    info->last_type   = -1;
-    info->id_list     = pmc_new(interp, enum_class_Array);
+    /* we must use PMCs here so that they get marked properly */
+    info->todo        = pmc_new(interp, enum_class_Array);
+    if (info->what == VISIT_FREEZE_NORMAL) {
+        info->seen    = pmc_new(interp, enum_class_Hash);
+        VTABLE_set_pointer(interp, info->seen, parrot_new_intval_hash(interp));
+        info->id_list = PMCNULL;
+    }
+    else {
+        info->seen    = PMCNULL;
+        info->id_list = pmc_new(interp, enum_class_Array);
+    }
     info->id          = 0;
     info->extra_flags = EXTRA_IS_NULL;
-}
-
 
-/*
-
-=item C<static void todo_list_init(PARROT_INTERP, visit_info *info)>
-
-Initializes the C<*info> lists.
-
-=cut
+    visit_loop_todo_list(interp, pmc, info);
+    PackFile_destroy(interp, info->pf);
+}
 
-*/
 
-static void
-todo_list_init(PARROT_INTERP, ARGOUT(visit_info *info))
-{
-    ASSERT_ARGS(todo_list_init)
-    info->visit_pmc_now   = visit_todo_list;
-
-    /* we must use PMCs here so that they get marked properly */
-    info->todo = pmc_new(interp, enum_class_Array);
-    info->seen = pmc_new(interp, enum_class_Hash);
-    VTABLE_set_pointer(interp, info->seen, parrot_new_intval_hash(interp));
+PARROT_INLINE
+static PMC*
+id_list_get(PARROT_INTERP, ARGIN(visit_info *info), UINTVAL id) {
+    List * const id_list = (List *)PMC_data(info->id_list);
+    PMC **pos = (PMC **)Parrot_pmc_array_get(interp, id_list, id, enum_type_PMC);
 
-    ft_init(interp, info);
+    if (pos && pos != ((void *)-1))
+        return *pos;
+    return NULL;
 }
 
-
 /*
 
-=item C<static void freeze_pmc(PARROT_INTERP, PMC *pmc, visit_info *info, int
-seen, UINTVAL id)>
+=item C<static void visit_todo_list_thaw(PARROT_INTERP, PMC* pmc_not_used,
+visit_info* info)>
 
-Freeze PMC, setting type, seen, and "same-as-last" indicators as
-appropriate.
+Callback for thaw - action first.
+thaws and return a PMC.
 
 =cut
 
@@ -601,361 +590,98 @@
 
 PARROT_INLINE
 static void
-freeze_pmc(PARROT_INTERP, ARGIN_NULLOK(PMC *pmc), ARGIN(visit_info *info),
-        int seen, UINTVAL id)
+visit_todo_list_thaw(PARROT_INTERP, SHIM(PMC* pmc_not_used), ARGIN(visit_info* info))
 {
-    ASSERT_ARGS(freeze_pmc)
-    IMAGE_IO * const io = info->image_io;
-    INTVAL           type;
-
-    if (PMC_IS_NULL(pmc)) {
-        /* NULL + seen bit */
-        VTABLE_push_integer(interp, io, PackID_new(NULL, enum_PackID_seen));
-        return;
-    }
-
-    type = pmc->vtable->base_type;
-
-    if (PObj_is_object_TEST(pmc))
-        type = enum_class_Object;
-
-    if (seen) {
-        if (info->extra_flags) {
-            PackID_set_FLAGS(id, enum_PackID_extra_info);
-            VTABLE_push_integer(interp, io, id);
-            VTABLE_push_integer(interp, io, info->extra_flags);
-            return;
-        }
-
-        PackID_set_FLAGS(id, enum_PackID_seen);
-    }
-    else if (type == info->last_type)
-        PackID_set_FLAGS(id, enum_PackID_prev_type);
-
-    VTABLE_push_integer(interp, io, id);
-
-    if (PackID_get_FLAGS(id) == enum_PackID_normal) {
-        /* write type */
-        VTABLE_push_integer(interp, io, type);
-        info->last_type = type;
-    }
-}
-
-
-/*
-
-=item C<static int thaw_pmc(PARROT_INTERP, visit_info *info, UINTVAL *id, INTVAL
-*type)>
-
-Freeze and thaw a PMC (id).
-
-For example, the ASCII representation of the C<Array>
-
-    P0 = [P1=666, P2=777, P0]
-
-may look like this:
-
-    0xdf4 30 3 0xdf8 33 666 0xdf2 777 0xdf5
-
-where 30 is C<class_enum_Array>, 33 is C<class_enum_Integer>, the
-type of the second C<Integer> is suppressed, the repeated P0 has bit 0
-set.
+    ASSERT_ARGS(visit_todo_list_thaw)
 
-=cut
+    UINTVAL  n            = VTABLE_shift_integer(interp, info);
+    UINTVAL  id           = PackID_get_PMCID(n);
+    int      packid_flags = PackID_get_FLAGS(n);
+    PMC     *pmc          = PMCNULL;
 
-*/
+    PARROT_ASSERT(info->what == VISIT_THAW_NORMAL);
 
-PARROT_INLINE
-static int
-thaw_pmc(PARROT_INTERP, ARGMOD(visit_info *info),
-        ARGOUT(UINTVAL *id), ARGOUT(INTVAL *type))
-{
-    ASSERT_ARGS(thaw_pmc)
-    IMAGE_IO * const io   = info->image_io;
-    UINTVAL          n    = VTABLE_shift_integer(interp, io);
-    int              seen = 0;
-
-    info->extra_flags     = EXTRA_IS_NULL;
-
-    switch (PackID_get_FLAGS(n)) {
-      case enum_PackID_extra_info:
-        /* pmc has extra data */
-        info->extra_flags = VTABLE_shift_integer(interp, io);
-        break;
+    switch (packid_flags) {
       case enum_PackID_seen:
-        seen = 1;
-        break;
-      case enum_PackID_prev_type:
-        /* prev PMC was same type */
-        *type = info->last_type;
+        if (id) /* got a non-NULL PMC */
+            pmc = id_list_get(interp, info, id);
         break;
-      default:
-        /* type follows */
+      case enum_PackID_normal:
         {
-            *type           = VTABLE_shift_integer(interp, io);
-            info->last_type = *type;
-
-            if (*type <= 0)
-                Parrot_ex_throw_from_c_args(interp, NULL, 1,
-                    "Unknown PMC type to thaw %d", (int) *type);
-
-            /* that ought to be a class */
-            if (*type >= interp->n_vtable_max || !interp->vtables[*type])
-                *type = enum_class_Class;
+            INTVAL type = VTABLE_shift_integer(interp, info);
+            if (type <= 0 || type > interp->n_vtable_max)
+                Parrot_ex_throw_from_c_args(interp, NULL, 1, "Unknown PMC type to thaw %d", type);
+
+            pmc = pmc_new_noinit(interp, type);
+            VTABLE_thaw(interp, pmc, info);
+
+            {
+                List * const todo    = (List *)PMC_data(info->todo);
+                List * const id_list = (List *)PMC_data(info->id_list);
+                Parrot_pmc_array_assign(interp, id_list, id, pmc, enum_type_PMC);
+                /* remember nested aggregates depth first */
+                Parrot_pmc_array_unshift(interp, todo, pmc, enum_type_PMC);
+            }
         }
         break;
-    }
-
-    *id = n;
-    return seen;
-}
-
-
-/*
-
-=item C<static void do_action(PARROT_INTERP, PMC *pmc, visit_info *info, int
-seen, UINTVAL id)>
-
-Called from C<visit_todo_list()> to perform the action specified in
-C<< info->what >>.
-
-Currently only C<VISIT_FREEZE_NORMAL> and C<VISIT_FREEZE_AT_DESTRUCT> are
-implemented.
-
-=cut
-
-*/
-
-PARROT_INLINE
-static void
-do_action(PARROT_INTERP, ARGIN_NULLOK(PMC *pmc), ARGIN(visit_info *info),
-        int seen, UINTVAL id)
-{
-    ASSERT_ARGS(do_action)
-    switch (info->what) {
-      case VISIT_FREEZE_AT_DESTRUCT:
-      case VISIT_FREEZE_NORMAL:
-        freeze_pmc(interp, pmc, info, seen, id);
-        if (pmc)
-            info->visit_action = pmc->vtable->freeze;
-        break;
       default:
-        Parrot_ex_throw_from_c_args(interp, NULL, 1, "Illegal action %ld",
-                (long)info->what);
-    }
-}
-
-
-/*
-
-=item C<static PMC* thaw_create_pmc(PARROT_INTERP, const visit_info *info,
-INTVAL type)>
-
-Called from C<do_thaw()> to attach the vtable etc. to C<*pmc>.
-
-=cut
-
-*/
-
-PARROT_INLINE
-PARROT_CANNOT_RETURN_NULL
-static PMC*
-thaw_create_pmc(PARROT_INTERP, ARGIN(const visit_info *info),
-        INTVAL type)
-{
-    ASSERT_ARGS(thaw_create_pmc)
-    PMC *pmc;
-    switch (info->what) {
-      case VISIT_THAW_NORMAL:
-        pmc = pmc_new_noinit(interp, type);
+        Parrot_ex_throw_from_c_args(interp, NULL, 1, "Unknown PMC id args thaw %d", packid_flags);
         break;
-      case VISIT_THAW_CONSTANTS:
-        pmc = constant_pmc_new_noinit(interp, type);
-        break;
-      default:
-        Parrot_ex_throw_from_c_args(interp, NULL, 1,
-                "Illegal visit_next type");
     }
 
-    return pmc;
+    *info->thaw_ptr = pmc;
 }
 
 
 /*
 
-=item C<static void do_thaw(PARROT_INTERP, PMC *pmc, visit_info *info)>
-
-Called by C<visit_todo_list_thaw()> to thaw and return a PMC.
+=item C<static void visit_todo_list_freeze(PARROT_INTERP, PMC* pmc, visit_info*
+info)>
 
-C<seen> is false if this is the first time the PMC has been encountered.
+Checks the seen PMC via the todo list.
 
 =cut
 
 */
 
-PARROT_INLINE
 static void
-do_thaw(PARROT_INTERP, ARGIN_NULLOK(PMC *pmc), ARGIN(visit_info *info))
+visit_todo_list_freeze(PARROT_INTERP, ARGIN_NULLOK(PMC* pmc), ARGIN(visit_info* info))
 {
-    ASSERT_ARGS(do_thaw)
-    PMC **pos;
-
-    /* set below, but avoid compiler warning */
-    UINTVAL id             = 0;
-    INTVAL  type           = 0;
-    int     must_have_seen = thaw_pmc(interp, info, &id, &type);
-
-    id = PackID_get_PMCID(id);
-
-    if (!id) {
-        /* got a NULL PMC */
-        pmc = PMCNULL;
-        if (!info->thaw_result)
-            info->thaw_result = pmc;
-        else
-            *info->thaw_ptr = pmc;
-        return;
-    }
+    ASSERT_ARGS(visit_todo_list_freeze)
+    UINTVAL id;
+    int packid_type;
 
-    pos = (PMC **)Parrot_pmc_array_get(interp, (List *)PMC_data(info->id_list),
-        id, enum_type_PMC);
+    PARROT_ASSERT(info->what == VISIT_FREEZE_NORMAL);
 
-    if (pos == (void *)-1)
-        pos = NULL;
-    else if (pos) {
-        pmc = *(PMC **)pos;
-        if (!pmc)
-            pos = NULL;
+    if (PMC_IS_NULL(pmc)) {
+        id   = 0;
+        packid_type = enum_PackID_seen;
     }
-
-    if (pos) {
-        if (info->extra_flags == EXTRA_IS_PROP_HASH) {
-            interp->vtables[enum_class_default]->thaw(interp, pmc, info);
-            return;
+    else {
+        Hash *hash = (Hash *)VTABLE_get_pointer(interp, info->seen);
+        HashBucket * const b = parrot_hash_get_bucket(interp, hash, pmc);
+        if (b) {
+            id = (UINTVAL) b->value;
+            packid_type = enum_PackID_seen;
+        }
+        else {
+            info->id++; /* next id to freeze */
+            id = info->id;
+            packid_type = enum_PackID_normal;
         }
-
-        /* else maybe VTABLE_thaw ... but there is no other extra stuff */
-
-        PARROT_ASSERT(must_have_seen);
-
-        *info->thaw_ptr = pmc;
-        return;
-    }
-
-    PARROT_ASSERT(!must_have_seen);
-    pmc = thaw_create_pmc(interp, info, type);
-
-    VTABLE_thaw(interp, pmc, info);
-
-    if (info->extra_flags == EXTRA_CLASS_EXISTS) {
-        pmc               = (PMC *)info->extra;
-        info->extra       = NULL;
-        info->extra_flags = 0;
-    }
-
-    if (!info->thaw_result)
-        info->thaw_result = pmc;
-    else
-        *info->thaw_ptr = pmc;
-
-
-    Parrot_pmc_array_assign(interp, (List *)PMC_data(info->id_list), id, pmc, enum_type_PMC);
-
-    /* remember nested aggregates depth first */
-    Parrot_pmc_array_unshift(interp, (List *)PMC_data(info->todo), pmc, enum_type_PMC);
-}
-
-/*
-
-=item C<static int todo_list_seen(PARROT_INTERP, PMC *pmc, visit_info *info,
-UINTVAL *id)>
-
-Returns true if the PMC was seen, otherwise it put it on the todo list.
-Generates an ID (tag) for PMC, offset by 4 as are addresses.  Low bits are
-flags.
-
-=cut
-
-*/
-
-PARROT_INLINE
-static int
-todo_list_seen(PARROT_INTERP, ARGIN(PMC *pmc), ARGMOD(visit_info *info),
-        ARGOUT(UINTVAL *id))
-{
-    ASSERT_ARGS(todo_list_seen)
-    HashBucket * const b =
-        parrot_hash_get_bucket(interp,
-                (Hash *)VTABLE_get_pointer(interp, info->seen), pmc);
-
-    if (b) {
-        *id = (UINTVAL) b->value;
-        return 1;
     }
 
-    /* next id to freeze */
-    info->id++;
-    *id = PackID_new(info->id, enum_PackID_normal);
-
-    parrot_hash_put(interp,
-            (Hash *)VTABLE_get_pointer(interp, info->seen), pmc, (void *)*id);
-
-    /* remember containers */
-    Parrot_pmc_array_unshift(interp, (List *)PMC_data(info->todo), pmc, enum_type_PMC);
-
-    return 0;
-}
-
-
-/*
-
-=item C<static void visit_todo_list(PARROT_INTERP, PMC* pmc, visit_info* info)>
-
-Checks the seen PMC via the todo list.
+    VTABLE_push_integer(interp, info, PackID_new(id, packid_type));
 
-=cut
-
-*/
-
-static void
-visit_todo_list(PARROT_INTERP, ARGIN_NULLOK(PMC* pmc), ARGIN(visit_info* info))
-{
-    ASSERT_ARGS(visit_todo_list)
-    int     seen;
-    UINTVAL id = 0;
-
-    if (PMC_IS_NULL(pmc)) {
-        seen = 1;
-        id   = 0;
+    if (packid_type == enum_PackID_normal) {
+        Hash *hash = (Hash *)VTABLE_get_pointer(interp, info->seen);
+        PARROT_ASSERT(pmc);
+        VTABLE_push_integer(interp, info,
+                PObj_is_object_TEST(pmc) ? enum_class_Object : pmc->vtable->base_type);
+        parrot_hash_put(interp, hash, pmc, (void *)id);
+        Parrot_pmc_array_unshift(interp, (List *)PMC_data(info->todo), pmc, enum_type_PMC);
+        VTABLE_freeze(interp, pmc, info);
     }
-    else
-        seen = todo_list_seen(interp, pmc, info, &id);
-
-    do_action(interp, pmc, info, seen, id);
-
-    if (!seen)
-        (info->visit_action)(interp, pmc, info);
-}
-
-
-/*
-
-=item C<static void visit_todo_list_thaw(PARROT_INTERP, PMC* old, visit_info*
-info)>
-
-Callback for thaw - action first.
-
-Todo-list and seen handling is all in C<do_thaw()>.
-
-=cut
-
-*/
-
-static void
-visit_todo_list_thaw(PARROT_INTERP, ARGIN_NULLOK(PMC* old), ARGIN(visit_info* info))
-{
-    ASSERT_ARGS(visit_todo_list_thaw)
-    do_thaw(interp, old, info);
 }
 
 
@@ -976,61 +702,37 @@
 {
     ASSERT_ARGS(visit_loop_todo_list)
     PMC        **list_item;
-    List        *finish_list    = NULL;
     List * const todo           = (List *)PMC_data(info->todo);
-    int          finished_first = 0;
-    const int    thawing        = info->what == VISIT_THAW_CONSTANTS
-                               || info->what == VISIT_THAW_NORMAL;
-    int          i;
-
-    /* create a list that contains PMCs that need thawfinish */
-    if (thawing) {
-        PMC * const finish_list_pmc = pmc_new(interp, enum_class_Array);
-        finish_list                 = (List *)PMC_data(finish_list_pmc);
-    }
+    const int    thawing        = info->what == VISIT_THAW_NORMAL;
 
     (info->visit_pmc_now)(interp, current, info);
 
     /* can't cache upper limit, visit may append items */
-again:
     while ((list_item = (PMC **)Parrot_pmc_array_shift(interp, todo, enum_type_PMC))) {
         current = *list_item;
         if (!current)
             Parrot_ex_throw_from_c_args(interp, NULL, 1,
-                "NULL current PMC in visit_loop_todo_list");
+                    "NULL current PMC in visit_loop_todo_list");
 
         PARROT_ASSERT(current->vtable);
 
-        /* Workaround for thawing constants. Clear constant flag */
-        /* See src/packfile.c:3999 */
-        if (thawing)
-            PObj_constant_CLEAR(current);
-
         VTABLE_visit(interp, current, info);
 
-        if (thawing) {
-            if (current == info->thaw_result)
-                finished_first = 1;
-            if (current->vtable->thawfinish != interp->vtables[enum_class_default]->thawfinish)
-                Parrot_pmc_array_unshift(interp, finish_list, current, enum_type_PMC);
-        }
+        VISIT_PMC(interp, info, PMC_metadata(current));
     }
 
-    if (thawing) {
-        INTVAL n;
-        /* if image isn't consumed, there are some extra data to thaw */
-        if (info->image->bufused > 0) {
-            (info->visit_pmc_now)(interp, NULL, info);
-            goto again;
-        }
+    if (thawing)
+        /* we're done reading the image */
+        PARROT_ASSERT(!INFO_HAS_DATA(info));
 
+    if (thawing) {
         /* on thawing call thawfinish for each processed PMC */
-        if (!finished_first)
-            Parrot_pmc_array_unshift(interp, finish_list, info->thaw_result, enum_type_PMC);
+        List        *finish_list = (List *)PMC_data(info->id_list);
+        const INTVAL n           = Parrot_pmc_array_length(interp, finish_list);
+        int          i;
 
-        n = Parrot_pmc_array_length(interp, finish_list);
-
-        for (i = 0; i < n ; ++i) {
+        /* Thaw in reverse order. We have to fully thaw younger PMCs before use them in older */
+        for (i = n-1; i >= 0; --i) {
             current = *(PMC**)Parrot_pmc_array_get(interp, finish_list, i, enum_type_PMC);
             if (!PMC_IS_NULL(current))
                 VTABLE_thawfinish(interp, current, info);
@@ -1041,18 +743,18 @@
 
 /*
 
-=item C<static void create_image(PARROT_INTERP, PMC *pmc, visit_info *info)>
+=item C<static void create_buffer(PARROT_INTERP, PMC *pmc, visit_info *info)>
 
-Allocate image to some estimated size.
+Allocate buffer to some estimated size.
 
 =cut
 
 */
 
 static void
-create_image(PARROT_INTERP, ARGIN_NULLOK(PMC *pmc), ARGMOD(visit_info *info))
+create_buffer(PARROT_INTERP, ARGIN_NULLOK(PMC *pmc), ARGMOD(visit_info *info))
 {
-    ASSERT_ARGS(create_image)
+    ASSERT_ARGS(create_buffer)
     STRING *array = CONST_STRING(interp, "array");
     STRING *hash  = CONST_STRING(interp, "hash");
     INTVAL  len;
@@ -1061,91 +763,14 @@
     && (VTABLE_does(interp, pmc, array) || VTABLE_does(interp, pmc, hash))) {
         const INTVAL items = VTABLE_elements(interp, pmc);
         /* TODO check e.g. first item of aggregate and estimate size */
-        len = items * FREEZE_BYTES_PER_ITEM;
+        len = (items ? items : 1) * FREEZE_BYTES_PER_ITEM;
     }
     else
         len = FREEZE_BYTES_PER_ITEM;
 
-    info->image = Parrot_str_new_init(interp, NULL, len,
-         Parrot_fixed_8_encoding_ptr, Parrot_binary_charset_ptr, 0);
-}
-
-
-/*
-
-=item C<static PMC* run_thaw(PARROT_INTERP, STRING* image, visit_enum_type
-what)>
-
-Performs thawing. C<what> indicates what to be thawed.
-
-For now it seems cheaper to use a list for remembering contained
-aggregates. We could of course decide dynamically, which strategy to
-use, e.g.: given a big image, the first thawed item is a small
-aggregate. This implies, it probably contains (or some big strings) more
-nested containers, for which another approach could be a win.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-static PMC*
-run_thaw(PARROT_INTERP, ARGIN(STRING* image), visit_enum_type what)
-{
-    ASSERT_ARGS(run_thaw)
-    visit_info    info;
-    int           gc_block = 0;
-    const UINTVAL bufused  = image->bufused;
-
-    info.image = image;
-    /*
-     * if we are thawing a lot of PMCs, it's cheaper to do
-     * a GC run first and then block GC - the limit should be
-     * chosen so that no more then one GC run would be triggered
-     *
-     * XXX
-     *
-     * md5_3.pir shows a segfault during thawing the config hash
-     * info->thaw_ptr becomes invalid - seems that the hash got
-     * collected under us.
-     */
-    if (1 || (Parrot_str_byte_length(interp, image) > THAW_BLOCK_GC_SIZE)) {
-        Parrot_block_GC_mark(interp);
-        Parrot_block_GC_sweep(interp);
-        gc_block = 1;
-    }
-
-    /* _NORMAL or _CONSTANTS */
-    info.what = what;
-
-    todo_list_init(interp, &info);
-    info.visit_pmc_now   = visit_todo_list_thaw;
-
-    info.thaw_result = NULL;
-
-    /* run thaw loop */
-    visit_loop_todo_list(interp, NULL, &info);
-
-    /*
-     * thaw consumes the image string by incrementing strstart
-     * and decrementing bufused - restore that
-     */
-    LVALUE_CAST(char *, image->strstart) -= bufused;
-    image->bufused = bufused;
-    image->strlen += bufused;
-
-    PARROT_ASSERT(image->strstart >= (char *)Buffer_bufstart(image));
-
-    if (gc_block) {
-        Parrot_unblock_GC_mark(interp);
-        Parrot_unblock_GC_sweep(interp);
-    }
-
-    PackFile_destroy(interp, info.image_io->pf);
-    mem_sys_free(info.image_io);
-    info.image_io = NULL;
-    return info.thaw_result;
+    info->buffer = (Buffer *)Parrot_gc_new_bufferlike_header(interp, sizeof (Buffer));
+    Parrot_gc_allocate_buffer_storage_aligned(interp, info->buffer, len);
+    SET_VISIT_CURSOR(info, Buffer_bufstart(info->buffer));
 }
 
 
@@ -1172,22 +797,10 @@
 Parrot_freeze(PARROT_INTERP, ARGIN(PMC *pmc))
 {
     ASSERT_ARGS(Parrot_freeze)
-    /*
-     * freeze using a todo list and seen hash
-     * Please note that both have to be PMCs, so that trace_system_stack
-     * can call mark on the PMCs
-     */
     visit_info info;
 
-    info.what = VISIT_FREEZE_NORMAL;
-    create_image(interp, pmc, &info);
-    todo_list_init(interp, &info);
-
-    visit_loop_todo_list(interp, pmc, &info);
-
-    PackFile_destroy(interp, info.image_io->pf);
-    mem_sys_free(info.image_io);
-    return info.image;
+    visit_info_init(interp, &info, VISIT_FREEZE_NORMAL, STRINGNULL, pmc);
+    return Parrot_str_new_from_buffer(interp, info.buffer, OUTPUT_LENGTH(&info));
 }
 
 
@@ -1197,6 +810,12 @@
 
 Thaws a PMC.  Called from the C<thaw> opcode.
 
+For now it seems cheaper to use a list for remembering contained
+aggregates. We could of course decide dynamically, which strategy to
+use, e.g.: given a big image, the first thawed item is a small
+aggregate. This implies, it probably contains (or some big strings) more
+nested containers, for which another approach could be a win.
+
 =cut
 
 */
@@ -1208,7 +827,38 @@
 Parrot_thaw(PARROT_INTERP, ARGIN(STRING *image))
 {
     ASSERT_ARGS(Parrot_thaw)
-    return run_thaw(interp, image, VISIT_THAW_NORMAL);
+
+    visit_info  info;
+    int         gc_block = 0;
+    PMC        *result;
+
+    /*
+     * if we are thawing a lot of PMCs, it's cheaper to do
+     * a GC run first and then block GC - the limit should be
+     * chosen so that no more then one GC run would be triggered
+     *
+     * XXX
+     *
+     * md5_3.pir shows a segfault during thawing the config hash
+     * info->thaw_ptr becomes invalid - seems that the hash got
+     * collected under us.
+     */
+    if (1 || (Parrot_str_byte_length(interp, image) > THAW_BLOCK_GC_SIZE)) {
+        Parrot_block_GC_mark(interp);
+        Parrot_block_GC_sweep(interp);
+        gc_block = 1;
+    }
+
+    info.thaw_ptr = &result;
+    visit_info_init(interp, &info, VISIT_THAW_NORMAL, image, PMCNULL);
+    BYTECODE_SHIFT_OK(&info);
+
+    if (gc_block) {
+        Parrot_unblock_GC_mark(interp);
+        Parrot_unblock_GC_sweep(interp);
+    }
+
+    return result;
 }
 
 
@@ -1217,6 +867,7 @@
 =item C<PMC* Parrot_thaw_constants(PARROT_INTERP, STRING *image)>
 
 Thaws constants, used by PackFile for unpacking PMC constants.
+This is a lie. It does nothing different from Parrot_thaw at the moment.
 
 =cut
 
@@ -1229,7 +880,7 @@
 Parrot_thaw_constants(PARROT_INTERP, ARGIN(STRING *image))
 {
     ASSERT_ARGS(Parrot_thaw_constants)
-    return run_thaw(interp, image, VISIT_THAW_CONSTANTS);
+    return Parrot_thaw(interp, image);
 }
 
 

Modified: branches/gc_encapsulate/src/string/api.c
==============================================================================
--- branches/gc_encapsulate/src/string/api.c	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/src/string/api.c	Thu Jan 28 09:35:26 2010	(r43633)
@@ -648,6 +648,45 @@
                                      point? */
 }
 
+
+/*
+
+=item C<STRING * Parrot_str_new_from_buffer(PARROT_INTERP, Buffer *buffer, const
+UINTVAL len)>
+
+Make a Parrot string from a Buffer.
+
+The Buffer is nulled afterwards - only one PObj can point at a given string pool object.
+
+=cut
+
+*/
+
+PARROT_EXPORT
+PARROT_WARN_UNUSED_RESULT
+PARROT_MALLOC
+PARROT_CANNOT_RETURN_NULL
+STRING *
+Parrot_str_new_from_buffer(PARROT_INTERP, ARGMOD(Buffer *buffer), const UINTVAL len)
+{
+    ASSERT_ARGS(Parrot_str_new_from_buffer)
+    STRING *result;
+
+    result = Parrot_gc_new_string_header(interp, 0);
+    Buffer_bufstart(result) = Buffer_bufstart(buffer);
+    Buffer_buflen(result)   = Buffer_buflen(buffer);
+    result->strstart        = (char *) Buffer_bufstart(result);
+    result->bufused         = len;
+    result->strlen          = len;
+    result->encoding        = Parrot_fixed_8_encoding_ptr;
+    result->charset         = Parrot_binary_charset_ptr;
+
+    Buffer_bufstart(buffer) = NULL;
+    Buffer_buflen(buffer)   = 0;
+
+    return result;
+}
+
 /*
 
 =item C<const char* string_primary_encoding_for_representation(PARROT_INTERP,

Modified: branches/gc_encapsulate/t/codingstd/c_function_docs.t
==============================================================================
--- branches/gc_encapsulate/t/codingstd/c_function_docs.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/codingstd/c_function_docs.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -130,7 +130,6 @@
 src/debug.c
 src/gc/generational_ms.c
 src/io/io_string.c
-src/nci_test.c
 src/pbc_dump.c
 src/string/charset/ascii.c
 src/string/charset/binary.c

Modified: branches/gc_encapsulate/t/codingstd/copyright.t
==============================================================================
--- branches/gc_encapsulate/t/codingstd/copyright.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/codingstd/copyright.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -4,9 +4,10 @@
 
 use strict;
 use warnings;
+use lib qw( . lib ../lib ../../lib );
+
 use Cwd;
 use File::Spec ();
-use lib qw( . lib ../lib ../../lib );
 use Parrot::Distribution;
 use Test::More tests => 3;
 
@@ -142,6 +143,10 @@
         reason  => 'heredoc text for generated file',
     },
     {
+        file    => 'tools/dev/create_language.pl',
+        reason  => 'generated files in data section',
+    },
+    {
         file    => 'examples/pir/quine_ord.pir',
         reason  => 'quine',
     },

Modified: branches/gc_encapsulate/t/compilers/imcc/syn/macro.t
==============================================================================
--- branches/gc_encapsulate/t/compilers/imcc/syn/macro.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/compilers/imcc/syn/macro.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,5 @@
 #!perl
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
 # $Id$
 
 use strict;
@@ -8,7 +8,7 @@
 
 use Test::More;
 use Parrot::Config;
-use Parrot::Test tests => 41;
+use Parrot::Test tests => 42;
 
 # macro tests
 
@@ -585,6 +585,27 @@
 my_func_2 my_func_2
 OUTPUT
 
+pir_error_output_like( <<'CODE', <<'OUTPUT', 'macro label outside of macro declaration (TT #902)' );
+.macro While(conditional, code)
+
+.label $beginwhile:
+    unless .conditional goto .$endwhile
+    .code
+  goto .$beginwhile
+.label $endwhile:
+.endm
+
+.sub main
+.While($I0 < 3, {
+say $I0
+goto .$endwhile
+inc $I0
+})
+.end
+CODE
+/Invalid LABEL outside of macro/
+OUTPUT
+
 # Local Variables:
 #   mode: cperl
 #   cperl-indent-level: 4

Modified: branches/gc_encapsulate/t/configure/testlib/adefectivefoobar
==============================================================================
--- branches/gc_encapsulate/t/configure/testlib/adefectivefoobar	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/configure/testlib/adefectivefoobar	Thu Jan 28 09:35:26 2010	(r43633)
@@ -62,7 +62,6 @@
 gen::config_h
 gen::core_pmcs
 gen::crypto
-gen::parrot_include
 gen::opengl
 gen::call_list
 gen::languages

Modified: branches/gc_encapsulate/t/configure/testlib/bdefectivefoobar
==============================================================================
--- branches/gc_encapsulate/t/configure/testlib/bdefectivefoobar	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/configure/testlib/bdefectivefoobar	Thu Jan 28 09:35:26 2010	(r43633)
@@ -72,7 +72,6 @@
 gen::config_h
 gen::core_pmcs
 gen::crypto
-gen::parrot_include
 gen::opengl
 gen::call_list
 gen::languages

Modified: branches/gc_encapsulate/t/configure/testlib/cdefectivefoobar
==============================================================================
--- branches/gc_encapsulate/t/configure/testlib/cdefectivefoobar	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/configure/testlib/cdefectivefoobar	Thu Jan 28 09:35:26 2010	(r43633)
@@ -73,7 +73,6 @@
 gen::config_h
 gen::core_pmcs
 gen::crypto
-gen::parrot_include
 gen::opengl
 gen::call_list
 gen::languages

Modified: branches/gc_encapsulate/t/configure/testlib/ddefectivefoobar
==============================================================================
--- branches/gc_encapsulate/t/configure/testlib/ddefectivefoobar	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/configure/testlib/ddefectivefoobar	Thu Jan 28 09:35:26 2010	(r43633)
@@ -64,7 +64,6 @@
 gen::config_h
 gen::core_pmcs
 gen::crypto
-gen::parrot_include
 gen::opengl
 gen::call_list
 gen::languages

Modified: branches/gc_encapsulate/t/configure/testlib/verbosefoobar
==============================================================================
--- branches/gc_encapsulate/t/configure/testlib/verbosefoobar	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/configure/testlib/verbosefoobar	Thu Jan 28 09:35:26 2010	(r43633)
@@ -66,7 +66,6 @@
 gen::config_h
 gen::core_pmcs
 gen::crypto
-gen::parrot_include
 gen::opengl
 gen::call_list
 gen::languages

Modified: branches/gc_encapsulate/t/harness
==============================================================================
--- branches/gc_encapsulate/t/harness	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/harness	Thu Jan 28 09:35:26 2010	(r43633)
@@ -31,12 +31,10 @@
 local @ARGV = @ARGV;
 (my $longopts, @ARGV) = handle_long_options(@ARGV);
 
-$ENV{RUNNING_MAKE_TEST} = $longopts->{running_make_test};
-
 # Suck the short options into the TEST_PROG_ARGS
 # environmental variable.
 my %opts;
-getopts('wgjPCSefbvdr?hO:D:', \%opts);
+getopts('wgGjPCSefbvdr?hO:D:', \%opts);
 
 if ($opts{'?'} || $opts{h} || $longopts->{help}) {
     Usage();
@@ -141,6 +139,10 @@
 
 Run the C<CGoto> core.
 
+=item C<-G>
+
+Run the C<GCDebug> core.
+
 =item C<-j>
 
 Alias for running with the fast core.
@@ -185,10 +187,6 @@
 
 =over 4
 
-=item C<--running-make-test>
-
-Some test scripts run more quickly when this is set.
-
 =item C<--gc-debug>
 
 Invoke parrot with '--gc-debug'.

Modified: branches/gc_encapsulate/t/native_pbc/annotations.pbc
==============================================================================
Binary file (source and/or target). No diff available.

Modified: branches/gc_encapsulate/t/native_pbc/integer_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.

Modified: branches/gc_encapsulate/t/native_pbc/number_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.

Modified: branches/gc_encapsulate/t/native_pbc/string_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.

Modified: branches/gc_encapsulate/t/op/lexicals.t
==============================================================================
--- branches/gc_encapsulate/t/op/lexicals.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/op/lexicals.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,5 +1,5 @@
 #!perl
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
 # $Id$
 
 use strict;
@@ -14,7 +14,7 @@
 plan( skip_all => 'lexicals not thawed properly from PBC, TT #1171' )
     if $ENV{TEST_PROG_ARGS} =~ /--run-pbc/;
 
-plan( tests => 51 );
+plan( tests => 57 );
 
 =head1 NAME
 
@@ -1558,6 +1558,60 @@
 main
 OUTPUT
 
+pir_error_output_like( <<'CODE', <<'OUTPUT', '.lex should not accept $S#');
+.sub 'main'
+    $S0 = 'hello world'
+    .lex '$var', $S0
+.end
+CODE
+/error.*Cannot use S register with \.lex/
+OUTPUT
+
+pir_error_output_like( <<'CODE', <<'OUTPUT', '.lex should not accept $I#');
+.sub 'main'
+    $I0 = 5
+    .lex '$var', $I0
+.end
+CODE
+/error.*Cannot use I register with \.lex/
+OUTPUT
+
+pir_error_output_like( <<'CODE', <<'OUTPUT', '.lex should not accept $N#');
+.sub 'main'
+    $N0 = 3.14
+    .lex '$pi', $N0
+.end
+CODE
+/error.*Cannot use N register with \.lex/
+OUTPUT
+
+pir_error_output_like( <<'CODE', <<'OUTPUT', 'store_lex should not accept $S#');
+.sub 'main'
+    $S0 = 'hello world'
+    store_lex '$var', $S0
+.end
+CODE
+/error/
+OUTPUT
+
+pir_error_output_like( <<'CODE', <<'OUTPUT', 'store_lex should not accept $I#');
+.sub 'main'
+    $I0 = 5
+    store_lex '$var', $I0
+.end
+CODE
+/error/
+OUTPUT
+
+pir_error_output_like( <<'CODE', <<'OUTPUT', 'store_lex should not accept $N#');
+.sub 'main'
+    $N0 = 3.14
+    store_lex '$pi', $N0
+.end
+CODE
+/error/
+OUTPUT
+
 # Local Variables:
 #   mode: cperl
 #   cperl-indent-level: 4

Modified: branches/gc_encapsulate/t/op/trans.t
==============================================================================
--- branches/gc_encapsulate/t/op/trans.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/op/trans.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,742 +1,127 @@
-#!perl
-# Copyright (C) 2001-2008, Parrot Foundation.
+#!parrot
+# Copyright (C) 2001-2010, Parrot Foundation.
 # $Id$
 
-use strict;
-use warnings;
-use lib qw( . lib ../lib ../../lib );
-use Test::More;
-use Parrot::Test tests => 22;
-use Math::Trig qw( tan sec atan asin acos asec cosh sinh tanh sech );
-
 =head1 NAME
 
-t/op/trans.t - Transcendental Mathematical Ops
+t/op/bitwise.t - Bitwise Ops
 
 =head1 SYNOPSIS
 
-    % prove t/op/trans.t
+        % prove t/op/trans.t
 
 =head1 DESCRIPTION
 
-Tests the transcendental mathematical operations.
+Tests various bitwise logical operations.
 
 =cut
 
-# This defines two macros:
-# fp_eq N, N, LABEL
-# fp_ne N, N, LABEL
-# which will conditionally branch
-# to LABEL if abs(n,n) < epsilon
-
-pasm_output_is( <<"CODE", <<OUTPUT, "sin" );
-        .include 'fp_equality.pasm'
-        set     N1, 1.0
-        sin     N2, N1
-        .fp_eq_pasm  (N2, 0.841471, EQ1)
-        print   "not "
-EQ1:    print   "ok 1\\n"
-
-        set     I1, 1
-        sin     N2, I1
-        .fp_eq_pasm  (N2, 0.841471, EQ2)
-        print   "not "
-EQ2:    print   "ok 2\\n"
-
-        end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "cos" );
-        .include 'fp_equality.pasm'
-        set     N1, 1.0
-        cos     N2, N1
-        .fp_eq_pasm  (N2, 0.540302, EQ1)
-        print   "not "
-EQ1:    print   "ok 1\\n"
-
-        set     I1, 1
-        cos     N2, I1
-        .fp_eq_pasm  (N2, 0.540302, EQ2)
-        print   "not "
-EQ2:    print   "ok 2\\n"
-        end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "tan" );
-        .include 'fp_equality.pasm'
-        set     N1, 1.0
-        tan     N2, N1
-        .fp_eq_pasm  (N2, 1.557408, EQ1)
-        print   "not "
-EQ1:    print   "ok 1\\n"
-
-        set     I1, 1
-        tan     N2, I1
-        .fp_eq_pasm  (N2, 1.557408, EQ2)
-        print   "not "
-EQ2:    print   "ok 2\\n"
-        end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "sec" );
-        .include 'fp_equality.pasm'
-        set N1, 1.0
-        sec N2, N1
-        .fp_eq_pasm  (N2, 1.850816, EQ1)
-        print "not "
-EQ1:    print "ok 1\\n"
-
-        set I1, 1
-        sec N2, I1
-        .fp_eq_pasm  (N2, 1.850816, EQ2)
-        print "not "
-EQ2:    print "ok 2\\n"
-        end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "atan" );
-        .include 'fp_equality.pasm'
-        set N1, 1.0
-        atan N2, N1
-        .fp_eq_pasm  (N2, 0.785398, EQ1)
-        print "not "
-EQ1:    print "ok 1\\n"
-
-        set I1, 1
-        atan N2, I1
-        .fp_eq_pasm  (N2,0.785398 , EQ2)
-        print "not "
-EQ2:    print "ok 2\\n"
-        end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "asin" );
-        .include 'fp_equality.pasm'
-        set N1, 1.0
-        asin N2, N1
-        .fp_eq_pasm  (N2, 1.570796, EQ1)
-        print "not "
-EQ1:    print "ok 1\\n"
-
-        set I1, 1
-        asin N2, I1
-        .fp_eq_pasm  (N2, 1.570796 , EQ2)
-        print "not "
-EQ2:    print "ok 2\\n"
-
-        end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "acos" );
-        .include 'fp_equality.pasm'
-        set N1, 1.0
-        acos N2, N1
-        .fp_eq_pasm  (N2, 0.000000, EQ1)
-        print "not "
-EQ1:    print "ok 1\\n"
-
-        set I1, 1
-        acos N2, I1
-        .fp_eq_pasm  (N2, 0.000000, EQ2)
-        print "not "
-EQ2:    print "ok 2\\n"
-
-        end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "asec" );
-        .include 'fp_equality.pasm'
-        set N1, 1.0
-        asec N2, N1
-        .fp_eq_pasm  (N2, 0.000000, EQ1)
-        print "not "
-EQ1:    print "ok 1\\n"
-
-        set I1, 1
-        asec N2, I1
-        .fp_eq_pasm  (N2, 0.000000, EQ2)
-        print "not "
-EQ2:    print "ok 2\\n"
-
-        end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "cosh" );
-        .include 'fp_equality.pasm'
-        set N1, 1.0
-        cosh N2, N1
-        .fp_eq_pasm  (N2, 1.543081, EQ1)
-        print "not "
-EQ1:    print "ok 1\\n"
-
-        set I1, 1
-        cosh N2, I1
-        .fp_eq_pasm  (N2, 1.543081, EQ2)
-        print "not "
-EQ2:    print "ok 2\\n"
-
-        end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-my $runcore = $ENV{TEST_PROG_ARGS} || '';
-my @bsdtodo = (
-    $runcore =~ /--runcore=jit/ &&  $^O =~ m/bsd/i
-        ? ( todo => 'broken under JIT TT #501' )
-        : ()
-);
-
-pasm_output_is( <<"CODE", <<OUTPUT, "sinh", @bsdtodo );
-        .include 'fp_equality.pasm'
-        set N1, 1.0
-        sinh N2, N1
-        .fp_eq_pasm  (N2, 1.175201, EQ1)
-        print "not "
-EQ1:    print "ok 1\\n"
-
-        set I1, 1
-        sinh N2, I1
-        .fp_eq_pasm  (N2, 1.175201, EQ2)
-        print "not "
-EQ2:    print "ok 2\\n"
-
-        end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "tanh", @bsdtodo );
-        .include 'fp_equality.pasm'
-        set N1, 1.0
-        tanh N2, N1
-        .fp_eq_pasm  (N2, 0.761594, EQ1)
-        print "not "
-EQ1:    print "ok 1\\n"
-
-        set I1, 1
-        tanh N2, I1
-        .fp_eq_pasm  (N2, 0.761594, EQ2)
-        print "not "
-EQ2:    print "ok 2\\n"
-
-        end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "sech" );
-        .include 'fp_equality.pasm'
-        set N1, 1.0
-        sech N2, N1
-        .fp_eq_pasm  (N2, 0.648054, EQ1)
-        print "not "
-EQ1:    print "ok 1\\n"
-
-        set I1, 1
-        sech N2, I1
-        .fp_eq_pasm  (N2, 0.648054, EQ2)
-        print "not "
-EQ2:    print "ok 2\\n"
-
-        end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-my @jittodo = (
-    $runcore =~ /--runcore=jit/
-        ? ( todo => 'broken under JIT TT #530' )
-        : ()
-);
-pasm_output_is( <<"CODE", <<OUTPUT, 'atan2', @jittodo );
-        .include 'fp_equality.pasm'
-        set N0, 0.0
-        set I0, 0
-        set N1, 1.0
-        set I1, 1
-        set N2, 1.0
-        set I2, 1
-        set I3, -1
-        set N3, -1.0
-
-        atan N4, N1, N2
-        .fp_eq_pasm  (N4, 0.785398, EQ1)
-        print "not "
-EQ1:    print "ok 1\\n"
-
-        atan N4, N1, I2
-        .fp_eq_pasm  (N4, 0.785398, EQ2)
-        print "not "
-EQ2:    print "ok 2\\n"
-
-        atan N4, I1, N2
-        .fp_eq_pasm  (N4, 0.785398, EQ3)
-        print "not "
-EQ3:    print "ok 3\\n"
-
-        atan N4, I1, I2
-        .fp_eq_pasm  (N4, 0.785398, EQ4)
-        print "not "
-EQ4:    print "ok 4\\n"
-
-        atan N4, N3, 1.0
-        .fp_eq_pasm   (N4, -0.785398, EQ5)
-        print "not "
-EQ5:    print "ok 5\\n"
-
-        atan N4, N1, 0
-        .fp_eq_pasm   (N4, 1.570796, EQ6)
-        print "not "
-EQ6:    print "ok 6\\n"
-
-        atan N4, I3, 0.0
-        .fp_eq_pasm   (N4, -1.570796, EQ7)
-        print "not "
-EQ7:    print "ok 7\\n"
-
-        atan N4, I3, -1
-        .fp_eq_pasm   (N4, -2.356194, EQ8)
-        print "not "
-EQ8:    print "ok 8\\n"
-
-        atan N4, 1.0, N3
-        .fp_eq_pasm   (N4, 2.356194, EQ9)
-        print "not "
-EQ9:    print "ok 9\\n"
-
-        atan N4, 1.0, I0
-        .fp_eq_pasm   (N4, 1.570796, EQ10)
-        print "not "
-EQ10:   print "ok 10\\n"
-
-        atan N4, 1, N1
-        .fp_eq_pasm   (N4, 0.785398, EQ11)
-        print "not "
-EQ11:   print "ok 11\\n"
-
-        atan N4, 1, I1
-        .fp_eq_pasm   (N4, 0.785398, EQ12)
-        print "not "
-EQ12:   print "ok 12\\n"
-
-        atan N4, 0.0, 1.0
-        .fp_eq_pasm   (N4, 0.000000, EQ13)
-        print "not "
-EQ13:   print "ok 13\\n"
-
-        atan N4, -1.0, 0
-        .fp_eq_pasm   (N4, -1.570796, EQ14)
-        print "not "
-EQ14:   print "ok 14\\n"
-
-        atan N4, 1, -1.0
-        .fp_eq_pasm   (N4, 2.356194, EQ15)
-        print "not "
-EQ15:   print "ok 15\\n"
-
-        atan N4, 0, 1
-        .fp_eq_pasm   (N4, 0.000000, EQ16)
-        print "not "
-EQ16:   print "ok 16\\n"
-        end
-CODE
-ok 1
-ok 2
-ok 3
-ok 4
-ok 5
-ok 6
-ok 7
-ok 8
-ok 9
-ok 10
-ok 11
-ok 12
-ok 13
-ok 14
-ok 15
-ok 16
-OUTPUT
-
-pasm_output_is( <<"CODE", <<'OUTPUT', 'atan, part 2' );
-        .include 'fp_equality.pasm'
-        atan N4, -0.0, -0.0
-        .fp_eq_pasm   (N4, -3.1415926, EQ1)
-        print "not "
-        print N4
-EQ1:    print "ok 1\\n"
-        end
-CODE
-ok 1
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "log2" );
-        .include 'fp_equality.pasm'
-        set N1, 10.0
-        log2 N2, N1
-        .fp_eq_pasm  (N2, 3.321928, EQ1)
-        print "not "
-EQ1:    print "ok 1\\n"
-
-        set I1, 10
-        log2 N2, I1
-        .fp_eq_pasm  (N2, 3.321928, EQ2)
-        print "not "
-EQ2:    print "ok 2\\n"
-
-        end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "log10" );
-        .include 'fp_equality.pasm'
-        set N1, 15.0
-        log10 N2, N1
-        .fp_eq_pasm  (N2, 1.176091, EQ1)
-        print "not "
-EQ1:    print "ok 1\\n"
-
-        set I1, 15
-        log10 N2, I1
-        .fp_eq_pasm  (N2, 1.176091, EQ2)
-        print "not "
-EQ2:    print "ok 2\\n"
-
-        end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "ln" );
-        .include 'fp_equality.pasm'
-        set N1, 10.0
-        ln N2, N1
-        .fp_eq_pasm  (N2, 2.302585, EQ1)
-        print "not "
-EQ1:    print "ok 1\\n"
-
-        set I1, 10
-        ln N2, I1
-        .fp_eq_pasm  (N2, 2.302585, EQ2)
-        print "not "
-EQ2:    print "ok 2\\n"
-        end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "exp" );
-        .include 'fp_equality.pasm'
-        set N1, 10.0
-        exp N2, N1
-        .fp_eq_pasm  (N2, 22026.465795, EQ1)
-        print "not "
-EQ1:    print "ok 1\\n"
-
-        set I1, 10
-        exp N2, I1
-        .fp_eq_pasm (N2, 22026.465795, EQ2)
-        print "not "
-EQ2:    print "ok 2\\n"
-        end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "pow", @bsdtodo );
-        .include 'fp_equality.pasm'
-        set N1, 3.0
-        set I1, 3
-        set N2, 5.0
-        set I2, 5
-        pow N3, N1, N2
-        .fp_eq_pasm  (N3, 243.0, EQ1)
-        print "not "
-EQ1:    print "ok 1\\n"
-
-        pow N3, N1, I2
-        .fp_eq_pasm  (N3, 243.0, EQ2)
-        print "not "
-EQ2:    print "ok 2\\n"
-
-        pow N3, I1, N2
-        .fp_eq_pasm  (N3, 243.0, EQ3)
-        print "not "
-EQ3:    print "ok 3\\n"
-
-        pow N3, I1, I2
-        .fp_eq_pasm  (N3, 243.0, EQ4)
-        print "not "
-EQ4:    print "ok 4\\n"
-
-        set N0, 0.0
-        set I0, 0
-        set N1, 1.0
-        set I1, 1
-        set N2, 4.0
-        set I2, 4
-        pow N3, N2, 2.5
-        .fp_eq_pasm  (N3, 32.0, EQ5)
-        print "not "
-EQ5:    print "ok 5\\n"
-
-        pow N3, N2, -2
-        .fp_eq_pasm  (N3, 0.0625, EQ6)
-        print "not "
-EQ6:    print "ok 6\\n"
-
-        pow N3, I2, 0.5
-        .fp_eq_pasm  (N3, 2.0, EQ7)
-        print "not "
-EQ7:    print "ok 7\\n"
-
-        pow N3, I2, 0
-        .fp_eq_pasm  (N3, 1.0, EQ8)
-        print "not "
-EQ8:    print "ok 8\\n"
-
-        pow N3, 0.0, N2
-        .fp_eq_pasm  (N3, 0.0, EQ9)
-        print "not "
-EQ9:    print "ok 9\\n"
-
-        pow N3, 2.5, 0.0
-        .fp_eq_pasm  (N3, 1.0, EQ10)
-        print "not "
-EQ10:   print "ok 10\\n"
-
-        pow N3, 2.5, I2
-        .fp_eq_pasm  (N3, 39.0625, EQ11)
-        print "not "
-EQ11:   print "ok 11\\n"
-
-        pow N3, 2.0, -4
-        .fp_eq_pasm  (N3, 0.0625, EQ12)
-        print "not "
-EQ12:   print "ok 12\\n"
-
-        pow N3, 0, N2
-        .fp_eq_pasm  (N3, 0.0, EQ13)
-        print "not "
-EQ13:   print "ok 13\\n"
-
-        pow N3, 4, -0.5
-        .fp_eq_pasm  (N3, 0.5, EQ14)
-        print "not "
-EQ14:   print "ok 14\\n"
-
-        pow N3, 4, I2
-        .fp_eq_pasm  (N3, 256.0, EQ15)
-        print "not "
-EQ15:   print "ok 15\\n"
-
-        pow N3, 4, -1
-        .fp_eq_pasm  (N3, 0.25, EQ16)
-        print "not "
-EQ16:   print "ok 16\\n"
-        end
-CODE
-ok 1
-ok 2
-ok 3
-ok 4
-ok 5
-ok 6
-ok 7
-ok 8
-ok 9
-ok 10
-ok 11
-ok 12
-ok 13
-ok 14
-ok 15
-ok 16
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "sqrt" );
-       .include 'fp_equality.pasm'
-       set N1, 9.0
-       sqrt N2, N1
-       .fp_eq_pasm  (N2, 3.0, EQ1)
-       print "not "
-EQ1:   print "ok 1\\n"
-
-       set I1, 9
-       sqrt N2, I1
-       .fp_eq_pasm  (N2, 3.0, EQ2)
-       print "not "
-EQ2:   print "ok 2\\n"
-
-       end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<'CODE', <<OUTPUT, "pow_n_n_ic" );
-    set N0, 2.0
-    pow N1, N0, 0
-    print N1
-    print "\n"
-    pow N1, N0, 1
-    print N1
-    print "\n"
-    pow N1, N0, 2
-    print N1
-    print "\n"
-    pow N1, N0, 3
-    print N1
-    print "\n"
-    pow N1, N0, 4
-    print N1
-    print "\n"
-    pow N1, N0, 5
-    print N1
-    print "\n"
-    pow N1, N0, 6
-    print N1
-    print "\n"
-    pow N1, N0, 7
-    print N1
-    print "\n"
-    pow N1, N0, -1
-    print N1
-    print "\n"
-    pow N1, N0, -2
-    print N1
-    print "\n"
-    pow N1, N0, -3
-    print N1
-    print "\n"
-    pow N1, N0, -4
-    print N1
-    print "\n"
-    pow N1, N0, -5
-    end
-CODE
-1
-2
-4
-8
-16
-32
-64
-128
-0.5
-0.25
-0.125
-0.0625
-OUTPUT
-
-pasm_output_is( <<'CODE', <<OUTPUT, "pow_n_n_i" );
-    set N0, 2.0
-    set I0, 0
-    pow N1, N0, I0
-    print N1
-    print "\n"
-    inc I0
-    pow N1, N0, I0
-    print N1
-    print "\n"
-    inc I0
-    pow N1, N0, I0
-    print N1
-    print "\n"
-    inc I0
-    pow N1, N0, I0
-    print N1
-    print "\n"
-    inc I0
-    pow N1, N0, I0
-    print N1
-    print "\n"
-    inc I0
-    pow N1, N0, I0
-    print N1
-    print "\n"
-    inc I0
-    pow N1, N0, I0
-    print N1
-    print "\n"
-    set I0, -1
-    pow N1, N0, I0
-    print N1
-    print "\n"
-    dec I0
-    pow N1, N0, I0
-    print N1
-    print "\n"
-    dec I0
-    pow N1, N0, I0
-    print N1
-    print "\n"
-    dec I0
-    pow N1, N0, I0
-    print N1
-    print "\n"
-    dec I0
-    pow N1, N0, I0
-    print N1
-    print "\n"
-    dec I0
-    pow N1, N0, I0
-    print N1
-    print "\n"
-    end
-CODE
-1
-2
-4
-8
-16
-32
-64
-0.5
-0.25
-0.125
-0.0625
-0.03125
-0.015625
-OUTPUT
-
-# Local Variables:
-#   mode: cperl
-#   cperl-indent-level: 4
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
+.sub main :main
+    .include 'test_more.pir'
+
+    plan(16)
+    
+    test_sin_n()
+    test_sin_i()
+    test_cos_n()
+    test_cos_i()
+    test_tan_n()
+    test_tan_i()
+.end
+
+.sub _pi
+    .return (3.1415926535897)
+.end
+
+.sub _e
+    .return (2.7182818459045)
+.end
+
+.sub _epsilon
+    .return (0.0001)
+.end
+
+.sub test_sin_n
+    .local num epsilon
+    epsilon = _epsilon()
+    
+    $N0 = sin 0.0
+    is($N0, 0.0, "sin(0.0)", epsilon)
+    
+    $N0 = sin 1.0
+    is($N0, 0.841471, "sin(1.0)", epsilon)
+    
+    $N1 = _pi()
+    $N0 = sin $N1
+    is($N0, 0.0, "sin(pi)", epsilon)
+    
+    $N1 = _pi()
+    $N1 = $N1 / 2
+    $N0 = sin $N1
+    is($N0, 1.0, "sin(pi/2)", epsilon)
+.end
+
+.sub test_sin_i
+    .local num epsilon
+    epsilon = _epsilon()
+    
+    $N0 = sin 0
+    is($N0, 0.0, "sin(0)", epsilon)
+    
+    $N0 = sin 1
+    is($N0, 0.841471, "sin(1)", epsilon)
+.end
+
+.sub test_cos_n
+    .local num epsilon
+    epsilon = _epsilon()
+    
+    $N0 = cos 0.0
+    is($N0, 1.0, "cos(0.0)", epsilon)
+    
+    $N0 = cos 1.0
+    is($N0, 0.540302, "cos(1.0)", epsilon)
+    
+    $N1 = _pi()
+    $N0 = cos $N1
+    is($N0, -1.0, "cos(pi)", epsilon)
+    
+    $N1 = _pi()
+    $N1 = $N1 / 2
+    $N0 = cos $N1
+    is($N0, 0.0, "cos(pi/2)", epsilon)
+.end
+
+.sub test_cos_i
+    .local num epsilon
+    epsilon = _epsilon()
+    
+    $N0 = cos 0
+    is($N0, 1.0, "cos(0)", epsilon)
+    
+    $N0 = cos 1
+    is($N0, 0.540302, "cos(1)", epsilon)
+.end
+
+.sub test_tan_n
+    .local num epsilon
+    epsilon = _epsilon()
+    
+    $N0 = tan 0.0
+    is($N0, 0.0, "tan(0.0)", epsilon)
+    
+    $N0 = tan 1.0
+    is($N0, 1.557408, "tan(1.0)", epsilon)
+.end    
+
+.sub test_tan_i
+    .local num epsilon
+    epsilon = _epsilon()
+    
+    $N0 = tan 0
+    is($N0, 0.0, "tan(0)", epsilon)
+    
+    $N0 = tan 1
+    is($N0, 1.557408, "tan(1)", epsilon)
+.end 
+

Copied and modified: branches/gc_encapsulate/t/op/trans_old.t (from r43481, branches/gc_encapsulate/t/op/trans.t)
==============================================================================
--- branches/gc_encapsulate/t/op/trans.t	Tue Jan 19 12:29:57 2010	(r43481, copy source)
+++ branches/gc_encapsulate/t/op/trans_old.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -6,7 +6,7 @@
 use warnings;
 use lib qw( . lib ../lib ../../lib );
 use Test::More;
-use Parrot::Test tests => 22;
+use Parrot::Test tests => 19;
 use Math::Trig qw( tan sec atan asin acos asec cosh sinh tanh sech );
 
 =head1 NAME
@@ -29,64 +29,6 @@
 # which will conditionally branch
 # to LABEL if abs(n,n) < epsilon
 
-pasm_output_is( <<"CODE", <<OUTPUT, "sin" );
-        .include 'fp_equality.pasm'
-        set     N1, 1.0
-        sin     N2, N1
-        .fp_eq_pasm  (N2, 0.841471, EQ1)
-        print   "not "
-EQ1:    print   "ok 1\\n"
-
-        set     I1, 1
-        sin     N2, I1
-        .fp_eq_pasm  (N2, 0.841471, EQ2)
-        print   "not "
-EQ2:    print   "ok 2\\n"
-
-        end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "cos" );
-        .include 'fp_equality.pasm'
-        set     N1, 1.0
-        cos     N2, N1
-        .fp_eq_pasm  (N2, 0.540302, EQ1)
-        print   "not "
-EQ1:    print   "ok 1\\n"
-
-        set     I1, 1
-        cos     N2, I1
-        .fp_eq_pasm  (N2, 0.540302, EQ2)
-        print   "not "
-EQ2:    print   "ok 2\\n"
-        end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "tan" );
-        .include 'fp_equality.pasm'
-        set     N1, 1.0
-        tan     N2, N1
-        .fp_eq_pasm  (N2, 1.557408, EQ1)
-        print   "not "
-EQ1:    print   "ok 1\\n"
-
-        set     I1, 1
-        tan     N2, I1
-        .fp_eq_pasm  (N2, 1.557408, EQ2)
-        print   "not "
-EQ2:    print   "ok 2\\n"
-        end
-CODE
-ok 1
-ok 2
-OUTPUT
-
 pasm_output_is( <<"CODE", <<OUTPUT, "sec" );
         .include 'fp_equality.pasm'
         set N1, 1.0

Modified: branches/gc_encapsulate/t/pharness/03-handle_long_options.t
==============================================================================
--- branches/gc_encapsulate/t/pharness/03-handle_long_options.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/pharness/03-handle_long_options.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -13,7 +13,7 @@
 };
 plan( skip_all => 't/harness only runs once configuration has completed' )
     if $@;
-plan( tests => 12 );
+plan( tests => 11 );
 use Carp;
 use Parrot::Harness::Options qw( handle_long_options );
 
@@ -22,13 +22,11 @@
 @argv = qw(
     -wv
     -O2
-    --running-make-test
     --gc-debug
     t/postconfigure/*.t
 ); # */
 
 ($longopts, @argv) = handle_long_options(@argv);
-ok($longopts->{running_make_test}, "Captured long option");
 ok($longopts->{gc_debug}, "Captured long option");
 %still_argv = map {$_, 1} @argv;
 ok($still_argv{'-wv'}, "Combined short options still present in \@ARGV");

Modified: branches/gc_encapsulate/t/pmc/io.t
==============================================================================
--- branches/gc_encapsulate/t/pmc/io.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/pmc/io.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -665,15 +665,14 @@
 sub_3: 345
 OUTPUT
 
-pir_output_like(
-    <<'CODE', <<'OUT', 'read on null PMC throws exception', todo => 'not yet implemented TT #433' );
+pir_error_output_like( <<'CODE', <<'OUT', 'read on null PMC throws exception');
 .sub main :main
     null $P1
     $S0 = read $P1, 1
     end
 .end
 CODE
-/some crazy exception/
+/read from null/
 OUT
 
 ($FOO, $temp_file) = create_tempfile( UNLINK => 1 );

Modified: branches/gc_encapsulate/t/pmc/nci.t
==============================================================================
--- branches/gc_encapsulate/t/pmc/nci.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/pmc/nci.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -566,12 +566,12 @@
   print "loaded\n"
   dlfunc P0, P1, "nci_ssc", "ssc"
   print "dlfunced\n"
-  set I5, 2
+  set I5, -2
   set I6, 3
   set_args "0,0", I5, I6
   get_results "0", I5
   invokecc P0
-  ne I5, 6, nok_1
+  ne I5, -6, nok_1
   print "ok 1\n"
   end
 nok_1: print "nok 1\n"
@@ -2367,7 +2367,7 @@
     print "\n"
 
     .local pmc nci_vv
-    nci_vv = dlfunc libnci_test, "nci_vv", "vv"
+    nci_vv = dlfunc libnci_test, "nci_vv", ""
     nci_vv()
     $I1 = nci_dlvar_int[0]
     print $I1

Modified: branches/gc_encapsulate/t/pmc/orderedhash.t
==============================================================================
--- branches/gc_encapsulate/t/pmc/orderedhash.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/pmc/orderedhash.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -6,7 +6,7 @@
 use warnings;
 use lib qw( . lib ../lib ../../lib );
 use Test::More;
-use Parrot::Test tests => 28;
+use Parrot::Test tests => 23;
 
 =head1 NAME
 
@@ -310,16 +310,10 @@
     print I0
     exists I0, P0["ghi"]
     print I0
-    exists I0, P0[0]
-    print I0
-    exists I0, P0[1]
-    print I0
-    exists I0, P0[2]
-    print I0
     print "\n"
     end
 CODE
-101101
+101
 OUTPUT
 
 pasm_output_like( <<'CODE', '/[axj]/', "iterate over keys" );
@@ -636,113 +630,6 @@
 ok 4
 OUTPUT
 
-pasm_output_is( <<'CODE', <<'OUTPUT', "set/get compound key" );
-    new P0, ['OrderedHash']
-    set P0["a"], "Foo\n"
-    new P1, ['Hash']
-    set P1['foo'], "bar\n"
-    set P0["b"], P1
-    set P2, P0['b'; 'foo']
-    print P2
-    set P0['b'; 'foo'], "baz\n"
-    set P0['b'; 'quux'], "xyzzy\n"
-    set P2, P0['b'; 'foo']
-    print P2
-    set P2, P0['b'; 'quux']
-    print P2
-    print "--\n"
-    set P2, P0[0]
-    print P2
-    end
-CODE
-bar
-baz
-xyzzy
---
-Foo
-OUTPUT
-
-pasm_output_is( <<'CODE', <<'OUTPUT', "exists compound key" );
-    new P0, ['OrderedHash']
-    set P0["a"], "Foo"
-    new P1, ['Hash']
-    set P1['foo'], "bar\n"
-    set P0["b"], P1
-    set P0['b'; 'quux'], "xyzzy\n"
-    exists I0, P0['a']
-    print I0
-    exists I0, P0['b'; 'foo']
-    print I0
-    exists I0, P0['b'; 'quux']
-    print I0
-    exists I0, P0['b'; 'nada']
-    print I0
-    exists I0, P0['c']
-    print I0
-    print "\n--\n"
-    exists I0, P0[0]
-    print I0
-    exists I0, P0[1; 'foo']
-    print I0
-    exists I0, P0[1; 'quux']
-    print I0
-    exists I0, P0[1; 'nada']
-    print I0
-    exists I0, P0[2]
-    print I0
-    print "\n"
-    end
-CODE
-11100
---
-11100
-OUTPUT
-
-pasm_output_is( <<'CODE', <<'OUTPUT', "delete compound key" );
-    new P0, ['OrderedHash']
-    set P0["a"], "Foo"
-    new P1, ['Hash']
-    set P1['foo'], "bar\n"
-    set P0["b"], P1
-    set P0['b'; 'quux'], "xyzzy\n"
-    delete  P0['b'; 'foo']
-    exists I0, P0['a']
-    print I0
-    exists I0, P0['b'; 'foo']
-    print I0
-    exists I0, P0['b'; 'quux']
-    print I0
-    exists I0, P0['b'; 'nada']
-    print I0
-    exists I0, P0['c']
-    print I0
-    print "\n--\n"
-    exists I0, P0[0]
-    print I0
-    exists I0, P0[1; 'foo']
-    print I0
-    exists I0, P0[1; 'quux']
-    print I0
-    exists I0, P0[1; 'nada']
-    print I0
-    exists I0, P0[2]
-    print I0
-    print "\n--\n"
-    delete P0[1; 'quux']
-    exists I0, P0['b'; 'quux']
-    print I0
-    exists I0, P0[1; 'quux']
-    print I0
-    print "\n"
-    end
-CODE
-10100
---
-10100
---
-00
-OUTPUT
-
 pasm_output_is( <<'CODE', <<'OUTPUT', "freeze/thaw 1" );
     new P0, ['OrderedHash']
     set P0["a"], "Foo\n"
@@ -767,104 +654,6 @@
 Bar
 OUTPUT
 
-pasm_output_is( <<'CODE', <<'OUTPUT', "freeze/thaw 2" );
-    new P0, ['OrderedHash']
-    set P0["a"], "Foo\n"
-    new P1, ['Hash']
-    set P1['foo'], "bar\n"
-    set P0["b"], P1
-    set P0['b'; 'quux'], "xyzzy\n"
-
-    freeze S0, P0
-    thaw P1, S0
-    set P2, P1["a"]
-    print P2
-    set P2, P1[0]
-    print P2
-    set P2, P1["b";"foo"]
-    print P2
-    set P2, P1[1; "foo"]
-    print P2
-    set P2, P1["b";"quux"]
-    print P2
-    set P2, P1[1; "quux"]
-    print P2
-
-    end
-CODE
-Foo
-Foo
-bar
-bar
-xyzzy
-xyzzy
-OUTPUT
-
-pir_output_is( <<'CODE', <<'OUTPUT', 'freeze/thaw 3' );
-.sub main :main
-    .local string frozen
-    frozen = get_frozen_hash()
-
-    sweep 1
-
-    .local pmc parent
-    parent = thaw frozen
-    $S0 = parent['a']
-    say $S0
-
-    $S0 = parent[0]
-    say $S0
-
-    .local pmc child
-    child = parent[1]
-    $S0   = child[0]
-    say $S0
-
-    $S0   = child['foo']
-    say $S0
-
-    $S0   = parent[1; 'foo']
-    say $S0
-
-    $S0   = parent['b'; 'foo']
-    say $S0
-
-    $S0   = parent['b'; 'quux']
-    say $S0
-
-    $S0   = parent['b'; 2]
-    say $S0
-    end
-.end
-
-.sub get_frozen_hash
-    .local pmc parent
-    parent      = new ['OrderedHash']
-    parent['a'] = 'Foo'
-
-    .local pmc child
-    child        = new ['OrderedHash']
-    child['foo'] = 'bar'
-    push child, 'baz'
-
-    parent['b']         = child
-    parent['b'; 'quux'] = 'qaax'
-
-    .local string frozen
-    frozen = freeze parent
-    .return( frozen )
-.end
-CODE
-Foo
-Foo
-bar
-bar
-bar
-bar
-qaax
-qaax
-OUTPUT
-
 # Local Variables:
 #   mode: cperl
 #   cperl-indent-level: 4

Deleted: branches/gc_encapsulate/t/steps/auto/alignptrs-01.t
==============================================================================
--- branches/gc_encapsulate/t/steps/auto/alignptrs-01.t	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,96 +0,0 @@
-#! perl
-# Copyright (C) 2007, Parrot Foundation.
-# $Id$
-# auto/alignptrs-01.t
-
-use strict;
-use warnings;
-use Test::More tests => 12;
-use Carp;
-use lib qw( lib t/configure/testlib );
-use_ok('config::auto::alignptrs');
-use Parrot::Configure::Options qw( process_options );
-use Parrot::Configure::Step::Test;
-use Parrot::Configure::Test qw(
-    test_step_constructor_and_description
-);
-
-
-########## regular; singular ##########
-
-my ($args, $step_list_ref) = process_options(
-    {
-        argv => [ ],
-        mode => q{configure},
-    }
-);
-
-my $conf = Parrot::Configure::Step::Test->new;
-$conf->include_config_results( $args );
-
-my $serialized = $conf->pcfreeze();
-
-my $pkg = q{auto::alignptrs};
-$conf->add_steps($pkg);
-$conf->options->set( %{$args} );
-my $step = test_step_constructor_and_description($conf);
-my $align = 1;
-$conf->data->set('ptr_alignment' => $align);
-my $ret = $step->runstep($conf);
-ok( $ret, "runstep() returned true value" );
-is($step->result(), qq{configured:  $align byte}, "Expected result was set");
-
-$conf->replenish($serialized);
-
-########## regular; plural ##########
-
-($args, $step_list_ref) = process_options(
-    {
-        argv => [ ],
-        mode => q{configure},
-    }
-);
-
-$conf->add_steps($pkg);
-$conf->options->set( %{$args} );
-$step = test_step_constructor_and_description($conf);
-$align = 2;
-$conf->data->set('ptr_alignment' => $align);
-$ret = $step->runstep($conf);
-ok( $ret, "runstep() returned true value" );
-is($step->result(), qq{configured:  $align bytes}, "Expected result was set");
-
-pass("Completed all tests in $0");
-
-################### DOCUMENTATION ###################
-
-=head1 NAME
-
-auto/alignptrs-01.t - test auto::alignptrs
-
-=head1 SYNOPSIS
-
-    % prove t/steps/auto/alignptrs-01.t
-
-=head1 DESCRIPTION
-
-The files in this directory test functionality used by F<Configure.pl>.
-
-The tests in this file test auto::alignptrs.
-
-=head1 AUTHOR
-
-James E Keenan
-
-=head1 SEE ALSO
-
-config::auto::alignptrs, F<Configure.pl>.
-
-=cut
-
-# Local Variables:
-#   mode: cperl
-#   cperl-indent-level: 4
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:

Deleted: branches/gc_encapsulate/t/steps/auto/alignptrs-02.t
==============================================================================
--- branches/gc_encapsulate/t/steps/auto/alignptrs-02.t	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,117 +0,0 @@
-#! perl
-# Copyright (C) 2007, Parrot Foundation.
-# $Id$
-# auto/alignptrs-02.t
-
-use strict;
-use warnings;
-use Test::More tests =>  13;
-use Carp;
-use lib qw( lib t/configure/testlib );
-use_ok('config::auto::alignptrs');
-use Parrot::Configure::Options qw( process_options );
-use Parrot::Configure::Step::Test;
-use Parrot::Configure::Test qw(
-    test_step_constructor_and_description
-);
-
-########## mock hpux ##########
-
-my ($args, $step_list_ref) = process_options(
-    {
-        argv => [ ],
-        mode => q{configure},
-    }
-);
-
-my $conf = Parrot::Configure::Step::Test->new;
-$conf->include_config_results( $args );
-
-my $pkg = q{auto::alignptrs};
-
-$conf->add_steps($pkg);
-$conf->options->set( %{$args} );
-my $step = test_step_constructor_and_description($conf);
-
-my $serialized = $conf->pcfreeze();
-
-{
-    $conf->data->set( ptr_alignment => undef );
-    $conf->data->set( OSNAME_provisional => 'hpux' );
-    my $ret = $step->runstep($conf);
-    ok( $ret, "runstep() returned true value" );
-    if ( $conf->data->get('ccflags_provisional') !~ /DD64/ ) {
-        is($conf->data->get('ptr_alignment'), 4,
-            "Got expected pointer alignment for HP Unix");
-        is($step->result(), qq{for hpux:  4 bytes},
-            "Expected result was set");
-    } else {
-        pass("Cannot mock \%Config");
-        pass("Cannot mock \%Config");
-    }
-}
-
-$conf->replenish($serialized);
-
-########## _evaluate_ptr_alignment()  ##########
-
-my $align = 2;
-auto::alignptrs::_evaluate_ptr_alignment($conf, $align);
-is($conf->data->get( 'ptr_alignment' ), 2,
-    "Got expected pointer alignment");
-
-$conf->replenish($serialized);
-
-########## _evaluate_ptr_alignment()  ##########
-
-$align = undef;
-eval { auto::alignptrs::_evaluate_ptr_alignment($conf, $align); };
-like($@, qr/Can't determine alignment!/, #'
-    "Got expected 'die' message");
-
-$conf->replenish($serialized);
-
-########## _evaluate_results()  ##########
-
-my ($results, $try_align);
-is(auto::alignptrs::_evaluate_results(q{OK}, 2), 2,
-    "Got expected alignment");
-is(auto::alignptrs::_evaluate_results(q{OK align}, 2), undef,
-    "Got undef as expected");
-is(auto::alignptrs::_evaluate_results(q{foobar}, 2), undef,
-    "Got undef as expected");
-
-pass("Completed all tests in $0");
-
-################### DOCUMENTATION ###################
-
-=head1 NAME
-
-auto/alignptrs-02.t - test auto::alignptrs
-
-=head1 SYNOPSIS
-
-    % prove t/steps/auto/alignptrs-02.t
-
-=head1 DESCRIPTION
-
-The files in this directory test functionality used by F<Configure.pl>.
-
-The tests in this file test auto::alignptrs.
-
-=head1 AUTHOR
-
-James E Keenan
-
-=head1 SEE ALSO
-
-config::auto::alignptrs, F<Configure.pl>.
-
-=cut
-
-# Local Variables:
-#   mode: cperl
-#   cperl-indent-level: 4
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:

Deleted: branches/gc_encapsulate/t/steps/gen/parrot_include-01.t
==============================================================================
--- branches/gc_encapsulate/t/steps/gen/parrot_include-01.t	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,74 +0,0 @@
-#! perl
-# Copyright (C) 2007, Parrot Foundation.
-# $Id$
-# gen/parrot_include-01.t
-
-use strict;
-use warnings;
-use Test::More tests =>  7;
-use Carp;
-use lib qw( lib );
-use_ok('config::gen::parrot_include');
-use Parrot::Configure::Options qw( process_options );
-use Parrot::Configure::Step::Test;
-use Parrot::Configure::Test qw(
-    test_step_constructor_and_description
-);
-
-########## regular ##########
-
-my ($args, $step_list_ref) = process_options(
-    {
-        argv => [ ],
-        mode => q{configure},
-    }
-);
-
-my $conf = Parrot::Configure::Step::Test->new;
-$conf->include_config_results( $args );
-
-my $pkg = q{gen::parrot_include};
-$conf->add_steps($pkg);
-$conf->options->set( %{$args} );
-my $step = test_step_constructor_and_description($conf);
-my %missing_files = ();
-foreach my $f ( @{ $step->{source_files} } ) {
-    $missing_files{$f}++ unless (-f $f);
-}
-is(keys %missing_files, 0, "No needed source files are missing");
-ok(-d $step->{destdir}, "Directory needed has been located");
-
-pass("Completed all tests in $0");
-
-################### DOCUMENTATION ###################
-
-=head1 NAME
-
-gen/parrot_include-01.t - test gen::parrot_include
-
-=head1 SYNOPSIS
-
-    % prove t/steps/gen/parrot_include-01.t
-
-=head1 DESCRIPTION
-
-The files in this directory test functionality used by F<Configure.pl>.
-
-The tests in this file test gen::parrot_include.
-
-=head1 AUTHOR
-
-James E Keenan
-
-=head1 SEE ALSO
-
-config::gen::parrot_include, F<Configure.pl>.
-
-=cut
-
-# Local Variables:
-#   mode: cperl
-#   cperl-indent-level: 4
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:

Modified: branches/gc_encapsulate/t/tools/install/01-create_directories.t
==============================================================================
--- branches/gc_encapsulate/t/tools/install/01-create_directories.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/tools/install/01-create_directories.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -79,9 +79,9 @@
 
 =head1 DESCRIPTION
 
-The files in this directory test functionality used by
-F<tools/dev/install_files.pl> and F<tools/dev/install_dev_files.pl> and
-exported by F<lib/Parrot/Install.pm>.
+The files in this directory test functionality used by the the scripts
+F<tools/dev/install_files.pl>, F<tools/dev/install_doc_files.pl> and F<tools/dev/install_dev_files.pl>
+and are exported by F<lib/Parrot/Install.pm>.
 
 =head1 AUTHOR
 
@@ -89,7 +89,7 @@
 
 =head1 SEE ALSO
 
-Parrot::Install, F<tools/dev/install_files.pl>, F<tools/dev/install_dev_files.pl>
+Parrot::Install, F<tools/dev/install_files.pl>, F<tools/dev/install_doc_files.pl>, F<tools/dev/install_dev_files.pl>
 
 =cut
 

Modified: branches/gc_encapsulate/t/tools/install/02-install_files.t
==============================================================================
--- branches/gc_encapsulate/t/tools/install/02-install_files.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/tools/install/02-install_files.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -260,9 +260,9 @@
 
 =head1 DESCRIPTION
 
-The files in this directory test functionality used by
-F<tools/dev/install_files.pl> and F<tools/dev/install_dev_files.pl> and
-exported by F<lib/Parrot/Install.pm>.
+The files in this directory test functionality used by the the scripts
+F<tools/dev/install_files.pl>, F<tools/dev/install_doc_files.pl> and F<tools/dev/install_dev_files.pl>
+and are exported by F<lib/Parrot/Install.pm>.
 
 =head1 AUTHOR
 
@@ -270,7 +270,7 @@
 
 =head1 SEE ALSO
 
-Parrot::Install, F<tools/dev/install_files.pl>, F<tools/dev/install_dev_files.pl>
+Parrot::Install, F<tools/dev/install_files.pl>, F<tools/dev/install_doc_files.pl>, F<tools/dev/install_dev_files.pl>
 
 =cut
 

Modified: branches/gc_encapsulate/t/tools/install/03-lines_to_files.t
==============================================================================
--- branches/gc_encapsulate/t/tools/install/03-lines_to_files.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/tools/install/03-lines_to_files.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -209,9 +209,9 @@
 
 =head1 DESCRIPTION
 
-The files in this directory test functionality used by
-F<tools/dev/install_files.pl> and F<tools/dev/install_dev_files.pl> and
-exported by F<lib/Parrot/Install.pm>.
+The files in this directory test functionality used by the the scripts
+F<tools/dev/install_files.pl>, F<tools/dev/install_doc_files.pl> and F<tools/dev/install_dev_files.pl>
+and are exported by F<lib/Parrot/Install.pm>.
 
 =head1 AUTHOR
 

Modified: branches/gc_encapsulate/t/tools/install/dev_overall.t
==============================================================================
--- branches/gc_encapsulate/t/tools/install/dev_overall.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/tools/install/dev_overall.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -50,17 +50,6 @@
             end     => File::Spec->catfile(
                         $libdir, $versiondir, 'languages', 'nqp', 'bootstrap', 'actions.pm' ),
         },
-        'docs/compiler_faq.pod' => {
-            start   => File::Spec->catfile( qw| . docs compiler_faq.pod | ),
-            end     => File::Spec->catfile(
-                        $docdir,  $versiondir, 'pod', 'compiler_faq.pod' ),
-        },
-        'docs/pct/past_building_blocks.pod' => {
-            start   => File::Spec->catfile(
-                        qw| . docs pct past_building_blocks.pod | ),
-            end     => File::Spec->catfile(
-                        $docdir,  $versiondir, 'pod', 'pct', 'past_building_blocks.pod' ),
-        },
         'lib/Parrot/Configure.pm' => {
             start   => File::Spec->catfile(
                         qw| . lib Parrot Configure.pm | ),

Modified: branches/gc_encapsulate/t/tools/install/overall.t
==============================================================================
--- branches/gc_encapsulate/t/tools/install/overall.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/tools/install/overall.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -53,16 +53,6 @@
             end     => File::Spec->catfile(
                         $docdir, $versiondir, 'LICENSE' )
         },
-        'docs/gettingstarted.pod' => {
-            start   => File::Spec->catfile( qw| . docs gettingstarted.pod | ),
-            end     => File::Spec->catfile(
-                        $docdir,  $versiondir, 'pod', 'gettingstarted.pod' ),
-        },
-        'docs/resources/phony_resource' => {
-            start   => File::Spec->catfile( qw| . docs resources phony_resource | ),
-            end     => File::Spec->catfile(
-                        $docdir,  $versiondir, 'resources', 'phony_resource' ),
-        },
         'include/parrot/charset.h' => {
             start   => File::Spec->catfile( qw| . include parrot charset.h | ),
             end     => File::Spec->catfile(

Modified: branches/gc_encapsulate/t/tools/ops2pm/00-qualify.t
==============================================================================
--- branches/gc_encapsulate/t/tools/ops2pm/00-qualify.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/tools/ops2pm/00-qualify.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -5,7 +5,7 @@
 
 use strict;
 use warnings;
-use Test::More tests => 11;
+use Test::More tests =>  8;
 use FindBin;
 use lib ( "$FindBin::Bin/../../../lib", );
 use_ok('Parrot::Ops2pm');
@@ -16,37 +16,7 @@
 ok( -f "$FindBin::Bin/../../../src/ops/core.ops",      "src/ops/core.ops located" );
 ok( -f "$FindBin::Bin/../../../src/ops/ops.num",       "src/ops/ops.num located" );
 ok( -f "$FindBin::Bin/../../../src/ops/ops.skip",      "src/ops/ops.skip located" );
-ok(
-    !-e "$FindBin::Bin/../../../lib/Parrot/OpLib/core.pm",
-    "lib/Parrot/OpLib/core.pm correctly does not yet exist"
-);
-ok(
-    !-e "$FindBin::Bin/../../../include/parrot/oplib/ops.h",
-    "include/parrot/oplib/ops.h correctly does not yet exist"
-);
-
-my $message = <<END_OF_MESSAGE;
-
-
-The files in this directory test the publicly callable methods and
-subroutines of Parrot::Ops2pm and Parrot::Ops2pm::Auxiliary.
-By doing so, they test the functionality of the ops2pm.pl utility.
-
-Since ops2pm.pl is invoked only once during 'make' -- very near the
-beginning of the build process -- and since its purpose is to create files
-used later in that process, tests of its functionality can give meaningful
-results only if you run them when your file system under the top-level
-Parrot directory is in a 'pre-make' state, i.e., *before* you have run 'perl
-Configure.pl' but *after* you have run 'make'.  These tests should pass
-if run at that point in the build process, but if you have already
-executed 'make', some of these tests will necessarily fail. Hence, they
-should *not* be included in the set of tests run by 'make test'.
 
-In short, these are tests of Parrot::Ops2pm and
-Parrot::Ops2pm::Auxiliary but are *not* tests of Parrot itself.
-
-END_OF_MESSAGE
-pass($message);
 pass("Completed all tests in $0");
 
 ################### DOCUMENTATION ###################

Deleted: branches/gc_encapsulate/t/tools/pmc2cutils/00-qualify.t
==============================================================================
--- branches/gc_encapsulate/t/tools/pmc2cutils/00-qualify.t	Thu Jan 28 09:35:26 2010	(r43632)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,128 +0,0 @@
-#! perl
-# Copyright (C) 2006-2007, Parrot Foundation.
-# $Id$
-# 00-qualify.t
-
-use strict;
-use warnings;
-use Test::More tests => 10;
-use FindBin;
-use lib ( "$FindBin::Bin/../..", "$FindBin::Bin/../../lib", "$FindBin::Bin/../../../lib", );
-use_ok('Parrot::Pmc2c::Pmc2cMain');
-
-ok( -f "$FindBin::Bin/../../../Makefile",          "Makefile located" );
-ok( -f "$FindBin::Bin/../../../myconfig",          "myconfig located" );
-ok( -f "$FindBin::Bin/../../../lib/Parrot/PMC.pm", "lib/Parrot/PMC.pm located" );
-
-my ( @files, %sfx );
- at files = glob("$FindBin::Bin/../../../src/pmc/*");
-for my $f (@files) {
-    if ( $f =~ m/.*\.(.*)$/ ) {
-        my $s = $1;
-        $sfx{$s}++;
-    }
-}
-
-# In src/pmc, we should have only .pmc files (81+ of them), 1 .num file,
-# and >= .h files none of whose names may begin 'pmc_' (lest they be left over
-# from a previous build).
-my $suffixqty = scalar( keys %sfx );
-ok( ( ( 2 <= $suffixqty ) and ( $suffixqty <= 3 ) ), "only 2 or 3 file suffixes in src/pmc" );
-
-ok( $sfx{'num'}, ".num suffix correctly located" );
-ok( $sfx{'pmc'}, ".pmc suffix correctly located" );
-if ( $sfx{'h'} ) {
-    my $pmc_leftovers = 0;
-    foreach my $f (@files) {
-        $pmc_leftovers++ if $f =~ m/^pmc_.*\.h$/;
-    }
-    is( $pmc_leftovers, 0, "No left-over 'pmc_*.h' files in src/pmc/" );
-}
-else {
-    pass("No .h files in src/pmc/");
-}
-
-my $message = <<END_OF_MESSAGE;
-
-
-The files in this directory test the publicly callable methods of
-Parrot::Pmc2c::Pmc2cMain.  By doing so, they test the functionality
-of the pmc2c.pl utility.
-
-Since pmc2c.pl is invoked many times during 'make', tests of its
-functionality can give meaningful results only if you run them
-when your file system under the top-level Parrot directory is in
-a 'pre-make' state, i.e., you have run 'perl Configure.pl' but
-have *not* yet run 'make'.  These tests should pass if run at
-that point in the build process, but some will necessarily fail
-if 'make' has already been executed.  Hence, they should not be
-included in the set of tests run by 'make test'.
-
-In short, these are tests of Parrot::Pmc2c::Pmc2cMain but are *not*
-tests of Parrot itself.
-
-END_OF_MESSAGE
-pass($message);
-pass("Completed all tests in $0");
-
-################### DOCUMENTATION ###################
-
-=head1 NAME
-
-00-qualify.t - Is this the right point to test Parrot build tools?
-
-=head1 SYNOPSIS
-
-    % prove t/tools/pmc2cutils/00-qualify.t
-
-=head1 DESCRIPTION
-
-The files in this directory test the publicly callable methods of
-F<lib/Parrot/Pmc2c/Pmc2cMain.pm>.  By doing so, they test the functionality
-of the F<pmc2c.pl> utility.  That functionality has largely been extracted
-into the methods of F<Pmc2cMain.pm>.
-
-Since F<pmc2c.pl> is invoked during C<make>, tests of its functionality can
-give meaningful results only if they take into consideration the status of the
-file structure at particular points in the build process:
-
-=over 4
-
-=item *
-
-after F<Configure.pl> has run but before F<make> has run;
-
-=item *
-
-at various points while F<make> is running; or
-
-=item *
-
-once F<make> has completed.
-
-=back
-
-The tests in F<00-qualify.t> attempt to confirm that you are at the first of
-these three stages.  It tests for the presence or absence of certain files to
-form a judgment as to whether F<Configure.pl> has been run (it should have
-been) and whether F<make> has been run (it should I<not> have been).  The
-tests make certain assumptions about what files should be present or not --
-assumptions which may be invalid if the Parrot build process changes in the
-future.
-
-=head1 AUTHOR
-
-James E Keenan
-
-=head1 SEE ALSO
-
-Parrot::Pmc2c, F<pmc2c.pl>.
-
-=cut
-
-# Local Variables:
-#   mode: cperl
-#   cperl-indent-level: 4
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:

Modified: branches/gc_encapsulate/t/tools/pmc2cutils/04-dump_pmc.t
==============================================================================
--- branches/gc_encapsulate/t/tools/pmc2cutils/04-dump_pmc.t	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/tools/pmc2cutils/04-dump_pmc.t	Thu Jan 28 09:35:26 2010	(r43633)
@@ -19,7 +19,7 @@
     }
     unshift @INC, qq{$topdir/lib};
 }
-use Test::More tests => 106;
+use Test::More tests => 108;
 use File::Basename;
 use File::Copy;
 use FindBin;
@@ -311,12 +311,12 @@
         my $rv = copy( $pmcfile, qq{$temppmcdir/$basename} );
         $copycount++ if $rv;
     }
-    is( $copycount, $pmcfilecount, "all src/pmc/*.pmc files copied to tempdir" );
+    is( $copycount, $pmcfilecount,
+        "all src/pmc/*.pmc files copied to tempdir" );
     my @include = ( $tdir, $temppmcdir, @include_orig );
 
     @args = (
         qq{$temppmcdir/default.pmc},
-
         #    qq{$temppmcdir/scalar.pmc},
         qq{$temppmcdir/integer.pmc},
     );
@@ -332,12 +332,10 @@
     $dump_file = $self->dump_vtable("$main::topdir/src/vtable.tbl");
     ok( -e $dump_file, "dump_vtable created vtable.dump" );
 
-    eval { $self->dump_pmc(); };
-    like(
-        $@,
-        qr/^cannot find file 'scalar\.dump' in path/,
-        "ERROR WAS '$@', path is $temppmcdir"
-    );
+     $self->dump_pmc();
+    ok( -f qq{$temppmcdir/default.dump}, "default.dump created as expected" );
+    ok( ! -f qq{$temppmcdir/scalar.dump},  "scalar.dump not created as expected" );
+    ok( -f qq{$temppmcdir/integer.dump}, "integer.dump created as expected" );
 
     ok( chdir $cwd, "changed back to original directory" );
 }
@@ -587,10 +585,6 @@
 =head1 SEE ALSO
 
 Parrot::Pmc2c, F<pmc2c.pl>.
-        "array.dump correctly overwritten");
-
-    ok(chdir $cwd, "changed back to original directory");
-}
 
 pass("Completed all tests in $0");
 

Modified: branches/gc_encapsulate/t/tools/pmc2cutils/README
==============================================================================
--- branches/gc_encapsulate/t/tools/pmc2cutils/README	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/t/tools/pmc2cutils/README	Thu Jan 28 09:35:26 2010	(r43633)
@@ -4,18 +4,17 @@
 
 This directory contains test code for Parrot::Pmc2c::Pmc2cMain, a Perl5
 module whose publicly callable methods and other subroutines supply
-functionality for Parrot build tool 'pmc2c.pl'.
-
-Since 'pmc2c.pl' is invoked many times during 'make', tests of its
-functionality can give meaningful results only if you run them
-when your file system beneath the top-level Parrot directory is in
-a 'pre-make' state, i.e., you have run 'perl Configure.pl' but
-have *not* yet run 'make'.  These tests should pass if run at
-that point in the build process, but some will necessarily fail
-if 'make' has already been executed.  Hence, they should not be
-included in the set of tests run by 'make test'.
-
-In short, these are tests of Parrot::Pmc2c::Pmc2cMain but are *not*
-tests of Parrot itself.
+functionality to Parrot build tool 'tools/build/pmc2c.pl'.
 
+'pmc2c.pl' is invoked many times during 'make', so it is important that
+Parrot developers be able to understand and, if necessary, refactor its
+component parts.  The tests in this directory serve to illustrate those
+parts.  They should be run by any developer refactoring 'pmc2c.pl' or
+the many modules underlying that program.
 
+However, since the processes they test precede the creation of the
+'parrot' executable, failures of these tests do not necessarily indicate
+problems with that executable.  For that reason, these tests are not
+included in the 'make test' or 'make fulltest' targets.  They can,
+however, be run as part of 'make buildtools_tests' and developers are
+encouraged to do so.

Copied and modified: branches/gc_encapsulate/tools/build/dynpmc.pl (from r43481, branches/gc_encapsulate/config/gen/makefiles/dynpmc_pl.in)
==============================================================================
--- branches/gc_encapsulate/config/gen/makefiles/dynpmc_pl.in	Tue Jan 19 12:29:57 2010	(r43481, copy source)
+++ branches/gc_encapsulate/tools/build/dynpmc.pl	Thu Jan 28 09:35:26 2010	(r43633)
@@ -7,9 +7,8 @@
 
 =head1 DESCRIPTION
 
-This file is generated by F<config/gen/makefiles.pl> from
-F<config/gen/makefiles/dynpmc_pl.in>.  This script is used for building
-dynamic PMCs.
+This script is used for building dynamic PMCs.  It is deprecated,
+L<http://trac.parrot.org/parrot/ticket/338>.
 
 =cut
 
@@ -22,27 +21,26 @@
 use File::Copy qw(copy);
 use Storable;
 
+use Parrot::Config qw/%PConfig/;
+
 # Config stuff
-# q[] isn't guaranteed to work, but it's safer than "" as some platforms
-# (eg FreeBSD) have ""s embedded in their substitution values. q[] is used
-# as Win32 paths have \'s in, which qq treats as escape sequences.
-our $CC              = q[@cc@ -c];
-our $LD              = q[@ld@];
-our $LDFLAGS         = q[@ldflags@ @ld_debug@ @rpath_blib@];
-our $LD_LOAD_FLAGS   = q[@ld_load_flags@];
-our $PERL            = q[@perl@];
-our $LOAD_EXT        = q[@load_ext@];
-our $O               = q[@o@];
-our $CFLAGS          = q[@ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@];
+our $CC            = $PConfig{cc} . ' -c';
+our $LD            = $PConfig{ld};
+our $LDFLAGS       = $PConfig{ldflags} . ' ' . $PConfig{ld_debug} . ' ' . $PConfig{rpath_blib};
+our $LD_LOAD_FLAGS = $PConfig{ld_load_flags};
+our $LOAD_EXT      = $PConfig{load_ext};
+our $O             = $PConfig{o};
+our $CFLAGS        = $PConfig{ccflags} . ' '. $PConfig{cc_shared} . ' ' . $PConfig{cc_debug} . ' ' . $PConfig{ccwarn} . ' ' . $PConfig{cc_hasjit} . ' ' . $PConfig{cg_flag} . ' ' . $PConfig{gc_flag};
+our $BUILD_DIR     = $PConfig{build_dir};
 
 our $LIBPARROT = q[];
-#IF(parrot_is_shared):$LIBPARROT = q[@libparrot_ldflags@];
-
-# Here comes some stuff for Win32.
-our $PATHQUOTE = $^O eq 'MSWin32' ? q["] : q[];
+if ($PConfig{parrot_is_shared}) {
+    $LIBPARROT = $PConfig{libparrot_ldflags};
+}
 
 # PMC2C Config
-our $PMC2C = "$PERL $PATHQUOTE" . q[@build_dir@@slash at tools@slash at build@slash at pmc2c.pl] . $PATHQUOTE;
+our $SLASH = $PConfig{slash};
+our $PMC2C = "$^X \"" . join($SLASH, qw/tools build pmc2c.pl/) . '"';
 
 # Actual commands
 sub compile_cmd {
@@ -52,18 +50,15 @@
     if (defined $ENV{DYNPMC_INCLUDE} )
     {
         $dynpmc_include = $ENV{DYNPMC_INCLUDE};
-        $dynpmc_include =~ s/,/$PATHQUOTE -I$PATHQUOTE/g;
-        $dynpmc_include = "-I" . $PATHQUOTE . $dynpmc_include . $PATHQUOTE . " ";
+        $dynpmc_include =~ s/,/" -I"/g;
+        $dynpmc_include = '-I"' . $dynpmc_include . '" ';
     }
 
     return
-        "$CC " .
-        '@cc_o_out@' . $target . " " .
-        "-I" . $PATHQUOTE . '@build_dir@@slash at include' . $PATHQUOTE . " " .
-        "-I" . $PATHQUOTE . '@build_dir@@slash at src@slash at pmc' . $PATHQUOTE . " " .
-        $dynpmc_include . " " .
-        "$CFLAGS " .
-        $source;
+        $CC . ' ' .
+        $PConfig{cc_o_out} . $target . ' ' .
+        '-I"' . $BUILD_DIR . $SLASH . 'include' .
+        "$dynpmc_include $CFLAGS $source";
 };
 
 sub partial_link_cmd {
@@ -79,23 +74,22 @@
         else {
             $liblist = join( ' ', map { "$_.lib" } keys %$libs );
         }
-        my $extraLibs = '@libs@ @icu_shared@';
+        my $extraLibs = $PConfig{libs} . ' ' . $PConfig{icu_shared};
         $extraLibs =~ s/blib/..\\blib/g;
         $extraLibs =~ s/\Q$(A)\E/.lib/g;
         $liblist .= ' ' . $extraLibs;
 
         # Also note that we may need to look in the Parrot blib directory.
         if ($CC =~ /gcc/i) {
-            $liblist .= qq{ -Wl,-L "@build_dir@/blib/lib"};
+            $liblist .= qq{ -Wl,-L "$BUILD_DIR/blib/lib"};
         }
         else {
-            $liblist .= qq{ /LIBPATH:"@build_dir@/blib/lib"};
+            $liblist .= qq{ /LIBPATH:"$BUILD_DIR/blib/lib"};
         }
     }
     else {
         $liblist = join( ' ', map { "-l$_" } keys %$libs );
-        my $extraLibs = '@libs@ @icu_shared@';
-        $liblist .= ' ' . $extraLibs;
+        $liblist .= ' ' . $PConfig{libs} . ' ' . $PConfig{icu_shared};
     }
 
     if (defined $ENV{DYNPMC_LINK}) {
@@ -103,9 +97,9 @@
     }
 
     return
-        "$LD ".
-        '@ld_out@' . $target . " " .
-        join(" ", map {"$PATHQUOTE$_$PATHQUOTE"} @$sources) .
+        $LD . ' ' . $PConfig{ld_out} .
+        $target . ' ' .
+        join(' ', map {"\"$_\""} @$sources) .
         " $liblist $LDFLAGS $LD_LOAD_FLAGS $LIBPARROT";
 }
 

Added: branches/gc_encapsulate/tools/build/h2inc.pl
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/gc_encapsulate/tools/build/h2inc.pl	Thu Jan 28 09:35:26 2010	(r43633)
@@ -0,0 +1,55 @@
+# Copyright (C) 2009, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+tools/build/h2inc.pl
+
+=head1 DESCRIPTION
+
+Generate C<.pasm> and C<.pm> files with constants based on C<.h> files.
+
+Invoked by F<make>.  Imports functions from Parrot::H2inc.
+
+=head1 USAGE
+
+    perl tools/build/h2inc.pl <input_file> <output_file>
+
+=cut
+
+use strict;
+use warnings;
+use lib qw( lib );
+use Parrot::H2inc qw(
+    parse_file
+    perform_directive
+    generate_text
+    print_generated_file
+);
+
+my $usage = "Usage: $0 <input_file> <output_file>\n";
+
+die $usage unless @ARGV == 2;
+my ($in_file, $out_file) = @ARGV;
+
+my $directive = parse_file($in_file, $out_file);
+die "invalid output file: '$out_file' for input '$in_file'" unless $directive;
+
+my $defs_ref = perform_directive($directive);
+
+my $generated_text = generate_text($directive, $defs_ref);
+
+print_generated_file( {
+    in      => $in_file,
+    out     => $out_file,
+    script  => $0,
+    gen     => $generated_text,
+} );
+
+
+# Local Variables:
+#   mode: cperl
+#   cperl-indent-level: 4
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:

Modified: branches/gc_encapsulate/tools/build/nativecall.pl
==============================================================================
--- branches/gc_encapsulate/tools/build/nativecall.pl	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/tools/build/nativecall.pl	Thu Jan 28 09:35:26 2010	(r43633)
@@ -49,12 +49,12 @@
              "    }\n" .
              "    Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"P\", final_destination);",
     },
-    i => { as_proto => "int",    sig_char => "I" },
-    l => { as_proto => "long",   sig_char => "I" },
-    c => { as_proto => "char",   sig_char => "I" },
-    s => { as_proto => "short",  sig_char => "I" },
-    f => { as_proto => "float",  sig_char => "N" },
-    d => { as_proto => "double", sig_char => "N" },
+    i => { as_proto => "int",    sig_char => "I", return_type => "INTVAL" },
+    l => { as_proto => "long",   sig_char => "I", return_type => "INTVAL" },
+    c => { as_proto => "char",   sig_char => "I", return_type => "INTVAL" },
+    s => { as_proto => "short",  sig_char => "I", return_type => "INTVAL" },
+    f => { as_proto => "float",  sig_char => "N", return_type => "FLOATVAL" },
+    d => { as_proto => "double", sig_char => "N", return_type => "FLOATVAL" },
     t => { as_proto => "char *",
            other_decl => "STRING *final_destination;",
            ret_assign => "final_destination = Parrot_str_new(interp, return_data, 0);\n    Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"S\", final_destination);",
@@ -454,25 +454,15 @@
     PMC        *b;
     PMC        *iglobals;
     PMC        *temp_pmc;
-    UINTVAL    signature_len;
 
     PMC        *HashPointer   = NULL;
 
     /* And in here is the platform-independent way. Which is to say
        "here there be hacks" */
-    signature_len = Parrot_str_byte_length(interp, signature);
 
-#ifndef CAN_BUILD_CALL_FRAMES
-    if (0 == signature_len)
-       return F2DPTR(pcf_v_);
-#endif
-
-    /* remove deprecated void argument 'v' character */
-    if (2 == signature_len && 'v' == Parrot_str_indexed(interp, signature, 1)) {
-       Parrot_warn(interp, PARROT_WARNINGS_ALL_FLAG, "function signature argument character 'v' ignored");
-       Parrot_str_chopn_inplace(interp, signature, 1);
-       signature_len = Parrot_str_byte_length(interp, signature);
-    }
+    /* fixup empty signatures */
+    if (STRING_IS_EMPTY(signature))
+        signature = CONST_STRING(interp, "v");
 
     iglobals = interp->iglobals;
 

Modified: branches/gc_encapsulate/tools/dev/cc_flags.pl
==============================================================================
--- branches/gc_encapsulate/tools/dev/cc_flags.pl	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/tools/dev/cc_flags.pl	Thu Jan 28 09:35:26 2010	(r43633)
@@ -30,14 +30,8 @@
 use strict;
 use warnings;
 
-my $return_only;
 my $verbose;
 
-if ($ARGV[0] eq '--return-only') {
-    $return_only = 1;
-    shift;
-}
-
 if ($ARGV[0] eq '-v') {
     $verbose = 1;
     shift;
@@ -140,11 +134,6 @@
     }
 }
 
-if ($return_only) {
-    print join ' ', @ARGV;
-    exit;
-}
-
 if ($verbose) {
     print join ' ', @ARGV;
 }

Modified: branches/gc_encapsulate/tools/dev/checkdepend.pl
==============================================================================
--- branches/gc_encapsulate/tools/dev/checkdepend.pl	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/tools/dev/checkdepend.pl	Thu Jan 28 09:35:26 2010	(r43633)
@@ -18,8 +18,13 @@
 
 =head1 DESCRIPTION
 
-A braindead script to check that every F<.c> file has makefile deps
-on its includes.
+A script to check that every file has makefile deps on its includes.
+
+ checkdepend.pl [--dump]
+
+If called with C<--dump>, no tests are run, and the pre-processed makefile
+is dumped (in lieu of having C<cc>'s C<-E> for C<make>. This option is only
+intended to be used by developers examining the build process.
 
 =head1 REQUIREMENTS
 
@@ -27,16 +32,20 @@
 them. Ack is used to find the files. We are not currently requiring ack
 for development, so this is an optional test.
 
+=head1 BUGS
+
+See L<http://trac.parrot.org/parrot/wiki/BuildTaskList>
+
 =cut
 
 die 'no Makefile found; This tool requires a full build for analysis.'
     unless -e 'Makefile';
 
-my $files = `ack -fa {src,compilers,include} | grep '\\.[ch]\$'`;
+my @incfiles = split /\n/, `ack -fa src compilers include  | ack '\\.(c|h|pir)\$'`;
 
 our %deps;
 
-foreach my $file (sort split /\n/, $files) {
+foreach my $file (sort grep /\.[hc]$/, @incfiles) {
     # For now, skip any files that have generated dependencies
     next if $file =~ m{src/(ops|dynoplibs|dynpmc|pmc)/};
     next if $file =~ m{src/string/(charset|encoding)/};
@@ -44,11 +53,11 @@
     open my $fh, '<', $file;
     my $guts;
     {
-        local undef $/;
+        local $/;
         $guts = <$fh>;
     }
 
-    # Ingore anything inside a c-style comment.
+    # Ignore anything inside a c-style comment.
     $guts =~ s{\Q/*\E.*?\Q*/}{}gm;
 
     my @includes = $guts =~ m/#include "(.*)"/g;
@@ -59,14 +68,14 @@
     foreach my $include (@includes) {
         # same dir as file?
         my $file_dir = (File::Spec->splitpath($file))[1];
-        my $make_dep = collapse_path(File::Spec->catfile($file_dir,$include));
+        my $make_dep = collapse_path(File::Spec->catfile($file_dir, $include));
         if (defined($make_dep) && -f $make_dep) {
             push @{$deps{$file}}, $make_dep;
             next;
         }
 
         # global 'include' dir?
-        $make_dep = collapse_path(File::Spec->catfile('include',$include));
+        $make_dep = collapse_path(File::Spec->catfile('include', $include));
         if (defined($make_dep) && -f $make_dep) {
             push @{$deps{$file}}, $make_dep;
             next;
@@ -76,75 +85,191 @@
     }
 }
 
-plan('no_plan');
+foreach my $file (sort grep /\.pir$/, @incfiles) {
+    open my $fh, '<', $file;
+    my $guts;
+    {
+        local $/;
+        $guts = <$fh>;
+    }
+
+    # Ignore anything inside a # - comment.
+    $guts =~ s{^#.*$}{}gm;
+    # Ignore anything inside pod.
+    $guts =~ s{^=.*^=cut$}{}gsm;
+    # Ignore anything inside strings that are assigned to a variable.
+    # (Avoid clobbering the strings used in .include 'foo.pir', etc.)
+    $guts =~ s{=\s*'[^']*'\s*$}{}gm;
+    $guts =~ s{=\s*"(?:[^"\\]|\\.)*"\s*$}{}gm;
+    # TT #1418:  also, heredocs (wheeeee!)
+
+    my @includes;
+    while ($guts =~ m/(?:\.include|\bload_bytecode)\s+(["'])(.*)\1/g) {
+        push @includes, $2;
+    }
+
+    # Canonicalize each of these includes.
+
+    $deps{$file} = [ ];
+    foreach my $include (@includes) {
+        # same dir as file?
+        my $file_dir = (File::Spec->splitpath($file))[1];
+        my $make_dep = collapse_path(File::Spec->catfile($file_dir, $include));
+        if (defined($make_dep) && -f $make_dep) {
+            push @{$deps{$file}}, $make_dep;
+            next;
+        }
+
+        # global 'runtime' dir?
+        $make_dep = collapse_path(File::Spec->catfile('runtime/parrot/include', $include));
+        if (defined($make_dep) && -f $make_dep) {
+            push @{$deps{$file}}, $make_dep;
+            next;
+        }
+        $make_dep = collapse_path(File::Spec->catfile('runtime/parrot/library', $include));
+        if (defined($make_dep) && -f $make_dep) {
+            push @{$deps{$file}}, $make_dep;
+            next;
+        }
 
-open my $mf, '<', "Makefile";
-my $rules;
-{
-    local undef $/;
-    $rules = <$mf>;
+        # relative to top level?
+        $make_dep = collapse_path(File::Spec->catfile($include));
+        if (defined($make_dep) && -f $make_dep) {
+            push @{$deps{$file}}, $make_dep;
+            next;
+        }
+
+        diag "couldn't find $include, included from $file";
+    }
 }
 
-# convert all \-newline continuations into single lines for ease of processing.
-$rules =~ s/\\\n//g;
+sub get_rules {
+
+    my ($filename, $rules) = @_;
+
+    open my $mf, '<', "$filename";
+    my $global_line_num = @$rules;
+    my $file_line_num   = 1;
+    my $escape_start    = 1;
+
+    foreach (<$mf>) {
+        my $line = $_;
+        chomp $line;
+        if ($_ =~ /^include\s+(.*)$/m) {
+            get_rules($1, $rules);
+            $global_line_num = @$rules;
+            $file_line_num++;
+        }
+        else {
+            $rules->[$global_line_num] =
+            {
+                filename => $filename,
+                line     => $line,
+                line_num => $file_line_num,
+            };
+
+            # Convert all \-newline continuations into single lines for ease of
+            # processing.  Leave blank lines to keep line numbers accurate.
+            if (exists $rules->[$escape_start]{line} &&
+                $rules->[$escape_start]{line}    !~ /\\$/ &&
+                $rules->[$global_line_num]{line} =~ /\\$/) {
+
+                $escape_start = $global_line_num;
+            }
 
-# replace all _DIR variables with their expansions.
-while ($rules =~ s/^([A-Z_]+_DIR)\s*:?=\s*(\S*)$//m) {
-    my ($var,$val) = ($1, $2);
-    $rules =~ s/\$\($var\)/$val/g;
+            if ($rules->[$escape_start]{line} && $rules->[$escape_start]{line} =~ /\\$/ &&
+                $escape_start != $global_line_num) {
+
+                $rules->[$escape_start]{line} =~ s/\\$//;
+                $rules->[$escape_start]{line} .= $rules->[$global_line_num]{line};
+                $rules->[$global_line_num]{line} = '';
+            }
+
+            $file_line_num++;
+            $global_line_num++;
+        }
+    }
+    close $mf;
 }
 
-# expand PARROT_H_HEADERS
-$rules =~ m/^PARROT_H_HEADERS\s*:?=\s*(.*)$/m;
-my $phh = $1;
+our $rules = [];
+get_rules('Makefile', $rules);
 
-$rules =~ s/\Q$(PARROT_H_HEADERS)/$phh/g;
+#expand all variables
+our %vars;
+foreach (@$rules) {
+    #expand any known variables
+    while ($_->{line} =~ /\$\(([A-Z_]+)\)/) {
+        my $var_name = $1;
+        if (exists $vars{$var_name}) {
+            $_->{line} =~ s/\$\($var_name\)/$vars{$var_name}/g;
+        }
+        else {
+            $_->{line} =~ s/\$\($var_name\)//g;
+        }
+    }
 
-foreach my $header (sort grep {/\.h$/} (keys %deps)) {
-    # static headers shouldn't depend on anything else.
-    if ($rules =~ /^$header\s*:\s*(.*)\s*$/m) {
-        #is("", $1, "$header should have no dependencies");
+    #store any new definitions
+    if ($_->{line} =~ /^(\w+)\s+=\s+(.*)$/) {
+        $vars{$1} = $2;
     }
 }
 
+if (@ARGV && $ARGV[0] eq '--dump') {
+    print "$_->{line}\n" for (@$rules);
+    exit 0;
+}
+
+my $test_count = grep {/\.(c|pir)$/} (keys %deps);
+
+plan( tests => $test_count );
+
+#foreach my $header (sort grep {/\.h$/} (keys %deps)) {
+#    # static headers shouldn't depend on anything else.
+#    if ($rules =~ /^$header\s*:\s*(.*)\s*$/m) {
+#        #is("", $1, "$header should have no dependencies");
+#    }
+#}
+
 my @files = keys %deps;
 @files = @ARGV if @ARGV;
 
-foreach my $file (sort grep {/\.c$/} @files) {
-    my $rule = $file;
-    $rule =~ s/\.c$//;
-
-    $rules =~ /^$rule\Q$(O)\E\s*:\s*(.*)\s*$/m;
-    my $declared = $1;
-
-    my $failed = 0;
-    if (!defined($declared)) {
-        $failed = 1;
-        is("", join(' ', (get_deps($file))), "$file has no dependencies");
-        next;
-    }
-    else
-    {
-        $declared =~ s/\s+/ /g;
-        foreach my $inc (sort (get_deps($file))) {
-            next if $declared =~ s/\b\Q$inc\E\b//;
+check_files($rules, \@files, '.c',   $vars{O});
+check_files($rules, \@files, '.pir', '.pbc');
+
+sub check_files {
 
-            is($declared, $inc, "$file is missing a dependency.");
-            $failed = 1;
+    my ($rules, $possible_files, $src_ext, $obj_ext) = @_;
 
+    foreach my $file (sort grep {/$src_ext$/} @$possible_files) {
+        my ($active_makefile, $active_line_num);
+        my $rule = $file;
+        $rule =~ s/$src_ext$//;
+
+        #find the applicable rule for this file
+        my $rule_deps = '';
+        for (@$rules) {
+            if ($_->{line} =~ /^$rule$obj_ext\s*:\s*(.*)\s*$/) {
+                $rule_deps = $1;
+                $active_makefile = $_->{filename};
+                $active_line_num = $_->{line_num};
+            }
+            last if $rule_deps;
         }
-    }
-    $declared =~ s/^\s+//;
-    $declared =~ s/\s+$//;
-    $declared =~ s/\s+/ /g;
-    if ($declared ne "") {
-       is($declared, '', "$file has extra dependencies.");
-    }
-    elsif (!$failed) {
-        pass($file);
+
+        my $extra_info = "(no rule found for this file)";
+        if ($rule_deps) {
+            $extra_info = "($active_makefile: line $active_line_num)";
+        }
+
+        $rule_deps        = join ' ', sort split /\s+/, $rule_deps;
+        my $expected_deps = join ' ', sort (get_deps($file));
+
+        is($rule_deps, $expected_deps, "$file has correct dependencies $extra_info.");
     }
 }
 
+
 sub collapse_path {
     my $path = shift;
     return $path unless defined $path;

Modified: branches/gc_encapsulate/tools/dev/install_dev_files.pl
==============================================================================
--- branches/gc_encapsulate/tools/dev/install_dev_files.pl	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/tools/dev/install_dev_files.pl	Thu Jan 28 09:35:26 2010	(r43633)
@@ -65,8 +65,8 @@
     lines_to_files
 );
 
-# When run from the makefile, which is probably the only time this
-# script will ever be used, all of these defaults will get overridden.
+# When run from the makefile, or from a test script, which are probably the only times
+# this script will ever be used, all of these defaults will get overridden.
 my %options = (
     buildprefix => '',
     prefix      => '/usr',

Modified: branches/gc_encapsulate/tools/util/release.json
==============================================================================
--- branches/gc_encapsulate/tools/util/release.json	Thu Jan 28 07:29:45 2010	(r43632)
+++ branches/gc_encapsulate/tools/util/release.json	Thu Jan 28 09:35:26 2010	(r43633)
@@ -1,9 +1,9 @@
 {
-    "release.version"  : "1.9.0",
-    "release.name"     : "Blue-fronted Amazon",
+    "release.version"  : "2.0.0",
+    "release.name"     : "Inevitable",
     "release.day"      : "Tuesday",
-    "release.date"     : "15 December 2009",
-    "release.nextdate" : "19 January 2010",
+    "release.date"     : "19 January 2010",
+    "release.nextdate" : "16 Februuary 2010",
 
     "web.root"         : "http://parrot.org/",
     "web.source"       : "download",
@@ -11,13 +11,13 @@
     "web.repository"   : "https://svn.parrot.org/parrot/trunk/",
 
     "bugday.day"       : "Saturday",
-    "bugday.date"      : "16 January 2010",
+    "bugday.date"      : "14 February 2010",
 
     "wiki.root"        : "https://trac.parrot.org/parrot/wiki/",
-    "wiki.bugday"      : "bug_day_2010_01_19",
+    "wiki.bugday"      : "bug_day_2010_02_14",
 
     "cpan.search"      : "http://search.cpan.org/dist/parrot",
-    "ftp.path"         : "ftp://ftp.parrot.org/pub/parrot/releases/devel/1.9.0/",
+    "ftp.path"         : "ftp://ftp.parrot.org/pub/parrot/releases/stable/2.0.0/",
     "subversion.root"  : "http://subversion.tigris.org/",
     "svk.root"         : "http://svk.bestpractical.com/"
 }


More information about the parrot-commits mailing list