[svn:parrot] r44285 - in branches/rm_cflags: . compilers/data_json compilers/imcc compilers/json compilers/nqp compilers/pct compilers/pge compilers/pirc/src compilers/tge config/auto/sizes config/gen/crypto config/gen/makefiles config/gen/platform/generic config/gen/platform/openbsd docs docs/book/draft docs/book/pct docs/dev docs/pdds docs/pdds/draft docs/project examples/c examples/embed examples/languages/abc examples/languages/squaak examples/pge ext/nqp-rx include/parrot include/parrot/atomic lib/Parrot lib/Parrot/Configure/Step lib/Parrot/Docs/Section lib/Parrot/Ops2c lib/Parrot/Pmc2c ports/cpan ports/cygwin ports/debian ports/fedora ports/mandriva ports/suse runtime/parrot/languages runtime/parrot/library runtime/parrot/library/Configure runtime/parrot/library/Math runtime/parrot/library/Math/Random src src/atomic src/call src/dynpmc src/gc src/interp src/io src/nci src/ops src/pmc src/runcore src/string t/codingstd t/compilers/tge t/native_pbc t/oo t/op t/pm c t/src t/steps/init/hints tools/build tools/dev tools/util

coke at svn.parrot.org coke at svn.parrot.org
Mon Feb 22 02:44:08 UTC 2010


Author: coke
Date: Mon Feb 22 02:43:55 2010
New Revision: 44285
URL: https://trac.parrot.org/parrot/changeset/44285

Log:
merge latest changes from trunk

Added:
   branches/rm_cflags/src/pmc/imageiosize.pmc
      - copied unchanged from r44284, trunk/src/pmc/imageiosize.pmc
   branches/rm_cflags/t/op/errorson.t
      - copied unchanged from r44284, trunk/t/op/errorson.t
   branches/rm_cflags/t/op/gc-leaky.t
      - copied unchanged from r44284, trunk/t/op/gc-leaky.t
   branches/rm_cflags/t/pmc/imageio.t
      - copied unchanged from r44284, trunk/t/pmc/imageio.t
   branches/rm_cflags/t/pmc/imageiosize.t
      - copied unchanged from r44284, trunk/t/pmc/imageiosize.t
   branches/rm_cflags/tools/dev/nci_thunk_gen.pir
      - copied unchanged from r44284, trunk/tools/dev/nci_thunk_gen.pir
Deleted:
   branches/rm_cflags/runtime/parrot/library/Math/Random/
   branches/rm_cflags/tools/build/nativecall.pir
Modified:
   branches/rm_cflags/   (props changed)
   branches/rm_cflags/DEPRECATED.pod
   branches/rm_cflags/MANIFEST
   branches/rm_cflags/MANIFEST.SKIP
   branches/rm_cflags/MANIFEST.generated
   branches/rm_cflags/compilers/data_json/Defines.mak
   branches/rm_cflags/compilers/data_json/Rules.mak   (contents, props changed)
   branches/rm_cflags/compilers/imcc/Rules.mak   (props changed)
   branches/rm_cflags/compilers/imcc/imcc.y
   branches/rm_cflags/compilers/imcc/imcparser.c
   branches/rm_cflags/compilers/imcc/parser_util.c
   branches/rm_cflags/compilers/imcc/pbc.c
   branches/rm_cflags/compilers/json/Rules.mak   (props changed)
   branches/rm_cflags/compilers/nqp/Rules.mak   (props changed)
   branches/rm_cflags/compilers/pct/Rules.mak   (props changed)
   branches/rm_cflags/compilers/pge/Rules.mak   (props changed)
   branches/rm_cflags/compilers/pirc/src/bcgen.c
   branches/rm_cflags/compilers/pirc/src/pircompunit.c
   branches/rm_cflags/compilers/pirc/src/piremit.c
   branches/rm_cflags/compilers/pirc/src/pirpcc.c
   branches/rm_cflags/compilers/tge/Rules.mak   (props changed)
   branches/rm_cflags/config/auto/sizes/intval_maxmin_c.in   (props changed)
   branches/rm_cflags/config/gen/crypto/digest_pmc.in
   branches/rm_cflags/config/gen/makefiles/root.in
   branches/rm_cflags/config/gen/platform/generic/env.c
   branches/rm_cflags/config/gen/platform/generic/memexec.c
   branches/rm_cflags/config/gen/platform/openbsd/memexec.c
   branches/rm_cflags/docs/book/draft/README   (props changed)
   branches/rm_cflags/docs/book/draft/appa_glossary.pod   (props changed)
   branches/rm_cflags/docs/book/draft/appb_patch_submission.pod   (props changed)
   branches/rm_cflags/docs/book/draft/appc_command_line_options.pod   (props changed)
   branches/rm_cflags/docs/book/draft/appd_build_options.pod   (props changed)
   branches/rm_cflags/docs/book/draft/appe_source_code.pod   (props changed)
   branches/rm_cflags/docs/book/draft/ch01_introduction.pod   (props changed)
   branches/rm_cflags/docs/book/draft/ch02_getting_started.pod   (props changed)
   branches/rm_cflags/docs/book/draft/ch07_dynpmcs.pod   (props changed)
   branches/rm_cflags/docs/book/draft/ch08_dynops.pod   (props changed)
   branches/rm_cflags/docs/book/draft/ch10_opcode_reference.pod   (props changed)
   branches/rm_cflags/docs/book/draft/ch11_directive_reference.pod   (props changed)
   branches/rm_cflags/docs/book/draft/ch12_operator_reference.pod   (props changed)
   branches/rm_cflags/docs/book/draft/chXX_hlls.pod   (props changed)
   branches/rm_cflags/docs/book/draft/chXX_library.pod   (props changed)
   branches/rm_cflags/docs/book/draft/chXX_testing_and_debugging.pod   (props changed)
   branches/rm_cflags/docs/book/pct/ch01_introduction.pod   (props changed)
   branches/rm_cflags/docs/book/pct/ch02_getting_started.pod   (props changed)
   branches/rm_cflags/docs/book/pct/ch03_compiler_tools.pod   (props changed)
   branches/rm_cflags/docs/book/pct/ch04_pge.pod   (props changed)
   branches/rm_cflags/docs/book/pct/ch05_nqp.pod   (props changed)
   branches/rm_cflags/docs/dev/c_functions.pod   (props changed)
   branches/rm_cflags/docs/embed.pod
   branches/rm_cflags/docs/pdds/draft/pdd11_extending.pod
   branches/rm_cflags/docs/pdds/pdd30_install.pod   (props changed)
   branches/rm_cflags/docs/project/release_manager_guide.pod
   branches/rm_cflags/examples/c/pbc_info.c
   branches/rm_cflags/examples/embed/cotorra.c   (contents, props changed)
   branches/rm_cflags/examples/languages/abc/   (props changed)
   branches/rm_cflags/examples/languages/squaak/   (props changed)
   branches/rm_cflags/examples/pge/demo.pir   (props changed)
   branches/rm_cflags/ext/nqp-rx/Rules.mak   (props changed)
   branches/rm_cflags/include/parrot/atomic/gcc_pcc.h
   branches/rm_cflags/include/parrot/call.h   (props changed)
   branches/rm_cflags/include/parrot/extend.h
   branches/rm_cflags/include/parrot/gc_api.h   (props changed)
   branches/rm_cflags/include/parrot/interpreter.h
   branches/rm_cflags/include/parrot/pmc.h
   branches/rm_cflags/include/parrot/pmc_freeze.h
   branches/rm_cflags/include/parrot/runcore_api.h   (props changed)
   branches/rm_cflags/include/parrot/runcore_profiling.h   (props changed)
   branches/rm_cflags/include/parrot/runcore_trace.h   (props changed)
   branches/rm_cflags/lib/Parrot/Configure/Step/Test.pm   (props changed)
   branches/rm_cflags/lib/Parrot/Docs/Section/Tools.pm
   branches/rm_cflags/lib/Parrot/H2inc.pm   (props changed)
   branches/rm_cflags/lib/Parrot/Ops2c/Utils.pm
   branches/rm_cflags/lib/Parrot/Pmc2c/Attribute.pm
   branches/rm_cflags/lib/Parrot/Pmc2c/PMCEmitter.pm
   branches/rm_cflags/lib/Parrot/Pmc2c/UtilFunctions.pm
   branches/rm_cflags/ports/cpan/pause_guide.pod   (props changed)
   branches/rm_cflags/ports/cygwin/parrot-1.0.0-1.cygport   (props changed)
   branches/rm_cflags/ports/debian/libparrot-dev.install.in   (props changed)
   branches/rm_cflags/ports/debian/libparrot.install.in   (props changed)
   branches/rm_cflags/ports/debian/parrot-doc.install.in   (props changed)
   branches/rm_cflags/ports/debian/parrot.install.in   (props changed)
   branches/rm_cflags/ports/fedora/parrot.spec.fedora   (props changed)
   branches/rm_cflags/ports/mandriva/parrot.spec.mandriva   (props changed)
   branches/rm_cflags/ports/suse/parrot.spec.suse   (props changed)
   branches/rm_cflags/runtime/parrot/languages/   (props changed)
   branches/rm_cflags/runtime/parrot/library/Configure/genfile.pir
   branches/rm_cflags/runtime/parrot/library/Math/Rand.pir   (contents, props changed)
   branches/rm_cflags/runtime/parrot/library/Rules.mak   (props changed)
   branches/rm_cflags/runtime/parrot/library/distutils.pir
   branches/rm_cflags/src/   (props changed)
   branches/rm_cflags/src/atomic/gcc_x86.c
   branches/rm_cflags/src/call/args.c
   branches/rm_cflags/src/call/context.c
   branches/rm_cflags/src/call/ops.c   (props changed)
   branches/rm_cflags/src/call/pcc.c   (props changed)
   branches/rm_cflags/src/debug.c
   branches/rm_cflags/src/dynext.c
   branches/rm_cflags/src/dynpmc/dynlexpad.pmc
   branches/rm_cflags/src/dynpmc/foo.pmc
   branches/rm_cflags/src/dynpmc/gdbmhash.pmc
   branches/rm_cflags/src/dynpmc/rational.pmc
   branches/rm_cflags/src/embed.c
   branches/rm_cflags/src/exceptions.c
   branches/rm_cflags/src/extend.c
   branches/rm_cflags/src/frame_builder.c
   branches/rm_cflags/src/gc/alloc_memory.c   (props changed)
   branches/rm_cflags/src/gc/alloc_resources.c   (props changed)
   branches/rm_cflags/src/gc/api.c   (props changed)
   branches/rm_cflags/src/gc/malloc.c   (props changed)
   branches/rm_cflags/src/gc/malloc_trace.c   (props changed)
   branches/rm_cflags/src/gc/mark_sweep.c   (props changed)
   branches/rm_cflags/src/gc/system.c   (props changed)
   branches/rm_cflags/src/global.c
   branches/rm_cflags/src/global_setup.c
   branches/rm_cflags/src/hash.c
   branches/rm_cflags/src/hll.c
   branches/rm_cflags/src/interp/inter_cb.c   (contents, props changed)
   branches/rm_cflags/src/interp/inter_create.c   (contents, props changed)
   branches/rm_cflags/src/interp/inter_misc.c   (contents, props changed)
   branches/rm_cflags/src/io/api.c
   branches/rm_cflags/src/io/socket_api.c
   branches/rm_cflags/src/io/socket_unix.c
   branches/rm_cflags/src/io/socket_win32.c
   branches/rm_cflags/src/key.c
   branches/rm_cflags/src/library.c
   branches/rm_cflags/src/main.c
   branches/rm_cflags/src/multidispatch.c
   branches/rm_cflags/src/nci/api.c
   branches/rm_cflags/src/nci/core_thunks.c
   branches/rm_cflags/src/nci/extra_thunks.c
   branches/rm_cflags/src/oo.c
   branches/rm_cflags/src/ops/bit.ops
   branches/rm_cflags/src/ops/cmp.ops
   branches/rm_cflags/src/ops/core.ops
   branches/rm_cflags/src/ops/experimental.ops
   branches/rm_cflags/src/ops/io.ops
   branches/rm_cflags/src/ops/math.ops
   branches/rm_cflags/src/ops/object.ops
   branches/rm_cflags/src/ops/pmc.ops
   branches/rm_cflags/src/packfile.c
   branches/rm_cflags/src/pmc.c
   branches/rm_cflags/src/pmc/arrayiterator.pmc
   branches/rm_cflags/src/pmc/bigint.pmc
   branches/rm_cflags/src/pmc/bignum.pmc
   branches/rm_cflags/src/pmc/callcontext.pmc
   branches/rm_cflags/src/pmc/capture.pmc
   branches/rm_cflags/src/pmc/class.pmc
   branches/rm_cflags/src/pmc/codestring.pmc
   branches/rm_cflags/src/pmc/complex.pmc
   branches/rm_cflags/src/pmc/continuation.pmc
   branches/rm_cflags/src/pmc/coroutine.pmc
   branches/rm_cflags/src/pmc/cpointer.pmc
   branches/rm_cflags/src/pmc/default.pmc
   branches/rm_cflags/src/pmc/env.pmc
   branches/rm_cflags/src/pmc/exception.pmc
   branches/rm_cflags/src/pmc/exporter.pmc
   branches/rm_cflags/src/pmc/fixedbooleanarray.pmc
   branches/rm_cflags/src/pmc/fixedfloatarray.pmc
   branches/rm_cflags/src/pmc/fixedintegerarray.pmc
   branches/rm_cflags/src/pmc/fixedpmcarray.pmc
   branches/rm_cflags/src/pmc/fixedstringarray.pmc
   branches/rm_cflags/src/pmc/float.pmc
   branches/rm_cflags/src/pmc/hash.pmc
   branches/rm_cflags/src/pmc/hashiterator.pmc
   branches/rm_cflags/src/pmc/imageio.pmc
   branches/rm_cflags/src/pmc/integer.pmc
   branches/rm_cflags/src/pmc/key.pmc
   branches/rm_cflags/src/pmc/lexinfo.pmc
   branches/rm_cflags/src/pmc/managedstruct.pmc
   branches/rm_cflags/src/pmc/namespace.pmc
   branches/rm_cflags/src/pmc/nci.pmc
   branches/rm_cflags/src/pmc/object.pmc
   branches/rm_cflags/src/pmc/opcode.pmc
   branches/rm_cflags/src/pmc/oplib.pmc
   branches/rm_cflags/src/pmc/orderedhash.pmc
   branches/rm_cflags/src/pmc/os.pmc
   branches/rm_cflags/src/pmc/packfile.pmc
   branches/rm_cflags/src/pmc/packfileannotations.pmc
   branches/rm_cflags/src/pmc/packfileconstanttable.pmc
   branches/rm_cflags/src/pmc/packfiledirectory.pmc
   branches/rm_cflags/src/pmc/packfilefixuptable.pmc
   branches/rm_cflags/src/pmc/packfilerawsegment.pmc
   branches/rm_cflags/src/pmc/parrotinterpreter.pmc
   branches/rm_cflags/src/pmc/parrotlibrary.pmc
   branches/rm_cflags/src/pmc/parrotthread.pmc
   branches/rm_cflags/src/pmc/pmcproxy.pmc
   branches/rm_cflags/src/pmc/pointer.pmc
   branches/rm_cflags/src/pmc/resizablebooleanarray.pmc
   branches/rm_cflags/src/pmc/resizablepmcarray.pmc
   branches/rm_cflags/src/pmc/resizablestringarray.pmc
   branches/rm_cflags/src/pmc/role.pmc
   branches/rm_cflags/src/pmc/scalar.pmc
   branches/rm_cflags/src/pmc/scheduler.pmc
   branches/rm_cflags/src/pmc/sockaddr.pmc
   branches/rm_cflags/src/pmc/string.pmc
   branches/rm_cflags/src/pmc/stringhandle.pmc
   branches/rm_cflags/src/pmc/stringiterator.pmc
   branches/rm_cflags/src/pmc/sub.pmc
   branches/rm_cflags/src/pmc/task.pmc
   branches/rm_cflags/src/pmc/undef.pmc
   branches/rm_cflags/src/pmc/unmanagedstruct.pmc
   branches/rm_cflags/src/pmc_freeze.c
   branches/rm_cflags/src/runcore/cores.c   (props changed)
   branches/rm_cflags/src/runcore/main.c   (props changed)
   branches/rm_cflags/src/runcore/profiling.c   (contents, props changed)
   branches/rm_cflags/src/runcore/trace.c   (props changed)
   branches/rm_cflags/src/scheduler.c
   branches/rm_cflags/src/string/api.c
   branches/rm_cflags/src/sub.c
   branches/rm_cflags/src/thread.c
   branches/rm_cflags/src/utils.c
   branches/rm_cflags/t/codingstd/c_function_docs.t
   branches/rm_cflags/t/codingstd/c_parens.t
   branches/rm_cflags/t/codingstd/copyright.t
   branches/rm_cflags/t/codingstd/linelength.t
   branches/rm_cflags/t/codingstd/trailing_space.t
   branches/rm_cflags/t/compilers/tge/NoneGrammar.tg   (props changed)
   branches/rm_cflags/t/native_pbc/annotations.pbc
   branches/rm_cflags/t/native_pbc/integer_1.pbc
   branches/rm_cflags/t/native_pbc/number_1.pbc
   branches/rm_cflags/t/native_pbc/string_1.pbc
   branches/rm_cflags/t/oo/root_new.t   (props changed)
   branches/rm_cflags/t/op/string_mem.t
   branches/rm_cflags/t/pmc/namespace-old.t   (props changed)
   branches/rm_cflags/t/pmc/oplib.t
   branches/rm_cflags/t/src/embed.t   (contents, props changed)
   branches/rm_cflags/t/src/extend.t
   branches/rm_cflags/t/steps/init/hints/linux-01.t   (props changed)
   branches/rm_cflags/tools/build/h2inc.pl   (props changed)
   branches/rm_cflags/tools/dev/fetch_languages.pl   (props changed)
   branches/rm_cflags/tools/dev/mk_gitignore.pl   (props changed)
   branches/rm_cflags/tools/dev/mk_language_shell.pl
   branches/rm_cflags/tools/dev/mk_nci_thunks.pl
   branches/rm_cflags/tools/util/perlcritic-cage.conf   (props changed)

Modified: branches/rm_cflags/DEPRECATED.pod
==============================================================================
--- branches/rm_cflags/DEPRECATED.pod	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/DEPRECATED.pod	Mon Feb 22 02:43:55 2010	(r44285)
@@ -194,13 +194,6 @@
 
 L<https://trac.parrot.org/parrot/ticket/443>
 
-=item Sub/method invocation functions [eligible in 2.1]
-
-The old 'Parrot_call_*' functions for invoking a sub/method object from C are
-deprecated, replaced by 'Parrot_ext_call'.
-
-L<https://trac.parrot.org/parrot/ticket/1145>
-
 =item PMC Attributes Allocation Functions [experimental]
 
  Parrot_gc_allocate_pmc_attributes

Modified: branches/rm_cflags/MANIFEST
==============================================================================
--- branches/rm_cflags/MANIFEST	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/MANIFEST	Mon Feb 22 02:43:55 2010	(r44285)
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Fri Feb 19 01:11:00 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sat Feb 20 18:21:54 2010 UT
 #
 # See below for documentation on the format of this file.
 #
@@ -1431,6 +1431,7 @@
 src/pmc/hashiterator.pmc                                    [devel]src
 src/pmc/hashiteratorkey.pmc                                 [devel]src
 src/pmc/imageio.pmc                                         [devel]src
+src/pmc/imageiosize.pmc                                     [devel]src
 src/pmc/integer.pmc                                         [devel]src
 src/pmc/iterator.pmc                                        [devel]src
 src/pmc/key.pmc                                             [devel]src
@@ -1811,9 +1812,11 @@
 t/op/comp.t                                                 [test]
 t/op/copy.t                                                 [test]
 t/op/debuginfo.t                                            [test]
+t/op/errorson.t                                             [test]
 t/op/exceptions.t                                           [test]
 t/op/exit.t                                                 [test]
 t/op/fetch.t                                                [test]
+t/op/gc-leaky.t                                             [test]
 t/op/gc.t                                                   [test]
 t/op/globals.t                                              [test]
 t/op/ifunless.t                                             [test]
@@ -1897,6 +1900,8 @@
 t/pmc/hash.t                                                [test]
 t/pmc/hashiterator.t                                        [test]
 t/pmc/hashiteratorkey.t                                     [test]
+t/pmc/imageio.t                                             [test]
+t/pmc/imageiosize.t                                         [test]
 t/pmc/integer.t                                             [test]
 t/pmc/io.t                                                  [test]
 t/pmc/io_iterator.t                                         [test]
@@ -2133,7 +2138,6 @@
 tools/build/fixup_gen_file.pl                               []
 tools/build/h2inc.pl                                        []
 tools/build/headerizer.pl                                   []
-tools/build/nativecall.pir                                  []
 tools/build/ops2c.pl                                        [devel]
 tools/build/ops2pm.pl                                       []
 tools/build/parrot_config_c.pl                              []
@@ -2168,6 +2172,7 @@
 tools/dev/mk_nci_thunks.pl                                  []
 tools/dev/mk_rpm_manifests.pl                               []
 tools/dev/nci_test_gen.pl                                   []
+tools/dev/nci_thunk_gen.pir                                 []
 tools/dev/nm.pl                                             []
 tools/dev/nopaste.pl                                        []
 tools/dev/ops_not_tested.pl                                 []

Modified: branches/rm_cflags/MANIFEST.SKIP
==============================================================================
--- branches/rm_cflags/MANIFEST.SKIP	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/MANIFEST.SKIP	Mon Feb 22 02:43:55 2010	(r44285)
@@ -1,6 +1,6 @@
 # ex: set ro:
 # $Id$
-# generated by tools/dev/mk_manifest_and_skip.pl Fri Feb 19 01:11:00 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sun Feb 21 04:27:37 2010 UT
 #
 # This file should contain a transcript of the svn:ignore properties
 # of the directories in the Parrot subversion repository. (Needed for
@@ -105,6 +105,12 @@
 ^parrot_config\.pbc/
 ^parrot_debugger$
 ^parrot_debugger/
+^parrot_nci_thunk_gen$
+^parrot_nci_thunk_gen/
+^parrot_nci_thunk_gen\.c$
+^parrot_nci_thunk_gen\.c/
+^parrot_nci_thunk_gen\.pbc$
+^parrot_nci_thunk_gen\.pbc/
 ^parrot_test_run\.tar\.gz$
 ^parrot_test_run\.tar\.gz/
 ^pbc_disassemble$
@@ -578,9 +584,6 @@
 # generated from svn:ignore of 'runtime/parrot/library/Math/'
 ^runtime/parrot/library/Math/.*\.pbc$
 ^runtime/parrot/library/Math/.*\.pbc/
-# generated from svn:ignore of 'runtime/parrot/library/Math/Random/'
-^runtime/parrot/library/Math/Random/.*\.pbc$
-^runtime/parrot/library/Math/Random/.*\.pbc/
 # generated from svn:ignore of 'runtime/parrot/library/NCI/'
 ^runtime/parrot/library/NCI/.*\.pbc$
 ^runtime/parrot/library/NCI/.*\.pbc/
@@ -639,6 +642,8 @@
 ^src/exec_dep\.h/
 ^src/extend_vtable\.c$
 ^src/extend_vtable\.c/
+^src/extra_nci_thunks\.c$
+^src/extra_nci_thunks\.c/
 ^src/fingerprint\.c$
 ^src/fingerprint\.c/
 ^src/glut_callbacks\.c$

Modified: branches/rm_cflags/MANIFEST.generated
==============================================================================
--- branches/rm_cflags/MANIFEST.generated	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/MANIFEST.generated	Mon Feb 22 02:43:55 2010	(r44285)
@@ -56,6 +56,7 @@
 installable_parrot_debugger                       [main]bin
 installable_parrot.exe                            [main]bin
 installable_parrot                                [main]bin
+installable_parrot_nci_thunk_gen                  [main]bin
 installable_pbc_disassemble.exe                   [main]bin
 installable_pbc_disassemble                       [main]bin
 installable_pbc_dump.exe                          [main]bin

Modified: branches/rm_cflags/compilers/data_json/Defines.mak
==============================================================================
--- branches/rm_cflags/compilers/data_json/Defines.mak	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/compilers/data_json/Defines.mak	Mon Feb 22 02:43:55 2010	(r44285)
@@ -1,4 +1,6 @@
-DATA_JSON_LIB_PBCS = compilers/data_json/data_json.pbc
-DATA_JSON_CLEANUPS = compilers/data_json/data_json.pbc \
+DATA_JSON_LIB_PBCS = $(LIBRARY_DIR)/data_json.pbc
+
+DATA_JSON_CLEANUPS = $(LIBRARY_DIR)/data_json.pbc \
+    compilers/data_json/data_json.pbc \
     compilers/data_json/data_json/grammar.pir \
     compilers/data_json/data_json/pge2pir.pir

Modified: branches/rm_cflags/compilers/data_json/Rules.mak
==============================================================================
--- branches/rm_cflags/compilers/data_json/Rules.mak	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/compilers/data_json/Rules.mak	Mon Feb 22 02:43:55 2010	(r44285)
@@ -1,10 +1,10 @@
 $(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 \
+    $(LIBRARY_DIR)/PGE.pbc \
+    $(LIBRARY_DIR)/PGE/Util.pbc \
+    $(LIBRARY_DIR)/TGE.pbc \
     compilers/data_json/data_json/grammar.pir \
     compilers/data_json/data_json/pge2pir.pir
 

Modified: branches/rm_cflags/compilers/imcc/imcc.y
==============================================================================
--- branches/rm_cflags/compilers/imcc/imcc.y	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/compilers/imcc/imcc.y	Mon Feb 22 02:43:55 2010	(r44285)
@@ -532,7 +532,7 @@
     }
 
     r[1]          = rhs;
-    rhs->pmc_type = pmc_type(interp,
+    rhs->pmc_type = Parrot_pmc_get_type_str(interp,
         Parrot_str_new(interp, unquoted_name, name_length));
 
     mem_sys_free(unquoted_name);
@@ -2026,7 +2026,7 @@
          {
            /* there'd normally be a mem_sys_strdup() here, but the lexer already
             * copied the string, so it's safe to use directly */
-           if ((IMCC_INFO(interp)->cur_pmc_type = pmc_type(interp,
+           if ((IMCC_INFO(interp)->cur_pmc_type = Parrot_pmc_get_type_str(interp,
                Parrot_str_new(interp, $1, 0))) <= 0) {
                IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
                     "Unknown PMC type '%s'\n", $1);

Modified: branches/rm_cflags/compilers/imcc/imcparser.c
==============================================================================
--- branches/rm_cflags/compilers/imcc/imcparser.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/compilers/imcc/imcparser.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -614,7 +614,7 @@
     }
 
     r[1]          = rhs;
-    rhs->pmc_type = pmc_type(interp,
+    rhs->pmc_type = Parrot_pmc_get_type_str(interp,
         Parrot_str_new(interp, unquoted_name, name_length));
 
     mem_sys_free(unquoted_name);
@@ -4800,7 +4800,7 @@
     {
            /* there'd normally be a mem_sys_strdup() here, but the lexer already
             * copied the string, so it's safe to use directly */
-           if ((IMCC_INFO(interp)->cur_pmc_type = pmc_type(interp,
+           if ((IMCC_INFO(interp)->cur_pmc_type = Parrot_pmc_get_type_str(interp,
                Parrot_str_new(interp, (yyvsp[(1) - (1)].s), 0))) <= 0) {
                IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
                     "Unknown PMC type '%s'\n", (yyvsp[(1) - (1)].s));

Modified: branches/rm_cflags/compilers/imcc/parser_util.c
==============================================================================
--- branches/rm_cflags/compilers/imcc/parser_util.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/compilers/imcc/parser_util.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -154,7 +154,7 @@
     SymReg *regs[3];
     SymReg *pmc;
     int nargs;
-    const int pmc_num = pmc_type(interp,
+    const int pmc_num = Parrot_pmc_get_type_str(interp,
             Parrot_str_new(interp, *type == '.' ? type + 1 : type, 0));
 
     snprintf(fmt, sizeof (fmt), "%d", pmc_num);
@@ -703,7 +703,7 @@
          *
          * TODO if a sub was denoted :main return that instead
          */
-        sub                  = pmc_new(interp, enum_class_Eval);
+        sub                  = Parrot_pmc_new(interp, enum_class_Eval);
         PMC_get_sub(interp, sub, sub_data);
         sub_data->seg        = new_cs;
         sub_data->start_offs = 0;

Modified: branches/rm_cflags/compilers/imcc/pbc.c
==============================================================================
--- branches/rm_cflags/compilers/imcc/pbc.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/compilers/imcc/pbc.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -1044,9 +1044,9 @@
 
     /* a :multi sub with no arguments */
     if (!pcc_sub->multi[0])
-        return pmc_new(interp, enum_class_FixedIntegerArray);
+        return Parrot_pmc_new(interp, enum_class_FixedIntegerArray);
 
-    multi_sig = pmc_new(interp, enum_class_FixedPMCArray);
+    multi_sig = Parrot_pmc_new(interp, enum_class_FixedPMCArray);
     VTABLE_set_integer_native(interp, multi_sig, n);
     ct        = interp->code->const_table;
 
@@ -1058,14 +1058,14 @@
 
         if (r->set == 'S') {
             STRING * const type_name = ct->constants[r->color]->u.string;
-            const INTVAL type_num    = pmc_type(interp, type_name);
+            const INTVAL type_num    = Parrot_pmc_get_type_str(interp, type_name);
 
             if (type_num == enum_type_undef) {
-                sig_pmc = pmc_new(interp, enum_class_String);
+                sig_pmc = Parrot_pmc_new(interp, enum_class_String);
                 VTABLE_set_string_native(interp, sig_pmc, type_name);
             }
             else {
-                sig_pmc = pmc_new(interp, enum_class_Integer);
+                sig_pmc = Parrot_pmc_new(interp, enum_class_Integer);
                 VTABLE_set_integer_native(interp, sig_pmc, type_num);
             }
         }
@@ -1116,7 +1116,7 @@
             if (r->set == 'P' && r->usage & U_LEXICAL) {
                 SymReg *n;
                 if (!lex_info) {
-                    lex_info = pmc_new_noinit(interp, lex_info_id);
+                    lex_info = Parrot_pmc_new_noinit(interp, lex_info_id);
                     VTABLE_init_pmc(interp, lex_info, sub_pmc);
                 }
 
@@ -1149,7 +1149,7 @@
     }
 
     if (!lex_info && (unit->outer || need_lex)) {
-        lex_info = pmc_new_noinit(interp, lex_info_id);
+        lex_info = Parrot_pmc_new_noinit(interp, lex_info_id);
         VTABLE_init_pmc(interp, lex_info, sub_pmc);
     }
 
@@ -1292,12 +1292,12 @@
         if (!PMC_IS_NULL(classobj))
             sub_pmc = VTABLE_instantiate(interp, classobj, PMCNULL);
         else {
-            const INTVAL type = pmc_type(interp, classname);
+            const INTVAL type = Parrot_pmc_get_type_str(interp, classname);
             if (type <= 0)
                 Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_NO_CLASS,
                     "Class '%Ss' specified in :instanceof(...) not found",
                     classname);
-            sub_pmc = pmc_new(interp, type);
+            sub_pmc = Parrot_pmc_new(interp, type);
         }
     }
     else {
@@ -1305,7 +1305,7 @@
         type = Parrot_get_ctx_HLL_type(interp, type);
 
         /* TODO create constant - see also src/packfile.c */
-        sub_pmc = pmc_new(interp, type);
+        sub_pmc = Parrot_pmc_new(interp, type);
     }
 
     /* Set flags and get the sub info. */
@@ -1348,7 +1348,7 @@
             ns_pmc = ct->constants[ns_const]->u.key;
             break;
           case PFC_STRING:
-            ns_pmc = constant_pmc_new(interp, enum_class_String);
+            ns_pmc = Parrot_pmc_new_constant(interp, enum_class_String);
             VTABLE_set_string_native(interp, ns_pmc, ct->constants[ns_const]->u.string);
             break;
           default:
@@ -1805,7 +1805,7 @@
     else
         s = Parrot_str_unescape(interp, r->name, 0, NULL);
 
-    p  = constant_pmc_new(interp, r->pmc_type);
+    p  = Parrot_pmc_new_constant(interp, r->pmc_type);
 
     switch (r->pmc_type) {
       case enum_class_Integer:

Modified: branches/rm_cflags/compilers/pirc/src/bcgen.c
==============================================================================
--- branches/rm_cflags/compilers/pirc/src/bcgen.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/compilers/pirc/src/bcgen.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -798,10 +798,10 @@
     /* A type_count of 1 means there was a :multi flag, but no :multi types.
      * therefore, create a special signature and return that.  */
     if (type_count == 1)
-        return pmc_new(bc->interp, enum_class_FixedIntegerArray);
+        return Parrot_pmc_new(bc->interp, enum_class_FixedIntegerArray);
 
     /* create a FixedPMCArray to store all multi types */
-    multi_signature = pmc_new(bc->interp, enum_class_FixedPMCArray);
+    multi_signature = Parrot_pmc_new(bc->interp, enum_class_FixedPMCArray);
 
     /* set its size as specified in type_count */
     VTABLE_set_integer_native(bc->interp, multi_signature, type_count);
@@ -818,7 +818,7 @@
                 /* add the string to the constant table, retrieve a pointer to the STRING */
                 STRING * typestring = add_string_const_from_cstring(bc, types[i].entry.ident);
                 /* create a new String PMC. */
-                sig_pmc = pmc_new(bc->interp, enum_class_String);
+                sig_pmc = Parrot_pmc_new(bc->interp, enum_class_String);
                 /* set the STRING in the String PMC */
                 VTABLE_set_string_native(bc->interp, sig_pmc, typestring);
                 break;
@@ -977,7 +977,7 @@
     STRING * const method      = string_from_literal(bc->interp, "declare_lex_preg");
 
     /* create a lexinfo PMC */
-    PMC * lex_info             = pmc_new_noinit(bc->interp, lex_info_id);
+    PMC * lex_info             = Parrot_pmc_new_noinit(bc->interp, lex_info_id);
     VTABLE_init_pmc(bc->interp, lex_info, sub);
 
     /* walk through the list of lexicals and register them */
@@ -1001,7 +1001,7 @@
      * :lex flag, then create the lex_info anyway.
      */
     if (lex_info == NULL && needlex) {
-        lex_info = pmc_new_noinit(bc->interp, lex_info_id);
+        lex_info = Parrot_pmc_new_noinit(bc->interp, lex_info_id);
         VTABLE_init_pmc(bc->interp, lex_info, sub);
     }
 
@@ -1108,7 +1108,7 @@
 
     switch (ns->entry_type) {
         case MULTI_TYPE_IDENT: {
-            PMC *namespace_pmc = constant_pmc_new(bc->interp, enum_class_String);
+            PMC *namespace_pmc = Parrot_pmc_new_constant(bc->interp, enum_class_String);
             PARROT_NAMESPACE(namespace_pmc)->name =
                 add_string_const_from_cstring(bc, ns->entry.ident);
             break;
@@ -1161,7 +1161,7 @@
                 Parrot_ex_throw_from_c_args(bc->interp, NULL, EXCEPTION_NO_CLASS,
                     "Requested sub class '%Ss' in :instanceof() not found", classname);
 
-            return pmc_new(bc->interp, type);
+            return Parrot_pmc_new(bc->interp, type);
         }
 
     }
@@ -1175,7 +1175,7 @@
      * TODO create constant - see also src/packfile.c
      * XXX is this (still) necessary?
      */
-    return pmc_new(bc->interp, type);
+    return Parrot_pmc_new(bc->interp, type);
 }
 
 /*

Modified: branches/rm_cflags/compilers/pirc/src/pircompunit.c
==============================================================================
--- branches/rm_cflags/compilers/pirc/src/pircompunit.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/compilers/pirc/src/pircompunit.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -1653,7 +1653,7 @@
             symbol *constsym  = new_symbol(lexer, name, PMC_TYPE);
             target *consttarg = target_from_symbol(lexer, constsym);
 
-            PMC *intconst = pmc_new(lexer->interp,
+            PMC *intconst = Parrot_pmc_new(lexer->interp,
                                     Parrot_get_ctx_HLL_type(lexer->interp, enum_class_Integer));
             int index     = add_pmc_const(lexer->bc, intconst);
             VTABLE_set_integer_native(lexer->interp, intconst, value->val.ival);
@@ -1688,7 +1688,7 @@
             symbol *constsym  = new_symbol(lexer, name, PMC_TYPE);
             target *consttarg = target_from_symbol(lexer, constsym);
 
-            PMC *numconst     = pmc_new(lexer->interp,
+            PMC *numconst     = Parrot_pmc_new(lexer->interp,
                                         Parrot_get_ctx_HLL_type(lexer->interp, enum_class_Float));
             int index         = add_pmc_const(lexer->bc, numconst);
             VTABLE_set_number_native(lexer->interp, numconst, value->val.nval);
@@ -1718,7 +1718,7 @@
             symbol *constsym  = new_symbol(lexer, name, PMC_TYPE);
             target *consttarg = target_from_symbol(lexer, constsym);
 
-            PMC    *strconst  = pmc_new(lexer->interp,
+            PMC    *strconst  = Parrot_pmc_new(lexer->interp,
                                     Parrot_get_ctx_HLL_type(lexer->interp, enum_class_String));
 
             int     index     = add_pmc_const(lexer->bc, strconst);

Modified: branches/rm_cflags/compilers/pirc/src/piremit.c
==============================================================================
--- branches/rm_cflags/compilers/pirc/src/piremit.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/compilers/pirc/src/piremit.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -790,7 +790,7 @@
 
             /* the last operand, which is the second in this case */
             expression *second_operand = instr->operands;
-            PMC *intconst = pmc_new(lexer->interp,
+            PMC *intconst = Parrot_pmc_new(lexer->interp,
                                     Parrot_get_ctx_HLL_type(lexer->interp, enum_class_Integer));
             int index     = add_pmc_const(lexer->bc, intconst);
             VTABLE_set_integer_native(lexer->interp, intconst, second_operand->expr.c->val.ival);
@@ -807,7 +807,7 @@
 
             /* the last operand, which is the second in this case */
             expression *second_operand = instr->operands;
-            PMC *numconst = pmc_new(lexer->interp,
+            PMC *numconst = Parrot_pmc_new(lexer->interp,
                                     Parrot_get_ctx_HLL_type(lexer->interp, enum_class_Float));
             int index     = add_pmc_const(lexer->bc, numconst);
             VTABLE_set_number_native(lexer->interp, numconst, second_operand->expr.c->val.nval);
@@ -825,7 +825,7 @@
 
             /* the last operand, which is the second in this case */
             expression *second_operand = instr->operands;
-            PMC *strconst = pmc_new(lexer->interp,
+            PMC *strconst = Parrot_pmc_new(lexer->interp,
                                     Parrot_get_ctx_HLL_type(lexer->interp, enum_class_String));
             int index     = add_pmc_const(lexer->bc, strconst);
 

Modified: branches/rm_cflags/compilers/pirc/src/pirpcc.c
==============================================================================
--- branches/rm_cflags/compilers/pirc/src/pirpcc.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/compilers/pirc/src/pirpcc.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -306,7 +306,7 @@
     int  array_index;
 
     /* flags and types are encoded in a FixedIntegerArray PMC */
-    fixed_int_array = pmc_new(lexer->interp, enum_class_FixedIntegerArray);
+    fixed_int_array = Parrot_pmc_new(lexer->interp, enum_class_FixedIntegerArray);
 
     if (size > 0) /* can't resize a fixed integer array to 0 elements, default size is 0. */
         VTABLE_set_integer_native(lexer->interp, fixed_int_array, size);

Modified: branches/rm_cflags/config/gen/crypto/digest_pmc.in
==============================================================================
--- branches/rm_cflags/config/gen/crypto/digest_pmc.in	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/config/gen/crypto/digest_pmc.in	Mon Feb 22 02:43:55 2010	(r44285)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2008, Parrot Foundation.
+Copyright (C) 2008-2010, Parrot Foundation.
 $Id$
 
 =head1 NAME
@@ -69,7 +69,7 @@
 */
     VTABLE PMC* clone() {
 @TEMP_md_guard@
-        PMC     *retval  = pmc_new_noinit(INTERP, SELF->vtable->base_type);
+        PMC     *retval  = Parrot_pmc_new_noinit(INTERP, SELF->vtable->base_type);
         @TEMP_md_ctx@ *c       = mem_allocate_zeroed_typed(@TEMP_md_ctx@);
 
         memcpy(c, PMC_data(SELF), sizeof (@TEMP_md_ctx@));

Modified: branches/rm_cflags/config/gen/makefiles/root.in
==============================================================================
--- branches/rm_cflags/config/gen/makefiles/root.in	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/config/gen/makefiles/root.in	Mon Feb 22 02:43:55 2010	(r44285)
@@ -284,7 +284,6 @@
     $(LIBRARY_DIR)/Getopt/Obj.pbc \
     $(LIBRARY_DIR)/Iter.pbc \
     $(LIBRARY_DIR)/JSON.pbc \
-    $(LIBRARY_DIR)/data_json.pbc \
     $(LIBRARY_DIR)/Math/Rand.pbc \
     $(LIBRARY_DIR)/MIME/Base64.pbc \
     $(LIBRARY_DIR)/NCI/Utils.pbc \
@@ -527,6 +526,7 @@
 PARROT_CONFIG       = . at slash@parrot_config$(EXE)
 PIRC                = . at slash@pirc$(EXE)
 NQP_RX              = . at slash@parrot-nqp$(EXE)
+NCI_THUNK_GEN	    = ./parrot_nci_thunk_gen$(EXE)
 
 # Installable executables
 INSTALLABLEPARROT    = . at slash@installable_parrot$(EXE)
@@ -537,6 +537,7 @@
 INSTALLABLEPDB       = . at slash@installable_parrot_debugger$(EXE)
 INSTALLABLECONFIG    = . at slash@installable_parrot_config$(EXE)
 INSTALLABLENQP       = . at slash@installable_parrot-nqp$(EXE)
+INSTALLABLENCITHUNKGEN = ./installable_parrot_nci_thunk_gen$(EXE)
 
 # Libraries
 LIBPARROT_STATIC    = @blib_dir@/@libparrot_static@
@@ -556,6 +557,7 @@
 DYNEXT_DIR          = runtime/parrot/dynext
 LIBNCI_TEST_SO      = $(DYNEXT_DIR)/libnci_test$(LOAD_EXT)
 LIBGLUTCB_SO        = $(DYNEXT_DIR)/libglutcb$(LOAD_EXT)
+EXTRANCITHUNKS_SO   = $(DYNEXT_DIR)/extra_nci_thunks$(LOAD_EXT)
 
 ###############################################################################
 #
@@ -596,6 +598,7 @@
     corevm \
     docs \
 #IF(has_glut):    $(LIBGLUTCB_SO) \
+    $(EXTRANCITHUNKS_SO) \
     $(DIS) \
     $(PARROT_CONFIG) \
     $(PBC_TO_EXE) \
@@ -607,6 +610,7 @@
     $(PGE_LIB_PBCS) \
     $(PCT_LIB_PBCS) \
     $(JSON_LIB_PBCS) \
+    $(DATA_JSON_LIB_PBCS) \
     $(NQP_LIB_PBCS)
 
 corevm : \
@@ -797,7 +801,7 @@
 
 parrot_utils : $(PDUMP) $(DIS) $(PDB) $(PBC_MERGE) $(PBC_TO_EXE) $(PARROT_CONFIG) src/install_config$(O)
 
-installable: all $(INSTALLABLEPARROT) $(INSTALLABLEPDUMP) $(INSTALLABLEDIS) $(INSTALLABLEPDB) $(INSTALLABLEPBC_MERGE) $(INSTALLABLEPBCTOEXE) $(INSTALLABLECONFIG) $(INSTALLABLENQP)
+installable: all $(INSTALLABLEPARROT) $(INSTALLABLEPDUMP) $(INSTALLABLEDIS) $(INSTALLABLEPDB) $(INSTALLABLEPBC_MERGE) $(INSTALLABLEPBCTOEXE) $(INSTALLABLECONFIG) $(INSTALLABLENQP) $(INSTALLABLENCITHUNKGEN)
 
 
 runtime/parrot/include/parrotlib.pbc: runtime/parrot/library/parrotlib.pir $(PARROT) $(GEN_PASM_INCLUDES)
@@ -818,6 +822,12 @@
 	$(PARROT) -o pbc_to_exe.pbc tools/dev/pbc_to_exe.pir
 	$(PARROT) pbc_to_exe.pbc pbc_to_exe.pbc
 
+parrot_nci_thunk_gen.pbc : tools/dev/nci_thunk_gen.pir $(DATA_JSON_LIB_PBCS) $(PARROT)
+	$(PARROT) -o parrot_nci_thunk_gen.pbc tools/dev/nci_thunk_gen.pir
+
+$(NCI_THUNK_GEN) : parrot_nci_thunk_gen.pbc $(PBC_TO_EXE)
+	$(PBC_TO_EXE) parrot_nci_thunk_gen.pbc
+
 $(PARROT_CONFIG) : tools/util/parrot-config.pir $(PARROT) $(PBC_TO_EXE)
 	$(PARROT) -o parrot_config.pbc tools/util/parrot-config.pir
 	$(PARROT) pbc_to_exe.pbc parrot_config.pbc
@@ -930,6 +940,9 @@
 $(INSTALLABLEPBCTOEXE) : $(PBC_TO_EXE) src/install_config$(O)
 	$(PBC_TO_EXE) pbc_to_exe.pbc --install
 
+$(INSTALLABLENCITHUNKGEN) : parrot_nci_thunk_gen.pbc $(PBC_TO_EXE) src/install_config$(O)
+	$(PBC_TO_EXE) parrot_nci_thunk_gen.pbc --install
+
 #
 # Parrot Debugger
 #
@@ -1828,7 +1841,9 @@
     $(INSTALLABLEPDB) \
     $(INSTALLABLECONFIG) \
     $(INSTALLABLENQP) \
+    $(INSTALLABLENCITHUNKGEN) \
     pbc_to_exe.pbc pbc_to_exe.c pbc_to_exe$(O) pbc_to_exe$(EXE) \
+    $(NCI_THUNK_GEN) parrot_nci_thunk_gen.c parrot_nci_thunk_gen$(O) parrot_nci_thunk_gen.pbc \
     parrot_config$(EXE) parrot_config.c parrot_config$(O) parrot_config.pbc \
     compilers/imcc/main$(O) \
     $(PDUMP) src/pbc_dump$(O) src/packdump$(O) \
@@ -1845,6 +1860,8 @@
     src/glut_callbacks$(O) \
     src/glut_nci_thunks$(O) \
     $(LIBGLUTCB_SO) \
+    src/extra_nci_thunks$(O) \
+    $(EXTRANCITHUNKS_SO) \
     install_config.fpmc
 	$(PERL) $(BUILD_TOOLS_DIR)/c2str.pl --init
 	$(RM_F) \
@@ -1882,6 +1899,8 @@
     $(LIBNCI_TEST_SO) \
     src/glut_callbacks$(O) \
     $(LIBGLUTCB_SO) \
+    src/extra_nci_thunks$(O) \
+    $(EXTRANCITHUNKS_SO) \
     $(LIBPARROT_STATIC) \
     $(LIBPARROT_SHARED)
 
@@ -2411,8 +2430,8 @@
 # for use by runtime/parrot/library/OpenGL.pir
 src/glut_callbacks$(O): $(GENERAL_H_FILES)
 
-src/glut_nci_thunks.c: $(PARROT) runtime/parrot/library/data_json.pbc tools/build/nativecall.pir
-	$(PARROT) tools/build/nativecall.pir \
+src/glut_nci_thunks.c: $(NCI_THUNK_GEN)
+	$(NCI_THUNK_GEN) \
 	    --loader-name=Parrot_glut_nci_loader \
 	    --loader-storage-class=PARROT_DYNEXT_EXPORT \
 	    --output=src/glut_nci_thunks.c \
@@ -2425,6 +2444,16 @@
     @ld_out@$@ src/glut_callbacks$(O) src/glut_nci_thunks$(O) \
     $(ALL_PARROT_LIBS) @opengl_lib@
 
+src/extra_nci_thunks.c : src/nci/extra_thunks.nci $(NCI_THUNK_GEN)
+	$(NCI_THUNK_GEN) --dynext --output=src/extra_nci_thunks.c <src/nci/extra_thunks.nci
+
+src/extra_nci_thunks$(O) : $(GENERAL_H_FILES)
+
+$(EXTRANCITHUNKS_SO) : $(LIBPARROT) src/extra_nci_thunks$(O)
+	$(LD) $(LD_LOAD_FLAGS) $(LDFLAGS) \
+    @ld_out@$@ src/extra_nci_thunks$(O) \
+    $(ALL_PARROT_LIBS)
+
 # emacs etags
 # this needs exuberant-ctags
 

Modified: branches/rm_cflags/config/gen/platform/generic/env.c
==============================================================================
--- branches/rm_cflags/config/gen/platform/generic/env.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/config/gen/platform/generic/env.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- * Copyright (C) 2004-2006, Parrot Foundation.
+ * Copyright (C) 2004-2010, Parrot Foundation.
  */
 
 /*
@@ -26,7 +26,9 @@
 
 /*
 
-=item C<void Parrot_setenv(const char *name, const char *value)>
+=item C<void Parrot_setenv(PARROT_INTERP, STRING *str_name, STRING *str_value)>
+
+Set up Environment vars
 
 =cut
 
@@ -61,7 +63,9 @@
 
 /*
 
-=item C<void Parrot_unsetenv(const char *name)>
+=item C<void Parrot_unsetenv(PARROT_INTERP, STRING *str_name)>
+
+UnSet Environment vars
 
 =cut
 
@@ -81,7 +85,9 @@
 
 /*
 
-=item C<char * Parrot_getenv(const char *name, int *free_it)>
+=item C<char * Parrot_getenv(PARROT_INTERP, STRING *str_name)>
+
+Get Environment vars
 
 =cut
 

Modified: branches/rm_cflags/config/gen/platform/generic/memexec.c
==============================================================================
--- branches/rm_cflags/config/gen/platform/generic/memexec.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/config/gen/platform/generic/memexec.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- * Copyright (C) 2004-2006, Parrot Foundation.
+ * Copyright (C) 2004-2010, Parrot Foundation.
  */
 
 /*
@@ -59,7 +59,7 @@
 
 /*
 
-=item C<void mem_free_executable(void *p, size_t)>
+=item C<void mem_free_executable(void *p, size_t size)>
 
 Free a buffer allocated with mem_alloc_executable().
 
@@ -81,7 +81,8 @@
 
 /*
 
-=item C<void * mem_realloc_executable(void* oldp, size_t oldsize, size_t newsize)>
+=item C<void * mem_realloc_executable(void* oldp, size_t oldsize, size_t
+newsize)>
 
 Reallocate executable memory.
 Rounds up to page size because the whole page will be marked as executable.

Modified: branches/rm_cflags/config/gen/platform/openbsd/memexec.c
==============================================================================
--- branches/rm_cflags/config/gen/platform/openbsd/memexec.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/config/gen/platform/openbsd/memexec.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -1,6 +1,6 @@
 /*
  * $Id$
- * Copyright (C) 2004-2006, Parrot Foundation.
+ * Copyright (C) 2004-2010, Parrot Foundation.
  */
 
 /*
@@ -65,7 +65,8 @@
 
 /*
 
-=item C<void * mem_realloc_executable(void* oldp, size_t oldsize, size_t newsize)>
+=item C<void * mem_realloc_executable(void* oldp, size_t oldsize, size_t
+newsize)>
 
 Reallocate executable memory
 Round up to page size because the whole page will be marked as executable

Modified: branches/rm_cflags/docs/embed.pod
==============================================================================
--- branches/rm_cflags/docs/embed.pod	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/docs/embed.pod	Mon Feb 22 02:43:55 2010	(r44285)
@@ -84,21 +84,7 @@
 
 =head2 Type signatures
 
-These are used with the Parrot_call_sub family of functions.
-
-=over 4
-
-=item v - void (return only)
-
-=item I - integer (return or argument)
-
-=item N - float (return or argument)
-
-=item S - string (return or argument)
-
-=item P - PMC (return or argument)
-
-=back
+    TODO: Write about signature strings
 
 =head2 Interpreter initialization and destruction
 
@@ -1717,7 +1703,7 @@
 
 =item C<Parrot_warn>
 
-=item C<PMC_is_null>
+=item C<Parrot_pmc_is_null>
 
 =item C<pmc_new>
 

Modified: branches/rm_cflags/docs/pdds/draft/pdd11_extending.pod
==============================================================================
--- branches/rm_cflags/docs/pdds/draft/pdd11_extending.pod	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/docs/pdds/draft/pdd11_extending.pod	Mon Feb 22 02:43:55 2010	(r44285)
@@ -275,11 +275,7 @@
 
 =over 4
 
-=item C<Parrot_call_sub(interp, Parrot_PMC sub, Parrot_Int argcount, ...)>
-
-Calls a Parrot subroutine, with C<argcount> PMC parameters. This function sets
-up Parrot's registers in line with the Parrot calling conventions; see
-L<pdd03_calling_conventions.pod> for more details.
+    TODO: Add new call functions here
 
 =back
 

Modified: branches/rm_cflags/docs/project/release_manager_guide.pod
==============================================================================
--- branches/rm_cflags/docs/project/release_manager_guide.pod	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/docs/project/release_manager_guide.pod	Mon Feb 22 02:43:55 2010	(r44285)
@@ -396,7 +396,7 @@
  - Mar 16, 2010 - 2.2  - cotto
  - Apr 20, 2010 - 2.3* - gerd
  - May 18, 2010 - 2.4  - whiteknight
- - Jun 15, 2010 - 2.5  - ??
+ - Jun 15, 2010 - 2.5  - gerd
  - Jul 20, 2010 - 2.6* - coke
 
 =cut

Modified: branches/rm_cflags/examples/c/pbc_info.c
==============================================================================
--- branches/rm_cflags/examples/c/pbc_info.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/examples/c/pbc_info.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2001-2003, Parrot Foundation.
+Copyright (C) 2001-2010, Parrot Foundation.
 $Id$
 
 =head1 NAME
@@ -27,6 +27,8 @@
 #include "parrot/embed.h"
 
 /*
+=item C<static INTVAL iter(PARROT_INTERP, PackFile_Segment *seg, void
+*user_data)>
 
 =item C<static INTVAL iter(PARROT_INTERP, PackFile_Segment *seg, void *user_data)>
 

Modified: branches/rm_cflags/examples/embed/cotorra.c
==============================================================================
--- branches/rm_cflags/examples/embed/cotorra.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/examples/embed/cotorra.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -203,7 +203,7 @@
         Parrot_String compiler = create_string(interp, "PIR");
         Parrot_String errstr;
         Parrot_PMC code = Parrot_compile_string(interp, compiler, exec, &errstr);
-        void *discard = Parrot_call_sub(interp, code, "v");
+        Parrot_ext_call(interp, code, "->");
         return 0;
     }
 
@@ -224,8 +224,7 @@
         Parrot_PMC parrotns = Parrot_PMC_get_pmc_strkey(interp, rootns, parrotname);
         Parrot_String name = create_string(interp, stname);
         Parrot_PMC start = Parrot_PMC_get_pmc_strkey(interp, parrotns, name);
-        void *discard;
-        discard = Parrot_call_sub(interp, start, "v");
+        Parrot_ext_call(interp, start, "->");
     }
     else {
         Parrot_runcode(interp, argc - i, argv + i);

Modified: branches/rm_cflags/include/parrot/atomic/gcc_pcc.h
==============================================================================
--- branches/rm_cflags/include/parrot/atomic/gcc_pcc.h	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/include/parrot/atomic/gcc_pcc.h	Mon Feb 22 02:43:55 2010	(r44285)
@@ -1,5 +1,5 @@
 /* atomic/gcc_pcc.h
- *  Copyright (C) 2006-2008, Parrot Foundation.
+ *  Copyright (C) 2006-2010, Parrot Foundation.
  *  SVN Info
  *     $Id$
  *  Overview:
@@ -23,6 +23,18 @@
 
 #  define PARROT_ATOMIC_PTR_SET(a, b) (a).val = (void *) (b)
 
+/*
+
+=over 4
+
+=item C<inline static void *parrot_ppc_cmpset(void * volatile *ptr, void
+*expect, void *update)>
+
+Generate ppc cmpset
+
+=cut
+
+*/
 inline static void *parrot_ppc_cmpset(void * volatile *ptr,
                                       void *expect, void *update)
 {
@@ -47,6 +59,18 @@
     return tmp;
 }
 
+/*
+
+=item C<inline static long parrot_ppc_add(volatile long *val, long what)>
+
+Generate ppc add
+
+=back
+
+=cut
+
+*/
+
 inline static long parrot_ppc_add(volatile long *val, long what)
 {
     long tmp;

Modified: branches/rm_cflags/include/parrot/extend.h
==============================================================================
--- branches/rm_cflags/include/parrot/extend.h	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/include/parrot/extend.h	Mon Feb 22 02:43:55 2010	(r44285)
@@ -62,24 +62,6 @@
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 
 PARROT_EXPORT
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-void * Parrot_call_sub(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),
-    ...)
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(3);
-
-PARROT_EXPORT
 int Parrot_eprintf(NULLOK_INTERP, ARGIN(const char *s), ...)
         __attribute__nonnull__(2);
 
@@ -412,12 +394,6 @@
         __attribute__nonnull__(2)
         __attribute__nonnull__(3);
 
-#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_int __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(signature))
 #define ASSERT_ARGS_Parrot_eprintf __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(s))
 #define ASSERT_ARGS_Parrot_ext_call __attribute__unused__ int _ASSERT_ARGS_CHECK = (\

Modified: branches/rm_cflags/include/parrot/interpreter.h
==============================================================================
--- branches/rm_cflags/include/parrot/interpreter.h	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/include/parrot/interpreter.h	Mon Feb 22 02:43:55 2010	(r44285)
@@ -606,7 +606,7 @@
 #endif   /* PARROT_IN_CORE */
 
 #ifndef PMC_IS_NULL
-#  define PMC_IS_NULL(pmc) PMC_is_null(NULL, (pmc))
+#  define PMC_IS_NULL(pmc) Parrot_pmc_is_null(NULL, (pmc))
 #endif
 #ifndef STRING_IS_NULL
 #  define STRING_IS_NULL(s) ((s) == NULL || STRING_is_null(NULL, (s))

Modified: branches/rm_cflags/include/parrot/pmc.h
==============================================================================
--- branches/rm_cflags/include/parrot/pmc.h	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/include/parrot/pmc.h	Mon Feb 22 02:43:55 2010	(r44285)
@@ -23,72 +23,84 @@
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 
 PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
-PMC * constant_pmc_new(PARROT_INTERP, INTVAL base_type)
+void Parrot_pmc_create_mro(PARROT_INTERP, INTVAL type)
         __attribute__nonnull__(1);
 
 PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
-PMC * constant_pmc_new_init(PARROT_INTERP,
-    INTVAL base_type,
-    ARGIN_NULLOK(PMC *init))
-        __attribute__nonnull__(1);
+void Parrot_pmc_destroy(PARROT_INTERP, ARGMOD(PMC *pmc))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2)
+        FUNC_MODIFIES(*pmc);
 
 PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
-PMC * constant_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)
-        __attribute__nonnull__(1);
+void Parrot_pmc_gc_register(PARROT_INTERP, ARGIN(PMC *pmc))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
 
 PARROT_EXPORT
-void gc_register_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
+void Parrot_pmc_gc_unregister(PARROT_INTERP, ARGIN(PMC *pmc))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
 PARROT_EXPORT
-void gc_unregister_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
+INTVAL Parrot_pmc_get_type(PARROT_INTERP, ARGIN(PMC *name))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
 PARROT_EXPORT
-void Parrot_create_mro(PARROT_INTERP, INTVAL type)
+PARROT_WARN_UNUSED_RESULT
+INTVAL Parrot_pmc_get_type_str(PARROT_INTERP, ARGIN_NULLOK(STRING *name))
         __attribute__nonnull__(1);
 
 PARROT_EXPORT
-void Parrot_pmc_destroy(PARROT_INTERP, ARGMOD(PMC *pmc))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2)
-        FUNC_MODIFIES(*pmc);
+INTVAL Parrot_pmc_is_null(SHIM_INTERP, ARGIN_NULLOK(const PMC *pmc));
 
 PARROT_EXPORT
-INTVAL PMC_is_null(SHIM_INTERP, ARGIN_NULLOK(const PMC *pmc));
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+PMC * Parrot_pmc_new(PARROT_INTERP, INTVAL base_type)
+        __attribute__nonnull__(1);
 
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-PMC * pmc_new(PARROT_INTERP, INTVAL base_type)
+PMC * Parrot_pmc_new_constant(PARROT_INTERP, INTVAL base_type)
+        __attribute__nonnull__(1);
+
+PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+PMC * Parrot_pmc_new_constant_init(PARROT_INTERP,
+    INTVAL base_type,
+    ARGIN_NULLOK(PMC *init))
+        __attribute__nonnull__(1);
+
+PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+PMC * Parrot_pmc_new_constant_noinit(PARROT_INTERP, INTVAL base_type)
         __attribute__nonnull__(1);
 
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
-PMC * pmc_new_init(PARROT_INTERP, INTVAL base_type, ARGOUT(PMC *init))
+PMC * Parrot_pmc_new_init(PARROT_INTERP,
+    INTVAL base_type,
+    ARGOUT(PMC *init))
         __attribute__nonnull__(1)
         __attribute__nonnull__(3)
         FUNC_MODIFIES(*init);
 
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
-PMC * pmc_new_noinit(PARROT_INTERP, INTVAL base_type)
+PMC * Parrot_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)
         __attribute__nonnull__(1);
 
 PARROT_EXPORT
-INTVAL pmc_register(PARROT_INTERP, ARGIN(STRING *name))
+INTVAL Parrot_pmc_register_new_type(PARROT_INTERP, ARGIN(STRING *name))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
 PARROT_IGNORABLE_RESULT
-PMC * pmc_reuse(PARROT_INTERP,
+PMC * Parrot_pmc_reuse(PARROT_INTERP,
     ARGIN(PMC *pmc),
     INTVAL new_type,
     UINTVAL flags)
@@ -98,7 +110,7 @@
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
 PARROT_IGNORABLE_RESULT
-PMC * pmc_reuse_by_class(PARROT_INTERP,
+PMC * Parrot_pmc_reuse_by_class(PARROT_INTERP,
     ARGMOD(PMC *pmc),
     ARGIN(PMC *class_),
     UINTVAL flags)
@@ -110,7 +122,7 @@
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
 PARROT_IGNORABLE_RESULT
-PMC * pmc_reuse_init(PARROT_INTERP,
+PMC * Parrot_pmc_reuse_init(PARROT_INTERP,
     ARGIN(PMC *pmc),
     INTVAL new_type,
     ARGIN(PMC *init),
@@ -119,82 +131,92 @@
         __attribute__nonnull__(2)
         __attribute__nonnull__(4);
 
-PARROT_EXPORT
-PARROT_WARN_UNUSED_RESULT
-INTVAL pmc_type(PARROT_INTERP, ARGIN_NULLOK(STRING *name))
-        __attribute__nonnull__(1);
-
-PARROT_EXPORT
-INTVAL pmc_type_p(PARROT_INTERP, ARGIN(PMC *name))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
-
-INTVAL get_new_vtable_index(PARROT_INTERP)
-        __attribute__nonnull__(1);
-
-void temporary_pmc_free(PARROT_INTERP, ARGMOD(PMC *pmc))
+void Parrot_pmc_free_temporary(PARROT_INTERP, ARGMOD(PMC *pmc))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*pmc);
 
+INTVAL Parrot_pmc_get_new_vtable_index(PARROT_INTERP)
+        __attribute__nonnull__(1);
+
 PARROT_CANNOT_RETURN_NULL
-PMC * temporary_pmc_new(PARROT_INTERP, INTVAL base_type)
+PMC * Parrot_pmc_new_temporary(PARROT_INTERP, INTVAL base_type)
         __attribute__nonnull__(1);
 
-#define ASSERT_ARGS_constant_pmc_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_constant_pmc_new_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_constant_pmc_new_noinit __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_create_mro __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_gc_register_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(pmc))
-#define ASSERT_ARGS_gc_unregister_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_gc_register __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(pmc))
-#define ASSERT_ARGS_Parrot_create_mro __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_Parrot_pmc_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_gc_unregister __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(pmc))
-#define ASSERT_ARGS_PMC_is_null __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#define ASSERT_ARGS_pmc_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_get_type __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(name))
+#define ASSERT_ARGS_Parrot_pmc_get_type_str __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_pmc_is_null __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_Parrot_pmc_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_pmc_new_constant __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_pmc_new_constant_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_pmc_new_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_new_constant_noinit \
+     __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_pmc_new_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(init))
-#define ASSERT_ARGS_pmc_new_noinit __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_new_noinit __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_pmc_register __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_register_new_type __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(name))
-#define ASSERT_ARGS_pmc_reuse __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_reuse __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(pmc))
-#define ASSERT_ARGS_pmc_reuse_by_class __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_reuse_by_class __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(pmc) \
     , PARROT_ASSERT_ARG(class_))
-#define ASSERT_ARGS_pmc_reuse_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_reuse_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(pmc) \
     , PARROT_ASSERT_ARG(init))
-#define ASSERT_ARGS_pmc_type __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_pmc_type_p __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp) \
-    , PARROT_ASSERT_ARG(name))
-#define ASSERT_ARGS_get_new_vtable_index __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
-       PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_temporary_pmc_free __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_free_temporary __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(pmc))
-#define ASSERT_ARGS_temporary_pmc_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_get_new_vtable_index \
+     __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_pmc_new_temporary __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp))
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 /* HEADERIZER END: src/pmc.c */
 
+/* Allows compatibility with old name (see r44190) */
+#define Parrot_create_mro       Parrot_pmc_create_mro
+#define PMC_is_null             Parrot_pmc_is_null
+#define constant_pmc_new        Parrot_pmc_new_constant
+#define constant_pmc_new_init   Parrot_pmc_new_constant_init
+#define gc_register_pmc         Parrot_pmc_gc_register
+#define gc_unregister_pmc       Parrot_pmc_gc_unregister
+#define pmc_new                 Parrot_pmc_new
+#define pmc_new_init            Parrot_pmc_new_init
+#define pmc_new_noinit          Parrot_pmc_new_noinit
+#define pmc_register            Parrot_pmc_register_new_type
+#define pmc_reuse               Parrot_pmc_reuse
+#define pmc_reuse_by_class      Parrot_pmc_reuse_by_class
+#define pmc_reuse_init          Parrot_pmc_reuse_init
+#define pmc_reuse_no_init       Parrot_pmc_reuse_noinit
+#define pmc_type                Parrot_pmc_get_type_str
+#define pmc_type_p              Parrot_pmc_get_type
+
 #endif /* PARROT_PMC_H_GUARD */
 
 /*

Modified: branches/rm_cflags/include/parrot/pmc_freeze.h
==============================================================================
--- branches/rm_cflags/include/parrot/pmc_freeze.h	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/include/parrot/pmc_freeze.h	Mon Feb 22 02:43:55 2010	(r44285)
@@ -13,9 +13,6 @@
 #ifndef PARROT_PMC_FREEZE_H_GUARD
 #define PARROT_PMC_FREEZE_H_GUARD
 
-struct _visit_info;
-typedef void (*visit_f)(PARROT_INTERP, ARGIN_NULLOK(PMC*), ARGIN(PMC*));
-
 typedef enum {
     VISIT_HOW_PMC_TO_VISITOR     = 0x00, /* push to visitor */
     VISIT_HOW_VISITOR_TO_PMC     = 0x01, /* shift from visitor */
@@ -124,6 +121,13 @@
 PARROT_EXPORT
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
+INTVAL Parrot_freeze_size(PARROT_INTERP, ARGIN(PMC *pmc))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
+PARROT_EXPORT
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
 PMC* Parrot_thaw(PARROT_INTERP, ARGIN(STRING *image))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
@@ -135,18 +139,35 @@
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
+void Parrot_visit_loop_thawfinish(PARROT_INTERP, ARGIN(PMC *info))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
+void Parrot_visit_loop_visit(PARROT_INTERP, ARGIN(PMC *info))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
 #define ASSERT_ARGS_Parrot_clone __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(pmc))
 #define ASSERT_ARGS_Parrot_freeze __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(pmc))
+#define ASSERT_ARGS_Parrot_freeze_size __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(pmc))
 #define ASSERT_ARGS_Parrot_thaw __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(image))
 #define ASSERT_ARGS_Parrot_thaw_constants __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(image))
+#define ASSERT_ARGS_Parrot_visit_loop_thawfinish __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(info))
+#define ASSERT_ARGS_Parrot_visit_loop_visit __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(info))
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 /* HEADERIZER END: src/pmc_freeze.c */
 

Modified: branches/rm_cflags/lib/Parrot/Docs/Section/Tools.pm
==============================================================================
--- branches/rm_cflags/lib/Parrot/Docs/Section/Tools.pm	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/lib/Parrot/Docs/Section/Tools.pm	Mon Feb 22 02:43:55 2010	(r44285)
@@ -45,7 +45,6 @@
             'Configuration',
             '',
             $self->new_item( '', 'tools/dev/as2c.pl' ),
-            $self->new_item( '', 'tools/build/nativecall.pl' ),
             $self->new_item( '', 'tools/build/vtable_h.pl' ),
             $self->new_item( '', 'tools/build/vtable_extend.pl' ),
         ),

Modified: branches/rm_cflags/lib/Parrot/Ops2c/Utils.pm
==============================================================================
--- branches/rm_cflags/lib/Parrot/Ops2c/Utils.pm	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/lib/Parrot/Ops2c/Utils.pm	Mon Feb 22 02:43:55 2010	(r44285)
@@ -1063,7 +1063,7 @@
 $self->{sym_export} PMC*
 $load_func(PARROT_INTERP)
 {
-    PMC *const lib      = pmc_new(interp, enum_class_ParrotLibrary);
+    PMC *const lib = Parrot_pmc_new(interp, enum_class_ParrotLibrary);
     ((Parrot_ParrotLibrary_attributes*)PMC_data(lib))->oplib_init = (void *) $self->{init_func};
     dynop_register(interp, lib);
     return lib;

Modified: branches/rm_cflags/lib/Parrot/Pmc2c/Attribute.pm
==============================================================================
--- branches/rm_cflags/lib/Parrot/Pmc2c/Attribute.pm	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/lib/Parrot/Pmc2c/Attribute.pm	Mon Feb 22 02:43:55 2010	(r44285)
@@ -207,7 +207,7 @@
     }
     elsif ($attrtype eq "INTVAL") {
         $decl .= <<"EOA";
-            PMC * const attr_value = pmc_new(interp, enum_class_Integer); \\
+            PMC * const attr_value = Parrot_pmc_new(interp, enum_class_Integer); \\
             VTABLE_set_integer_native(interp, attr_value, value); \\
             VTABLE_set_attr_str(interp, pmc, \\
                               Parrot_str_new_constant(interp, "$attrname"), attr_value); \\
@@ -215,7 +215,7 @@
     }
     elsif ($attrtype eq "FLOATVAL") {
         $decl .= <<"EOA";
-            PMC * const attr_value = pmc_new(interp, enum_class_Float); \\
+            PMC * const attr_value = Parrot_pmc_new(interp, enum_class_Float); \\
             VTABLE_set_number_native(interp, attr_value, value); \\
             VTABLE_set_attr_str(interp, pmc, \\
                               Parrot_str_new_constant(interp, "$attrname"), attr_value); \\
@@ -223,7 +223,7 @@
     }
     elsif ($attrtype =~ $isptrtostring) {
         $decl .= <<"EOA";
-            PMC * const attr_value = pmc_new(interp, enum_class_String); \\
+            PMC * const attr_value = Parrot_pmc_new(interp, enum_class_String); \\
             VTABLE_set_string_native(interp, attr_value, value); \\
             VTABLE_set_attr_str(interp, pmc, \\
                               Parrot_str_new_constant(interp, "$attrname"), attr_value); \\

Modified: branches/rm_cflags/lib/Parrot/Pmc2c/PMCEmitter.pm
==============================================================================
--- branches/rm_cflags/lib/Parrot/Pmc2c/PMCEmitter.pm	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/lib/Parrot/Pmc2c/PMCEmitter.pm	Mon Feb 22 02:43:55 2010	(r44285)
@@ -655,7 +655,7 @@
         }
 
         /* set up MRO and _namespace */
-        Parrot_create_mro(interp, entry);
+        Parrot_pmc_create_mro(interp, entry);
 EOC
 
     # declare each nci method for this class
@@ -822,7 +822,7 @@
 PARROT_WARN_UNUSED_RESULT
 PMC* Parrot_${classname}_get_mro(PARROT_INTERP, PMC* mro) {
     if (PMC_IS_NULL(mro)) {
-        mro = pmc_new(interp, enum_class_ResizableStringArray);
+        mro = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
     }
 $get_mro
     VTABLE_unshift_string(interp, mro,

Modified: branches/rm_cflags/lib/Parrot/Pmc2c/UtilFunctions.pm
==============================================================================
--- branches/rm_cflags/lib/Parrot/Pmc2c/UtilFunctions.pm	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/lib/Parrot/Pmc2c/UtilFunctions.pm	Mon Feb 22 02:43:55 2010	(r44285)
@@ -163,7 +163,7 @@
     int pass;
 
     /* create a library PMC */
-    pmc = constant_pmc_new(interp, enum_class_ParrotLibrary);
+    pmc = Parrot_pmc_new_constant(interp, enum_class_ParrotLibrary);
 
     /* TODO: stuff some info into this PMC's props */
 
@@ -173,7 +173,7 @@
         my $lhs = $info->{flags}{no_init} ? "" : "type$class = ";
         $cout .= <<"EOC";
     whoami = CONST_STRING_GEN(interp, "$class");
-    ${lhs}pmc_register(interp, whoami);
+    ${lhs}Parrot_pmc_register_new_type(interp, whoami);
 EOC
     }
     $cout .= <<"EOC";

Modified: branches/rm_cflags/runtime/parrot/library/Configure/genfile.pir
==============================================================================
--- branches/rm_cflags/runtime/parrot/library/Configure/genfile.pir	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/runtime/parrot/library/Configure/genfile.pir	Mon Feb 22 02:43:55 2010	(r44285)
@@ -44,15 +44,19 @@
     .param string tmpl
     .param string outfile
     .param pmc config
+    .param int verbose          :named('verbose') :optional
+    .param int has_verbose      :opt_flag
     $S0 = slurp(tmpl)
     $S0 = conditioned_line($S0, config)
     $S0 = interpolate_var($S0, config)
     $S1 = sysinfo .SYSINFO_PARROT_OS
     $S0 = replace_slash($S0, $S1)
     spew(outfile, $S0)
-    printerr "\n\tGenerating '"
-    printerr outfile
-    printerr "'\n\n"
+    unless has_verbose goto L1
+    unless verbose goto L1
+    print "generate "
+    say outfile
+  L1:
 .end
 
 .sub 'slurp' :anon

Modified: branches/rm_cflags/runtime/parrot/library/Math/Rand.pir
==============================================================================
--- branches/rm_cflags/runtime/parrot/library/Math/Rand.pir	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/runtime/parrot/library/Math/Rand.pir	Mon Feb 22 02:43:55 2010	(r44285)
@@ -52,9 +52,7 @@
 .namespace [ 'Math'; 'Rand' ]
 
 .sub '__onload' :anon :load
-#    print "__onload Math::Rand\n"
-    new $P0, 'Integer'
-    set $P0, 1
+    $P0 = box 1
     set_global 'next', $P0
 .end
 

Modified: branches/rm_cflags/runtime/parrot/library/distutils.pir
==============================================================================
--- branches/rm_cflags/runtime/parrot/library/distutils.pir	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/runtime/parrot/library/distutils.pir	Mon Feb 22 02:43:55 2010	(r44285)
@@ -14,7 +14,7 @@
 to a wider audience with very little overhead for build/release/install mechanics.
 
 All the rules needed (dynops, dynpmc, pbc_to_exe, nqp, ...) are coded in this module distutils.
-A module author just must write a script C<setup.pir> (or C<setup.nqp> in future).
+A module author just must write a script C<setup.pir> or C<setup.nqp>.
 
 A setup script can be as simple as this:
 
@@ -456,15 +456,27 @@
 
 Overload the default message
 
+=item setup
+
+the default value is setup.pir
+
 =back
 
 =cut
 
 .sub '_usage' :anon
     .param pmc kv :slurpy :named
-    .local string msg
-    msg = <<'USAGE'
-usage: parrot setup.pir [target|--key value]*
+    .local string setup
+    setup = get_value('setup', "setup.pir" :named('default'), kv :flat :named)
+    .local string command
+    command = _command_setup(setup)
+
+    $P0 = new 'FixedStringArray'
+    set $P0, 1
+    $P0[0] = command
+
+    $S0 = <<'USAGE'
+usage: %s [target|--key value]*
 
     Default targets are :
 
@@ -488,7 +500,8 @@
 
         help:           Print this help message.
 USAGE
-    $S0 = get_value('usage', msg :named('default'), kv :flat :named)
+    $S0 = sprintf $S0, $P0
+    $S0 = get_value('usage', $S0 :named('default'), kv :flat :named)
     say $S0
 .end
 
@@ -1130,9 +1143,11 @@
 
 hash
 
-the key is the group name
+the key is the PMC name
+
+the value is an array of PMC pathname or a single PPC pathname
 
-the value is an array of PMC pathname
+an array creates a PMC group
 
 =item dynpmc_cflags
 
@@ -1163,10 +1178,12 @@
     $P0 = iter hash
   L1:
     unless $P0 goto L2
-    .local string group
-    group = shift $P0
+    .local string name
+    name = shift $P0
     .local pmc srcs
-    srcs = hash[group]
+    srcs = hash[name]
+    $I0 = does srcs, 'array'
+    unless $I0 goto L5
     $P1 = iter srcs
   L3:
     unless $P1 goto L4
@@ -1178,11 +1195,18 @@
     __build_dynpmc(src, cflags)
     goto L3
   L4:
-    if group == '' goto L1
-    $S0 = _mk_path_dynpmc(group, load_ext)
+    $S0 = _mk_path_dynpmc(name, load_ext)
     $I0 = newer($S0, srcs)
     if $I0 goto L1
-    __build_dynpmc_group(srcs, group, cflags, ldflags)
+    __build_dynpmc_group(srcs, name, cflags, ldflags)
+    goto L1
+  L5:
+    src = srcs
+    $S0 = _mk_path_dynpmc(name, load_ext)
+    $I0 = newer($S0, src)
+    if $I0 goto L1
+    __build_dynpmc(src, cflags)
+    __build_dynpmc_alone(src, name, cflags, ldflags)
     goto L1
   L2:
 .end
@@ -1324,6 +1348,50 @@
   L6:
 .end
 
+.sub '__build_dynpmc_alone' :anon
+    .param string src
+    .param string name
+    .param string cflags
+    .param string ldflags
+    .local pmc config
+    config = get_config()
+
+    .local string dynext
+    $S0 = config['load_ext']
+    dynext = _mk_path_dynpmc(name, $S0)
+    .local string cmd
+    cmd = config['ld']
+    cmd .= " "
+    $S0 = config['ld_out']
+    cmd .= $S0
+    cmd .= dynext
+    cmd .= " "
+    $S0 = config['o']
+    $S0 = _mk_path_gen_dynpmc(src, $S0)
+    cmd .= $S0
+    cmd .= " "
+    $S0 = get_ldflags()
+    cmd .= $S0
+    cmd .= " "
+    $S0 = config['ld_load_flags']
+    cmd .= $S0
+    cmd .= " "
+    $I0 = config['parrot_is_shared']
+    unless $I0 goto L5
+    $S0 = config['inst_libparrot_ldflags']
+    cmd .= $S0
+    cmd .= " "
+  L5:
+    cmd .= ldflags
+    system(cmd, 1 :named('verbose'))
+
+    $I0 = _has_strip(cflags)
+    unless $I0 goto L6
+    cmd = "strip " . dynext
+    system(cmd, 1 :named('verbose'))
+  L6:
+.end
+
 .sub '_mk_path_dynpmc' :anon
     .param string group
     .param string load_ext
@@ -1653,12 +1721,14 @@
     $P0 = iter hash
   L1:
     unless $P0 goto L2
-    .local string group
-    group = shift $P0
+    .local string name
+    name = shift $P0
     .local pmc srcs
-    srcs = hash[group]
-    $S0 = _mk_path_dynpmc(group, load_ext)
+    srcs = hash[name]
+    $S0 = _mk_path_dynpmc(name, load_ext)
     unlink($S0, 1 :named('verbose'))
+    $I0 = does srcs, 'array'
+    unless $I0 goto L5
     $P1 = iter srcs
   L3:
     unless $P1 goto L4
@@ -1675,11 +1745,22 @@
     goto L3
   L4:
     src = srcs[0]
-    $S0 = _mk_path_gen_dynpmc_group(src, group, '.c')
+    $S0 = _mk_path_gen_dynpmc_group(src, name, '.c')
     unlink($S0, 1 :named('verbose'))
-    $S0 = _mk_path_gen_dynpmc_group(src, group, '.h')
+    $S0 = _mk_path_gen_dynpmc_group(src, name, '.h')
     unlink($S0, 1 :named('verbose'))
-    $S0 = _mk_path_gen_dynpmc_group(src, group, obj)
+    $S0 = _mk_path_gen_dynpmc_group(src, name, obj)
+    unlink($S0, 1 :named('verbose'))
+    goto L1
+  L5:
+    src = srcs
+    $S0 = _mk_path_gen_dynpmc(src, '.c')
+    unlink($S0, 1 :named('verbose'))
+    $S0 = _mk_path_gen_dynpmc(src, '.h')
+    unlink($S0, 1 :named('verbose'))
+    $S0 = _mk_path_gen_dynpmc(src, '.dump')
+    unlink($S0, 1 :named('verbose'))
+    $S0 = _mk_path_gen_dynpmc(src, obj)
     unlink($S0, 1 :named('verbose'))
     goto L1
   L2:
@@ -2421,6 +2502,10 @@
 
 =item project_uri
 
+=item setup
+
+the default value is setup.pir
+
 =back
 
 =cut
@@ -2494,6 +2579,11 @@
     keywords .= "\""
   L10:
 
+    .local string setup
+    setup = get_value('setup', "setup.pir" :named('default'), kv :flat :named)
+    .local string instruction
+    instruction = _plumage_instruction(setup)
+
     .local string vcs
     vcs = get_vcs()
 
@@ -2507,7 +2597,7 @@
     project_uri =get_value('project_uri', kv :flat :named)
 
     $P0 = new 'FixedStringArray'
-    set $P0, 16
+    set $P0, 23
     $P0[0] = name
     $P0[1] = abstract
     $P0[2] = authority
@@ -2518,12 +2608,19 @@
     $P0[7] = packager
     $P0[8] = keywords
     $P0[9] = description
-    $P0[10] = name
-    $P0[11] = vcs
-    $P0[12] = vcs
-    $P0[13] = checkout_uri
-    $P0[14] = browser_uri
-    $P0[15] = project_uri
+    $P0[10] = instruction
+    $P0[11] = instruction
+    $P0[12] = instruction
+    $P0[13] = instruction
+    $P0[14] = instruction
+    $P0[15] = instruction
+    $P0[16] = instruction
+    $P0[17] = name
+    $P0[18] = vcs
+    $P0[19] = vcs
+    $P0[20] = checkout_uri
+    $P0[21] = browser_uri
+    $P0[22] = project_uri
 
     $S0 = <<'TEMPLATE'
 {
@@ -2550,25 +2647,25 @@
             "type" : "repository"
         },
         "update"   : {
-            "type" : "parrot_setup"
+            "type" : "%s"
         },
         "build"    : {
-            "type" : "parrot_setup"
+            "type" : "%s"
         },
         "test"     : {
-            "type" : "parrot_setup"
+            "type" : "%s"
         },
         "smoke"    : {
-            "type" : "parrot_setup"
+            "type" : "%s"
         },
         "install"  : {
-            "type" : "parrot_setup"
+            "type" : "%s"
         },
         "uninstall": {
-            "type" : "parrot_setup"
+            "type" : "%s"
         },
         "clean"    : {
-            "type" : "parrot_setup"
+            "type" : "%s"
         }
     },
     "dependency-info"  : {
@@ -2604,6 +2701,18 @@
     .return (str)
 .end
 
+.sub '_plumage_instruction' :anon
+    .param string setup
+    .local string instruction
+    instruction = "parrot_setup"
+    $I0 = index setup, "."
+    $S0 = substr setup, $I0
+    unless $S0 == '.nqp' goto L1
+    instruction = "nqp_setup"
+  L1:
+    .return (instruction)
+.end
+
 =head3 Step manifest
 
 =over 4
@@ -2627,6 +2736,10 @@
 
 =item harness_files, prove_files
 
+=item setup
+
+the default value is setup.pir
+
 =back
 
 =cut
@@ -2690,7 +2803,9 @@
     _manifest_add_glob(needed, 't/*.t')
   L7:
 
-    $P0 = split ' ', 'setup.pir setup.nqp t/harness'
+    $P0 = split ' ', 't/harness'
+    $S0 = get_value('setup', 'setup.pir' :named('default'), kv :flat :named)
+    push $P0, $S0
   L8:
     unless $P0 goto L9
     $S0 = shift $P0
@@ -3057,7 +3172,11 @@
 
 =item inst_bin, inst_dynext, inst_inc, inst_lang, inst_lib
 
-=back
+=item setup
+
+the default value is setup.pir
+
+back
 
 =cut
 
@@ -3132,8 +3251,13 @@
     .local string packager
     packager = get_value('packager', "you <you at you.org>" :named('default'), kv :flat :named)
 
+    .local string setup
+    setup = get_value('setup', "setup.pir" :named('default'), kv :flat :named)
+    .local string command
+    command = _command_setup(setup)
+
     $P0 = new 'FixedStringArray'
-    set $P0, 9
+    set $P0, 12
     $P0[0] = parrot_version
     $P0[1] = name
     $P0[2] = version
@@ -3143,6 +3267,9 @@
     $P0[6] = project_uri
     $P0[7] = tarball
     $P0[8] = description
+    $P0[9] = command
+    $P0[10] = command
+    $P0[11] = command
 
     $S0 = <<'TEMPLATE'
 %%define parrot_version %s
@@ -3166,14 +3293,14 @@
 %%setup -n %%{name}-%%{version}
 
 %%build
-parrot setup.pir
+%s
 
 %%install
 rm -rf $RPM_BUILD_ROOT
-parrot setup.pir --root $RPM_BUILD_ROOT install
+%s --root $RPM_BUILD_ROOT install
 
 %%check
-parrot setup.pir test
+%s test
 
 %%clean
 rm -rf $RPM_BUILD_ROOT
@@ -3215,6 +3342,18 @@
     .return (spec)
 .end
 
+.sub '_command_setup' :anon
+    .param string setup
+    .local string command
+    command = "parrot setup.pir"
+    $I0 = index setup, "."
+    $S0 = substr setup, $I0
+    unless $S0 == '.nqp' goto L1
+    command = "parrot-nqp setup.nqp"
+  L1:
+    .return (command)
+.end
+
 =head3 Step bdist_rpm
 
 =cut
@@ -3275,6 +3414,10 @@
 
 =item inst_bin, inst_dynext, inst_inc, inst_lang, inst_lib
 
+=item setup
+
+the default value is setup.pir
+
 =back
 
 =cut
@@ -3490,6 +3633,17 @@
 .sub 'mk_deb_rules' :anon
     .param pmc kv :slurpy :named
 
+    .local string setup
+    setup = get_value('setup', "setup.pir" :named('default'), kv :flat :named)
+    .local string command
+    command = _command_setup(setup)
+
+    $P0 = new 'FixedStringArray'
+    set $P0, 3
+    $P0[0] = command
+    $P0[1] = command
+    $P0[2] = command
+
     $S0 = <<'TEMPLATE'
 #!/usr/bin/make -f
 # -*- makefile -*-
@@ -3504,14 +3658,14 @@
 build: build-stamp
 build-stamp: configure-stamp
 	dh_testdir
-	parrot setup.pir build
+	%s build
 	touch $@
 
 clean:
 	dh_testdir
 	dh_testroot
 	rm -f build-stamp configure-stamp
-	parrot setup.pir clean
+	%s clean
 	dh_clean
 
 install: build
@@ -3519,7 +3673,7 @@
 	dh_testroot
 	dh_prep
 	dh_installdirs
-	parrot setup.pir --root $(CURDIR)/debian/tmp install
+	%s --root $(CURDIR)/debian/tmp install
 	dh_install --sourcedir=$(CURDIR)/debian/tmp --list-missing
 
 # Build architecture-independent files here.
@@ -3548,6 +3702,7 @@
 .PHONY: build clean binary-indep binary-arch binary install configure
 
 TEMPLATE
+    $S0 = sprintf $S0, $P0
     .return ($S0)
 .end
 
@@ -3617,6 +3772,10 @@
 
 =item doc_files
 
+=item setup
+
+the default value is setup.pir
+
 =back
 
 =cut
@@ -3663,6 +3822,11 @@
     .local string license_type
     license_type = get_value('license_type', kv :flat :named)
 
+    .local string setup
+    setup = get_value('setup', "setup.pir" :named('default'), kv :flat :named)
+    .local string command
+    command = _command_setup(setup)
+
     .local string doc
     doc = ''
     $I0 = exists kv['doc_files']
@@ -3681,11 +3845,14 @@
   L1:
 
     $P0 = new 'FixedStringArray'
-    set $P0, 4
+    set $P0, 7
     $P0[0] = description
     $P0[1] = project_uri
     $P0[2] = license_type
-    $P0[3] = doc
+    $P0[3] = command
+    $P0[4] = command
+    $P0[5] = doc
+    $P0[6] = command
 
     $S0 = <<'TEMPLATE'
 
@@ -3702,16 +3869,16 @@
 #RDEPEND=""
 
 src_compile() {
-    parrot setup.pir build || die "build failed"
+    %s build || die "build failed"
 }
 
 src_install() {
-    parrot setup.pir --root ${D} install || die "install failed"
+    %s --root ${D} install || die "install failed"
 %s
 }
 
 src_test() {
-    parrot setup.pir test || die "test failed"
+    %s test || die "test failed"
 }
 TEMPLATE
     $S0 = sprintf $S0, $P0
@@ -4337,37 +4504,22 @@
     .return ($S0)
 .end
 
-=item probe_include
+=item cc_run
 
 =cut
 
-.sub 'probe_include'
-    .param string include
-    .param int verbose          :named('verbose') :optional
+.sub 'cc_run'
+    .param string source
     .param string cflags        :named('cflags') :optional
     .param int has_cflags       :opt_flag
-
-    $S0 = <<'SOURCE_C'
-#include <%s>
-#include <stdio.h>
-
-int
-main(int argc, char* argv[])
-{
-    printf("%s OK\n");
-    return 0;
-}
-SOURCE_C
-    $P0 = new 'FixedStringArray'
-    set $P0, 2
-    $P0[0] = include
-    $P0[1] = include
-    $S0 = sprintf $S0, $P0
-    spew('probe.c', $S0)
-
-    .local string probe
+    .param string ldflags       :named('ldflags') :optional
+    .param int has_ldflags      :opt_flag
+    .param int verbose          :named('verbose') :optional
+    .const string srcname = 'tmp.c'
+    spew(srcname, source)
+    .local string exename
     $S0 = get_exe()
-    probe = "probe" . $S0
+    exename = 'tmp' . $S0
     .local pmc config
     config = get_config()
     .local string cmd
@@ -4379,15 +4531,55 @@
     cmd .= " "
     cmd .= cflags
   L1:
-    cmd .= " probe.c -o "
-    cmd .= probe
+    cmd .= " "
+    $S0 = get_ldflags()
+    cmd .= $S0
+    unless has_ldflags goto L2
+    cmd .= " "
+    cmd .= ldflags
+  L2:
+    cmd .= " "
+    cmd .= srcname
+    cmd .= " -o "
+    cmd .= exename
     system(cmd, verbose :named('verbose'), 1 :named('ignore_error'))
+    unlink(srcname, verbose :named('verbose'))
+
+    cmd = "./" . exename
+    $P0 = open cmd, 'rp'
+    $S0 = $P0.'readall'()
+    $P0.'close'()
+
+    unlink(exename, verbose :named('verbose'))
+    .return ($S0)
+.end
+
+
+=item probe_include
 
-    cmd = "./" . probe
-    $I0 = system(cmd, verbose :named('verbose'), 1 :named('ignore_error'))
+=cut
+
+.sub 'probe_include'
+    .param string include
+    .param string cflags        :named('cflags') :optional
+    .param int verbose          :named('verbose') :optional
+    $P0 = new 'FixedStringArray'
+    set $P0, 2
+    $P0[0] = include
+    $P0[1] = include
+    $S0 = sprintf <<'SOURCE_C', $P0
+#include <%s>
+#include <stdio.h>
 
-    unlink('probe.c', verbose :named('verbose'))
-    unlink(probe, verbose :named('verbose'))
+int
+main(int argc, char* argv[])
+{
+    printf("OK %s\n");
+    return 0;
+}
+SOURCE_C
+    $S0 = cc_run($S0, cflags :named('cflags'), verbose :named('verbose'))
+    $I0 = index $S0, 'OK '
     .return ($I0)
 .end
 
@@ -4485,6 +4677,13 @@
     .return ($I0)
 .end
 
+.sub 'newer' :multi(pmc, pmc)
+    .param pmc target
+    .param pmc depend
+    $S0 = target
+    .tailcall newer($S0, depend)
+.end
+
 =item mkpath
 
 =cut

Modified: branches/rm_cflags/src/atomic/gcc_x86.c
==============================================================================
--- branches/rm_cflags/src/atomic/gcc_x86.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/atomic/gcc_x86.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -1,5 +1,5 @@
 /* atomic/gcc_x86.c
- *  Copyright (C) 2006, Parrot Foundation.
+ *  Copyright (C) 2006-2010, Parrot Foundation.
  *  SVN Info
  *     $Id$
  */
@@ -34,7 +34,8 @@
  */
 /*
 
-=item C<void * parrot_i386_cmpxchg>
+=item C<void * parrot_i386_cmpxchg(void *volatile *ptr, void *expect, void
+*update)>
 
 The CMPXCHG assembly instruction is a single cycle x86 instruction
 that compares C<expect> and C<*ptr>. If they are equal, sets
@@ -68,7 +69,7 @@
 
 /*
 
-=item C<long parrot_i386_xadd>
+=item C<long parrot_i386_xadd(volatile long *l, long amount)>
 
 C<xadd> is an x86 instruction that performs the following operation:
 Temporary = C<result>;

Modified: branches/rm_cflags/src/call/args.c
==============================================================================
--- branches/rm_cflags/src/call/args.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/call/args.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -573,7 +573,7 @@
     INTVAL          arg_index;
 
     if (PMC_IS_NULL(signature))
-        call_object = pmc_new(interp, enum_class_CallContext);
+        call_object = Parrot_pmc_new(interp, enum_class_CallContext);
     else
         call_object = signature;
 
@@ -749,7 +749,7 @@
     else if (VTABLE_does(interp, aggregate, CONST_STRING(interp, "hash"))) {
         const INTVAL elements = VTABLE_elements(interp, aggregate);
         INTVAL index;
-        PMC * const key = pmc_new(interp, enum_class_Key);
+        PMC * const key = Parrot_pmc_new(interp, enum_class_Key);
         VTABLE_set_integer_native(interp, key, 0);
         SETATTR_Key_next_key(interp, key, (PMC *)INITBucketIndex);
 
@@ -798,7 +798,7 @@
     INTVAL          arg_count;
 
     if (PMC_IS_NULL(signature))
-        call_object = pmc_new(interp, enum_class_CallContext);
+        call_object = Parrot_pmc_new(interp, enum_class_CallContext);
     /* A hack to support 'get_results' as the way of fetching the
      * exception object inside an exception handler. The first argument
      * in the call object is the exception, stick it directly into the
@@ -881,7 +881,7 @@
     ASSERT_ARGS(Parrot_pcc_build_sig_object_from_varargs)
     PMC         *arg_flags     = PMCNULL;
     PMC         *return_flags  = PMCNULL;
-    PMC         * const call_object = pmc_new(interp, enum_class_CallContext);
+    PMC         * const call_object = Parrot_pmc_new(interp, enum_class_CallContext);
     const INTVAL sig_len            = strlen(sig);
     INTVAL       in_return_sig      = 0;
     INTVAL       i;
@@ -1085,7 +1085,7 @@
                         EXCEPTION_INVALID_OPERATION,
                         "named parameters must follow all positional parameters");
 
-            collect_positional = pmc_new(interp,
+            collect_positional = Parrot_pmc_new(interp,
                     Parrot_get_ctx_HLL_type(interp, enum_class_ResizablePMCArray));
             for (; arg_index < positional_args; arg_index++) {
                 VTABLE_push_pmc(interp, collect_positional,
@@ -1117,7 +1117,7 @@
 
                 /* Mark the name as used, cannot be filled again. */
                 if (PMC_IS_NULL(named_used_list)) /* Only created if needed. */
-                    named_used_list = pmc_new(interp, enum_class_Hash);
+                    named_used_list = Parrot_pmc_new(interp, enum_class_Hash);
 
                 VTABLE_set_integer_keyed_str(interp, named_used_list, param_name, 1);
             }
@@ -1240,7 +1240,7 @@
 
         /* Collected ("slurpy") named parameter */
         if (param_flags & PARROT_ARG_SLURPY_ARRAY) {
-            PMC * const collect_named = pmc_new(interp,
+            PMC * const collect_named = Parrot_pmc_new(interp,
                     Parrot_get_ctx_HLL_type(interp, enum_class_Hash));
             PMC * const named_arg_list = VTABLE_get_attr_str(interp, call_object, CONST_STRING(interp, "named"));
             if (!PMC_IS_NULL(named_arg_list)) {
@@ -1258,7 +1258,7 @@
                                 VTABLE_get_pmc_keyed_str(interp, call_object, name));
                         /* Mark the name as used, cannot be filled again. */
                         if (PMC_IS_NULL(named_used_list)) /* Only created if needed. */
-                            named_used_list = pmc_new(interp, enum_class_Hash);
+                            named_used_list = Parrot_pmc_new(interp, enum_class_Hash);
                         VTABLE_set_integer_keyed_str(interp, named_used_list, name, 1);
                         named_count++;
                     }
@@ -1289,7 +1289,7 @@
 
                 /* Mark the name as used, cannot be filled again. */
                 if (PMC_IS_NULL(named_used_list)) /* Only created if needed. */
-                    named_used_list = pmc_new(interp, enum_class_Hash);
+                    named_used_list = Parrot_pmc_new(interp, enum_class_Hash);
                 VTABLE_set_integer_keyed_str(interp, named_used_list, param_name, 1);
                 named_count++;
 
@@ -1580,8 +1580,8 @@
         ARGIN(PMC *raw_sig), ARGIN(void *return_info), ARGIN(struct pcc_get_funcs *accessor))
 {
     ASSERT_ARGS(fill_results)
-    INTVAL *return_array;
-    INTVAL *result_array;
+    INTVAL *return_array       = NULL;
+    INTVAL *result_array       = NULL;
     PMC    *result_sig         = NULL;
     PMC    *named_used_list    = PMCNULL;
     PMC    *named_return_list  = PMCNULL;
@@ -1676,7 +1676,7 @@
                         EXCEPTION_INVALID_OPERATION,
                         "named results must follow all positional results");
 
-            collect_positional = pmc_new(interp,
+            collect_positional = Parrot_pmc_new(interp,
                     Parrot_get_ctx_HLL_type(interp, enum_class_ResizablePMCArray));
 
             /* Iterate over all positional returns in the list. */
@@ -1764,7 +1764,7 @@
 
                 /* Mark the name as used, cannot be filled again. */
                 if (PMC_IS_NULL(named_used_list)) /* Only created if needed. */
-                    named_used_list = pmc_new(interp,
+                    named_used_list = Parrot_pmc_new(interp,
                             Parrot_get_ctx_HLL_type(interp, enum_class_Hash));
                 VTABLE_set_integer_keyed_str(interp, named_used_list, result_name, 1);
             }
@@ -1917,7 +1917,7 @@
         return_flags = return_array[return_index];
 
         if (PMC_IS_NULL(named_return_list)) /* Only created if needed. */
-            named_return_list = pmc_new(interp,
+            named_return_list = Parrot_pmc_new(interp,
                     Parrot_get_ctx_HLL_type(interp, enum_class_Hash));
 
         if (VTABLE_exists_keyed_str(interp, named_return_list, return_name))
@@ -1983,7 +1983,7 @@
         /* Collected ("slurpy") named result */
         if (result_flags & PARROT_ARG_SLURPY_ARRAY) {
             if (PMC_IS_NULL(named_return_list))
-                named_return_list = pmc_new(interp,
+                named_return_list = Parrot_pmc_new(interp,
                         Parrot_get_ctx_HLL_type(interp, enum_class_Hash));
 
             csr_fill_pmc(interp, call_object, result_index, named_return_list);
@@ -2283,7 +2283,7 @@
     INTVAL set = 0;
 
     if (PMC_IS_NULL(*arg_flags))
-        *arg_flags = pmc_new(interp, enum_class_ResizableIntegerArray);
+        *arg_flags = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
     current_array = *arg_flags;
 
     for (x = signature; *x != '\0'; x++) {
@@ -2302,7 +2302,7 @@
 
             /* Switch to the return argument flags. */
             if (PMC_IS_NULL(*return_flags))
-                *return_flags = pmc_new(interp, enum_class_ResizableIntegerArray);
+                *return_flags = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
             current_array = *return_flags;
         }
         /* parse arg type */
@@ -3140,7 +3140,7 @@
     return_flags = VTABLE_get_attr_str(interp, sig_object, return_flags_name);
     if (PMC_IS_NULL(return_flags)) {
         /* Create return_flags for single element */
-        return_flags = pmc_new(interp, enum_class_FixedIntegerArray);
+        return_flags = Parrot_pmc_new(interp, enum_class_FixedIntegerArray);
         return_flags_size = 0;
         VTABLE_set_integer_native(interp, return_flags, 1);
         VTABLE_set_attr_str(interp, sig_object, return_flags_name, return_flags);

Modified: branches/rm_cflags/src/call/context.c
==============================================================================
--- branches/rm_cflags/src/call/context.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/call/context.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -566,7 +566,7 @@
     ARGIN_NULLOK(PMC *old))
 {
     ASSERT_ARGS(Parrot_alloc_context)
-    PMC            *pmcctx = pmc_new(interp, enum_class_CallContext);
+    PMC            *pmcctx = Parrot_pmc_new(interp, enum_class_CallContext);
 
     allocate_registers(interp, pmcctx, number_regs_used);
     init_context(interp, pmcctx, old);
@@ -592,7 +592,7 @@
 Parrot_pcc_allocate_empty_context(PARROT_INTERP, ARGIN_NULLOK(PMC *old))
 {
     ASSERT_ARGS(Parrot_pcc_allocate_empty_context)
-    PMC            *pmcctx = pmc_new(interp, enum_class_CallContext);
+    PMC            *pmcctx = Parrot_pmc_new(interp, enum_class_CallContext);
 
     init_context(interp, pmcctx, old);
 

Modified: branches/rm_cflags/src/debug.c
==============================================================================
--- branches/rm_cflags/src/debug.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/debug.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2001-2009, Parrot Foundation.
+Copyright (C) 2001-2010, Parrot Foundation.
 $Id$
 
 =head1 NAME
@@ -1019,7 +1019,6 @@
         strcpy(pdb->cur_command, buf);
     }
     else {
-
         /* update the last command */
         if (pdb->cur_command[0] != '\0')
             strcpy(pdb->last_command, pdb->cur_command);
@@ -1028,44 +1027,26 @@
 
         c = pdb->cur_command;
 
-        /*Parrot_io_eprintf(pdb->debugger, "\n(pdb) ");*/
         Parrot_io_eprintf(pdb->debugger, "\n");
 
-        /* skip leading whitespace */
-/*
-        do {
-            ch = fgetc(stdin);
-        } while (isspace((unsigned char)ch) && ch != '\n');
-*/
-        {
-        Interp * interpdeb = interp->pdb->debugger;
-        STRING * readline = CONST_STRING(interpdeb, "readline_interactive");
-        STRING * prompt = CONST_STRING(interpdeb, "(pdb) ");
-        STRING *s= Parrot_str_new(interpdeb, NULL, 0);
-        PMC *tmp_stdin = Parrot_io_stdhandle(interpdeb, 0, NULL);
-
-        Parrot_pcc_invoke_method_from_c_args(interpdeb,
-            tmp_stdin, readline,
-            "S->S", prompt, & s);
         {
-        char * const aux = Parrot_str_to_cstring(interpdeb, s);
-        strcpy(c, aux);
-        Parrot_str_free_cstring(aux);
-        }
-        ch = '\n';
-        }
+            Interp *interpdeb = interp->pdb->debugger;
+            STRING *readline  = CONST_STRING(interpdeb, "readline_interactive");
+            STRING *prompt    = CONST_STRING(interpdeb, "(pdb) ");
+            STRING *s         = Parrot_str_new(interpdeb, NULL, 0);
+            PMC    *tmp_stdin = Parrot_io_stdhandle(interpdeb, 0, NULL);
+
+            Parrot_pcc_invoke_method_from_c_args(interpdeb,
+                tmp_stdin, readline,
+                "S->S", prompt, & s);
+            {
+                char * const aux = Parrot_str_to_cstring(interpdeb, s);
+                strcpy(c, aux);
+                Parrot_str_free_cstring(aux);
+            }
 
-        /* generate string (no more than buffer length) */
-/*
-        while (ch != EOF && ch != '\n' && (i < DEBUG_CMD_BUFFER_LENGTH)) {
-            c[i++] = (char)ch;
-            ch     = fgetc(tmp_stdin);
+            ch = '\n';
         }
-
-        c[i] = '\0';
-*/
-        if (ch == -1)
-            strcpy(c, "quit");
     }
 }
 

Modified: branches/rm_cflags/src/dynext.c
==============================================================================
--- branches/rm_cflags/src/dynext.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/dynext.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -155,7 +155,7 @@
 {
     ASSERT_ARGS(set_cstring_prop)
     STRING * const key  = Parrot_str_new_constant(interp, what);
-    PMC    * const prop = constant_pmc_new(interp, enum_class_String);
+    PMC    * const prop = Parrot_pmc_new_constant(interp, enum_class_String);
 
     VTABLE_set_string_native(interp, prop, name);
     VTABLE_setprop(interp, lib_pmc, key, prop);
@@ -396,7 +396,7 @@
 
     /* seems to be a native/NCI lib */
     if (!load_func || !lib_pmc)
-        lib_pmc = constant_pmc_new(interp, enum_class_ParrotLibrary);
+        lib_pmc = Parrot_pmc_new_constant(interp, enum_class_ParrotLibrary);
 
     /*  Call init, if it exists */
     if (init_func)
@@ -532,7 +532,7 @@
 make_string_pmc(PARROT_INTERP, ARGIN(STRING *string))
 {
     ASSERT_ARGS(make_string_pmc)
-    PMC * const ret = constant_pmc_new(interp, enum_class_String);
+    PMC * const ret = Parrot_pmc_new_constant(interp, enum_class_String);
     VTABLE_set_string_native(interp, ret, string);
 
     return ret;
@@ -576,7 +576,7 @@
          * Anyways, if we hope to share bytecode at runtime, we need to have
          * them have identical opcodes anyways.
          */
-        PMC * const new_lib_pmc = constant_pmc_new(d, enum_class_ParrotLibrary);
+        PMC * const new_lib_pmc = Parrot_pmc_new_constant(d, enum_class_ParrotLibrary);
 
         PMC_data(new_lib_pmc) = handle;
         VTABLE_setprop(d, new_lib_pmc, CONST_STRING(s, "_filename"), make_string_pmc(d, wo_ext));
@@ -668,7 +668,7 @@
          * XXX Parrot_ex_throw_from_c_args? return PMCNULL?
          * PMC Undef seems convenient, because it can be queried with get_bool()
          */
-        return pmc_new(interp, enum_class_Undef);
+        return Parrot_pmc_new(interp, enum_class_Undef);
     }
 
     return run_init_lib(interp, handle, lib_name, wo_ext);

Modified: branches/rm_cflags/src/dynpmc/dynlexpad.pmc
==============================================================================
--- branches/rm_cflags/src/dynpmc/dynlexpad.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/dynpmc/dynlexpad.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -45,7 +45,7 @@
             (Parrot_DynLexPad_attributes *) PMC_data(SELF);
 
         if (VTABLE_elements(interp, lexinfo)) {
-            attrs->init = pmc_new_init(interp, enum_class_LexPad, lexinfo);
+            attrs->init = Parrot_pmc_new_init(interp, enum_class_LexPad, lexinfo);
         }
         else
             attrs->init = NULL;

Modified: branches/rm_cflags/src/dynpmc/foo.pmc
==============================================================================
--- branches/rm_cflags/src/dynpmc/foo.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/dynpmc/foo.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -16,14 +16,14 @@
 
     MULTI PMC* subtract(Integer value, PMC *dest) {
         if (!dest)
-            dest = pmc_new(interp, SELF->vtable->base_type);
+            dest = Parrot_pmc_new(interp, SELF->vtable->base_type);
         VTABLE_set_integer_native(interp, dest, 144);
         return dest;
     }
 
     MULTI PMC* subtract(DEFAULT value, PMC *dest) {
         if (!dest)
-            dest = pmc_new(interp, SELF->vtable->base_type);
+            dest = Parrot_pmc_new(interp, SELF->vtable->base_type);
         VTABLE_set_integer_native(interp, dest, 244);
         return dest;
     }

Modified: branches/rm_cflags/src/dynpmc/gdbmhash.pmc
==============================================================================
--- branches/rm_cflags/src/dynpmc/gdbmhash.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/dynpmc/gdbmhash.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -291,7 +291,7 @@
 
     VTABLE PMC* get_pmc_keyed(PMC* key) {
         STRING * ret_string = SELF.get_string_keyed(key);
-        PMC *ret_pmc = pmc_new(interp, enum_class_String);
+        PMC *ret_pmc = Parrot_pmc_new(interp, enum_class_String);
 
         VTABLE_set_string_native(interp, ret_pmc, ret_string);
 
@@ -311,7 +311,7 @@
     VTABLE void set_integer_keyed(PMC* key, INTVAL value) {
         PMC *temp;
 
-        temp = pmc_new(interp, enum_class_String);
+        temp = Parrot_pmc_new(interp, enum_class_String);
         VTABLE_set_integer_native(interp, temp, value);
         SELF.set_pmc_keyed(key, temp);
     }
@@ -330,7 +330,7 @@
     VTABLE void set_number_keyed(PMC* key, FLOATVAL value) {
         PMC *temp;
 
-        temp = pmc_new(interp, enum_class_String);
+        temp = Parrot_pmc_new(interp, enum_class_String);
         VTABLE_set_number_native(interp, temp, value);
         SELF.set_pmc_keyed(key, temp);
     }

Modified: branches/rm_cflags/src/dynpmc/rational.pmc
==============================================================================
--- branches/rm_cflags/src/dynpmc/rational.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/dynpmc/rational.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -254,7 +254,7 @@
 */
     VTABLE PMC *clone() {
       #ifdef PARROT_HAS_GMP
-        PMC * const ret = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC * const ret = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
         mpq_set(RT(ret), RT(SELF));
         return ret;
       #else
@@ -494,7 +494,7 @@
 
     MULTI PMC *add(Rational value, PMC* dest) {
       #ifdef PARROT_HAS_GMP
-        dest = pmc_new(INTERP, SELF->vtable->base_type);
+        dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
 
         mpq_add(RT(dest), RT(SELF), RT(value));
         return dest;
@@ -605,7 +605,7 @@
 
     MULTI PMC *subtract(Rational value, PMC* dest) {
       #ifdef PARROT_HAS_GMP
-        dest = pmc_new(INTERP, SELF->vtable->base_type);
+        dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
         mpq_sub(RT(dest), RT(SELF), RT(value));
         return dest;
       #else
@@ -715,7 +715,7 @@
 
     MULTI PMC *multiply(Rational value, PMC* dest) {
       #ifdef PARROT_HAS_GMP
-        dest = pmc_new(INTERP, SELF->vtable->base_type);
+        dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
         mpq_mul(RT(dest), RT(SELF), RT(value));
         return dest;
       #else
@@ -825,7 +825,7 @@
 
     MULTI PMC *divide(Rational value, PMC* dest) {
       #ifdef PARROT_HAS_GMP
-        dest = pmc_new(INTERP, SELF->vtable->base_type);
+        dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
         mpq_div(RT(dest), RT(SELF), RT(value));
         return dest;
       #else
@@ -923,7 +923,7 @@
 */
     VTABLE PMC *neg(PMC* dest) {
       #ifdef PARROT_HAS_GMP
-        dest = pmc_new(INTERP, SELF->vtable->base_type);
+        dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
 
         mpq_neg(RT(dest), RT(SELF));
         return dest;
@@ -956,7 +956,7 @@
 */
     VTABLE PMC *absolute(PMC* dest) {
       #ifdef PARROT_HAS_GMP
-        dest = pmc_new(INTERP, SELF->vtable->base_type);
+        dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
 
         mpq_abs(RT(dest), RT(SELF));
         return dest;

Modified: branches/rm_cflags/src/embed.c
==============================================================================
--- branches/rm_cflags/src/embed.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/embed.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -181,7 +181,7 @@
 void
 Parrot_set_executable_name(PARROT_INTERP, Parrot_String name)
 {
-    PMC * const name_pmc = pmc_new(interp, enum_class_String);
+    PMC * const name_pmc = Parrot_pmc_new(interp, enum_class_String);
     VTABLE_set_string_native(interp, name_pmc, name);
     VTABLE_set_pmc_keyed_int(interp, interp->iglobals, IGLOBALS_EXECUTABLE,
         name_pmc);
@@ -630,7 +630,7 @@
 setup_argv(PARROT_INTERP, int argc, ARGIN(char **argv))
 {
     ASSERT_ARGS(setup_argv)
-    PMC   *userargv = pmc_new(interp, enum_class_ResizableStringArray);
+    PMC   *userargv = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
     INTVAL i;
 
     if (Interp_debug_TEST(interp, PARROT_START_DEBUG_FLAG)) {
@@ -738,7 +738,7 @@
     /* 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);
+    sub_pmc                      = Parrot_pmc_new(interp, enum_class_Sub);
     Parrot_pcc_set_sub(interp, CURRENT_CONTEXT(interp), sub_pmc);
 
     return sub_pmc;

Modified: branches/rm_cflags/src/exceptions.c
==============================================================================
--- branches/rm_cflags/src/exceptions.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/exceptions.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -68,7 +68,7 @@
         long error, ARGIN_NULLOK(STRING *msg))
 {
     ASSERT_ARGS(Parrot_ex_build_exception)
-    PMC *exception = pmc_new(interp, enum_class_Exception);
+    PMC *exception = Parrot_pmc_new(interp, enum_class_Exception);
 
     VTABLE_set_integer_keyed_str(interp, exception, CONST_STRING(interp, "severity"), severity);
     VTABLE_set_integer_keyed_str(interp, exception, CONST_STRING(interp, "type"), error);
@@ -176,7 +176,7 @@
 Parrot_ex_add_c_handler(PARROT_INTERP, ARGIN(Parrot_runloop *jp))
 {
     ASSERT_ARGS(Parrot_ex_add_c_handler)
-    PMC * const handler = pmc_new(interp, enum_class_ExceptionHandler);
+    PMC * const handler = Parrot_pmc_new(interp, enum_class_ExceptionHandler);
     /* Flag to mark a C exception handler */
     PObj_get_FLAGS(handler) |= SUB_FLAG_C_HANDLER;
     VTABLE_set_pointer(interp, handler, jp);

Modified: branches/rm_cflags/src/extend.c
==============================================================================
--- branches/rm_cflags/src/extend.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/extend.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -945,7 +945,7 @@
     ASSERT_ARGS(Parrot_PMC_new)
     Parrot_PMC newpmc;
     PARROT_CALLIN_START(interp);
-    newpmc = pmc_new_noinit(interp, type);
+    newpmc = Parrot_pmc_new_noinit(interp, type);
     VTABLE_init(interp, newpmc);
     PARROT_CALLIN_END(interp);
     return newpmc;
@@ -968,7 +968,7 @@
     ASSERT_ARGS(Parrot_PMC_typenum)
     Parrot_Int retval;
     PARROT_CALLIN_START(interp);
-    retval = pmc_type(interp, Parrot_str_new(interp, _class, 0));
+    retval = Parrot_pmc_get_type_str(interp, Parrot_str_new(interp, _class, 0));
     PARROT_CALLIN_END(interp);
     return retval;
 }
@@ -1058,118 +1058,6 @@
 
 /*
 
-=item C<void * Parrot_call_sub(PARROT_INTERP, Parrot_PMC sub_pmc, const char
-*signature, ...)>
-
-Call a parrot subroutine with the given function signature. The first char in
-C<signature> denotes the return value. Next chars are arguments.
-
-The return value of this function can be void or a pointer type.
-
-Signature chars are:
-
-    v ... void return
-    I ... Parrot_Int
-    N ... Parrot_Float
-    S ... Parrot_String
-    P ... Parrot_PMC
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-void *
-Parrot_call_sub(PARROT_INTERP, Parrot_PMC sub_pmc,
-                 ARGIN(const char *signature), ...)
-{
-    ASSERT_ARGS(Parrot_call_sub)
-    va_list     args;
-    PMC        *sig_object;
-    Parrot_sub *sub;
-    void       *result     = NULL;
-    const char *arg_sig    = signature;
-    char        return_sig = signature[0];
-
-    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). */
-    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_sub_ret_int(PARROT_INTERP, Parrot_PMC sub_pmc,
-const char *signature, ...)>
-
-Like C<Parrot_call_sub>, with Parrot_Int return result.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-Parrot_Int
-Parrot_call_sub_ret_int(PARROT_INTERP, Parrot_PMC sub_pmc,
-                 ARGIN(const char *signature), ...)
-{
-    ASSERT_ARGS(Parrot_call_sub_ret_int)
-    va_list     args;
-    PMC        *sig_object;
-    Parrot_Int  result;
-    const char *arg_sig     = signature;
-
-    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, "I"), &result);
-    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.
@@ -1389,7 +1277,7 @@
 {
     ASSERT_ARGS(Parrot_register_pmc)
     PARROT_CALLIN_START(interp);
-    gc_register_pmc(interp, pmc);
+    Parrot_pmc_gc_register(interp, pmc);
     PARROT_CALLIN_END(interp);
 }
 
@@ -1410,7 +1298,7 @@
 {
     ASSERT_ARGS(Parrot_unregister_pmc)
     PARROT_CALLIN_START(interp);
-    gc_unregister_pmc(interp, pmc);
+    Parrot_pmc_gc_unregister(interp, pmc);
     PARROT_CALLIN_END(interp);
 }
 
@@ -1471,7 +1359,7 @@
     ASSERT_ARGS(Parrot_sub_new_from_c_func)
     Parrot_String sig = Parrot_new_string(interp, signature, strlen(signature),
         (char *) NULL, 0);
-    Parrot_PMC sub = pmc_new(interp, enum_class_NCI);
+    Parrot_PMC sub = Parrot_pmc_new(interp, enum_class_NCI);
     VTABLE_set_pointer_keyed_str(interp, sub, sig, F2DPTR(func));
     PObj_get_FLAGS(sub) |= PObj_private1_FLAG;
     return sub;
@@ -1495,7 +1383,7 @@
     Parrot_PMC result;
     PARROT_CALLIN_START(interp);
 
-    result = pmc_new_init(interp, enum_class_Class, classtype);
+    result = Parrot_pmc_new_init(interp, enum_class_Class, classtype);
 
     PARROT_CALLIN_END(interp);
     return result;

Modified: branches/rm_cflags/src/frame_builder.c
==============================================================================
--- branches/rm_cflags/src/frame_builder.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/frame_builder.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -62,7 +62,7 @@
 PMC *
 Parrot_jit_clone_buffer(PARROT_INTERP, PMC *pmc, void *priv)
 {
-    PMC * const rv = pmc_new(interp, pmc->vtable->base_type);
+    PMC * const rv = Parrot_pmc_new(interp, pmc->vtable->base_type);
 
     VTABLE_init(interp, rv);
     /* copy the attributes */
@@ -552,7 +552,7 @@
 
         /* make new pmc */
         emitm_movl_i_m(pc, enum_class_UnManagedStruct, emit_EBP, 0, 1, temp_calls_offset + 4);
-        emitm_call_cfunc(pc, pmc_new);
+        emitm_call_cfunc(pc, Parrot_pmc_new);
 
         /* restore pointer p to EDX */
         emitm_movl_m_r(interp, pc, emit_EDX, emit_EBP, 0, 1, temp_calls_offset + 12);

Modified: branches/rm_cflags/src/global.c
==============================================================================
--- branches/rm_cflags/src/global.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/global.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -249,7 +249,7 @@
         return PMCNULL;
 
     /* TT #1221 - match HLL of enclosing namespace? */
-    sub_ns = pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
+    sub_ns = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
                                                  enum_class_NameSpace));
 
     if (PMC_IS_NULL(sub_ns))
@@ -765,7 +765,7 @@
 
     /* is there an existing MultiSub PMC? or do we need to create one? */
     if (PMC_IS_NULL(multisub)) {
-        multisub = pmc_new(interp,  Parrot_get_ctx_HLL_type(interp, enum_class_MultiSub));
+        multisub = Parrot_pmc_new(interp,  Parrot_get_ctx_HLL_type(interp, enum_class_MultiSub));
         /* we have to push the sub onto the MultiSub before we try to store
         it because storing requires information from the sub */
         VTABLE_push_pmc(interp, multisub, sub_pmc);

Modified: branches/rm_cflags/src/global_setup.c
==============================================================================
--- branches/rm_cflags/src/global_setup.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/global_setup.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -104,7 +104,7 @@
         config_hash = Parrot_thaw(interp, config_string);
     }
     else {
-        config_hash = pmc_new(interp, enum_class_Hash);
+        config_hash = Parrot_pmc_new(interp, enum_class_Hash);
     }
 
     VTABLE_set_pmc_keyed_int(interp, iglobals,
@@ -172,7 +172,7 @@
     VTABLE_set_pmc_keyed_int(interp, iglobals,
             (INTVAL)IGLOBALS_CLASSNAME_HASH, interp->class_hash);
 
-    self           = pmc_new_noinit(interp, enum_class_ParrotInterpreter);
+    self           = Parrot_pmc_new_noinit(interp, enum_class_ParrotInterpreter);
     VTABLE_set_pointer(interp, self, interp);
     /* PMC_data(self) = interp; */
 
@@ -185,10 +185,10 @@
     parrot_init_library_paths(interp);
 
     /* load_bytecode and dynlib loaded hash */
-    pmc = pmc_new(interp, enum_class_Hash);
+    pmc = Parrot_pmc_new(interp, enum_class_Hash);
     VTABLE_set_pmc_keyed_int(interp, iglobals, IGLOBALS_PBC_LIBS, pmc);
 
-    pmc = pmc_new(interp, enum_class_Hash);
+    pmc = Parrot_pmc_new(interp, enum_class_Hash);
     VTABLE_set_pmc_keyed_int(interp, iglobals, IGLOBALS_DYN_LIBS, pmc);
 }
 
@@ -212,18 +212,18 @@
     create_initial_context(interp);
 
     /* create the namespace root stash */
-    interp->root_namespace = pmc_new(interp, enum_class_NameSpace);
+    interp->root_namespace = Parrot_pmc_new(interp, enum_class_NameSpace);
     Parrot_init_HLL(interp);
 
     Parrot_pcc_set_namespace(interp, CURRENT_CONTEXT(interp),
         VTABLE_get_pmc_keyed_int(interp, interp->HLL_namespace, 0));
 
     /* We need a class hash */
-    interp->class_hash = classname_hash = pmc_new(interp, enum_class_NameSpace);
+    interp->class_hash = classname_hash = Parrot_pmc_new(interp, enum_class_NameSpace);
     Parrot_register_core_pmcs(interp, classname_hash);
 
     /* init the interpreter globals array */
-    iglobals         = pmc_new(interp, enum_class_FixedPMCArray);
+    iglobals         = Parrot_pmc_new(interp, enum_class_FixedPMCArray);
     interp->iglobals = iglobals;
     VTABLE_set_integer_native(interp, iglobals, (INTVAL)IGLOBALS_SIZE);
 

Modified: branches/rm_cflags/src/hash.c
==============================================================================
--- branches/rm_cflags/src/hash.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/hash.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -1446,7 +1446,7 @@
 get_integer_pmc(PARROT_INTERP, INTVAL value)
 {
     ASSERT_ARGS(get_integer_pmc)
-    PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Integer));
+    PMC * const ret = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Integer));
     VTABLE_set_integer_native(interp, ret, value);
     return ret;
 }
@@ -1467,7 +1467,7 @@
 get_number_pmc(PARROT_INTERP, FLOATVAL value)
 {
     ASSERT_ARGS(get_number_pmc)
-    PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
+    PMC * const ret = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
     VTABLE_set_number_native(interp, ret, value);
     return ret;
 }
@@ -1487,7 +1487,7 @@
 get_string_pmc(PARROT_INTERP, ARGIN(STRING *value))
 {
     ASSERT_ARGS(get_string_pmc)
-    PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_String));
+    PMC * const ret = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_String));
     VTABLE_set_string_native(interp, ret, value);
     return ret;
 }

Modified: branches/rm_cflags/src/hll.c
==============================================================================
--- branches/rm_cflags/src/hll.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/hll.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -88,7 +88,7 @@
 
     PMC *entry_id;
 
-    PMC * const entry = constant_pmc_new(interp, enum_class_FixedPMCArray);
+    PMC * const entry = Parrot_pmc_new_constant(interp, enum_class_FixedPMCArray);
 
     if (entry_name && !STRING_IS_EMPTY(entry_name)) {
         VTABLE_set_pmc_keyed_str(interp, hll_info, entry_name, entry);
@@ -98,7 +98,7 @@
 
     VTABLE_set_integer_native(interp, entry, e_HLL_MAX);
 
-    entry_id = constant_pmc_new(interp, enum_class_Integer);
+    entry_id = Parrot_pmc_new_constant(interp, enum_class_Integer);
     VTABLE_set_integer_native(interp, entry_id, id);
     VTABLE_set_pmc_keyed_int(interp, entry, e_HLL_id, entry_id);
 
@@ -122,9 +122,9 @@
 {
     ASSERT_ARGS(Parrot_init_HLL)
     interp->HLL_info      =
-        pmc_new(interp, enum_class_OrderedHash);
+        Parrot_pmc_new(interp, enum_class_OrderedHash);
     interp->HLL_namespace =
-        constant_pmc_new(interp, enum_class_ResizablePMCArray);
+        Parrot_pmc_new_constant(interp, enum_class_ResizablePMCArray);
 
     Parrot_register_HLL(interp, CONST_STRING(interp, "parrot"));
 }
@@ -168,7 +168,7 @@
     entry    = new_hll_entry(interp, hll_name);
 
     /* register HLL name */
-    name     = constant_pmc_new(interp, enum_class_String);
+    name     = Parrot_pmc_new_constant(interp, enum_class_String);
 
     VTABLE_set_string_native(interp, name, hll_name);
     VTABLE_set_pmc_keyed_int(interp, entry, e_HLL_name, name);
@@ -188,7 +188,7 @@
     VTABLE_set_pmc_keyed_int(interp, interp->HLL_namespace, idx, ns_hash);
 
     /* create HLL typemap hash */
-    type_hash = constant_pmc_new(interp, enum_class_Hash);
+    type_hash = Parrot_pmc_new_constant(interp, enum_class_Hash);
     VTABLE_set_pointer(interp, type_hash, parrot_new_intval_hash(interp));
     VTABLE_set_pmc_keyed_int(interp, entry, e_HLL_typemap, type_hash);
 
@@ -243,7 +243,7 @@
     VTABLE_set_pmc_keyed_int(interp, entry, e_HLL_name, PMCNULL);
 
     /* register dynlib */
-    name    = constant_pmc_new(interp, enum_class_String);
+    name    = Parrot_pmc_new_constant(interp, enum_class_String);
 
     VTABLE_set_string_native(interp, name, hll_lib);
     VTABLE_set_pmc_keyed_int(interp, entry, e_HLL_lib, name);

Modified: branches/rm_cflags/src/interp/inter_cb.c
==============================================================================
--- branches/rm_cflags/src/interp/inter_cb.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/interp/inter_cb.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -110,7 +110,7 @@
         Parrot_ex_throw_from_c_args(interp, NULL, 1,
             "unhandled signature '%Ss' in make_cb", cb_signature);
 
-    cb_sig = pmc_new(interp, enum_class_String);
+    cb_sig = Parrot_pmc_new(interp, enum_class_String);
     VTABLE_set_string_native(interp, cb_sig, cb_signature);
     sc = CONST_STRING(interp, "_signature");
     VTABLE_setprop(interp, user_data, sc, cb_sig);
@@ -122,14 +122,14 @@
      * we need to anchor it.
      *
      */
-    gc_register_pmc(interp, user_data);
+    Parrot_pmc_gc_register(interp, user_data);
 
     /*
      * Finally, the external lib awaits a function pointer.
      * Create a PMC that points to Parrot_callback_C (or _D);
      * it can be passed on with signature 'p'.
      */
-    cb = pmc_new(interp, enum_class_UnManagedStruct);
+    cb = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     /*
      * Currently, we handle only 2 types:
      * _C ... user_data is 2nd parameter
@@ -139,7 +139,7 @@
         VTABLE_set_pointer(interp, cb, F2DPTR(Parrot_callback_C));
     else
         VTABLE_set_pointer(interp, cb, F2DPTR(Parrot_callback_D));
-    gc_register_pmc(interp, cb);
+    Parrot_pmc_gc_register(interp, cb);
 
     return cb;
 }
@@ -345,7 +345,7 @@
 #endif
       case 'p':
         /* created a UnManagedStruct */
-        p_param = pmc_new(interp, enum_class_UnManagedStruct);
+        p_param = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
         VTABLE_set_pointer(interp, p_param, external_data);
         pasm_sig[1] = 'P';
         param = (void*) p_param;

Modified: branches/rm_cflags/src/interp/inter_create.c
==============================================================================
--- branches/rm_cflags/src/interp/inter_create.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/interp/inter_create.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -264,11 +264,11 @@
     interp->code            = NULL;
 
     /* create the root set registry */
-    interp->gc_registry     = pmc_new(interp, enum_class_AddrRegistry);
+    interp->gc_registry     = Parrot_pmc_new(interp, enum_class_AddrRegistry);
 
     /* And a dynamic environment stack */
     /* TODO: We should really consider removing this (TT #876) */
-    interp->dynamic_env = pmc_new(interp, enum_class_ResizablePMCArray);
+    interp->dynamic_env = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
 
     /* create exceptions list */
     interp->current_runloop_id    = 0;

Modified: branches/rm_cflags/src/interp/inter_misc.c
==============================================================================
--- branches/rm_cflags/src/interp/inter_misc.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/interp/inter_misc.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -51,7 +51,7 @@
                     ARGIN(const char *name), ARGIN(const char *proto))
 {
     ASSERT_ARGS(register_nci_method)
-    PMC    * const method      = pmc_new(interp, enum_class_NCI);
+    PMC    * const method      = Parrot_pmc_new(interp, enum_class_NCI);
     STRING * const method_name = string_make(interp, name, strlen(name),
         NULL, PObj_constant_FLAG|PObj_external_FLAG);
 
@@ -84,7 +84,7 @@
         ARGIN(STRING *name))
 {
     ASSERT_ARGS(register_raw_nci_method_in_ns)
-    PMC    * const method      = pmc_new(interp, enum_class_NCI);
+    PMC    * const method      = Parrot_pmc_new(interp, enum_class_NCI);
 
     /* setup call func */
     VTABLE_set_pointer(interp, method, func);
@@ -111,7 +111,7 @@
 {
     ASSERT_ARGS(Parrot_mark_method_writes)
     STRING *const str_name = Parrot_str_new_constant(interp, name);
-    PMC    *const pmc_true = pmc_new(interp, enum_class_Integer);
+    PMC    *const pmc_true = Parrot_pmc_new(interp, enum_class_Integer);
     PMC    *const method   = VTABLE_get_pmc_keyed_str(
         interp, interp->vtables[type]->_namespace, str_name);
     VTABLE_set_integer_native(interp, pmc_true, 1);
@@ -136,13 +136,13 @@
 {
     ASSERT_ARGS(Parrot_compreg)
     PMC* const iglobals = interp->iglobals;
-    PMC        *nci     = pmc_new(interp, enum_class_NCI);
+    PMC        *nci     = Parrot_pmc_new(interp, enum_class_NCI);
     STRING     *sc      = CONST_STRING(interp, "PJt");
     PMC        *hash    = VTABLE_get_pmc_keyed_int(interp, interp->iglobals,
                               IGLOBALS_COMPREG_HASH);
 
     if (!hash) {
-        hash = pmc_new_noinit(interp, enum_class_Hash);
+        hash = Parrot_pmc_new_noinit(interp, enum_class_Hash);
         VTABLE_init(interp, hash);
         VTABLE_set_pmc_keyed_int(interp, iglobals,
                 (INTVAL)IGLOBALS_COMPREG_HASH, hash);

Modified: branches/rm_cflags/src/io/api.c
==============================================================================
--- branches/rm_cflags/src/io/api.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/io/api.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -89,7 +89,7 @@
 Parrot_io_new_pmc(PARROT_INTERP, INTVAL flags)
 {
     ASSERT_ARGS(Parrot_io_new_pmc)
-    PMC * const new_io = pmc_new(interp, enum_class_FileHandle);
+    PMC * const new_io = Parrot_pmc_new(interp, enum_class_FileHandle);
 
     Parrot_io_set_flags(interp, new_io, flags);
 
@@ -125,7 +125,7 @@
     if (PMC_IS_NULL(pmc)) {
         /* TODO: We should look up the HLL mapped type, instead of always
            using FileHandle here */
-        new_filehandle = pmc_new(interp, enum_class_FileHandle);
+        new_filehandle = Parrot_pmc_new(interp, enum_class_FileHandle);
         PARROT_ASSERT(new_filehandle->vtable->base_type == enum_class_FileHandle);
     }
     else

Modified: branches/rm_cflags/src/io/socket_api.c
==============================================================================
--- branches/rm_cflags/src/io/socket_api.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/io/socket_api.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -346,7 +346,7 @@
 Parrot_io_new_socket_pmc(PARROT_INTERP, INTVAL flags)
 {
     ASSERT_ARGS(Parrot_io_new_socket_pmc)
-    PMC * const new_io = pmc_new(interp, enum_class_Socket);
+    PMC * const new_io = Parrot_pmc_new(interp, enum_class_Socket);
 
     Parrot_io_set_flags(interp, new_io, flags);
 

Modified: branches/rm_cflags/src/io/socket_unix.c
==============================================================================
--- branches/rm_cflags/src/io/socket_unix.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/io/socket_unix.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -102,7 +102,7 @@
     ASSERT_ARGS(Parrot_io_sockaddr_in)
 
     char * const s        = Parrot_str_to_cstring(interp, addr);
-    PMC  * const sockaddr = pmc_new(interp, enum_class_Sockaddr);
+    PMC  * const sockaddr = Parrot_pmc_new(interp, enum_class_Sockaddr);
 
     get_sockaddr_in(interp, sockaddr, s, port);
     Parrot_str_free_cstring(s);
@@ -258,7 +258,7 @@
     int newsock;
 
     PARROT_SOCKET(newio)->local  = PARROT_SOCKET(socket)->local;
-    PARROT_SOCKET(newio)->remote = pmc_new(interp, enum_class_Sockaddr);
+    PARROT_SOCKET(newio)->remote = Parrot_pmc_new(interp, enum_class_Sockaddr);
     saddr                        = SOCKADDR_REMOTE(newio);
 
     newsock = accept(io->os_handle, (struct sockaddr *)saddr, &addrlen);

Modified: branches/rm_cflags/src/io/socket_win32.c
==============================================================================
--- branches/rm_cflags/src/io/socket_win32.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/io/socket_win32.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -205,7 +205,7 @@
     int newsock;
 
     PARROT_SOCKET(newio)->local  = PARROT_SOCKET(socket)->local;
-    PARROT_SOCKET(newio)->remote = pmc_new(interp, enum_class_Sockaddr);
+    PARROT_SOCKET(newio)->remote = Parrot_pmc_new(interp, enum_class_Sockaddr);
     saddr                        = SOCKADDR_REMOTE(newio);
 
     newsock = accept((int)io->os_handle, (struct sockaddr *)saddr, &addrlen);
@@ -445,7 +445,7 @@
     ASSERT_ARGS(Parrot_io_sockaddr_in)
     PMC  * sockaddr;
     char * const s = Parrot_str_to_cstring(interp, addr);
-    sockaddr = pmc_new(interp, enum_class_Sockaddr);
+    sockaddr = Parrot_pmc_new(interp, enum_class_Sockaddr);
     get_sockaddr_in(interp, sockaddr, s, port);
     Parrot_str_free_cstring(s);
     return sockaddr;

Modified: branches/rm_cflags/src/key.c
==============================================================================
--- branches/rm_cflags/src/key.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/key.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -43,7 +43,7 @@
 key_new(PARROT_INTERP)
 {
     ASSERT_ARGS(key_new)
-    return pmc_new(interp, enum_class_Key);
+    return Parrot_pmc_new(interp, enum_class_Key);
 }
 
 
@@ -64,7 +64,7 @@
 key_new_integer(PARROT_INTERP, INTVAL value)
 {
     ASSERT_ARGS(key_new_integer)
-    PMC * const key = pmc_new(interp, enum_class_Key);
+    PMC * const key = Parrot_pmc_new(interp, enum_class_Key);
 
     PObj_get_FLAGS(key) |= KEY_integer_FLAG;
     SETATTR_Key_int_key(interp, key, value);
@@ -90,7 +90,7 @@
 key_new_number(PARROT_INTERP, FLOATVAL value)
 {
     ASSERT_ARGS(key_new_number)
-    PMC * const key = pmc_new(interp, enum_class_Key);
+    PMC * const key = Parrot_pmc_new(interp, enum_class_Key);
 
     PObj_get_FLAGS(key) |= KEY_number_FLAG;
     SETATTR_Key_num_key(interp, key, value);
@@ -116,7 +116,7 @@
 key_new_string(PARROT_INTERP, ARGIN(STRING *value))
 {
     ASSERT_ARGS(key_new_string)
-    PMC * const key = pmc_new(interp, enum_class_Key);
+    PMC * const key = Parrot_pmc_new(interp, enum_class_Key);
 
     PObj_get_FLAGS(key) |= KEY_string_FLAG;
     SETATTR_Key_str_key(interp, key, value);
@@ -164,7 +164,7 @@
 key_new_pmc(PARROT_INTERP, ARGIN(PMC *value))
 {
     ASSERT_ARGS(key_new_pmc)
-    PMC * const key = pmc_new(interp, enum_class_Key);
+    PMC * const key = Parrot_pmc_new(interp, enum_class_Key);
 
     PObj_get_FLAGS(key) |= KEY_pmc_FLAG;
     Parrot_ex_throw_from_c_args(interp, NULL, 1, "this is broken - see slice.pmc");

Modified: branches/rm_cflags/src/library.c
==============================================================================
--- branches/rm_cflags/src/library.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/library.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -168,7 +168,7 @@
                                 (INTVAL)IGLOBALS_CONFIG_HASH);
 
     /* create the lib_paths array */
-    PMC * const lib_paths   = pmc_new(interp, enum_class_FixedPMCArray);
+    PMC * const lib_paths   = Parrot_pmc_new(interp, enum_class_FixedPMCArray);
 
     VTABLE_set_integer_native(interp, lib_paths, PARROT_LIB_PATH_SIZE);
     VTABLE_set_pmc_keyed_int(interp, iglobals,
@@ -191,7 +191,7 @@
 
     /* each is an array of strings */
     /* define include paths */
-    paths = pmc_new(interp, enum_class_ResizableStringArray);
+    paths = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
     VTABLE_set_pmc_keyed_int(interp, lib_paths,
             PARROT_LIB_PATH_INCLUDE, paths);
     if (!STRING_IS_NULL(builddir)) {
@@ -209,7 +209,7 @@
 
 
     /* define library paths */
-    paths = pmc_new(interp, enum_class_ResizableStringArray);
+    paths = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
     VTABLE_set_pmc_keyed_int(interp, lib_paths,
             PARROT_LIB_PATH_LIBRARY, paths);
     if (!STRING_IS_NULL(builddir)) {
@@ -224,7 +224,7 @@
     }
 
     /* define languages paths */
-    paths = pmc_new(interp, enum_class_ResizableStringArray);
+    paths = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
     VTABLE_set_pmc_keyed_int(interp, lib_paths,
             PARROT_LIB_PATH_LANG, paths);
     if (!STRING_IS_NULL(builddir)) {
@@ -239,7 +239,7 @@
     }
 
     /* define dynext paths */
-    paths = pmc_new(interp, enum_class_ResizableStringArray);
+    paths = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
     VTABLE_set_pmc_keyed_int(interp, lib_paths,
             PARROT_LIB_PATH_DYNEXT, paths);
     if (!STRING_IS_NULL(builddir)) {
@@ -254,7 +254,7 @@
     }
 
     /* shared exts */
-    paths = pmc_new(interp, enum_class_ResizableStringArray);
+    paths = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
     VTABLE_set_pmc_keyed_int(interp, lib_paths,
             PARROT_LIB_DYN_EXTS, paths);
     /* no CONST_STRING here - the c2str.pl preprocessor needs "real strs" */

Modified: branches/rm_cflags/src/main.c
==============================================================================
--- branches/rm_cflags/src/main.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/main.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -129,7 +129,7 @@
     imcc_initialize(interp);
 
     { /* EXPERIMENTAL: add library and include paths from environment */
-        PMC *env = pmc_new(interp, enum_class_Env);
+        PMC *env = Parrot_pmc_new(interp, enum_class_Env);
         STRING *path = VTABLE_get_string_keyed_str(interp, env,
                 Parrot_str_new_constant(interp, "PARROT_LIBRARY"));
         if (!STRING_is_null(interp, path) && Parrot_str_length(interp, path) > 0)

Modified: branches/rm_cflags/src/multidispatch.c
==============================================================================
--- branches/rm_cflags/src/multidispatch.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/multidispatch.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -233,7 +233,7 @@
 Parrot_mmd_find_multi_from_sig_obj(PARROT_INTERP, ARGIN(STRING *name), ARGIN(PMC *invoke_sig))
 {
     ASSERT_ARGS(Parrot_mmd_find_multi_from_sig_obj)
-    PMC * const candidate_list = pmc_new(interp, enum_class_ResizablePMCArray);
+    PMC * const candidate_list = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
 
     mmd_search_by_sig_obj(interp, name, invoke_sig, candidate_list);
     mmd_search_global(interp, name, candidate_list);
@@ -385,7 +385,7 @@
 mmd_build_type_tuple_from_type_list(PARROT_INTERP, ARGIN(PMC *type_list))
 {
     ASSERT_ARGS(mmd_build_type_tuple_from_type_list)
-    PMC   *multi_sig   = constant_pmc_new(interp, enum_class_FixedIntegerArray);
+    PMC   *multi_sig   = Parrot_pmc_new_constant(interp, enum_class_FixedIntegerArray);
     INTVAL param_count = VTABLE_elements(interp, type_list);
     INTVAL i;
 
@@ -404,7 +404,7 @@
         else if (Parrot_str_equal(interp, type_name, CONST_STRING(interp, "FLOATVAL")))
             type = enum_type_FLOATVAL;
         else
-            type = pmc_type(interp, type_name);
+            type = Parrot_pmc_get_type_str(interp, type_name);
 
         VTABLE_set_integer_keyed_int(interp, multi_sig, i, type);
     }
@@ -456,7 +456,7 @@
 Parrot_mmd_build_type_tuple_from_sig_obj(PARROT_INTERP, ARGIN(PMC *sig_obj))
 {
     ASSERT_ARGS(Parrot_mmd_build_type_tuple_from_sig_obj)
-    PMC * const  type_tuple = pmc_new(interp, enum_class_ResizableIntegerArray);
+    PMC * const  type_tuple = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
     STRING      *string_sig = VTABLE_get_string(interp, sig_obj);
     INTVAL       args_ended = 0;
     INTVAL       i, seen_invocant = 0;
@@ -575,7 +575,7 @@
             if (!sig)
                 return PMCNULL;
 
-            type = pmc_type(interp, sig);
+            type = Parrot_pmc_get_type_str(interp, sig);
 
             if (type == enum_type_undef)
                 return PMCNULL;
@@ -584,11 +584,11 @@
             type = VTABLE_get_integer(interp, sig_elem);
         }
         else
-            type = pmc_type_p(interp, sig_elem);
+            type = Parrot_pmc_get_type(interp, sig_elem);
 
         /* create destination PMC only as necessary */
         if (PMC_IS_NULL(ar)) {
-            ar = pmc_new(interp, enum_class_FixedIntegerArray);
+            ar = Parrot_pmc_new(interp, enum_class_FixedIntegerArray);
             VTABLE_set_integer_native(interp, ar, n);
         }
 
@@ -954,7 +954,7 @@
     PMC           *multi_sub = Parrot_get_global(interp, ns, sub_name);
 
     if (PMC_IS_NULL(multi_sub)) {
-        multi_sub = constant_pmc_new(interp, enum_class_MultiSub);
+        multi_sub = Parrot_pmc_new_constant(interp, enum_class_MultiSub);
         Parrot_set_global(interp, ns, sub_name, multi_sub);
     }
 
@@ -987,7 +987,7 @@
     PMC        *multi_sub = Parrot_get_global(interp, ns, sub_name);
 
     if (PMC_IS_NULL(multi_sub)) {
-        multi_sub = constant_pmc_new(interp, enum_class_MultiSub);
+        multi_sub = Parrot_pmc_new_constant(interp, enum_class_MultiSub);
         Parrot_set_global(interp, ns, sub_name, multi_sub);
     }
 
@@ -1065,7 +1065,7 @@
     STRING *ns_name       = VTABLE_get_string_keyed_int(interp, type_list, 0);
 
     /* Create an NCI sub for the C function */
-    PMC    *sub_obj       = constant_pmc_new(interp, enum_class_NCI);
+    PMC    *sub_obj       = Parrot_pmc_new_constant(interp, enum_class_NCI);
     PMC    *multi_sig     = mmd_build_type_tuple_from_long_sig(interp,
                                 long_sig_str);
 
@@ -1112,7 +1112,7 @@
         STRING   *ns_name   = mmd_info[i].ns_name;
 
         /* Create an NCI sub for the C function */
-        PMC    *sub_obj       = constant_pmc_new(interp, enum_class_NCI);
+        PMC    *sub_obj       = Parrot_pmc_new_constant(interp, enum_class_NCI);
 
         VTABLE_set_pointer_keyed_str(interp, sub_obj, short_sig,
                                      F2DPTR(func_ptr));

Modified: branches/rm_cflags/src/nci/api.c
==============================================================================
--- branches/rm_cflags/src/nci/api.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/nci/api.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -21,7 +21,7 @@
 static void
 init_nci_funcs(PARROT_INTERP) {
     VTABLE_set_pmc_keyed_int(interp, interp->iglobals, IGLOBALS_NCI_FUNCS,
-        pmc_new(interp, enum_class_Hash));
+        Parrot_pmc_new(interp, enum_class_Hash));
     Parrot_nci_load_core_thunks(interp);
     Parrot_nci_load_extra_thunks(interp);
 }

Modified: branches/rm_cflags/src/nci/core_thunks.c
==============================================================================
--- branches/rm_cflags/src/nci/core_thunks.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/nci/core_thunks.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -1,7 +1,7 @@
 /* ex: set ro ft=c:
  * !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
  *
- * This file is generated automatically by tools/build/nativecall.pir
+ * This file is generated automatically by tools/dev/nci_thunk_gen.pir
  *
  * Any changes made here will be lost!
  *
@@ -1044,195 +1044,192 @@
  void
 Parrot_nci_load_core_thunks(PARROT_INTERP)
 {
-    PMC        *iglobals;
-    PMC        *temp_pmc;
-
-    PMC        *HashPointer   = NULL;
+    PMC *iglobals;
+    PMC *nci_funcs;
+    PMC *temp_pmc;
 
     iglobals = interp->iglobals;
-    if (PMC_IS_NULL(iglobals))
-        PANIC(interp, "iglobals isn't created yet");
+    PARROT_ASSERT(!(PMC_IS_NULL(iglobals)));
 
-    HashPointer = VTABLE_get_pmc_keyed_int(interp, iglobals,
+    nci_funcs = VTABLE_get_pmc_keyed_int(interp, iglobals,
             IGLOBALS_NCI_FUNCS);
-    if (PMC_IS_NULL(HashPointer))
-        PANIC(interp, "iglobals.nci_funcs isn't created yet");
+    PARROT_ASSERT(!(PMC_IS_NULL(nci_funcs)));
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_d_JOd);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "dJOd"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "dJOd"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JOS);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "IJOS"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJOS"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOl);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJOl"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOl"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_Jt);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_S_JOS);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "SJOS"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "SJOS"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JI);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "IJI"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJI"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOSP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJOSP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOSP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOS);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJOS"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOS"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOS);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJOS"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOS"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JOI);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "IJOI"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJOI"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJOP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOPS);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJOPS"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOPS"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOPSP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJOPSP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOPSP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPPP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJPPP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJPPP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPIP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJPIP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJPIP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPSP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJPSP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJPSP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPNP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJPNP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJPNP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJPP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJPP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPI);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJPI"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJPI"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPS);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJPS"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJPS"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPN);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJPN"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJPN"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JPPP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJPPP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJPPP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JPIP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJPIP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJPIP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JPSP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJPSP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJPSP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JPNP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJPNP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJPNP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JPP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "IJPP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJPP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JPS);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "IJPS"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJPS"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JPN);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "IJPN"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJPN"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iJP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JPi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iJPi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJPi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JPii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iJPii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJPii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JPiii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iJPiii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJPiii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JPt);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iJPt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJPt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOSSS);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJOSSS"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOSSS"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOSS);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJOSS"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOSS"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_S_JOI);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "SJOI"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "SJOI"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOb);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJOb"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOb"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JOPxAT_);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iJOP@"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJOP@"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JOPxAT_);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "IJOP@"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJOP@"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JOIPxAT_);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "IJOIP@"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJOIP@"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JO);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJO"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJO"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJOP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_Ji);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJi"), temp_pmc);
 
 }
 

Modified: branches/rm_cflags/src/nci/extra_thunks.c
==============================================================================
--- branches/rm_cflags/src/nci/extra_thunks.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/nci/extra_thunks.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -1,7 +1,7 @@
 /* ex: set ro ft=c:
  * !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
  *
- * This file is generated automatically by tools/build/nativecall.pir
+ * This file is generated automatically by tools/dev/nci_thunk_gen.pir
  *
  * Any changes made here will be lost!
  *
@@ -207,7 +207,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(interp);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -231,7 +231,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(interp, PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1));
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -445,7 +445,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(interp, t_1, t_2, t_3, t_4);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -1397,7 +1397,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(interp, t_1);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -1424,7 +1424,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(interp, t_1, PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2), PMC_IS_NULL((PMC*)t_3) ? (void *)NULL : VTABLE_get_pointer(interp, t_3));
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -1453,7 +1453,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(interp, Buffer_bufstart(t_1), t_2, PMC_IS_NULL((PMC*)t_3) ? (void *)NULL : VTABLE_get_pointer(interp, t_3));
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -2001,7 +2001,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -2026,7 +2026,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0));
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -2111,7 +2111,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3, t_4, t_5, t_6, t_7);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -2246,7 +2246,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -2273,7 +2273,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -2323,7 +2323,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1));
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -2422,7 +2422,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3, t_4, t_5, t_6, t_7);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -2457,7 +2457,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(t_0, t_1, &t_2, &i_3, t_4);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -2489,7 +2489,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(t_0, t_1, PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2), &i_3, t_4);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -2586,7 +2586,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, PMC_IS_NULL((PMC*)t_3) ? (void *)NULL : VTABLE_get_pointer(interp, t_3), PMC_IS_NULL((PMC*)t_4) ? (void *)NULL : VTABLE_get_pointer(interp, t_4), PMC_IS_NULL((PMC*)t_5) ? (void *)NULL : VTABLE_get_pointer(interp, t_5), PMC_IS_NULL((PMC*)t_6) ? (void *)NULL : VTABLE_get_pointer(interp, t_6), t_7);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -2623,7 +2623,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, &i_2, &i_3, t_4, PMC_IS_NULL((PMC*)t_5) ? (void *)NULL : VTABLE_get_pointer(interp, t_5), t_6);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -2657,7 +2657,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3, PMC_IS_NULL((PMC*)t_4) ? (void *)NULL : VTABLE_get_pointer(interp, t_4));
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -2691,7 +2691,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, PMC_IS_NULL((PMC*)t_3) ? (void *)NULL : VTABLE_get_pointer(interp, t_3), PMC_IS_NULL((PMC*)t_4) ? (void *)NULL : VTABLE_get_pointer(interp, t_4), PMC_IS_NULL((PMC*)t_5) ? (void *)NULL : VTABLE_get_pointer(interp, t_5), t_6);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -2723,7 +2723,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -2752,7 +2752,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(t_0, t_1, t_2, t_3);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -2827,7 +2827,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -2879,7 +2879,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -2907,7 +2907,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(t_0, t_1);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -2934,7 +2934,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2));
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -4688,7 +4688,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)();
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -4712,7 +4712,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(&t_0);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -4736,7 +4736,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(Buffer_bufstart(t_0));
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -4760,7 +4760,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(interp, t_1);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -4785,7 +4785,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(t_0);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -4810,7 +4810,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(t_0, t_1);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -4838,7 +4838,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(t_0, t_1, t_2, t_3);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -4870,7 +4870,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(t_0, t_1, t_2, t_3, t_4, t_5);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -4906,7 +4906,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(t_0, t_1, t_2, t_3, t_4, t_5, t_6, t_7);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -4939,7 +4939,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -4969,7 +4969,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3, t_4);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -4997,7 +4997,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(t_0);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -5023,7 +5023,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(t_0, PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2));
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -5055,7 +5055,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(t_0, t_1, t_2, t_3, t_4, t_5, t_6);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -5472,7 +5472,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(t_0, PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1));
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -5690,7 +5690,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2, t_3, t_4);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -5726,7 +5726,7 @@
     fn_pointer = (func_t)D2FPTR(orig_func);
     return_data =  (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2, t_3, t_4, t_5, t_6, t_7, t_8);
     if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
                              VTABLE_set_pointer(interp, final_destination, return_data);
                           }
                           Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
@@ -6196,1035 +6196,1032 @@
  void
 Parrot_nci_load_extra_thunks(PARROT_INTERP)
 {
-    PMC        *iglobals;
-    PMC        *temp_pmc;
-
-    PMC        *HashPointer   = NULL;
+    PMC *iglobals;
+    PMC *nci_funcs;
+    PMC *temp_pmc;
 
     iglobals = interp->iglobals;
-    if (PMC_IS_NULL(iglobals))
-        PANIC(interp, "iglobals isn't created yet");
+    PARROT_ASSERT(!(PMC_IS_NULL(iglobals)));
 
-    HashPointer = VTABLE_get_pmc_keyed_int(interp, iglobals,
+    nci_funcs = VTABLE_get_pmc_keyed_int(interp, iglobals,
             IGLOBALS_NCI_FUNCS);
-    if (PMC_IS_NULL(HashPointer))
-        PANIC(interp, "iglobals.nci_funcs isn't created yet");
+    PARROT_ASSERT(!(PMC_IS_NULL(nci_funcs)));
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_J);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJ"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJ"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ip);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iip"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iip"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JPip);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iJPip"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJPip"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JpP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iJpP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJpP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_Jpii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iJpii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJpii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_p);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ip"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ip"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_tp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "itp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "itp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_J);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pJ"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pJ"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_Jp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pJp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pJp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_J);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "tJ"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tJ"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_Jpti);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "tJpti"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tJpti"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_p);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "tp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_pt);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "tpt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tpt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_p);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_pit);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vpit"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vpit"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_ptt);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vptt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vptt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_Jtiiipt);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJtiiipt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJtiiipt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_JttPP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pJttPP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pJttPP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_Jtpi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJtpi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJtpi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_Vppp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iVppp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iVppp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JpPP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJpPP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJpPP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_pt);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vpt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vpt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_Jpt);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJpt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJpt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "v"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "v"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_Jiiip);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJiiip"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJiiip"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_i);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_ii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_illllllll);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "villllllll"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "villllllll"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_l);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vl"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vl"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_pbip);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vpbip"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vpbip"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_pi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vpi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vpi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_piiii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vpiiii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vpiiii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_pl);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vpl"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vpl"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_pp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vpp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vpp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JPP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iJPP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJPP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JPP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJPP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJPP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JO);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJO"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJO"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_S_JO);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "SJO"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "SJO"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_P);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOPP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJOPP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOPP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOPPP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJOPPP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOPPP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOPP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJOPP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOPP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOPPP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJOPPP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOPPP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOPPPP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJOPPPP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOPPPP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOPPPPP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJOPPPPP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOPPPPP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JOSI);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "IJOSI"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJOSI"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOSII);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJOSII"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOSII"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_p3);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "tp3"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tp3"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pp3p);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipp3p"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipp3p"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pp3);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipp3"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipp3"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppd);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ippd"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippd"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ptii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iptii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iptii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pipi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipipi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipipi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_ptti);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "tptti"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tptti"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_pti);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "tpti"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tpti"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_pttti);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "tpttti"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tpttti"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_Ji);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pJi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pJi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_Jipp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pJipp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pJipp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_Jbip);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pJbip"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pJbip"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_Jp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JS);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJS"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJS"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_tt);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ttt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ttt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JOt);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "IJOt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJOt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOSI);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJOSI"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOSI"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_S_JOi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "SJOi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "SJOi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJOi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JO);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "IJO"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJO"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_N_JO);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "NJO"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "NJO"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JON);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJON"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJON"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJOi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOI);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJOI"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOI"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOI);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJOI"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOI"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOIS);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJOIS"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOIS"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_S_JOSP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "SJOSP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "SJOSP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "i"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "i"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_i3i);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ii3i"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ii3i"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ibi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iibi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iibi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_lttl);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "llttl"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "llttl"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pip);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipip"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipip"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_piS);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipiS"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipiS"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_S_i);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "Si"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "Si"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_p);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "lp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "lp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_c_p);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "cp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "cp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_pi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ppi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ppi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_p);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pttttt);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipttttt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipttttt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_c_pttt);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "cpttt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "cpttt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_pttttiti);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ppttttiti"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ppttttiti"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pt);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ptl);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iptl"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iptl"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pl);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipl"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipl"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "l"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "l"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_pt);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ppt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ppt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ptt);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pptt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pptt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pit);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipit"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipit"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_pp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ppp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ppp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_ttl);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "lttl"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "lttl"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_pttl);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "lpttl"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "lpttl"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_t);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_pttttitl);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ppttttitl"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ppttttitl"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_tiB3P);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ptiB3P"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ptiB3P"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_tip3P);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ptip3P"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ptip3P"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pPtiiipi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipPtiiipi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipPtiiipi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_tpiibi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "itpiibi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "itpiibi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ptippppi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pptippppi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pptippppi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_pi33ipi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ppi33ipi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ppi33ipi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_pttip);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ppttip"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ppttip"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ptipppi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pptipppi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pptipppi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ppP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pppP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pppP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_iiil);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "piiil"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "piiil"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppl);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ippl"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippl"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_pip);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vpip"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vpip"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_pti);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ppti"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ppti"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ippp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ptii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pptii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pptii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ti);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pti"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pti"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ptp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pptp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pptp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pt33);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipt33"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipt33"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_c_);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "c"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "c"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_c_pi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "cpi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "cpi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_d_);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "d"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "d"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_d_d);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "dd"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "dd"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_f_);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "f"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "f"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_f_ff);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "fff"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "fff"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_f_is);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "fis"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "fis"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_b);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ib"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ib"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_d);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "id"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "id"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_i);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ii4);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iii4"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iii4"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ii4i);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iii4i"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iii4i"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_iiii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iiiii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iiiii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_iiilsp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iiiilsp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iiiilsp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_iil);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iiil"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iiil"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_iili);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iiili"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iiili"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_iip);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iiip"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iiip"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_iit);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iiit"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iiit"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_iiti);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iiiti"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iiiti"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ilsp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iilsp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iilsp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_iti);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iiti"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iiti"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_l);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "il"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "il"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_li);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ili"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ili"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_lp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ilp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ilp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_lsp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ilsp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ilsp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_p33);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ip33"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ip33"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_p333);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ip333"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ip333"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_p333333);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ip333333"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ip333333"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_p4);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ip4"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ip4"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_p42p);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ip42p"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ip42p"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_p4i);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ip4i"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ip4i"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pb);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipb"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipb"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pii4);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipii4"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipii4"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pii4i);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipii4i"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipii4i"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_piii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipiii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipiii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_piiiiii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipiiiiii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipiiiiii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_piiilsp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipiiilsp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipiiilsp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_piil);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipiil"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipiil"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_piili);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipiili"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipiili"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_piit);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipiit"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipiit"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_piiti);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipiiti"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipiiti"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pilsp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipilsp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipilsp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pli);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipli"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipli"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pll);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipll"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipll"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pllllllll);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipllllllll"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipllllllll"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_plp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iplp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iplp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_plsp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iplsp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iplsp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ippi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppiiiiiiii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ippiiiiiiii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippiiiiiiii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pppp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipppp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipppp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_psp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipsp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipsp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pti);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipti"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipti"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pitl);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipitl"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipitl"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_s);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "is"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "is"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_s22);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "is22"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "is22"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_s222);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "is222"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "is222"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_sp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "isp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "isp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_sss);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "isss"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "isss"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ssss);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "issss"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "issss"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_t);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "it"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "it"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ti);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iti"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iti"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_4);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "i4"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "i4"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_4i);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "i4i"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "i4i"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_42p);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "i42p"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "i42p"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_ii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "lii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "lii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_l4);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ll4"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ll4"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_pi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "lpi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "lpi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_pii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "lpii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "lpii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_p33l);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "lp33l"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "lp33l"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_33l);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "l33l"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "l33l"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "p"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "p"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_B);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pB"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pB"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_b);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pb"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pb"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_Jt);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pJt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pJt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_i);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_iiii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "piiii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "piiii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_iiiiii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "piiiiii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "piiiiii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_iiiiiiii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "piiiiiiii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "piiiiiiii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_pii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ppii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ppii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_piiii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ppiiii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ppiiii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_t);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_tpp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ptpp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ptpp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ttttttt);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pttttttt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pttttttt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_s_);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "s"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "s"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "t"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "t"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_i);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ti"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ti"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_ii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "tii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_pi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "tpi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tpi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_pii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "tpii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tpii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_t);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "tt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_tl4);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ttl4"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ttl4"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_t4);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "tt4"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tt4"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_sc);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "isc"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "isc"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_s_sc);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ssc"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ssc"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_c_sc);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "csc"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "csc"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_iii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iiii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iiii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_i3);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ii3"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ii3"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_b);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "tb"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tb"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_B);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "tB"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tB"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_P);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_pP);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vpP"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vpP"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ip);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pip"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pip"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_33);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "i33"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "i33"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_pii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vpii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vpii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JO);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJO"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJO"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JO);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iJO"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJO"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JOi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iJOi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJOi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JOt);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iJOt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJOt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_Jt);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iJt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_Ji);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iJi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_Vi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vVi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vVi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ppiii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pppiii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pppiii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ppiiiiiii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "pppiiiiiii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pppiiiiiii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ippii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppiii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ippiii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippiii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppiiii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ippiiii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippiiii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppiiiii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ippiiiii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippiiiii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppiiiiii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ippiiiiii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippiiiiii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppt);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ippt"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippt"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pppi);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipppi"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipppi"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pppii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipppii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipppii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pppiiii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipppiiii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipppiiii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppppiiiiii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ippppiiiiii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippppiiiiii"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_fff);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vfff"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vfff"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_V);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vV"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vV"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_VVV);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vVVV"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vVVV"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_tV);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "itV"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "itV"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ptiVp);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iptiVp"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iptiVp"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pid);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipid"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipid"), temp_pmc);
 
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
     VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pitii);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "ipitii"), temp_pmc);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipitii"), temp_pmc);
 
 }
 

Modified: branches/rm_cflags/src/oo.c
==============================================================================
--- branches/rm_cflags/src/oo.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/oo.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -207,9 +207,9 @@
         if (base_type == enum_class_Key
          || base_type == enum_class_ResizableStringArray
          || base_type == enum_class_String)
-            type = pmc_type_p(interp, key);
+            type = Parrot_pmc_get_type(interp, key);
         else
-            type = pmc_type(interp, VTABLE_get_string(interp, key));
+            type = Parrot_pmc_get_type_str(interp, VTABLE_get_string(interp, key));
 
         classobj = get_pmc_proxy(interp, type);
     }
@@ -251,7 +251,7 @@
     }
     else {
         obj    = PARROT_OBJECT(pmc);
-        cloned = pmc_new_noinit(interp, enum_class_Object);
+        cloned = Parrot_pmc_new_noinit(interp, enum_class_Object);
     }
 
     _class = PARROT_CLASS(obj->_class);
@@ -342,9 +342,9 @@
 
         /* Create proxy if not found */
         if (PMC_IS_NULL(proxy)) {
-            PMC * const type_num = pmc_new(interp, enum_class_Integer);
+            PMC * const type_num = Parrot_pmc_new(interp, enum_class_Integer);
             VTABLE_set_integer_native(interp, type_num, type);
-            proxy = pmc_new_init(interp, enum_class_PMCProxy, type_num);
+            proxy = Parrot_pmc_new_init(interp, enum_class_PMCProxy, type_num);
             Parrot_pcc_invoke_method_from_c_args(interp, pmc_ns, CONST_STRING(interp, "set_class"), "P->", proxy);
         }
         return proxy;
@@ -382,7 +382,7 @@
 
         /* If not found, check for a PMC */
         if (PMC_IS_NULL(_class))
-            return get_pmc_proxy(interp, pmc_type(interp, name));
+            return get_pmc_proxy(interp, Parrot_pmc_get_type_str(interp, name));
         else
             return _class;
     }
@@ -405,14 +405,14 @@
 Parrot_oo_newclass_from_str(PARROT_INTERP, ARGIN(STRING *name))
 {
     ASSERT_ARGS(Parrot_oo_newclass_from_str)
-    PMC * const namearg  = pmc_new(interp, enum_class_String);
-    PMC * const namehash = pmc_new(interp, enum_class_Hash);
+    PMC * const namearg  = Parrot_pmc_new(interp, enum_class_String);
+    PMC * const namehash = Parrot_pmc_new(interp, enum_class_Hash);
     PMC        *classobj;
 
     VTABLE_set_string_native(interp, namearg, name);
     VTABLE_set_pmc_keyed_str(interp, namehash, CONST_STRING(interp, "name"), namearg);
 
-    classobj = pmc_new_init(interp, enum_class_Class, namehash);
+    classobj = Parrot_pmc_new_init(interp, enum_class_Class, namehash);
 
     PARROT_ASSERT(classobj);
     return classobj;
@@ -487,7 +487,7 @@
                 break;
         }
         if (PMC_IS_NULL(result))
-            result = pmc_new(interp, enum_class_Undef);
+            result = Parrot_pmc_new(interp, enum_class_Undef);
         VTABLE_set_pmc_keyed_str(interp, _class->parent_overrides, name, result);
     }
     if (result->vtable->base_type == enum_class_Undef)
@@ -649,12 +649,12 @@
      * pt_shared_fixup() can safely do a type lookup. */
     LOCK_INTERPRETER(interp);
     {
-        type = get_new_vtable_index(interp);
+        type = Parrot_pmc_get_new_vtable_index(interp);
     }
     {
         if (!typeid_exists) {
             PMC * const classname_hash = interp->class_hash;
-            PMC * const item           = pmc_new(interp, enum_class_Integer);
+            PMC * const item           = Parrot_pmc_new(interp, enum_class_Integer);
             /* set entry in name->type hash */
             VTABLE_set_integer_native(interp, item, type);
 
@@ -845,7 +845,7 @@
         return;
     }
 
-    type = pmc_type(interp, _class);
+    type = Parrot_pmc_get_type_str(interp, _class);
 
     if (type == 0)
         invalidate_all_caches(interp);
@@ -1130,7 +1130,7 @@
 
     /* If we never found any candidates, return an empty list. */
     if (cand_count == 0)
-        return pmc_new(interp, enum_class_ResizablePMCArray);
+        return Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
 
     /* If we didn't find anything to accept, error. */
     if (PMC_IS_NULL(accepted))
@@ -1200,7 +1200,7 @@
 
     if (parent_count == 0) {
         /* No parents - MRO just contains this class. */
-        result = pmc_new(interp, enum_class_ResizablePMCArray);
+        result = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
         VTABLE_push_pmc(interp, result, _class);
         return result;
     }
@@ -1217,7 +1217,7 @@
 
         /* instantiated lazily */
         if (PMC_IS_NULL(merge_list))
-            merge_list = pmc_new(interp, enum_class_ResizablePMCArray);
+            merge_list = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
 
         VTABLE_push_pmc(interp, merge_list, lin);
     }
@@ -1289,7 +1289,7 @@
     /* We need to check for conflicts before we do the composition. We
      * put each method that would be OK to add into a proposal list, and
      * bail out right away if we find a problem. */
-    proposed_add_methods = pmc_new(interp, enum_class_Hash);
+    proposed_add_methods = Parrot_pmc_new(interp, enum_class_Hash);
     methods_iter         = VTABLE_get_iter(interp, methods);
 
     while (VTABLE_get_bool(interp, methods_iter)) {

Modified: branches/rm_cflags/src/ops/bit.ops
==============================================================================
--- branches/rm_cflags/src/ops/bit.ops	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/ops/bit.ops	Mon Feb 22 02:43:55 2010	(r44285)
@@ -172,7 +172,7 @@
 
 inline op bnot(out PMC, invar PMC) :base_core {
     const INTVAL a = VTABLE_get_integer(interp, $2);
-    PMC * const b = pmc_new(interp, VTABLE_type(interp, $2));
+    PMC * const b = Parrot_pmc_new(interp, VTABLE_type(interp, $2));
     VTABLE_set_integer_native(interp, b, ~a);
     $1 = b;
 }

Modified: branches/rm_cflags/src/ops/cmp.ops
==============================================================================
--- branches/rm_cflags/src/ops/cmp.ops	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/ops/cmp.ops	Mon Feb 22 02:43:55 2010	(r44285)
@@ -87,15 +87,15 @@
 }
 
 op eq(invar PMC, in INT, inconst LABEL) :base_core {
-    PMC * temp = temporary_pmc_new(interp, enum_class_Integer);
+    PMC * temp = Parrot_pmc_new_temporary(interp, enum_class_Integer);
     VTABLE_set_integer_native(interp, temp, $2);
 
     if (VTABLE_is_equal(interp, $1, temp)) {
-        temporary_pmc_free(interp, temp);
+        Parrot_pmc_free_temporary(interp, temp);
         goto OFFSET($3);
     }
 
-    temporary_pmc_free(interp, temp);
+    Parrot_pmc_free_temporary(interp, temp);
 }
 
 op eq(invar PMC, in NUM, inconst LABEL) :base_core {
@@ -193,15 +193,15 @@
 }
 
 op ne(invar PMC, in INT, inconst LABEL) :base_core {
-    PMC * temp = temporary_pmc_new(interp, enum_class_Integer);
+    PMC * temp = Parrot_pmc_new_temporary(interp, enum_class_Integer);
     VTABLE_set_integer_native(interp, temp, $2);
 
     if (!VTABLE_is_equal(interp, $1, temp)) {
-        temporary_pmc_free(interp, temp);
+        Parrot_pmc_free_temporary(interp, temp);
         goto OFFSET($3);
     }
 
-    temporary_pmc_free(interp, temp);
+    Parrot_pmc_free_temporary(interp, temp);
 }
 
 op ne(invar PMC, in NUM, inconst LABEL) :base_core {
@@ -289,15 +289,15 @@
 }
 
 op lt(invar PMC, in INT, inconst LABEL) :base_core {
-    PMC * temp  = temporary_pmc_new(interp, enum_class_Integer);
+    PMC * temp  = Parrot_pmc_new_temporary(interp, enum_class_Integer);
     VTABLE_set_integer_native(interp, temp, $2);
 
     if (VTABLE_cmp(interp, $1, temp) < 0) {
-        temporary_pmc_free(interp, temp);
+        Parrot_pmc_free_temporary(interp, temp);
         goto OFFSET($3);
     }
 
-    temporary_pmc_free(interp, temp);
+    Parrot_pmc_free_temporary(interp, temp);
 }
 
 op lt(invar PMC, in NUM, inconst LABEL) :base_core {
@@ -373,15 +373,15 @@
 }
 
 op le(invar PMC, in INT, inconst LABEL) :base_core {
-    PMC * temp  = temporary_pmc_new(interp, enum_class_Integer);
+    PMC * temp  = Parrot_pmc_new_temporary(interp, enum_class_Integer);
     VTABLE_set_integer_native(interp, temp, $2);
 
     if (VTABLE_cmp(interp, $1, temp) <= 0) {
-        temporary_pmc_free(interp, temp);
+        Parrot_pmc_free_temporary(interp, temp);
         goto OFFSET($3);
     }
 
-    temporary_pmc_free(interp, temp);
+    Parrot_pmc_free_temporary(interp, temp);
 }
 
 op le(invar PMC, in NUM, inconst LABEL) :base_core {
@@ -433,15 +433,15 @@
 }
 
 op gt(invar PMC, in INT, inconst LABEL) :base_core {
-    PMC * temp  = temporary_pmc_new(interp, enum_class_Integer);
+    PMC * temp  = Parrot_pmc_new_temporary(interp, enum_class_Integer);
     VTABLE_set_integer_native(interp, temp, $2);
 
     if (VTABLE_cmp(interp, $1, temp) > 0) {
-        temporary_pmc_free(interp, temp);
+        Parrot_pmc_free_temporary(interp, temp);
         goto OFFSET($3);
     }
 
-    temporary_pmc_free(interp, temp);
+    Parrot_pmc_free_temporary(interp, temp);
 }
 
 op gt(invar PMC, in NUM, inconst LABEL) :base_core {
@@ -493,15 +493,15 @@
 }
 
 op ge(invar PMC, in INT, inconst LABEL) :base_core {
-    PMC * temp  = temporary_pmc_new(interp, enum_class_Integer);
+    PMC * temp  = Parrot_pmc_new_temporary(interp, enum_class_Integer);
     VTABLE_set_integer_native(interp, temp, $2);
 
     if (VTABLE_cmp(interp, $1, temp) >= 0) {
-        temporary_pmc_free(interp, temp);
+        Parrot_pmc_free_temporary(interp, temp);
         goto OFFSET($3);
     }
 
-    temporary_pmc_free(interp, temp);
+    Parrot_pmc_free_temporary(interp, temp);
 }
 
 op ge(invar PMC, in NUM, inconst LABEL) :base_core {

Modified: branches/rm_cflags/src/ops/core.ops
==============================================================================
--- branches/rm_cflags/src/ops/core.ops	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/ops/core.ops	Mon Feb 22 02:43:55 2010	(r44285)
@@ -606,7 +606,7 @@
 
     /* If no elements, hand back empty array; otherwise PMC. */
     if (!sig)
-        $1 = pmc_new(interp, enum_class_FixedIntegerArray);
+        $1 = Parrot_pmc_new(interp, enum_class_FixedIntegerArray);
     else
         $1 = sig;
 }
@@ -758,7 +758,7 @@
 =cut
 
 inline op push_eh(inconst LABEL) {
-    PMC * const eh = pmc_new(interp, enum_class_ExceptionHandler);
+    PMC * const eh = Parrot_pmc_new(interp, enum_class_ExceptionHandler);
     VTABLE_set_pointer(interp, eh, CUR_OPCODE + $1);
     Parrot_cx_add_handler_local(interp, eh);
 }
@@ -874,7 +874,7 @@
 }
 
 inline op pushmark(in INT) {
-    PMC * const newint = pmc_new(interp, enum_class_Integer);
+    PMC * const newint = Parrot_pmc_new(interp, enum_class_Integer);
     VTABLE_set_integer_native(interp, newint, $1);
     VTABLE_push_pmc(interp, interp->dynamic_env, newint);
 }
@@ -1319,10 +1319,10 @@
         const char * err = Parrot_dlerror();
         Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG,
                 "Symbol '%s' not found: %s\n", name, err ? err : "unknown reason");
-        $1 = pmc_new(interp, enum_class_Undef);
+        $1 = Parrot_pmc_new(interp, enum_class_Undef);
     }
     else {
-        $1 = pmc_new(interp, enum_class_NCI);
+        $1 = Parrot_pmc_new(interp, enum_class_NCI);
         VTABLE_set_pointer_keyed_str(interp, $1, $4, F2DPTR(p));
         PObj_get_FLAGS($1) |= PObj_private1_FLAG;
     }
@@ -1342,12 +1342,12 @@
         const char * const err = Parrot_dlerror();
         Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG,
                 "Symbol '%s' not found: %s\n", name, err ? err : "unknown reason");
-        $1 = pmc_new(interp, enum_class_Undef);
+        $1 = Parrot_pmc_new(interp, enum_class_Undef);
     }
     else {
         /* At this point we have the symbol's address. We just need to build
            a PMC with it so we can get and set the value */
-        $1 = pmc_new(interp, enum_class_UnManagedStruct);
+        $1 = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
         VTABLE_set_pointer(interp, $1, p);
     }
     Parrot_str_free_cstring(name);
@@ -1399,7 +1399,7 @@
                 cur_pos, NULL);
     }
     else {
-        $1 = pmc_new(interp, enum_class_Hash);
+        $1 = Parrot_pmc_new(interp, enum_class_Hash);
     }
     goto NEXT();
 }

Modified: branches/rm_cflags/src/ops/experimental.ops
==============================================================================
--- branches/rm_cflags/src/ops/experimental.ops	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/ops/experimental.ops	Mon Feb 22 02:43:55 2010	(r44285)
@@ -98,7 +98,7 @@
         if (!PMC_IS_NULL(classobj))
             $1 = VTABLE_instantiate(interp, classobj, PMCNULL);
         else {
-            const INTVAL type = pmc_type_p(interp, $4);
+            const INTVAL type = Parrot_pmc_get_type(interp, $4);
             if (type <= 0) {
                 opcode_t *dest = Parrot_ex_throw_from_op_args(
                     interp, expr NEXT(), EXCEPTION_NO_CLASS,
@@ -106,7 +106,7 @@
                 goto ADDRESS(dest);
             }
 
-            $1 = pmc_new(interp, type);
+            $1 = Parrot_pmc_new(interp, type);
         }
     }
 }
@@ -118,7 +118,7 @@
         if (!PMC_IS_NULL(classobj))
             $1 = VTABLE_instantiate(interp, classobj, PMCNULL);
         else {
-            const INTVAL type = pmc_type_p(interp, $4);
+            const INTVAL type = Parrot_pmc_get_type(interp, $4);
             if (type <= 0) {
                 opcode_t *dest = Parrot_ex_throw_from_op_args(
                     interp, expr NEXT(), EXCEPTION_NO_CLASS,
@@ -126,7 +126,7 @@
                 goto ADDRESS(dest);
             }
 
-            $1 = pmc_new(interp, type);
+            $1 = Parrot_pmc_new(interp, type);
         }
     }
 }
@@ -138,7 +138,7 @@
         if (!PMC_IS_NULL(classobj))
             $1 = VTABLE_instantiate(interp, classobj, PMCNULL);
         else {
-            const INTVAL type = pmc_type_p(interp, $4);
+            const INTVAL type = Parrot_pmc_get_type(interp, $4);
             if (type <= 0) {
                 opcode_t *dest = Parrot_ex_throw_from_op_args(
                     interp, expr NEXT(), EXCEPTION_NO_CLASS,
@@ -146,7 +146,7 @@
                 goto ADDRESS(dest);
             }
 
-            $1 = pmc_new(interp, type);
+            $1 = Parrot_pmc_new(interp, type);
         }
     }
 }
@@ -175,7 +175,7 @@
         if (!PMC_IS_NULL(classobj))
             $1 = VTABLE_instantiate(interp, classobj, PMCNULL);
         else {
-            const INTVAL type = pmc_type_p(interp, $4);
+            const INTVAL type = Parrot_pmc_get_type(interp, $4);
             if (type <= 0) {
                 opcode_t *dest = Parrot_ex_throw_from_op_args(
                     interp, expr NEXT(), EXCEPTION_NO_CLASS,
@@ -183,7 +183,7 @@
                 goto ADDRESS(dest);
             }
 
-            $1 = pmc_new(interp, type);
+            $1 = Parrot_pmc_new(interp, type);
         }
         VTABLE_set_pmc_keyed(interp, $2, $3, $1);
     }
@@ -197,7 +197,7 @@
         if (!PMC_IS_NULL(classobj))
             $1 = VTABLE_instantiate(interp, classobj, PMCNULL);
         else {
-            const INTVAL type = pmc_type_p(interp, $4);
+            const INTVAL type = Parrot_pmc_get_type(interp, $4);
             if (type <= 0) {
                 opcode_t *dest = Parrot_ex_throw_from_op_args(
                     interp, expr NEXT(), EXCEPTION_NO_CLASS,
@@ -205,7 +205,7 @@
                 goto ADDRESS(dest);
             }
 
-            $1 = pmc_new(interp, type);
+            $1 = Parrot_pmc_new(interp, type);
         }
 
         VTABLE_set_pmc_keyed_int(interp, $2, $3, $1);
@@ -220,7 +220,7 @@
         if (!PMC_IS_NULL(classobj))
             $1 = VTABLE_instantiate(interp, classobj, PMCNULL);
         else {
-            const INTVAL type = pmc_type_p(interp, $4);
+            const INTVAL type = Parrot_pmc_get_type(interp, $4);
             if (type <= 0) {
                 opcode_t *dest = Parrot_ex_throw_from_op_args(
                     interp, expr NEXT(), EXCEPTION_NO_CLASS,
@@ -228,7 +228,7 @@
                 goto ADDRESS(dest);
             }
 
-            $1 = pmc_new(interp, type);
+            $1 = Parrot_pmc_new(interp, type);
         }
 
         VTABLE_set_pmc_keyed_str(interp, $2, $3, $1);

Modified: branches/rm_cflags/src/ops/io.ops
==============================================================================
--- branches/rm_cflags/src/ops/io.ops	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/ops/io.ops	Mon Feb 22 02:43:55 2010	(r44285)
@@ -54,7 +54,7 @@
 inline op fdopen(out PMC, in INT, in STR) :filesys_open {
     $1 = Parrot_io_fdopen(interp, PMCNULL, (PIOHANDLE)$2, $3);
     if (!$1)
-        $1 = pmc_new(interp, enum_class_Undef);
+        $1 = Parrot_pmc_new(interp, enum_class_Undef);
 }
 
 =item B<getstdin>(out PMC)

Modified: branches/rm_cflags/src/ops/math.ops
==============================================================================
--- branches/rm_cflags/src/ops/math.ops	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/ops/math.ops	Mon Feb 22 02:43:55 2010	(r44285)
@@ -205,7 +205,7 @@
 
     result = VTABLE_get_integer(interp, $2) % $3;
 
-    $1 = pmc_new(interp, VTABLE_type(interp, $2));
+    $1 = Parrot_pmc_new(interp, VTABLE_type(interp, $2));
     VTABLE_set_integer_native(interp, $1, result);
 }
 
@@ -222,7 +222,7 @@
 
     result = VTABLE_get_integer(interp, $2) % value;
 
-    $1 = pmc_new(interp, VTABLE_type(interp, $2));
+    $1 = Parrot_pmc_new(interp, VTABLE_type(interp, $2));
     VTABLE_set_integer_native(interp, $1, result);
 }
 
@@ -283,7 +283,7 @@
 
     result = fmod(VTABLE_get_integer(interp, $2), value);
 
-    $1 = pmc_new(interp, VTABLE_type(interp, $2));
+    $1 = Parrot_pmc_new(interp, VTABLE_type(interp, $2));
     VTABLE_set_integer_native(interp, $1, (INTVAL) result);
 }
 
@@ -816,9 +816,9 @@
     const FLOATVAL b = VTABLE_get_number(interp, $3);
     const FLOATVAL c = pow(a, b);
     if (PMC_IS_NULL($1))
-        $1 = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
+        $1 = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
     else
-        $1 = pmc_new(interp, $1->vtable->base_type);
+        $1 = Parrot_pmc_new(interp, $1->vtable->base_type);
     VTABLE_set_number_native(interp, $1, c);
 }
 
@@ -827,9 +827,9 @@
     const FLOATVAL b = (FLOATVAL)$3;
     const FLOATVAL c = pow(a, b);
     if (PMC_IS_NULL($1))
-        $1 = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
+        $1 = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
     else
-        $1 = pmc_new(interp, $1->vtable->base_type);
+        $1 = Parrot_pmc_new(interp, $1->vtable->base_type);
     VTABLE_set_number_native(interp, $1, c);
 }
 
@@ -837,9 +837,9 @@
     const FLOATVAL a = VTABLE_get_number(interp, $2);
     const FLOATVAL c = pow(a, $3);
     if (PMC_IS_NULL($1))
-        $1 = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
+        $1 = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
     else
-        $1 = pmc_new(interp, $1->vtable->base_type);
+        $1 = Parrot_pmc_new(interp, $1->vtable->base_type);
     VTABLE_set_number_native(interp, $1, c);
 }
 

Modified: branches/rm_cflags/src/ops/object.ops
==============================================================================
--- branches/rm_cflags/src/ops/object.ops	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/ops/object.ops	Mon Feb 22 02:43:55 2010	(r44285)
@@ -236,13 +236,13 @@
 =cut
 
 inline op newclass(out PMC, in STR) :object_classes {
-    PMC * const name = pmc_new(interp, enum_class_String);
+    PMC * const name = Parrot_pmc_new(interp, enum_class_String);
     VTABLE_set_string_native(interp, name, $2);
-    $1 = pmc_new_init(interp, enum_class_Class, name);
+    $1 = Parrot_pmc_new_init(interp, enum_class_Class, name);
 }
 
 inline op newclass(out PMC, in PMC) :object_classes {
-    $1 = pmc_new_init(interp, enum_class_Class, $2);
+    $1 = Parrot_pmc_new_init(interp, enum_class_Class, $2);
 }
 
 =item B<subclass>(out PMC, in PMC)
@@ -267,7 +267,7 @@
             "Class '%Ss' doesn't exist", VTABLE_get_string(interp, $2));
         goto ADDRESS(handler);
     }
-    $1 = pmc_new(interp, enum_class_Class);
+    $1 = Parrot_pmc_new(interp, enum_class_Class);
     VTABLE_add_parent(interp, $1, parent_class);
     goto ADDRESS(next);
 }
@@ -297,7 +297,7 @@
             "Class '%Ss' doesn't exist", VTABLE_get_string(interp, $2));
         goto ADDRESS(handler);
     }
-    $1 = pmc_new_init(interp, enum_class_Class, $3);
+    $1 = Parrot_pmc_new_init(interp, enum_class_Class, $3);
     VTABLE_add_parent(interp, $1, parent_class);
     goto ADDRESS(next);
 }
@@ -326,7 +326,7 @@
         goto ADDRESS(handler);
     }
 
-    $1 = pmc_new(interp, enum_class_Class);
+    $1 = Parrot_pmc_new(interp, enum_class_Class);
     VTABLE_add_parent(interp, $1, parent_class);
     goto ADDRESS(next);
 }
@@ -358,7 +358,7 @@
         goto ADDRESS(handler);
     }
 
-    $1 = pmc_new_init(interp, enum_class_Class, $3);
+    $1 = Parrot_pmc_new_init(interp, enum_class_Class, $3);
     VTABLE_add_parent(interp, $1, parent_class);
     goto ADDRESS(next);
 }

Modified: branches/rm_cflags/src/ops/pmc.ops
==============================================================================
--- branches/rm_cflags/src/ops/pmc.ops	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/ops/pmc.ops	Mon Feb 22 02:43:55 2010	(r44285)
@@ -58,14 +58,14 @@
     if (!PMC_IS_NULL(_class))
         $1 = VTABLE_instantiate(interp, _class, PMCNULL);
     else {
-        const INTVAL type = pmc_type(interp, name);
+        const INTVAL type = Parrot_pmc_get_type_str(interp, name);
         if (type <= 0) {
             opcode_t *dest = Parrot_ex_throw_from_op_args(interp, expr NEXT(),
                 EXCEPTION_NO_CLASS,
                 "Class '%Ss' not found", name);
             goto ADDRESS(dest);
         }
-        $1 = pmc_new(interp, type);
+        $1 = Parrot_pmc_new(interp, type);
     }
 }
 
@@ -78,14 +78,14 @@
     if (!PMC_IS_NULL(_class))
         $1 = VTABLE_instantiate(interp, _class, $3);
     else {
-        const INTVAL type = pmc_type(interp, name);
+        const INTVAL type = Parrot_pmc_get_type_str(interp, name);
         if (type <= 0) {
             opcode_t *dest = Parrot_ex_throw_from_op_args(interp, expr NEXT(),
                 EXCEPTION_NO_CLASS,
                 "Class '%Ss' not found", name);
             goto ADDRESS(dest);
         }
-        $1 = pmc_new_init(interp, type, $3);
+        $1 = Parrot_pmc_new_init(interp, type, $3);
     }
 }
 
@@ -96,14 +96,14 @@
     if (!PMC_IS_NULL(_class))
         $1 = VTABLE_instantiate(interp, _class, PMCNULL);
     else {
-        const INTVAL type = pmc_type_p(interp, name_key);
+        const INTVAL type = Parrot_pmc_get_type(interp, name_key);
         if (type <= 0) {
             opcode_t *dest = Parrot_ex_throw_from_op_args(interp, expr NEXT(),
                 EXCEPTION_NO_CLASS,
                 "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));
             goto ADDRESS(dest);
         }
-        $1 = pmc_new(interp, type);
+        $1 = Parrot_pmc_new(interp, type);
     }
 }
 
@@ -114,14 +114,14 @@
     if (!PMC_IS_NULL(_class))
         $1 = VTABLE_instantiate(interp, _class, $3);
     else {
-        const INTVAL type = pmc_type_p(interp, name_key);
+        const INTVAL type = Parrot_pmc_get_type(interp, name_key);
         if (type <= 0) {
             opcode_t *dest = Parrot_ex_throw_from_op_args(interp, expr NEXT(),
                 EXCEPTION_NO_CLASS,
                 "Class '%Ss' not found", VTABLE_get_repr(interp, name_key));
             goto ADDRESS(dest);
         }
-        $1 = pmc_new_init(interp, type, $3);
+        $1 = Parrot_pmc_new_init(interp, type, $3);
     }
 }
 
@@ -627,11 +627,11 @@
 =cut
 
 op register(invar PMC) {
-    gc_register_pmc(interp, $1);
+    Parrot_pmc_gc_register(interp, $1);
 }
 
 op unregister(invar PMC) {
-    gc_unregister_pmc(interp, $1);
+    Parrot_pmc_gc_unregister(interp, $1);
 }
 
 
@@ -648,17 +648,17 @@
 =cut
 
 op box(out PMC, in INT) {
-    $1 = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Integer));
+    $1 = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Integer));
     VTABLE_set_integer_native(interp, $1, $2);
 }
 
 op box(out PMC, in NUM) {
-    $1 = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
+    $1 = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
     VTABLE_set_number_native(interp, $1, $2);
 }
 
 op box(out PMC, in STR) {
-    $1 = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_String));
+    $1 = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_String));
     VTABLE_set_string_native(interp, $1, $2);
 }
 

Modified: branches/rm_cflags/src/packfile.c
==============================================================================
--- branches/rm_cflags/src/packfile.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/packfile.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -3865,7 +3865,6 @@
 {
     ASSERT_ARGS(PackFile_Constant_pack_size)
     PMC    *component;
-    STRING *image;
     size_t  packed_size;
 
     switch (self->type) {
@@ -3889,13 +3888,8 @@
       case PFC_PMC:
         component = self->u.key; /* the pmc (Sub, ...) */
 
-        /*
-         * TODO create either
-         * a) a frozen_size freeze entry or
-         * b) change packout.c so that component size isn't needed
-         */
-        image       = Parrot_freeze(interp, component);
-        packed_size = PF_size_string(image);
+        packed_size =
+            PF_size_string(STRINGNULL) + Parrot_freeze_size(interp, component) / sizeof (opcode_t);
         break;
 
       default:
@@ -4058,11 +4052,11 @@
         opcode_t        op;
 
         if (tail) {
-            SETATTR_Key_next_key(interp, tail, constant_pmc_new(interp, pmc_enum));
+            SETATTR_Key_next_key(interp, tail, Parrot_pmc_new_constant(interp, pmc_enum));
             GETATTR_Key_next_key(interp, tail, tail);
         }
         else
-            head = tail = constant_pmc_new(interp, pmc_enum);
+            head = tail = Parrot_pmc_new_constant(interp, pmc_enum);
 
         op = PF_fetch_opcode(pf, &cursor);
 
@@ -4546,16 +4540,16 @@
 
     switch (type) {
       case PF_ANNOTATION_KEY_TYPE_INT:
-        result = pmc_new(interp, enum_class_Integer);
+        result = Parrot_pmc_new(interp, enum_class_Integer);
         VTABLE_set_integer_native(interp, result, value);
         break;
       case PF_ANNOTATION_KEY_TYPE_NUM:
-        result = pmc_new(interp, enum_class_Float);
+        result = Parrot_pmc_new(interp, enum_class_Float);
         VTABLE_set_number_native(interp, result,
                     PF_CONST(self->code, value)->u.number);
         break;
       default:
-        result = pmc_new(interp, enum_class_String);
+        result = Parrot_pmc_new(interp, enum_class_String);
         VTABLE_set_string_native(interp, result,
                     PF_CONST(self->code, value)->u.string);
     }
@@ -4627,7 +4621,7 @@
         }
 
         /* Create hash of values we have. */
-        result = pmc_new(interp, enum_class_Hash);
+        result = Parrot_pmc_new(interp, enum_class_Hash);
 
         for (i = 0; i < self->num_keys; i++) {
             if (have_values[i]) {

Modified: branches/rm_cflags/src/pmc.c
==============================================================================
--- branches/rm_cflags/src/pmc.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -46,7 +46,7 @@
         __attribute__nonnull__(1);
 
 PARROT_CANNOT_RETURN_NULL
-static PMC* pmc_reuse_no_init(PARROT_INTERP,
+static PMC* Parrot_pmc_reuse_noinit(PARROT_INTERP,
     ARGIN(PMC *pmc),
     INTVAL new_type,
     SHIM(UINTVAL flags))
@@ -59,7 +59,7 @@
        PARROT_ASSERT_ARG(interp))
 #define ASSERT_ARGS_get_new_pmc_header __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_pmc_reuse_no_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_reuse_noinit __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(pmc))
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
@@ -72,7 +72,7 @@
 
 /*
 
-=item C<INTVAL PMC_is_null(PARROT_INTERP, const PMC *pmc)>
+=item C<INTVAL Parrot_pmc_is_null(PARROT_INTERP, const PMC *pmc)>
 
 Tests if the given pmc is null.
 
@@ -82,9 +82,9 @@
 
 PARROT_EXPORT
 INTVAL
-PMC_is_null(SHIM_INTERP, ARGIN_NULLOK(const PMC *pmc))
+Parrot_pmc_is_null(SHIM_INTERP, ARGIN_NULLOK(const PMC *pmc))
 {
-    ASSERT_ARGS(PMC_is_null)
+    ASSERT_ARGS(Parrot_pmc_is_null)
 #if PARROT_CATCH_NULL
     return pmc == PMCNULL || pmc == NULL;
 #else
@@ -135,7 +135,7 @@
 
 /*
 
-=item C<PMC * pmc_new(PARROT_INTERP, INTVAL base_type)>
+=item C<PMC * Parrot_pmc_new(PARROT_INTERP, INTVAL base_type)>
 
 Creates a new PMC of type C<base_type> (which is an index into the list of PMC
 types declared in C<vtables> in F<include/parrot/pmc.h>). Once the PMC has been
@@ -150,9 +150,9 @@
 PARROT_CANNOT_RETURN_NULL
 PARROT_WARN_UNUSED_RESULT
 PMC *
-pmc_new(PARROT_INTERP, INTVAL base_type)
+Parrot_pmc_new(PARROT_INTERP, INTVAL base_type)
 {
-    ASSERT_ARGS(pmc_new)
+    ASSERT_ARGS(Parrot_pmc_new)
     PARROT_ASSERT(interp->vtables[base_type]);
     {
         PMC *const classobj = interp->vtables[base_type]->pmc_class;
@@ -169,7 +169,7 @@
 
 /*
 
-=item C<PMC * pmc_reuse(PARROT_INTERP, PMC *pmc, INTVAL new_type, UINTVAL
+=item C<PMC * Parrot_pmc_reuse(PARROT_INTERP, PMC *pmc, INTVAL new_type, UINTVAL
 flags)>
 
 Reuse an existing PMC, turning it into an empty PMC of the new type. Any
@@ -188,11 +188,11 @@
 PARROT_CANNOT_RETURN_NULL
 PARROT_IGNORABLE_RESULT
 PMC *
-pmc_reuse(PARROT_INTERP, ARGIN(PMC *pmc), INTVAL new_type,
-          UINTVAL flags)
+Parrot_pmc_reuse(PARROT_INTERP, ARGIN(PMC *pmc), INTVAL new_type,
+    UINTVAL flags)
 {
-    ASSERT_ARGS(pmc_reuse)
-    pmc = pmc_reuse_no_init(interp, pmc, new_type, flags);
+    ASSERT_ARGS(Parrot_pmc_reuse)
+    pmc = Parrot_pmc_reuse_noinit(interp, pmc, new_type, flags);
 
     /* Call the base init for the redone pmc. Warning, this should not
        be called on Object PMCs. */
@@ -203,8 +203,8 @@
 
 /*
 
-=item C<PMC * pmc_reuse_init(PARROT_INTERP, PMC *pmc, INTVAL new_type, PMC
-*init, UINTVAL flags)>
+=item C<PMC * Parrot_pmc_reuse_init(PARROT_INTERP, PMC *pmc, INTVAL new_type,
+PMC *init, UINTVAL flags)>
 
 Reuse an existing PMC, turning it into an PMC of the new type. Any
 required internal structure will be put in place (such as the extension area)
@@ -222,11 +222,11 @@
 PARROT_CANNOT_RETURN_NULL
 PARROT_IGNORABLE_RESULT
 PMC *
-pmc_reuse_init(PARROT_INTERP, ARGIN(PMC *pmc), INTVAL new_type, ARGIN(PMC *init),
+Parrot_pmc_reuse_init(PARROT_INTERP, ARGIN(PMC *pmc), INTVAL new_type, ARGIN(PMC *init),
           UINTVAL flags)
 {
-    ASSERT_ARGS(pmc_reuse_init)
-    pmc = pmc_reuse_no_init(interp, pmc, new_type, flags);
+    ASSERT_ARGS(Parrot_pmc_reuse_init)
+    pmc = Parrot_pmc_reuse_noinit(interp, pmc, new_type, flags);
 
     /* Call the base init for the redone pmc. Warning, this should not
        be called on Object PMCs. */
@@ -237,8 +237,8 @@
 
 /*
 
-=item C<static PMC* pmc_reuse_no_init(PARROT_INTERP, PMC *pmc, INTVAL new_type,
-UINTVAL flags)>
+=item C<static PMC* Parrot_pmc_reuse_noinit(PARROT_INTERP, PMC *pmc, INTVAL
+new_type, UINTVAL flags)>
 
 Prepare pmc for reuse. Do all scuffolding except initing.
 
@@ -247,10 +247,10 @@
 */
 PARROT_CANNOT_RETURN_NULL
 static PMC*
-pmc_reuse_no_init(PARROT_INTERP, ARGIN(PMC *pmc), INTVAL new_type,
+Parrot_pmc_reuse_noinit(PARROT_INTERP, ARGIN(PMC *pmc), INTVAL new_type,
     SHIM(UINTVAL flags)) {
 
-    ASSERT_ARGS(pmc_reuse_no_init)
+    ASSERT_ARGS(Parrot_pmc_reuse_noinit)
     VTABLE *new_vtable;
     INTVAL  new_flags = 0;
 
@@ -281,8 +281,8 @@
 
 /*
 
-=item C<PMC * pmc_reuse_by_class(PARROT_INTERP, PMC *pmc, PMC *class_, UINTVAL
-flags)>
+=item C<PMC * Parrot_pmc_reuse_by_class(PARROT_INTERP, PMC *pmc, PMC *class_,
+UINTVAL flags)>
 
 Reuse an existing PMC. Convert it to the type specified by the given Class
 PMC. At the moment, this means we can only use this function to reuse PMCs
@@ -297,10 +297,10 @@
 PARROT_CANNOT_RETURN_NULL
 PARROT_IGNORABLE_RESULT
 PMC *
-pmc_reuse_by_class(PARROT_INTERP, ARGMOD(PMC *pmc), ARGIN(PMC *class_),
+Parrot_pmc_reuse_by_class(PARROT_INTERP, ARGMOD(PMC *pmc), ARGIN(PMC *class_),
     UINTVAL flags)
 {
-    ASSERT_ARGS(pmc_reuse_by_class)
+    ASSERT_ARGS(Parrot_pmc_reuse_by_class)
     const INTVAL   new_type   = PARROT_CLASS(class_)->id;
     VTABLE * const new_vtable = interp->vtables[new_type];
     INTVAL         new_flags  = flags;
@@ -466,11 +466,11 @@
 
 /*
 
-=item C<PMC * pmc_new_noinit(PARROT_INTERP, INTVAL base_type)>
+=item C<PMC * Parrot_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)>
 
 Creates a new PMC of type C<base_type> (which is an index into the list of PMC
-types declared in C<vtables> in F<include/parrot/pmc.h>). Unlike C<pmc_new()>,
-C<pmc_new_noinit()> does not call its C<init> method.  This allows separate
+types declared in C<vtables> in F<include/parrot/pmc.h>). Unlike C<Parrot_pmc_new()>,
+C<Parrot_pmc_new_noinit()> does not call its C<init> method.  This allows separate
 allocation and initialization for continuations.
 
 =cut
@@ -480,9 +480,9 @@
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
 PMC *
-pmc_new_noinit(PARROT_INTERP, INTVAL base_type)
+Parrot_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)
 {
-    ASSERT_ARGS(pmc_new_noinit)
+    ASSERT_ARGS(Parrot_pmc_new_noinit)
     PMC *const classobj = interp->vtables[base_type]->pmc_class;
 
     if (!PMC_IS_NULL(classobj) && PObj_is_class_TEST(classobj))
@@ -494,7 +494,7 @@
 
 /*
 
-=item C<PMC * constant_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)>
+=item C<PMC * Parrot_pmc_new_constant_noinit(PARROT_INTERP, INTVAL base_type)>
 
 Creates a new constant PMC of type C<base_type>.
 
@@ -505,16 +505,16 @@
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
 PMC *
-constant_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)
+Parrot_pmc_new_constant_noinit(PARROT_INTERP, INTVAL base_type)
 {
-    ASSERT_ARGS(constant_pmc_new_noinit)
+    ASSERT_ARGS(Parrot_pmc_new_constant_noinit)
     return get_new_pmc_header(interp, base_type, PObj_constant_FLAG);
 }
 
 
 /*
 
-=item C<PMC * constant_pmc_new(PARROT_INTERP, INTVAL base_type)>
+=item C<PMC * Parrot_pmc_new_constant(PARROT_INTERP, INTVAL base_type)>
 
 Creates a new constant PMC of type C<base_type>, then calls its C<init>.
 
@@ -525,9 +525,9 @@
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
 PMC *
-constant_pmc_new(PARROT_INTERP, INTVAL base_type)
+Parrot_pmc_new_constant(PARROT_INTERP, INTVAL base_type)
 {
-    ASSERT_ARGS(constant_pmc_new)
+    ASSERT_ARGS(Parrot_pmc_new_constant)
     PMC * const pmc = get_new_pmc_header(interp, base_type, PObj_constant_FLAG);
     VTABLE_init(interp, pmc);
     return pmc;
@@ -536,9 +536,9 @@
 
 /*
 
-=item C<PMC * pmc_new_init(PARROT_INTERP, INTVAL base_type, PMC *init)>
+=item C<PMC * Parrot_pmc_new_init(PARROT_INTERP, INTVAL base_type, PMC *init)>
 
-As C<pmc_new()>, but passes C<init> to the PMC's C<init_pmc()> vtable entry.
+As C<Parrot_pmc_new()>, but passes C<init> to the PMC's C<init_pmc()> vtable entry.
 
 =cut
 
@@ -547,9 +547,9 @@
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
 PMC *
-pmc_new_init(PARROT_INTERP, INTVAL base_type, ARGOUT(PMC *init))
+Parrot_pmc_new_init(PARROT_INTERP, INTVAL base_type, ARGOUT(PMC *init))
 {
-    ASSERT_ARGS(pmc_new_init)
+    ASSERT_ARGS(Parrot_pmc_new_init)
     PMC *const classobj = interp->vtables[base_type]->pmc_class;
 
     if (!PMC_IS_NULL(classobj) && PObj_is_class_TEST(classobj))
@@ -564,9 +564,10 @@
 
 /*
 
-=item C<PMC * constant_pmc_new_init(PARROT_INTERP, INTVAL base_type, PMC *init)>
+=item C<PMC * Parrot_pmc_new_constant_init(PARROT_INTERP, INTVAL base_type, PMC
+*init)>
 
-As C<constant_pmc_new>, but passes C<init> to the PMC's C<init_pmc> vtable
+As C<Parrot_pmc_new_constant>, but passes C<init> to the PMC's C<init_pmc> vtable
 entry.
 
 =cut
@@ -576,9 +577,9 @@
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
 PMC *
-constant_pmc_new_init(PARROT_INTERP, INTVAL base_type, ARGIN_NULLOK(PMC *init))
+Parrot_pmc_new_constant_init(PARROT_INTERP, INTVAL base_type, ARGIN_NULLOK(PMC *init))
 {
-    ASSERT_ARGS(constant_pmc_new_init)
+    ASSERT_ARGS(Parrot_pmc_new_constant_init)
     PMC * const pmc = get_new_pmc_header(interp, base_type, PObj_constant_FLAG);
     VTABLE_init_pmc(interp, pmc, init);
     return pmc;
@@ -587,7 +588,7 @@
 
 /*
 
-=item C<PMC * temporary_pmc_new(PARROT_INTERP, INTVAL base_type)>
+=item C<PMC * Parrot_pmc_new_temporary(PARROT_INTERP, INTVAL base_type)>
 
 Creates a new temporary PMC of type C<base_type>, then call C<init>. Cannot
 be used to create PMC Objects which have been defined from PIR.
@@ -602,11 +603,11 @@
 If you don't know what this means means, or you can't tell if either case
 will happen as the result of any call you make on or with this PMC,
 B<DO NOT> use this function, lest you cause weird crashes and memory errors.
-Use C<pmc_new()> instead.
+Use C<Parrot_pmc_new()> instead.
 
 (Why do these functions even exist?  Used judiciously, they can reduce GC
 pressure in hotspots tremendously.  If you haven't audited the code carefully
--- including profiling and benchmarking -- then use C<pmc_new()> instead, and
+-- including profiling and benchmarking -- then use C<Parrot_pmc_new()> instead, and
 never B<ever> add C<PARROT_EXPORT> to either function.)
 
 =cut
@@ -615,9 +616,9 @@
 
 PARROT_CANNOT_RETURN_NULL
 PMC *
-temporary_pmc_new(PARROT_INTERP, INTVAL base_type)
+Parrot_pmc_new_temporary(PARROT_INTERP, INTVAL base_type)
 {
-    ASSERT_ARGS(temporary_pmc_new)
+    ASSERT_ARGS(Parrot_pmc_new_temporary)
     PMC * const pmc = get_new_pmc_header(interp, base_type, PObj_constant_FLAG);
     VTABLE_init(interp, pmc);
     return pmc;
@@ -626,11 +627,11 @@
 
 /*
 
-=item C<void temporary_pmc_free(PARROT_INTERP, PMC *pmc)>
+=item C<void Parrot_pmc_free_temporary(PARROT_INTERP, PMC *pmc)>
 
-Frees a new temporary PMC created by C<temporary_pmc_new()>.  Do not call
+Frees a new temporary PMC created by C<temporary_Parrot_pmc_new()>.  Do not call
 this with any other type of PMC.  Do not forget to call this (or you'll leak
-PMCs). Read and I<understand> the warnings for C<temporary_pmc_new()> before
+PMCs). Read and I<understand> the warnings for C<temporary_Parrot_pmc_new()> before
 you're tempted to use this.
 
 =cut
@@ -638,16 +639,16 @@
 */
 
 void
-temporary_pmc_free(PARROT_INTERP, ARGMOD(PMC *pmc))
+Parrot_pmc_free_temporary(PARROT_INTERP, ARGMOD(PMC *pmc))
 {
-    ASSERT_ARGS(temporary_pmc_free)
+    ASSERT_ARGS(Parrot_pmc_free_temporary)
     Parrot_gc_free_pmc_header(interp, pmc);
 }
 
 
 /*
 
-=item C<INTVAL get_new_vtable_index(PARROT_INTERP)>
+=item C<INTVAL Parrot_pmc_get_new_vtable_index(PARROT_INTERP)>
 
 Get a new unique identifier number and allocate a new vtable structure for a
 new PMC type.
@@ -657,9 +658,9 @@
 */
 
 INTVAL
-get_new_vtable_index(PARROT_INTERP)
+Parrot_pmc_get_new_vtable_index(PARROT_INTERP)
 {
-    ASSERT_ARGS(get_new_vtable_index)
+    ASSERT_ARGS(Parrot_pmc_get_new_vtable_index)
     const INTVAL type_id = interp->n_vtable_max++;
 
     /* Have we overflowed the table? */
@@ -671,7 +672,7 @@
 
 /*
 
-=item C<INTVAL pmc_register(PARROT_INTERP, STRING *name)>
+=item C<INTVAL Parrot_pmc_register_new_type(PARROT_INTERP, STRING *name)>
 
 Registers the name of a new PMC type with Parrot, returning the INTVAL
 representing that type.
@@ -682,12 +683,12 @@
 
 PARROT_EXPORT
 INTVAL
-pmc_register(PARROT_INTERP, ARGIN(STRING *name))
+Parrot_pmc_register_new_type(PARROT_INTERP, ARGIN(STRING *name))
 {
-    ASSERT_ARGS(pmc_register)
+    ASSERT_ARGS(Parrot_pmc_register_new_type)
     /* If they're looking to register an existing class, return that
        class' type number */
-    INTVAL type = pmc_type(interp, name);
+    INTVAL type = Parrot_pmc_get_type_str(interp, name);
 
     if (type > enum_type_undef)
         return type;
@@ -696,7 +697,7 @@
         Parrot_ex_throw_from_c_args(interp, NULL, 1,
             "undefined type already exists - can't register PMC");
 
-    type = get_new_vtable_index(interp);
+    type = Parrot_pmc_get_new_vtable_index(interp);
 
     /* set entry in name->type hash */
     VTABLE_set_integer_keyed_str(interp, interp->class_hash, name, type);
@@ -707,7 +708,7 @@
 
 /*
 
-=item C<INTVAL pmc_type(PARROT_INTERP, STRING *name)>
+=item C<INTVAL Parrot_pmc_get_type_str(PARROT_INTERP, STRING *name)>
 
 Returns the PMC type for C<name>.
 
@@ -718,9 +719,9 @@
 PARROT_EXPORT
 PARROT_WARN_UNUSED_RESULT
 INTVAL
-pmc_type(PARROT_INTERP, ARGIN_NULLOK(STRING *name))
+Parrot_pmc_get_type_str(PARROT_INTERP, ARGIN_NULLOK(STRING *name))
 {
-    ASSERT_ARGS(pmc_type)
+    ASSERT_ARGS(Parrot_pmc_get_type_str)
     if (!name)
         return enum_type_undef;
     else {
@@ -743,7 +744,7 @@
 
 /*
 
-=item C<INTVAL pmc_type_p(PARROT_INTERP, PMC *name)>
+=item C<INTVAL Parrot_pmc_get_type(PARROT_INTERP, PMC *name)>
 
 Returns the PMC type for C<name>.
 
@@ -753,9 +754,9 @@
 
 PARROT_EXPORT
 INTVAL
-pmc_type_p(PARROT_INTERP, ARGIN(PMC *name))
+Parrot_pmc_get_type(PARROT_INTERP, ARGIN(PMC *name))
 {
-    ASSERT_ARGS(pmc_type_p)
+    ASSERT_ARGS(Parrot_pmc_get_type)
     PMC * const classname_hash = interp->class_hash;
     PMC * item;
 
@@ -813,7 +814,7 @@
 
 /*
 
-=item C<void Parrot_create_mro(PARROT_INTERP, INTVAL type)>
+=item C<void Parrot_pmc_create_mro(PARROT_INTERP, INTVAL type)>
 
 Create the MRO (method resolution order) array for this type.
 
@@ -823,9 +824,9 @@
 
 PARROT_EXPORT
 void
-Parrot_create_mro(PARROT_INTERP, INTVAL type)
+Parrot_pmc_create_mro(PARROT_INTERP, INTVAL type)
 {
-    ASSERT_ARGS(Parrot_create_mro)
+    ASSERT_ARGS(Parrot_pmc_create_mro)
     PMC    *_class, *mro;
     VTABLE *vtable   = interp->vtables[type];
     PMC    *mro_list = vtable->mro;
@@ -838,7 +839,7 @@
     if (mro_list->vtable->base_type != enum_class_ResizableStringArray)
         return;
 
-    mro         = pmc_new(interp, enum_class_ResizablePMCArray);
+    mro         = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
     vtable->mro = mro;
 
     if (vtable->ro_variant_vtable)
@@ -848,7 +849,7 @@
 
     for (i = 0; i < count; ++i) {
         STRING *class_name  = VTABLE_get_string_keyed_int(interp, mro_list, i);
-        INTVAL  parent_type = pmc_type(interp, class_name);
+        INTVAL  parent_type = Parrot_pmc_get_type_str(interp, class_name);
 
         /* abstract classes don't have a vtable */
         if (!parent_type)
@@ -858,7 +859,7 @@
 
         if (!vtable->_namespace) {
             /* need a namespace Hash, anchor at parent, name it */
-            PMC * const ns     = pmc_new(interp,
+            PMC * const ns     = Parrot_pmc_new(interp,
                     Parrot_get_ctx_HLL_type(interp, enum_class_NameSpace));
             vtable->_namespace = ns;
 
@@ -884,7 +885,7 @@
 
 =over 4
 
-=item C<void gc_register_pmc(PARROT_INTERP, PMC *pmc)>
+=item C<void Parrot_pmc_gc_register(PARROT_INTERP, PMC *pmc)>
 
 Registers the PMC with the interpreter's GC registry.
 
@@ -894,9 +895,9 @@
 
 PARROT_EXPORT
 void
-gc_register_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
+Parrot_pmc_gc_register(PARROT_INTERP, ARGIN(PMC *pmc))
 {
-    ASSERT_ARGS(gc_register_pmc)
+    ASSERT_ARGS(Parrot_pmc_gc_register)
     /* Better not trigger a GC run with a potentially unanchored PMC */
     Parrot_block_GC_mark(interp);
 
@@ -906,10 +907,9 @@
     Parrot_unblock_GC_mark(interp);
 }
 
-
 /*
 
-=item C<void gc_unregister_pmc(PARROT_INTERP, PMC *pmc)>
+=item C<void Parrot_pmc_gc_unregister(PARROT_INTERP, PMC *pmc)>
 
 Unregisters the PMC from the interpreter's GC registry.
 
@@ -919,15 +919,14 @@
 
 PARROT_EXPORT
 void
-gc_unregister_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
+Parrot_pmc_gc_unregister(PARROT_INTERP, ARGIN(PMC *pmc))
 {
-    ASSERT_ARGS(gc_unregister_pmc)
+    ASSERT_ARGS(Parrot_pmc_gc_unregister)
     PARROT_ASSERT(interp->gc_registry);
 
     VTABLE_delete_keyed(interp, interp->gc_registry, pmc);
 }
 
-
 /*
 
 =back
@@ -947,7 +946,6 @@
 
 */
 
-
 /*
  * Local variables:
  *   c-file-style: "parrot"

Modified: branches/rm_cflags/src/pmc/arrayiterator.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/arrayiterator.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/arrayiterator.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -128,7 +128,7 @@
         GET_ATTR_pos(interp, SELF, pos);
         GET_ATTR_reverse(interp, SELF, reverse);
 
-        clone = pmc_new_init(INTERP, enum_class_ArrayIterator, array);
+        clone = Parrot_pmc_new_init(INTERP, enum_class_ArrayIterator, array);
 
         SET_ATTR_pos(interp, clone, pos);
         SET_ATTR_reverse(interp, clone, reverse);

Modified: branches/rm_cflags/src/pmc/bigint.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/bigint.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/bigint.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -540,7 +540,7 @@
     }
 
     VTABLE PMC *clone() {
-        PMC *res = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC *res = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
         bigint_set(INTERP, res, SELF);
         return res;
     }
@@ -723,14 +723,14 @@
     }
 
     MULTI PMC *add(BigInt value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bigint_add_bigint(INTERP, SELF, value, dest);
         return dest;
     }
 
     MULTI PMC *add(Integer value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bigint_add_bigint_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
         return dest;
@@ -745,7 +745,7 @@
     }
 
     VTABLE PMC *add_int(INTVAL value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bigint_add_bigint_int(INTERP, SELF, value, dest);
         return dest;
@@ -779,14 +779,14 @@
 
 
     MULTI PMC *subtract(BigInt value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bigint_sub_bigint(INTERP, SELF, value, dest);
         return dest;
     }
 
     MULTI PMC *subtract(Integer value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bigint_sub_bigint_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
         return dest;
@@ -801,7 +801,7 @@
     }
 
     VTABLE PMC *subtract_int(INTVAL value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bigint_sub_bigint_int(INTERP, SELF, value, dest);
         return dest;
@@ -835,14 +835,14 @@
 
 
     MULTI PMC *multiply(BigInt value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bigint_mul_bigint(INTERP, SELF, value, dest);
         return dest;
     }
 
     MULTI PMC *multiply(Integer value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bigint_mul_bigint_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
         return dest;
@@ -857,7 +857,7 @@
     }
 
     VTABLE PMC *multiply_int(INTVAL value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bigint_mul_bigint_int(INTERP, SELF, value, dest);
         return dest;
@@ -890,7 +890,7 @@
     METHOD PMC *pow(PMC *value) {
         /* XXX only Integer RHS currently */
         const INTVAL r = VTABLE_get_integer(INTERP, value);
-        PMC *dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC *dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bigint_pow_bigint_int(INTERP, SELF, r, dest);
         RETURN(PMC *dest);
@@ -898,7 +898,7 @@
 
     MULTI PMC *divide(BigInt value, PMC *dest) {
         BIGINT *bi;
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bigint_div_bigint(INTERP, SELF, value, dest);
 #if 0
@@ -914,7 +914,7 @@
     }
 
     MULTI PMC *divide(Integer value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bigint_div_bigint_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
         return dest;
@@ -929,7 +929,7 @@
     }
 
     VTABLE PMC *divide_int(INTVAL value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bigint_div_bigint_int(INTERP, SELF, value, dest);
         return dest;
@@ -953,14 +953,14 @@
     }
 
     MULTI PMC *floor_divide(BigInt value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bigint_fdiv_bigint(INTERP, SELF, value, dest);
         return dest;
     }
 
     MULTI PMC *floor_divide(Integer value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bigint_fdiv_bigint_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
         return dest;
@@ -975,7 +975,7 @@
     }
 
     VTABLE PMC *floor_divide_int(INTVAL value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bigint_fdiv_bigint_int(INTERP, SELF, value, dest);
         return dest;
@@ -1001,14 +1001,14 @@
     }
 
     MULTI PMC *modulus(BigInt value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bigint_mod_bigint(INTERP, SELF, value, dest);
         return dest;
     }
 
     MULTI PMC *modulus(Integer value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bigint_mod_bigint_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
         return dest;
@@ -1078,7 +1078,7 @@
 */
 
     VTABLE PMC *absolute(PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bigint_abs(INTERP, SELF, dest);
         return dest;
@@ -1102,7 +1102,7 @@
 */
 
     VTABLE PMC *neg(PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bigint_neg(INTERP, SELF, dest);
         return dest;

Modified: branches/rm_cflags/src/pmc/bignum.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/bignum.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/bignum.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -810,7 +810,7 @@
     }
 
     VTABLE PMC *clone() {
-        PMC *res = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC *res = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
         bignum_set(INTERP, res, SELF);
         return res;
     }
@@ -1046,14 +1046,14 @@
 */
 
     MULTI PMC *add(BigNum value, PMC *dest) {
-        dest = pmc_new(INTERP, SELF->vtable->base_type);
+        dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
 
         bignum_add_bignum(INTERP, SELF, value, dest);
         return dest;
     }
 
     MULTI PMC *add(Integer value, PMC *dest) {
-        dest = pmc_new(INTERP, SELF->vtable->base_type);
+        dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
 
         bignum_add_bignum_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
         return dest;
@@ -1067,7 +1067,7 @@
     }
 
     VTABLE PMC *add_int(INTVAL value, PMC *dest) {
-        dest = pmc_new(INTERP, SELF->vtable->base_type);
+        dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
 
         bignum_add_bignum_int(INTERP, SELF, value, dest);
         return dest;
@@ -1109,14 +1109,14 @@
 */
 
     MULTI PMC *subtract(BigNum value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bignum_sub_bignum(INTERP, SELF, value, dest);
         return dest;
     }
 
     MULTI PMC *subtract(Integer value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bignum_sub_bignum_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
         return dest;
@@ -1130,7 +1130,7 @@
     }
 
     VTABLE PMC *subtract_int(INTVAL value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bignum_sub_bignum_int(INTERP, SELF, value, dest);
         return dest;
@@ -1172,14 +1172,14 @@
 */
 
     MULTI PMC *multiply(BigNum value, PMC *dest) {
-        dest = pmc_new(INTERP, SELF->vtable->base_type);
+        dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
 
         bignum_mul_bignum(INTERP, SELF, value, dest);
         return dest;
     }
 
     MULTI PMC *multiply(Integer value, PMC *dest) {
-        dest = pmc_new(INTERP, SELF->vtable->base_type);
+        dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
 
         bignum_mul_bignum_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
         return dest;
@@ -1193,7 +1193,7 @@
     }
 
     VTABLE PMC *multiply_int(INTVAL value, PMC *dest) {
-        dest = pmc_new(INTERP, SELF->vtable->base_type);
+        dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
 
         bignum_mul_bignum_int(INTERP, SELF, value, dest);
         return dest;
@@ -1243,7 +1243,7 @@
     METHOD PMC *pow(PMC *value) {
         /* only Integer RHS currently. TODO: check number and bignum types */
         INTVAL r = VTABLE_get_integer(INTERP, value);
-        PMC *dest = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC *dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
 
         bignum_pow_bignum_int(INTERP, SELF, r, dest);
         RETURN(PMC *dest);
@@ -1259,7 +1259,7 @@
 
     MULTI PMC *divide(BigNum value, PMC *dest) {
         BIGNUM *bn;
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bignum_div_bignum(INTERP, SELF, value, dest);
 #if 0
@@ -1275,7 +1275,7 @@
     }
 
     MULTI PMC *divide(Integer value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bignum_div_bignum_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
         return dest;
@@ -1289,14 +1289,14 @@
     }
 
     VTABLE PMC *divide_int(INTVAL value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bignum_div_bignum_int(INTERP, SELF, value, dest);
         return dest;
     }
 
     VTABLE PMC *divide_float(FLOATVAL value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bignum_div_bignum_float(INTERP, SELF, value, dest);
         return dest;
@@ -1331,14 +1331,14 @@
 */
 
     MULTI PMC *floor_divide(BigNum value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bignum_fdiv_bignum(INTERP, SELF, value, dest);
         return dest;
     }
 
     MULTI PMC *floor_divide(Integer value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bignum_fdiv_bignum_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
         return dest;
@@ -1352,7 +1352,7 @@
     }
 
     VTABLE PMC *floor_divide_int(INTVAL value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         bignum_fdiv_bignum_int(INTERP, SELF, value, dest);
         return dest;
@@ -1436,7 +1436,7 @@
 */
 
     VTABLE PMC *absolute(PMC *dest) {
-        dest = pmc_new(INTERP, SELF->vtable->base_type);
+        dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
 
         bignum_abs(INTERP, SELF, dest);
         return dest;
@@ -1460,7 +1460,7 @@
 */
 
     VTABLE PMC *neg(PMC *dest) {
-        dest = pmc_new(INTERP, SELF->vtable->base_type);
+        dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
 
         bignum_neg(INTERP, SELF, dest);
         return dest;

Modified: branches/rm_cflags/src/pmc/callcontext.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/callcontext.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/callcontext.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -257,15 +257,15 @@
 
     switch (CELL_TYPE_MASK(cell)) {
       case INTCELL:
-        result = pmc_new(interp, HLL_TYPE(enum_class_Integer));
+        result = Parrot_pmc_new(interp, HLL_TYPE(enum_class_Integer));
         VTABLE_set_integer_native(interp, result, CELL_INT(cell));
         break;
       case FLOATCELL:
-        result = pmc_new(interp, HLL_TYPE(enum_class_Float));
+        result = Parrot_pmc_new(interp, HLL_TYPE(enum_class_Float));
         VTABLE_set_number_native(interp, result, CELL_FLOAT(cell));
         break;
       case STRINGCELL:
-        result = pmc_new(interp, HLL_TYPE(enum_class_String));
+        result = Parrot_pmc_new(interp, HLL_TYPE(enum_class_String));
         VTABLE_set_string_native(interp, result, CELL_STRING(cell));
         break;
       case PMCCELL:
@@ -351,7 +351,7 @@
     /* yes, this *looks* risky, but it's a Parrot STRING hash internally */
     if (hash && hash->entries) {
         UINTVAL i, j = 0;
-        result  = pmc_new(interp, enum_class_FixedStringArray);
+        result  = Parrot_pmc_new(interp, enum_class_FixedStringArray);
         VTABLE_set_integer_native(interp, result, hash->entries);
 
         for (i = 0; i <= hash->mask; i++) {
@@ -1379,7 +1379,7 @@
         Pcc_cell    *cell;
         STRING      *short_sig;
         PMC         *type_tuple, *arg_flags, *return_flags;
-        PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
 
         GET_ATTR_positionals(INTERP, SELF, cell);
 
@@ -1461,13 +1461,13 @@
 */
 
     METHOD backtrace(PMC *resume :optional, INTVAL has_resume :opt_flag) {
-        PMC *result  = pmc_new(interp, enum_class_ResizablePMCArray);
+        PMC *result  = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
         PMC *cur_ctx = SELF;
         Parrot_Continuation_attributes *cont = has_resume ? PMC_cont(resume) : NULL;
 
         /* Get starting context, then loop over them. */
         while (cur_ctx) {
-            PMC        *frame       = pmc_new(interp, enum_class_Hash);
+            PMC        *frame       = Parrot_pmc_new(interp, enum_class_Hash);
             PMC        *annotations = NULL;
             Parrot_Sub_attributes *sub;
 
@@ -1496,7 +1496,7 @@
             }
 
             if (!annotations)
-                annotations = pmc_new(interp, enum_class_Hash);
+                annotations = Parrot_pmc_new(interp, enum_class_Hash);
 
             VTABLE_set_pmc_keyed_str(interp, frame, CONST_STRING(interp, "annotations"), annotations);
 

Modified: branches/rm_cflags/src/pmc/capture.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/capture.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/capture.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -22,13 +22,13 @@
     do { \
         GETATTR_Capture_array((i), (obj), array); \
         if (!array) \
-            SETATTR_Capture_array((i), (obj), pmc_new((i), enum_class_ResizablePMCArray)); \
+            SETATTR_Capture_array((i), (obj), Parrot_pmc_new((i), enum_class_ResizablePMCArray)); \
     } while (0)
 #define CAPTURE_hash_CREATE(i, obj) \
     do { \
         GETATTR_Capture_hash((i), (obj), hash); \
         if (!hash) \
-            SETATTR_Capture_hash((i), (obj),  pmc_new((i), enum_class_Hash)); \
+            SETATTR_Capture_hash((i), (obj),  Parrot_pmc_new((i), enum_class_Hash)); \
     } while (0)
 
 pmclass Capture auto_attrs {
@@ -61,7 +61,7 @@
 
     VTABLE PMC *clone() {
         PMC *array, *hash;
-        PMC *dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC *dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         GET_ATTR_array(INTERP, SELF, array);
         GET_ATTR_hash(INTERP, SELF, hash);
         if (array)

Modified: branches/rm_cflags/src/pmc/class.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/class.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/class.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -106,7 +106,7 @@
     /* Build a string representing the fully qualified class name. */
     /* Retrieve the fully qualified class name for the class. */
     STRING       * const fq_class    = VTABLE_get_string(interp, cur_class);
-    PMC          * const class_cache = pmc_new(interp, enum_class_Hash);
+    PMC          * const class_cache = Parrot_pmc_new(interp, enum_class_Hash);
     VTABLE_set_pmc_keyed_str(interp, cache, fq_class, class_cache);
 
     /* Iterate over the attributes. */
@@ -138,8 +138,8 @@
 {
     Parrot_Class_attributes * const _class      = PARROT_CLASS(self);
     int                  cur_index    = 0;
-    PMC * const          attrib_index = pmc_new(interp, enum_class_Hash);
-    PMC * const          cache        = pmc_new(interp, enum_class_Hash);
+    PMC * const          attrib_index = Parrot_pmc_new(interp, enum_class_Hash);
+    PMC * const          cache        = Parrot_pmc_new(interp, enum_class_Hash);
     const int            num_classes  = VTABLE_elements(interp, _class->all_parents);
     int                  i;
 
@@ -344,7 +344,7 @@
 
         if (!PMC_IS_NULL(meth)) {
             /* build an empty signature; it has an invocant but no args/retvals */
-            PMC * const sig_obj = pmc_new(interp, enum_class_CallContext);
+            PMC * const sig_obj = Parrot_pmc_new(interp, enum_class_CallContext);
             /* preserve current_object */
             PMC * const old_object = interp->current_object;
             VTABLE_set_string_native(interp, sig_obj, CONST_STRING(interp, "Pi->"));
@@ -504,18 +504,18 @@
         /* Set up the object. */
         _class->name            = CONST_STRING(interp, "");
         _class->_namespace      = PMCNULL;
-        _class->parents         = pmc_new(interp, enum_class_ResizablePMCArray);
-        _class->all_parents     = pmc_new(interp, enum_class_ResizablePMCArray);
-        _class->roles           = pmc_new(interp, enum_class_ResizablePMCArray);
-        _class->methods         = pmc_new(interp, enum_class_Hash);
-        _class->attrib_metadata = pmc_new(interp, enum_class_Hash);
+        _class->parents         = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+        _class->all_parents     = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+        _class->roles           = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+        _class->methods         = Parrot_pmc_new(interp, enum_class_Hash);
+        _class->attrib_metadata = Parrot_pmc_new(interp, enum_class_Hash);
         _class->attrib_index    = PMCNULL;
         _class->attrib_cache    = PMCNULL;
         _class->meth_cache      = PMCNULL;
-        _class->resolve_method  = pmc_new(interp, enum_class_ResizablePMCArray);
+        _class->resolve_method  = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
 
-        _class->vtable_overrides = pmc_new(interp, enum_class_Hash);
-        _class->parent_overrides = pmc_new(interp, enum_class_Hash);
+        _class->vtable_overrides = Parrot_pmc_new(interp, enum_class_Hash);
+        _class->parent_overrides = Parrot_pmc_new(interp, enum_class_Hash);
 
         /* We put ourself on the all parents list. */
         VTABLE_push_pmc(interp, _class->all_parents, SELF);
@@ -542,7 +542,7 @@
           case enum_class_ResizableStringArray:
           case enum_class_NameSpace:
             /* set only the name property */
-            arg = pmc_new(interp, enum_class_Hash);
+            arg = Parrot_pmc_new(interp, enum_class_Hash);
             VTABLE_set_pmc_keyed_str(interp, arg, name_str, init_data);
             break;
 
@@ -556,7 +556,7 @@
              || VTABLE_isa(interp, init_data, CONST_STRING(interp, "Key"))
              || VTABLE_isa(interp, init_data, CONST_STRING(interp, "ResizableStringArray"))) {
                 /* set only the name property */
-                arg = pmc_new(interp, enum_class_Hash);
+                arg = Parrot_pmc_new(interp, enum_class_Hash);
                 VTABLE_set_pmc_keyed_str(interp, arg, name_str, init_data);
             }
 
@@ -631,7 +631,7 @@
 
     VTABLE void add_attribute(STRING *name, PMC *type) {
         Parrot_Class_attributes * const _class        = PARROT_CLASS(SELF);
-        PMC          * const new_attribute = pmc_new(interp, enum_class_Hash);
+        PMC          * const new_attribute = Parrot_pmc_new(interp, enum_class_Hash);
 
         /* If we've been instantiated already, not allowed. */
         if (_class->instantiated)
@@ -960,11 +960,11 @@
             found = _class->parents;
         }
         else if (Parrot_str_equal(interp, what, CONST_STRING(interp, "name"))) {
-            found = pmc_new(interp, enum_class_String);
+            found = Parrot_pmc_new(interp, enum_class_String);
             VTABLE_set_string_native(interp, found, _class->name);
         }
         else if (Parrot_str_equal(interp, what, CONST_STRING(interp, "id"))) {
-            found = pmc_new(interp, enum_class_Integer);
+            found = Parrot_pmc_new(interp, enum_class_Integer);
             VTABLE_set_integer_native(interp, found, _class->id);
         }
         else if (Parrot_str_equal(interp, what, CONST_STRING(interp, "namespace"))) {
@@ -987,7 +987,7 @@
             found = _class->roles;
         }
         else if (Parrot_str_equal(interp, what, CONST_STRING(interp, "flags"))) {
-            found = pmc_new(interp, enum_class_Integer);
+            found = Parrot_pmc_new(interp, enum_class_Integer);
             VTABLE_set_integer_native(interp, found,
                 (INTVAL)PObj_get_FLAGS(SELF));
         }
@@ -1002,7 +1002,7 @@
         if (found->vtable->base_type == enum_class_Hash) {
             /* for Hash return values, create and return a shallow
              * clone because the VTABLE_clone does a deep clone */
-            PMC * const hash  = pmc_new(interp, enum_class_Hash);
+            PMC * const hash  = Parrot_pmc_new(interp, enum_class_Hash);
             PMC * const iter  = VTABLE_get_iter(interp, found);
             while (VTABLE_get_bool(interp, iter)) {
                 STRING * const key   = VTABLE_shift_string(interp, iter);
@@ -1029,7 +1029,7 @@
     VTABLE PMC *inspect() {
         /* Create a hash, then use inspect_str to get all of the data to
          * fill it up with. */
-        PMC    * const metadata    = pmc_new(interp, enum_class_Hash);
+        PMC    * const metadata    = Parrot_pmc_new(interp, enum_class_Hash);
         STRING * const name_str    = CONST_STRING(interp, "name");
         STRING * const ns_str      = CONST_STRING(interp, "namespace");
         STRING * const attrs_str   = CONST_STRING(interp, "attributes");
@@ -1191,7 +1191,7 @@
         _class->instantiated = 1;
 
         /* Create object. */
-        object = pmc_new_noinit(interp, enum_class_Object);
+        object = Parrot_pmc_new_noinit(interp, enum_class_Object);
 
         /* Set custom GC mark and destroy on the object. */
         PObj_custom_mark_destroy_SETALL(object);
@@ -1207,7 +1207,7 @@
             Parrot_Object_attributes * const objattr =
                 PMC_data_typed(object, Parrot_Object_attributes *);
             objattr->_class       = SELF;
-            objattr->attrib_store = pmc_new(interp, enum_class_ResizablePMCArray);
+            objattr->attrib_store = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
         }
 
         if (!PMC_IS_NULL(init)) {
@@ -1537,7 +1537,7 @@
 
 This is just a temporary hack. Type ID numbers shouldn't be externally
 visible to the average PIR user. However, we need this for now to interface
-with functions like pmc_new and pmc_reuse, which take type ID numbers still.
+with functions like Parrot_pmc_new and pmc_reuse, which take type ID numbers still.
 
 =cut
 
@@ -1563,7 +1563,7 @@
 
         /* Recalculate full MRO from thawed parents */
         _class->all_parents         = Parrot_ComputeMRO_C3(interp, SELF);
-        _class->parent_overrides    = pmc_new(interp, enum_class_Hash);
+        _class->parent_overrides    = Parrot_pmc_new(interp, enum_class_Hash);
 
         /* Rebuild attribute index from thawed attribute metadata */
         build_attrib_index(interp, SELF);
@@ -1591,7 +1591,7 @@
         if (has_name) {
             /* We'll build a hash just containing the name, then give this to
              * init_class_from_hash - saves some code duplication. */
-            PMC    * const naming_hash = pmc_new(interp, enum_class_Hash);
+            PMC    * const naming_hash = Parrot_pmc_new(interp, enum_class_Hash);
             STRING * const name_str    = CONST_STRING(interp, "name");
 
             VTABLE_set_string_keyed_str(interp, naming_hash, name_str, name);

Modified: branches/rm_cflags/src/pmc/codestring.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/codestring.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/codestring.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -189,7 +189,7 @@
         INTVAL  eos;
         INTVAL  jpos;
 
-        linepos = pmc_new(INTERP, enum_class_ResizableIntegerArray);
+        linepos = Parrot_pmc_new(INTERP, enum_class_ResizableIntegerArray);
         /* get the string itself */
         GET_ATTR_str_val(INTERP, SELF, str);
         eos  = Parrot_str_byte_length(INTERP, str);

Modified: branches/rm_cflags/src/pmc/complex.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/complex.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/complex.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -234,7 +234,7 @@
 */
     VTABLE opcode_t *invoke(void *next) {
         const int   argcP = REG_INT(interp, 3);
-        PMC * const res   = pmc_new(INTERP, enum_class_Complex);
+        PMC * const res   = Parrot_pmc_new(INTERP, enum_class_Complex);
 
         if (argcP == 1) {
             PMC * const arg = REG_PMC(interp, 5);
@@ -316,7 +316,7 @@
     }
 
     VTABLE PMC *clone() {
-        PMC * const dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         FLOATVAL re, im;
 
         GET_ATTR_re(INTERP, SELF, re);
@@ -436,7 +436,7 @@
     }
 
     VTABLE PMC *get_pmc_keyed_str(STRING *key) {
-        PMC * const    ret = pmc_new(INTERP, enum_class_Float);
+        PMC * const    ret = Parrot_pmc_new(INTERP, enum_class_Float);
         const FLOATVAL val = SELF.get_number_keyed_str(key);
         VTABLE_set_number_native(INTERP, ret, val);
         return ret;
@@ -453,7 +453,7 @@
 */
 
     VTABLE PMC *get_pmc_keyed_int(INTVAL key) {
-        PMC * const    ret = pmc_new(INTERP, enum_class_Float);
+        PMC * const    ret = Parrot_pmc_new(INTERP, enum_class_Float);
         const FLOATVAL val = SELF.get_number_keyed_int(key);
         VTABLE_set_number_native(INTERP, ret, val);
         return ret;
@@ -635,7 +635,7 @@
 
     MULTI PMC *add(Complex value, PMC *dest) {
         FLOATVAL self_re, self_im, val_re, val_im;
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         GET_ATTR_re(INTERP, SELF, self_re);
         GET_ATTR_im(INTERP, SELF, self_im);
@@ -651,7 +651,7 @@
 
     MULTI PMC *add(DEFAULT value, PMC *dest) {
         FLOATVAL re, im;
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         GET_ATTR_re(INTERP, SELF, re);
         GET_ATTR_im(INTERP, SELF, im);
@@ -667,7 +667,7 @@
 
     VTABLE PMC *add_float(FLOATVAL value, PMC *dest) {
         FLOATVAL re, im;
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         GET_ATTR_re(INTERP, SELF, re);
         GET_ATTR_im(INTERP, SELF, im);
@@ -724,7 +724,7 @@
 
     MULTI PMC *subtract(Complex value, PMC *dest) {
         FLOATVAL self_re, self_im, val_re, val_im;
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         GET_ATTR_re(INTERP, SELF, self_re);
         GET_ATTR_im(INTERP, SELF, self_im);
@@ -740,7 +740,7 @@
 
     MULTI PMC *subtract(DEFAULT value, PMC *dest) {
         FLOATVAL re, im;
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         GET_ATTR_re(INTERP, SELF, re);
         GET_ATTR_im(INTERP, SELF, im);
@@ -756,7 +756,7 @@
 
     VTABLE PMC *subtract_float(FLOATVAL value, PMC *dest) {
         FLOATVAL re, im;
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         GET_ATTR_re(INTERP, SELF, re);
         GET_ATTR_im(INTERP, SELF, im);
@@ -827,7 +827,7 @@
     MULTI PMC *multiply(Complex value, PMC *dest) {
         FLOATVAL a, b, c, d;
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         GET_ATTR_re(INTERP, SELF, a);
         GET_ATTR_im(INTERP, SELF, b);
@@ -841,7 +841,7 @@
 
     MULTI PMC *multiply(DEFAULT value, PMC *dest) {
         FLOATVAL re, im;
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         GET_ATTR_re(INTERP, SELF, re);
         GET_ATTR_im(INTERP, SELF, im);
@@ -857,7 +857,7 @@
 
     VTABLE PMC *multiply_float(FLOATVAL value, PMC *dest) {
         FLOATVAL re, im;
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         GET_ATTR_re(INTERP, SELF, re);
         GET_ATTR_im(INTERP, SELF, im);
@@ -940,7 +940,7 @@
         FLOATVAL self_re, self_im, val_re, val_im;
 
         complex_check_divide_zero(INTERP, value);
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         GET_ATTR_re(INTERP, SELF, self_re);
         GET_ATTR_im(INTERP, SELF, self_im);
@@ -970,7 +970,7 @@
         FLOATVAL re, im;
         const FLOATVAL d = VTABLE_get_number(INTERP, value);
         float_check_divide_zero(INTERP, d);
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         GET_ATTR_re(INTERP, SELF, re);
         GET_ATTR_im(INTERP, SELF, im);
@@ -984,7 +984,7 @@
     VTABLE PMC *divide_int(INTVAL value, PMC *dest) {
         FLOATVAL re, im;
         int_check_divide_zero(INTERP, value);
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         GET_ATTR_re(INTERP, SELF, re);
         GET_ATTR_im(INTERP, SELF, im);
@@ -998,7 +998,7 @@
     VTABLE PMC *divide_float(FLOATVAL value, PMC *dest) {
         FLOATVAL re, im;
         float_check_divide_zero(INTERP, value);
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         GET_ATTR_re(INTERP, SELF, re);
         GET_ATTR_im(INTERP, SELF, im);
@@ -1085,7 +1085,7 @@
 
     VTABLE PMC *neg(PMC *dest) {
         FLOATVAL re, im;
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         GET_ATTR_re(INTERP, SELF, re);
         GET_ATTR_im(INTERP, SELF, im);
@@ -1164,7 +1164,7 @@
         GET_ATTR_im(INTERP, SELF, im);
         d = sqrt(re*re + im*im);
 
-        dest = pmc_new(INTERP,
+        dest = Parrot_pmc_new(INTERP,
             Parrot_get_ctx_HLL_type(INTERP, enum_class_Float));
 
         VTABLE_set_number_native(INTERP, dest, d);
@@ -1176,7 +1176,7 @@
         GET_ATTR_re(INTERP, SELF, re);
         GET_ATTR_im(INTERP, SELF, im);
         d = sqrt(re*re + im*im);
-        pmc_reuse(INTERP, SELF, enum_class_Float, 0);
+        Parrot_pmc_reuse(INTERP, SELF, enum_class_Float, 0);
         VTABLE_set_number_native(INTERP, SELF, d);
     }
 
@@ -1202,7 +1202,7 @@
 */
 
     METHOD ln() {
-        PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         FLOATVAL re, im, result_re, result_im;
         GET_ATTR_re(INTERP, SELF, re);
         GET_ATTR_im(INTERP, SELF, im);
@@ -1236,7 +1236,7 @@
 */
 
     METHOD exp() {
-        PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         FLOATVAL re, im, f;
         GET_ATTR_re(INTERP, SELF, re);
         GET_ATTR_im(INTERP, SELF, im);
@@ -1290,7 +1290,7 @@
 */
 
     METHOD sin() {
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         FLOATVAL re, im, result_re, result_im;
         GET_ATTR_re(INTERP, SELF, re);
         GET_ATTR_im(INTERP, SELF, im);
@@ -1320,7 +1320,7 @@
     }
 
     METHOD cos() {
-        PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         FLOATVAL re, im, result_re, result_im;
         GET_ATTR_re(INTERP, SELF, re);
         GET_ATTR_im(INTERP, SELF, im);
@@ -1345,8 +1345,8 @@
     }
 
     METHOD tan() {
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-        PMC * const e = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const e = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         (PMC *d) = PCCINVOKE(INTERP, SELF, "sin");
         (PMC *e) = PCCINVOKE(INTERP, SELF, "cos");
@@ -1357,8 +1357,8 @@
     }
 
     METHOD cot() {
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-        PMC * const e = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const e = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         (PMC *d) = PCCINVOKE(INTERP, SELF, "cos");
         (PMC *e) = PCCINVOKE(INTERP, SELF, "sin");
 
@@ -1368,8 +1368,8 @@
     }
 
     METHOD sec() {
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-        PMC * const e = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const e = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         SET_ATTR_re(INTERP, d, 1.0);
         SET_ATTR_im(INTERP, d, 0.0);
         (PMC *e) = PCCINVOKE(INTERP, SELF, "cos");
@@ -1380,8 +1380,8 @@
     }
 
     METHOD csc() {
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-        PMC * const e = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const e = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         SET_ATTR_re(INTERP, d, 1.0);
         SET_ATTR_im(INTERP, d, 0.0);
@@ -1428,8 +1428,8 @@
 
     METHOD asin() {
         FLOATVAL d_re, d_im, e_re, e_im, self_re, self_im;
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-        PMC *       e = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC *       e = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         GET_ATTR_re(INTERP, SELF, self_re);
         GET_ATTR_im(INTERP, SELF, self_im);
 
@@ -1456,8 +1456,8 @@
 
     METHOD acos() {
         FLOATVAL d_re, d_im, e_re, e_im, self_re, self_im;
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-        PMC *       e = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC *       e = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         GET_ATTR_re(INTERP, SELF, self_re);
         GET_ATTR_im(INTERP, SELF, self_im);
 
@@ -1483,8 +1483,8 @@
     }
 
     METHOD atan() {
-        PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-        PMC * const e  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const e  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         FLOATVAL re, im, d_re, d_im;
         GET_ATTR_re(INTERP, SELF, re);
         GET_ATTR_im(INTERP, SELF, im);
@@ -1507,7 +1507,7 @@
     }
 
     METHOD acot() {
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         PMC     *e;
         FLOATVAL re, im;
         GET_ATTR_re(INTERP, SELF, re);
@@ -1521,7 +1521,7 @@
     }
 
     METHOD acsc() {
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         PMC     *e;
         FLOATVAL re, im;
         GET_ATTR_re(INTERP, SELF, re);
@@ -1535,7 +1535,7 @@
     }
 
     METHOD asec() {
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         PMC     *e;
         FLOATVAL re, im;
         GET_ATTR_re(INTERP, SELF, re);
@@ -1569,7 +1569,7 @@
 */
 
     METHOD sinh() {
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         FLOATVAL re, im;
         GET_ATTR_re(INTERP, SELF, re);
         GET_ATTR_im(INTERP, SELF, im);
@@ -1581,7 +1581,7 @@
     }
 
     METHOD cosh() {
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         FLOATVAL re, im;
         GET_ATTR_re(INTERP, SELF, re);
         GET_ATTR_im(INTERP, SELF, im);
@@ -1598,8 +1598,8 @@
     }
 
     METHOD tanh() {
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-        PMC * const e = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const e = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         (PMC *d) = PCCINVOKE(INTERP, SELF, "sinh");
         (PMC *e) = PCCINVOKE(INTERP, SELF, "cosh");
@@ -1611,7 +1611,7 @@
 
     METHOD coth() {
         FLOATVAL re, im;
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         (PMC *d) = PCCINVOKE(INTERP, SELF, "tanh");
         GET_ATTR_re(INTERP, d, re);
@@ -1625,7 +1625,7 @@
 
     METHOD csch() {
         FLOATVAL re, im;
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         (PMC *d) = PCCINVOKE(INTERP, SELF, "sinh");
         GET_ATTR_re(INTERP, d, re);
@@ -1639,7 +1639,7 @@
 
     METHOD sech() {
         FLOATVAL re, im;
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         (PMC *d) = PCCINVOKE(INTERP, SELF, "cosh");
         GET_ATTR_re(INTERP, d, re);
@@ -1681,8 +1681,8 @@
 
     METHOD asinh() {
         FLOATVAL re, im;
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-        PMC * const e = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const e = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         GET_ATTR_re(INTERP, SELF, re);
         GET_ATTR_im(INTERP, SELF, im);
@@ -1700,8 +1700,8 @@
 
     METHOD acosh() {
         FLOATVAL re, im;
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-        PMC * const e = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const e = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         (PMC *d) = PCCINVOKE(INTERP, SELF, "acos");
         GET_ATTR_re(INTERP, d, re);
@@ -1714,8 +1714,8 @@
 
     METHOD atanh() {
         FLOATVAL re, im;
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-        PMC * const e = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const e = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         GET_ATTR_re(INTERP, SELF, re);
         GET_ATTR_im(INTERP, SELF, im);
@@ -1732,7 +1732,7 @@
     }
 
     METHOD acoth() {
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         PMC     *e;
         FLOATVAL re, im;
         GET_ATTR_re(INTERP, SELF, re);
@@ -1746,7 +1746,7 @@
     }
 
     METHOD acsch() {
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         PMC     *e;
         FLOATVAL re, im;
         GET_ATTR_re(INTERP, SELF, re);
@@ -1760,7 +1760,7 @@
     }
 
     METHOD asech() {
-        PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         PMC     *e;
         FLOATVAL re, im;
         GET_ATTR_re(INTERP, SELF, re);
@@ -1796,9 +1796,9 @@
 */
 
     METHOD pow(PMC * value) {
-        PMC *l = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC *l = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         PMC *log;
-        PMC *dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC *dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         Parrot_pcc_invoke_method_from_c_args(interp, SELF, CONST_STRING(interp, "ln"),
                     "->P", &log);
@@ -1811,7 +1811,7 @@
     }
 
     METHOD sqrt() {
-        PMC * const result = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const result = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         const FLOATVAL absval = SELF.get_number();
         FLOATVAL sx, sy, rx, ry;
         GET_ATTR_re(INTERP, SELF, sx);

Modified: branches/rm_cflags/src/pmc/continuation.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/continuation.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/continuation.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -157,7 +157,7 @@
 
     VTABLE PMC *clone() {
         /* Start to prepare for subclassable continuations */
-        return pmc_new_init(INTERP, SELF->vtable->base_type, SELF);
+        return Parrot_pmc_new_init(INTERP, SELF->vtable->base_type, SELF);
     }
 
 /*

Modified: branches/rm_cflags/src/pmc/coroutine.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/coroutine.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/coroutine.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -97,7 +97,7 @@
 
     VTABLE PMC *clone() {
         STRING     *name;
-        PMC * const ret = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC * const ret = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
 
         PObj_custom_mark_destroy_SETALL(ret);
 
@@ -164,7 +164,7 @@
 
             /* first time set current sub, cont, object */
             if (PMC_IS_NULL(ctx))
-                ctx = pmc_new(INTERP, enum_class_CallContext);
+                ctx = Parrot_pmc_new(INTERP, enum_class_CallContext);
 
             CURRENT_CONTEXT(INTERP) = ctx;
 
@@ -189,7 +189,7 @@
             /* create pad if needed */
             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);
+                PMC * const lexpad = Parrot_pmc_new_init(INTERP, hlltype, lex_info);
                 Parrot_pcc_set_lex_pad(INTERP, ctx, lexpad);
                 VTABLE_set_pointer(INTERP, lexpad, ctx);
             }

Modified: branches/rm_cflags/src/pmc/cpointer.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/cpointer.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/cpointer.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -99,7 +99,7 @@
 */
 
     VTABLE PMC *clone() {
-        PMC * const dest = pmc_new_noinit(INTERP, SELF->vtable->base_type);
+        PMC * const dest = Parrot_pmc_new_noinit(INTERP, SELF->vtable->base_type);
         void       *ptr;
         STRING     *sig;
 

Modified: branches/rm_cflags/src/pmc/default.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/default.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/default.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -148,7 +148,7 @@
 static void
 propagate_std_props(PARROT_INTERP, PMC *self, PMC *prop_hash) {
     if (self->vtable->flags & (VTABLE_IS_CONST_FLAG | VTABLE_IS_READONLY_FLAG)){
-        PMC * const pmc_true  = pmc_new(interp, enum_class_Integer);
+        PMC * const pmc_true  = Parrot_pmc_new(interp, enum_class_Integer);
         VTABLE_set_integer_native(interp, pmc_true, 1);
         VTABLE_set_pmc_keyed_str(interp, prop_hash, CONST_STRING(interp, "_ro"), pmc_true);
     }
@@ -189,7 +189,7 @@
 check_get_std_props(PARROT_INTERP, PMC *self, STRING *key) {
     if ((self->vtable->flags & (VTABLE_IS_CONST_FLAG | VTABLE_IS_READONLY_FLAG))
        && Parrot_str_equal(interp, key, CONST_STRING(interp, "_ro"))) {
-        PMC * const ret_val  = pmc_new(interp, enum_class_Integer);
+        PMC * const ret_val  = Parrot_pmc_new(interp, enum_class_Integer);
         VTABLE_set_integer_native(interp, ret_val, 1);
         return ret_val;
     }
@@ -214,7 +214,7 @@
 make_prop_hash(PARROT_INTERP, PMC *self) {
     PMC *prop;
 
-    PMC_metadata(self) = prop = pmc_new(interp, enum_class_Hash);
+    PMC_metadata(self) = prop = Parrot_pmc_new(interp, enum_class_Hash);
     propagate_std_props(interp, self, prop);
     return prop;
 }
@@ -332,16 +332,16 @@
     VTABLE PMC *instantiate(PMC *init) {
         const INTVAL type = VTABLE_type(INTERP, SELF);
 
-        /* Ensure no looping, as pmc_new calls the instantiate vtable entry for
+        /* Ensure no looping, as Parrot_pmc_new calls the instantiate vtable entry for
          * classes. */
         if (PObj_is_class_TEST(SELF))
             Parrot_ex_throw_from_c_args(interp, NULL, 1,
                     "All high-level classes should override instantiate");
 
         if (!PMC_IS_NULL(init))
-            return pmc_new_init(INTERP, type, init);
+            return Parrot_pmc_new_init(INTERP, type, init);
 
-        return pmc_new(INTERP, type);
+        return Parrot_pmc_new(INTERP, type);
     }
 
 /*
@@ -612,7 +612,7 @@
         STRING * const undef = CONST_STRING(INTERP, "Undef");
 
         if (VTABLE_isa(INTERP, value, undef))
-            pmc_reuse(INTERP, SELF, value->vtable->base_type, 0);
+            Parrot_pmc_reuse(INTERP, SELF, value->vtable->base_type, 0);
         else
             SELF.set_pmc(value);
     }
@@ -632,7 +632,7 @@
 */
 
     VTABLE void morph(PMC* type) {
-        pmc_reuse(INTERP, SELF, VTABLE_get_integer(interp, type), 0);
+        Parrot_pmc_reuse(INTERP, SELF, VTABLE_get_integer(interp, type), 0);
     }
 
 /*
@@ -936,7 +936,7 @@
 
     VTABLE PMC *inspect_str(STRING *name) {
         if (Parrot_str_equal(interp, name, CONST_STRING(interp, "flags"))) {
-            PMC *found = pmc_new(interp, enum_class_Integer);
+            PMC *found = Parrot_pmc_new(interp, enum_class_Integer);
             VTABLE_set_integer_native(interp, found,
                     (INTVAL)PObj_get_FLAGS(SELF));
             return found;
@@ -960,7 +960,7 @@
 
 */
     VTABLE PMC *inspect() {
-        PMC    *metadata           = pmc_new(interp, enum_class_Hash);
+        PMC    *metadata           = Parrot_pmc_new(interp, enum_class_Hash);
         STRING * const flags_str   = CONST_STRING(interp, "flags");
 
         VTABLE_set_pmc_keyed_str(interp, metadata, flags_str,
@@ -987,9 +987,9 @@
 
         if (PMC_IS_NULL(_class)) {
             INTVAL type      = VTABLE_type(interp, SELF);
-            PMC   *type_num  = pmc_new(interp, enum_class_Integer);
+            PMC   *type_num  = Parrot_pmc_new(interp, enum_class_Integer);
             VTABLE_set_integer_native(interp, type_num, type);
-            return pmc_new_init(interp, enum_class_PMCProxy, type_num);
+            return Parrot_pmc_new_init(interp, enum_class_PMCProxy, type_num);
         }
 
         return _class;
@@ -1158,7 +1158,7 @@
 */
 
     VTABLE PMC *add_float(FLOATVAL value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_number_native(INTERP, dest,
                 SELF.get_number() + value);

Modified: branches/rm_cflags/src/pmc/env.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/env.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/env.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -74,7 +74,7 @@
 */
 
     VTABLE PMC *get_iter() {
-        return pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
+        return Parrot_pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
     }
 
 /*
@@ -215,7 +215,7 @@
         if (!retval)
             retval = string_from_literal(INTERP, "");
 
-        return_pmc = pmc_new(INTERP, enum_class_String);
+        return_pmc = Parrot_pmc_new(INTERP, enum_class_String);
 
         VTABLE_set_string_native(INTERP, return_pmc, retval);
         return return_pmc;

Modified: branches/rm_cflags/src/pmc/exception.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/exception.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/exception.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -541,30 +541,30 @@
         if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "type"))) {
                 INTVAL type;
                 GET_ATTR_type(interp, SELF, type);
-                value = pmc_new(interp, enum_class_Integer);
+                value = Parrot_pmc_new(interp, enum_class_Integer);
                 VTABLE_set_integer_native(interp, value, type);
         }
         else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "severity"))) {
                 INTVAL severity;
                 GET_ATTR_severity(interp, SELF, severity);
-                value = pmc_new(interp, enum_class_Integer);
+                value = Parrot_pmc_new(interp, enum_class_Integer);
                 VTABLE_set_integer_native(interp, value, severity);
         }
         else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "exit_code"))) {
                 INTVAL exit_code;
                 GET_ATTR_exit_code(interp, SELF, exit_code);
-                value = pmc_new(interp, enum_class_Integer);
+                value = Parrot_pmc_new(interp, enum_class_Integer);
                 VTABLE_set_integer_native(interp, value, exit_code);
         }
         else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "handled"))) {
                 INTVAL handled;
                 GET_ATTR_handled(interp, SELF, handled);
-                value = pmc_new(interp, enum_class_Integer);
+                value = Parrot_pmc_new(interp, enum_class_Integer);
                 VTABLE_set_integer_native(interp, value, handled);
         }
         else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "message"))) {
                 STRING *message = SELF.get_string();
-                value = pmc_new(interp, enum_class_String);
+                value = Parrot_pmc_new(interp, enum_class_String);
                 VTABLE_set_string_native(interp, value, message);
         }
         else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "payload"))) {
@@ -709,7 +709,7 @@
         /* If we didn't have a key specified and we found no annotations to
          * return, should return an empty hash. */
         if (!have_name && PMC_IS_NULL(result))
-            result = pmc_new(interp, enum_class_Hash);
+            result = Parrot_pmc_new(interp, enum_class_Hash);
 
         RETURN(PMC *result);
     }

Modified: branches/rm_cflags/src/pmc/exporter.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/exporter.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/exporter.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -231,7 +231,7 @@
 
         if (got_glb) {
             STRING * const s_empty      = CONST_STRING(interp, "");
-            PMC           *temp_globals = pmc_new(interp, enum_class_Hash);
+            PMC           *temp_globals = Parrot_pmc_new(interp, enum_class_Hash);
 
             if (PMC_IS_NULL(glb)) {
                 temp_globals = PMCNULL;

Modified: branches/rm_cflags/src/pmc/fixedbooleanarray.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/fixedbooleanarray.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/fixedbooleanarray.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -90,7 +90,7 @@
     VTABLE PMC *clone() {
         unsigned char * my_bit_array, * clone_bit_array;
         UINTVAL         resize_threshold, size;
-        PMC *   const   dest   = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC *   const   dest   = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
 
         GET_ATTR_bit_array(INTERP, SELF, my_bit_array);
         GET_ATTR_size(INTERP, SELF, size);
@@ -296,7 +296,7 @@
 */
 
     VTABLE PMC *get_pmc_keyed_int(INTVAL key) {
-        PMC  * const ret = pmc_new(INTERP, enum_class_Boolean);
+        PMC  * const ret = Parrot_pmc_new(INTERP, enum_class_Boolean);
         const INTVAL val = SELF.get_integer_keyed_int(key);
         VTABLE_set_integer_native(INTERP, ret, val);
         return ret;
@@ -427,7 +427,7 @@
 
     VTABLE void set_string_keyed_int(INTVAL key, STRING *value) {
         INTVAL tempInt;
-        PMC * const tempPMC = pmc_new(INTERP, enum_class_Boolean);
+        PMC * const tempPMC = Parrot_pmc_new(INTERP, enum_class_Boolean);
 
         VTABLE_set_string_native(INTERP, tempPMC, value);
         tempInt = VTABLE_get_integer(INTERP, tempPMC);
@@ -493,7 +493,7 @@
 */
 
     VTABLE PMC *get_iter() {
-        return pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
+        return Parrot_pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
     }
 
 

Modified: branches/rm_cflags/src/pmc/fixedfloatarray.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/fixedfloatarray.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/fixedfloatarray.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -60,7 +60,7 @@
         INTVAL    size;
         FLOATVAL *self_float_array, *dest_float_array;
         size_t mem_size;
-        PMC   * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC   * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
         GET_ATTR_float_array(INTERP, SELF, self_float_array);
 
         if (!self_float_array)
@@ -89,7 +89,7 @@
 */
 
     VTABLE PMC *get_iter() {
-        return pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
+        return Parrot_pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
     }
 
 /*
@@ -248,7 +248,7 @@
 */
 
     VTABLE PMC *get_pmc_keyed_int(INTVAL key) {
-        PMC    * const ret = pmc_new(INTERP, enum_class_Float);
+        PMC    * const ret = Parrot_pmc_new(INTERP, enum_class_Float);
         const FLOATVAL val = SELF.get_number_keyed_int(key);
 
         VTABLE_set_number_native(INTERP, ret, val);
@@ -374,7 +374,7 @@
 
     VTABLE void set_string_keyed_int(INTVAL key, STRING *value) {
         FLOATVAL tempNum;
-        PMC * const tempPMC = pmc_new(INTERP, enum_class_Float);
+        PMC * const tempPMC = Parrot_pmc_new(INTERP, enum_class_Float);
 
         VTABLE_set_string_native(INTERP, tempPMC, value);
         tempNum = VTABLE_get_number(INTERP, tempPMC);

Modified: branches/rm_cflags/src/pmc/fixedintegerarray.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/fixedintegerarray.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/fixedintegerarray.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -81,8 +81,8 @@
         INTVAL * int_array;
         PMC    * const dest =
             PObj_constant_TEST(SELF)
-                ? constant_pmc_new(INTERP, SELF->vtable->base_type)
-                : pmc_new(INTERP, SELF->vtable->base_type);
+                ? Parrot_pmc_new_constant(INTERP, SELF->vtable->base_type)
+                : Parrot_pmc_new(INTERP, SELF->vtable->base_type);
 
         GET_ATTR_int_array(INTERP, SELF, int_array);
 
@@ -294,7 +294,7 @@
 */
 
     VTABLE PMC *get_pmc_keyed_int(INTVAL key) {
-        PMC  * const ret = pmc_new(INTERP, enum_class_Integer);
+        PMC  * const ret = Parrot_pmc_new(INTERP, enum_class_Integer);
         const INTVAL val = SELF.get_integer_keyed_int(key);
         VTABLE_set_integer_native(INTERP, ret, val);
         return ret;
@@ -422,10 +422,10 @@
 
     VTABLE void set_string_keyed_int(INTVAL key, STRING *value) {
         INTVAL tempInt;
-        PMC  * const tempPMC = temporary_pmc_new(INTERP, enum_class_Integer);
+        PMC  * const tempPMC = Parrot_pmc_new_temporary(INTERP, enum_class_Integer);
         VTABLE_set_string_native(INTERP, tempPMC, value);
         tempInt        = VTABLE_get_integer(INTERP, tempPMC);
-        temporary_pmc_free(interp, tempPMC);
+        Parrot_pmc_free_temporary(interp, tempPMC);
         SELF.set_integer_keyed_int(key, tempInt);
     }
 
@@ -532,7 +532,7 @@
 */
 
     VTABLE PMC *get_iter() {
-        return pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
+        return Parrot_pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
     }
 
 /*

Modified: branches/rm_cflags/src/pmc/fixedpmcarray.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/fixedpmcarray.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/fixedpmcarray.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -102,7 +102,7 @@
 */
 
     VTABLE PMC *clone() {
-        PMC * const dest  = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC * const dest  = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
         const INTVAL size = PMC_size(SELF);
 
         if (size) {
@@ -346,7 +346,7 @@
         box = SELF.get_pmc_keyed_int(k);
 
         if (box == NULL)
-            box = pmc_new(INTERP, enum_class_Undef);
+            box = Parrot_pmc_new(INTERP, enum_class_Undef);
 
         return VTABLE_get_pmc_keyed(INTERP, box, nextkey);
     }
@@ -418,7 +418,7 @@
 */
 
     VTABLE void set_integer_keyed_int(INTVAL key, INTVAL value) {
-        PMC * const val = pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
+        PMC * const val = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
                     enum_class_Integer));
 
         VTABLE_set_integer_native(INTERP, val, value);
@@ -436,7 +436,7 @@
 */
 
     VTABLE void set_integer_keyed(PMC *key, INTVAL value) {
-        PMC * const val = pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
+        PMC * const val = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
                     enum_class_Integer));
 
         VTABLE_set_integer_native(INTERP, val, value);
@@ -457,7 +457,7 @@
 */
 
     VTABLE void set_number_keyed_int(INTVAL key, FLOATVAL value) {
-        PMC * const val = pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
+        PMC * const val = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
                     enum_class_Float));
 
         VTABLE_set_number_native(INTERP, val, value);
@@ -487,7 +487,7 @@
 
             /* TT #1295: autovivify an Array and insert it in SELF */
             if (!box)
-                box = pmc_new(INTERP, SELF.type());
+                box = Parrot_pmc_new(INTERP, SELF.type());
 
             VTABLE_set_number_keyed(INTERP, box, nextkey, value);
         }
@@ -504,7 +504,7 @@
 */
 
     VTABLE void set_string_keyed_int(INTVAL key, STRING *value) {
-        PMC * const val = pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
+        PMC * const val = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
                     enum_class_String));
 
         VTABLE_set_string_native(INTERP, val, value);
@@ -523,7 +523,7 @@
 */
 
     VTABLE void set_string_keyed(PMC *key, STRING *value) {
-        PMC * const val = pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
+        PMC * const val = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
                     enum_class_String));
 
         VTABLE_set_string_native(INTERP, val, value);
@@ -575,7 +575,7 @@
 
             /* TT #1295: autovivify an Array and insert it in SELF */
             if (!box)
-                box = pmc_new(INTERP, SELF.type());
+                box = Parrot_pmc_new(INTERP, SELF.type());
 
             VTABLE_set_pmc_keyed(INTERP, box, nextkey, value);
         }
@@ -632,7 +632,7 @@
 */
 
     VTABLE PMC *get_iter() {
-        return pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
+        return Parrot_pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
     }
 
 /*

Modified: branches/rm_cflags/src/pmc/fixedstringarray.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/fixedstringarray.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/fixedstringarray.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -76,7 +76,7 @@
     VTABLE PMC *clone() {
 
         STRING    **my_str_array, **dest_str_array;
-        PMC        *const dest = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC        *const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
 
         GET_ATTR_str_array(INTERP, SELF, my_str_array);
 
@@ -150,7 +150,7 @@
 
 */
     VTABLE PMC *get_iter() {
-        return pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
+        return Parrot_pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
     }
 
 /*
@@ -296,7 +296,7 @@
 */
 
     VTABLE PMC *get_pmc_keyed_int(INTVAL key) {
-        PMC    * const ret = pmc_new(INTERP, enum_class_String);
+        PMC    * const ret = Parrot_pmc_new(INTERP, enum_class_String);
         STRING * const val = SELF.get_string_keyed_int(key);
 
         VTABLE_set_string_native(INTERP, ret, val);

Modified: branches/rm_cflags/src/pmc/float.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/float.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/float.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -47,7 +47,7 @@
 
     VTABLE PMC *clone() {
         FLOATVAL fv;
-        PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
         GET_ATTR_fv(INTERP, SELF, fv);
         SET_ATTR_fv(INTERP, dest, fv);
         return dest;
@@ -134,12 +134,12 @@
 */
 
     VTABLE void set_integer_native(INTVAL value) {
-        pmc_reuse(INTERP, SELF, enum_class_Integer, 0);
+        Parrot_pmc_reuse(INTERP, SELF, enum_class_Integer, 0);
         SELF.set_integer_native(value);
     }
 
     VTABLE void set_bool(INTVAL value) {
-        pmc_reuse(INTERP, SELF, enum_class_Boolean, 0);
+        Parrot_pmc_reuse(INTERP, SELF, enum_class_Boolean, 0);
         SELF.set_bool(value);
     }
 
@@ -170,7 +170,7 @@
 */
 
     VTABLE void set_string_native(STRING *value) {
-        pmc_reuse(INTERP, SELF, enum_class_String, 0);
+        Parrot_pmc_reuse(INTERP, SELF, enum_class_String, 0);
         SELF.set_string_native(value);
     }
 
@@ -204,7 +204,7 @@
     VTABLE PMC *neg(PMC *dest) {
         const FLOATVAL a = -SELF.get_number();
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_number_native(INTERP, dest, a);
         return dest;
@@ -331,7 +331,7 @@
     VTABLE PMC *absolute(PMC *dest) {
         const FLOATVAL a = fabs(SELF.get_number());
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_number_native(INTERP, dest, a);
         return dest;
@@ -416,110 +416,110 @@
 */
 
     METHOD acos() {
-        PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         SET_ATTR_fv(INTERP, d, acos(SELF.get_number()));
         RETURN(PMC *d);
     }
 
     METHOD cos() {
-        PMC * const d  = pmc_new(INTERP,
+        PMC * const d  = Parrot_pmc_new(INTERP,
                 Parrot_get_ctx_HLL_type(INTERP, enum_class_Float));
         SET_ATTR_fv(INTERP, d, cos(SELF.get_number()));
         RETURN(PMC *d);
     }
 
     METHOD asec() {
-        PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         SET_ATTR_fv(INTERP, d, acos(1.0 / SELF.get_number()));
         RETURN(PMC *d);
     }
 
     METHOD asin() {
-        PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         SET_ATTR_fv(INTERP, d, asin(SELF.get_number()));
         RETURN(PMC *d);
     }
 
     METHOD atan() {
-        PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         SET_ATTR_fv(INTERP, d, atan(SELF.get_number()));
         RETURN(PMC *d);
     }
 
     METHOD atan2(PMC *val) {
-        PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         SET_ATTR_fv(INTERP, d, atan2(SELF.get_number(), VTABLE_get_number(INTERP, val)));
         RETURN(PMC *d);
     }
 
     METHOD cosh() {
-        PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         SET_ATTR_fv(INTERP, d, cosh(SELF.get_number()));
         RETURN(PMC *d);
     }
 
     METHOD exp() {
-        PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         SET_ATTR_fv(INTERP, d, exp(SELF.get_number()));
         RETURN(PMC *d);
     }
 
     METHOD ln() {
-        PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         SET_ATTR_fv(INTERP, d, log(SELF.get_number()));
         RETURN(PMC *d);
     }
 
     METHOD log10() {
-        PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         SET_ATTR_fv(INTERP, d, log10(SELF.get_number()));
         RETURN(PMC *d);
     }
 
     METHOD log2() {
-        PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         SET_ATTR_fv(INTERP, d, log(SELF.get_number()) / log(2.0));
         RETURN(PMC *d);
     }
 
     METHOD sec() {
-        PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         SET_ATTR_fv(INTERP, d, 1.0 / cos(SELF.get_number()));
         RETURN(PMC *d);
     }
 
     METHOD sech() {
-        PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         SET_ATTR_fv(INTERP, d, 1.0 / cosh(SELF.get_number()));
         RETURN(PMC *d);
     }
 
     METHOD sin() {
-        PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         SET_ATTR_fv(INTERP, d, sin(SELF.get_number()));
         RETURN(PMC *d);
     }
 
     METHOD sinh() {
-        PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         SET_ATTR_fv(INTERP, d, sinh(SELF.get_number()));
         RETURN(PMC *d);
     }
 
     METHOD tan() {
-        PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         SET_ATTR_fv(INTERP, d, tan(SELF.get_number()));
         RETURN(PMC *d);
     }
 
     METHOD tanh() {
-        PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         SET_ATTR_fv(INTERP, d, tanh(SELF.get_number()));
         RETURN(PMC *d);
     }
 
     METHOD sqrt() {
-        PMC * const d  = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        PMC * const d  = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         SET_ATTR_fv(INTERP, d, sqrt(SELF.get_number()));
         RETURN(PMC *d);
     }

Modified: branches/rm_cflags/src/pmc/hash.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/hash.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/hash.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -106,7 +106,7 @@
 */
 
     VTABLE PMC *clone() {
-        PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
 
         parrot_hash_clone(INTERP, (Hash *)SELF.get_pointer(),
                    (Hash *)VTABLE_get_pointer(INTERP, dest));
@@ -445,7 +445,7 @@
             box = hash_value_to_pmc(INTERP, hash, b->value);
         else {
             /* autovivify an Hash */
-            box = pmc_new(INTERP, SELF.type());
+            box = Parrot_pmc_new(INTERP, SELF.type());
             parrot_hash_put(INTERP, hash, keystr,
                     hash_value_from_pmc(INTERP, hash, box));
         }
@@ -625,7 +625,7 @@
             box = hash_value_to_pmc(INTERP, hash, b->value);
         else {
             /* autovivify an Hash */
-            box = pmc_new(INTERP, SELF.type());
+            box = Parrot_pmc_new(INTERP, SELF.type());
             parrot_hash_put(INTERP, hash, keystr,
                     hash_value_from_pmc(INTERP, hash, box));
         }
@@ -753,7 +753,7 @@
 
         /* autovivify an Hash */
         if (PMC_IS_NULL(box))
-            box = pmc_new(INTERP, SELF.type());
+            box = Parrot_pmc_new(INTERP, SELF.type());
 
         VTABLE_set_number_keyed(INTERP, box, nextkey, value);
     }
@@ -799,7 +799,7 @@
             box = hash_value_to_pmc(INTERP, hash, b->value);
         else {
             /* autovivify an Hash */
-            box = pmc_new(INTERP, SELF.type());
+            box = Parrot_pmc_new(INTERP, SELF.type());
             parrot_hash_put(INTERP, hash, keystr,
                     hash_value_from_pmc(INTERP, hash, box));
         }
@@ -994,7 +994,7 @@
 */
 
     VTABLE PMC *get_iter() {
-        return pmc_new_init(INTERP, enum_class_HashIterator, SELF);
+        return Parrot_pmc_new_init(INTERP, enum_class_HashIterator, SELF);
     }
 
 /*

Modified: branches/rm_cflags/src/pmc/hashiterator.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/hashiterator.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/hashiterator.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -229,7 +229,7 @@
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
                 "StopIteration");
 
-        ret = pmc_new(INTERP, enum_class_HashIteratorKey);
+        ret = Parrot_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, attrs->bucket);
 
@@ -246,7 +246,7 @@
     VTABLE STRING* shift_string() {
         PMC    * const key = SELF.shift_pmc();
         STRING * const ret = VTABLE_get_string(INTERP, key);
-        temporary_pmc_free(INTERP, key);
+        Parrot_pmc_free_temporary(INTERP, key);
         return ret;
     }
 

Modified: branches/rm_cflags/src/pmc/imageio.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/imageio.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/imageio.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -10,6 +10,8 @@
 
 Freezes and thaws other PMCs.
 
+=cut
+
 */
 
 #define GROW_TO_16_BYTE_BOUNDARY(size) ((size) + ((size) % 16 ? 16 - (size) % 16 : 0))
@@ -123,12 +125,12 @@
 PARROT_INLINE
 static PMC*
 id_list_get(PARROT_INTERP, PMC *io, UINTVAL id) {
-    return VTABLE_get_pmc_keyed_int(interp, PARROT_IMAGEIO(io)->id_list, id);
+    return VTABLE_get_pmc_keyed_int(interp, PARROT_IMAGEIO(io)->todo, id - 1);
 }
 
 PARROT_INLINE
-static void
-visit_todo_list_thaw(PARROT_INTERP, SHIM(PMC* pmc_not_used), ARGIN(PMC* info))
+static PMC *
+visit_todo_list_thaw(PARROT_INTERP, ARGIN(PMC* info))
 {
     UINTVAL  n            = VTABLE_shift_integer(interp, info);
     UINTVAL  id           = PackID_get_PMCID(n);
@@ -148,15 +150,12 @@
             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);
+            pmc = Parrot_pmc_new_noinit(interp, type);
             VTABLE_thaw(interp, pmc, info);
 
             {
                 PMC * const todo    = PARROT_IMAGEIO(info)->todo;
-                PMC * const id_list = PARROT_IMAGEIO(info)->id_list;
-                VTABLE_set_pmc_keyed_int(interp, id_list, id, pmc);
-                /* remember nested aggregates depth first */
-                VTABLE_push_pmc(interp, todo, pmc);
+                VTABLE_set_pmc_keyed_int(interp, todo, id - 1, pmc);
             }
         }
         break;
@@ -165,7 +164,7 @@
         break;
     }
 
-    *(PARROT_IMAGEIO(info)->thaw_ptr) = pmc;
+    return pmc;
 }
 
 static void
@@ -207,65 +206,14 @@
     }
 }
 
-static void
-visit_loop_todo_list(PARROT_INTERP, PMC *current, PMC *info)
-{
-    PMC * const todo     = PARROT_IMAGEIO(info)->todo;
-    const int    thawing = PARROT_IMAGEIO(info)->what == VISIT_THAW_NORMAL;
-
-    (PARROT_IMAGEIO(info)->visit_pmc_now)(interp, current, info);
-
-    /* can't cache upper limit, visit may append items */
-    while (VTABLE_get_bool(interp, todo)) {
-        current = VTABLE_pop_pmc(interp, todo);
-        if (!current)
-            Parrot_ex_throw_from_c_args(interp, NULL, 1,
-                    "NULL current PMC in visit_loop_todo_list");
-
-        PARROT_ASSERT(current->vtable);
-
-        VTABLE_visit(interp, current, info);
-
-        VISIT_PMC(interp, info, PMC_metadata(current));
-    }
-
-    if (thawing)
-        /* we're done reading the image */
-        PARROT_ASSERT(!INFO_HAS_DATA(info));
-
-    if (thawing) {
-        /* on thawing call thawfinish for each processed PMC */
-        const INTVAL n = VTABLE_elements(interp, PARROT_IMAGEIO(info)->id_list);
-        int          i;
-
-        /*
-         * Thaw in reverse order. We have to fully thaw younger PMCs
-         * before use them in older.
-         *
-         * XXX There are no younger or older pmcs in a directed graph
-         *     that allows cycles. Any code that requires a specific
-         *      order here is likely broken.
-         */
-        for (i = n-1; i >= 0; --i) {
-            current = VTABLE_get_pmc_keyed_int(interp, PARROT_IMAGEIO(info)->id_list, i);
-            if (!PMC_IS_NULL(current))
-                VTABLE_thawfinish(interp, current, info);
-        }
-    }
-}
-
 pmclass ImageIO auto_attrs {
-    ATTR visit_f          visit_pmc_now;
     ATTR Buffer          *buffer;         /* buffer to store the image */
     ATTR size_t           pos;            /* current read/write position in buffer */
     ATTR size_t           input_length;
     ATTR INTVAL           what;
-    ATTR PMC            **thaw_ptr;       /* where to thaw a new PMC */
     ATTR PMC             *seen;           /* seen hash */
     ATTR PMC             *todo;           /* todo list */
-    ATTR PMC             *id_list;        /* seen list used by thaw */
     ATTR UINTVAL          id;             /* freze ID of PMC */
-    ATTR INTVAL           extra_flags;    /* concerning to extra */
     ATTR struct PackFile *pf;
 
 /*
@@ -288,13 +236,10 @@
 
 */
     VTABLE void init() {
-        PARROT_IMAGEIO(SELF)->thaw_ptr    = NULL;
         PARROT_IMAGEIO(SELF)->buffer      = NULL;
-        PARROT_IMAGEIO(SELF)->todo        = pmc_new(INTERP, enum_class_ResizablePMCArray);
+        PARROT_IMAGEIO(SELF)->todo        = Parrot_pmc_new(INTERP, enum_class_ResizablePMCArray);
         PARROT_IMAGEIO(SELF)->seen        = PMCNULL;
-        PARROT_IMAGEIO(SELF)->id_list     = PMCNULL;
         PARROT_IMAGEIO(SELF)->id          = 0;
-        PARROT_IMAGEIO(SELF)->extra_flags = EXTRA_IS_NULL;
         PARROT_IMAGEIO(SELF)->pf          = PackFile_new(INTERP, 0);
 
         PObj_custom_mark_destroy_SETALL(SELF);
@@ -329,7 +274,6 @@
             Parrot_gc_mark_PObj_alive(INTERP, (PObj *)(PARROT_IMAGEIO(SELF)->buffer));
         Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIO(SELF)->todo);
         Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIO(SELF)->seen);
-        Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIO(SELF)->id_list);
     }
 
 /*
@@ -347,20 +291,33 @@
                                           PARROT_IMAGEIO(SELF)->buffer,
                                           PARROT_IMAGEIO(SELF)->pos);
     }
+
 /*
 
+=item C<VTABLE PMC *get_pmc()>
+
+Gets the result PMC after a thaw.
+
+=cut
+
+*/
+
+    VTABLE PMC *get_pmc() {
+        return VTABLE_get_pmc_keyed_int(INTERP, (PARROT_IMAGEIO(SELF))->todo, 0);
+    }
+
 /*
 
-=item C<VTABLE void set_pointer()>
+=item C<VTABLE PMC *get_iter()>
 
-Sets the location where to thaw a new PMC.
+Get the C<todo> list for this freeze/thaw for iterating over.
 
 =cut
 
 */
 
-    VTABLE void set_pointer(void* value) {
-        PARROT_IMAGEIO(SELF)->thaw_ptr = (PMC**)value;
+    VTABLE PMC *get_iter() {
+        return PARROT_IMAGEIO(SELF)->todo;
     }
 
 /*
@@ -441,8 +398,7 @@
 */
 
     VTABLE void push_pmc(PMC *v) {
-        VTABLE_set_pointer(interp, SELF, &v);
-        (PARROT_IMAGEIO(SELF)->visit_pmc_now)(INTERP, v, SELF);
+        visit_todo_list_freeze(INTERP, v, SELF);
     }
 
 /*
@@ -515,59 +471,59 @@
 */
 
     VTABLE PMC *shift_pmc() {
-        PMC *result;
-        VTABLE_set_pointer(interp, SELF, &result);
-        (PARROT_IMAGEIO(SELF)->visit_pmc_now)(interp, NULL, SELF);
-        return result;
+        return visit_todo_list_thaw(INTERP, SELF);
     }
 
     VTABLE void set_pmc(PMC *p)
     {
-            UINTVAL header_length = GROW_TO_16_BYTE_BOUNDARY(PACKFILE_HEADER_BYTES);
-
-            PARROT_IMAGEIO(SELF)->what = VISIT_FREEZE_NORMAL;
-            PARROT_IMAGEIO(SELF)->visit_pmc_now  = visit_todo_list_freeze;
-            create_buffer(INTERP, p, SELF);
-            ensure_buffer_size(INTERP, SELF, header_length);
-            mem_sys_memcopy(GET_VISIT_CURSOR(SELF),
-                PARROT_IMAGEIO(SELF)->pf->header, PACKFILE_HEADER_BYTES);
-            INC_VISIT_CURSOR(SELF, header_length);
+        UINTVAL header_length = GROW_TO_16_BYTE_BOUNDARY(PACKFILE_HEADER_BYTES);
 
-            PARROT_IMAGEIO(SELF)->seen = pmc_new(INTERP, enum_class_Hash);
-            VTABLE_set_pointer(INTERP, PARROT_IMAGEIO(SELF)->seen,
-                parrot_new_intval_hash(INTERP));
+        PARROT_IMAGEIO(SELF)->what = VISIT_FREEZE_NORMAL;
+        create_buffer(INTERP, p, SELF);
+        ensure_buffer_size(INTERP, SELF, header_length);
+        mem_sys_memcopy(GET_VISIT_CURSOR(SELF),
+            PARROT_IMAGEIO(SELF)->pf->header, PACKFILE_HEADER_BYTES);
+        INC_VISIT_CURSOR(SELF, header_length);
+
+        PARROT_IMAGEIO(SELF)->seen = Parrot_pmc_new(INTERP, enum_class_Hash);
+        VTABLE_set_pointer(INTERP, PARROT_IMAGEIO(SELF)->seen,
+            parrot_new_intval_hash(INTERP));
 
-            visit_loop_todo_list(INTERP, p, SELF);
+        visit_todo_list_freeze(INTERP, p, SELF);
+        Parrot_visit_loop_visit(INTERP, SELF);
     }
 
     VTABLE void set_string_native(STRING *image) {
-            UINTVAL header_length = GROW_TO_16_BYTE_BOUNDARY(PACKFILE_HEADER_BYTES);
-            int unpacked_length;
+        UINTVAL header_length = GROW_TO_16_BYTE_BOUNDARY(PACKFILE_HEADER_BYTES);
+        int unpacked_length;
 
-            PARROT_IMAGEIO(SELF)->what          = VISIT_THAW_NORMAL;
-            PARROT_IMAGEIO(SELF)->visit_pmc_now = visit_todo_list_thaw;
-            PARROT_IMAGEIO(SELF)->buffer        = (Buffer *)image;
-            PARROT_IMAGEIO(SELF)->id_list       = pmc_new(INTERP, enum_class_ResizablePMCArray);
-
-            PARROT_ASSERT(image->_bufstart == image->strstart);
-
-            SET_VISIT_CURSOR(SELF, (char *)Buffer_bufstart(PARROT_IMAGEIO(SELF)->buffer));
-            PARROT_IMAGEIO(SELF)->input_length = image->strlen;
-
-            PARROT_IMAGEIO(SELF)->pf->options |= PFOPT_PMC_FREEZE_ONLY;
-            unpacked_length = PackFile_unpack(interp, PARROT_IMAGEIO(SELF)->pf,
-                GET_VISIT_CURSOR(SELF), PARROT_IMAGEIO(SELF)->input_length);
-
-            if (!unpacked_length) {
-                Parrot_ex_throw_from_c_args(interp, NULL,
-                        EXCEPTION_INVALID_STRING_REPRESENTATION,
-                        "PackFile header failed during unpack");
-            }
-            else {
-                INC_VISIT_CURSOR(SELF, header_length);
-            }
+        PARROT_IMAGEIO(SELF)->what          = VISIT_THAW_NORMAL;
+        PARROT_IMAGEIO(SELF)->buffer        = (Buffer *)image;
 
-            visit_loop_todo_list(interp, pmc, SELF);
+        PARROT_ASSERT(image->_bufstart == image->strstart);
+
+        SET_VISIT_CURSOR(SELF, (char *)Buffer_bufstart(PARROT_IMAGEIO(SELF)->buffer));
+        PARROT_IMAGEIO(SELF)->input_length = image->strlen;
+
+        PARROT_IMAGEIO(SELF)->pf->options |= PFOPT_PMC_FREEZE_ONLY;
+        unpacked_length = PackFile_unpack(interp, PARROT_IMAGEIO(SELF)->pf,
+            GET_VISIT_CURSOR(SELF), PARROT_IMAGEIO(SELF)->input_length);
+
+        if (!unpacked_length) {
+            Parrot_ex_throw_from_c_args(interp, NULL,
+                    EXCEPTION_INVALID_STRING_REPRESENTATION,
+                    "PackFile header failed during unpack");
+        }
+        else {
+            INC_VISIT_CURSOR(SELF, header_length);
+        }
+
+        visit_todo_list_thaw(INTERP, SELF);
+        Parrot_visit_loop_visit(INTERP, SELF);
+
+        /* we're done reading the image */
+        PARROT_ASSERT(!INFO_HAS_DATA(SELF));
+        Parrot_visit_loop_thawfinish(INTERP, SELF);
     }
 
 /*

Copied: branches/rm_cflags/src/pmc/imageiosize.pmc (from r44284, trunk/src/pmc/imageiosize.pmc)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/rm_cflags/src/pmc/imageiosize.pmc	Mon Feb 22 02:43:55 2010	(r44285, copy of r44284, trunk/src/pmc/imageiosize.pmc)
@@ -0,0 +1,237 @@
+/*
+Copyright (C) 2010, Parrot Foundation.
+$Id$
+
+=head1 NAME
+
+src/pmc/imageiosize.pmc - ImageIOSize PMC
+
+=head1 DESCRIPTION
+
+Gets the size of an ImageIO image without the allocation costs.
+
+=cut
+
+*/
+
+#define GROW_TO_16_BYTE_BOUNDARY(size) ((size) + ((size) % 16 ? 16 - (size) % 16 : 0))
+
+static void
+visit_todo_list_freeze(PARROT_INTERP, PMC* pmc, PMC* info) {
+    int is_new = 0;
+
+    if (!PMC_IS_NULL(pmc)) {
+        Hash *hash = (Hash *)VTABLE_get_pointer(interp, PARROT_IMAGEIOSIZE(info)->seen);
+        HashBucket * const b = parrot_hash_get_bucket(interp, hash, pmc);
+        is_new = !b;
+    }
+
+    VTABLE_push_integer(interp, info, 0);
+
+    if (is_new) {
+        Hash *hash = (Hash *)VTABLE_get_pointer(interp, PARROT_IMAGEIOSIZE(info)->seen);
+        parrot_hash_put(interp, hash, pmc, pmc);
+        VTABLE_push_integer(interp, info, pmc->vtable->base_type);
+        VTABLE_push_pmc(interp, PARROT_IMAGEIOSIZE(info)->todo, pmc);
+        VTABLE_freeze(interp, pmc, info);
+    }
+}
+
+pmclass ImageIOSize auto_attrs {
+    ATTR PMC             *seen;           /* seen hash */
+    ATTR PMC             *todo;           /* todo list */
+    ATTR struct PackFile *pf;
+    ATTR INTVAL           size;
+
+/*
+
+=head1 VTABLES
+
+=over 4
+
+=cut
+
+*/
+
+/*
+
+=item C<void init()>
+
+Initializes the PMC.
+
+=cut
+
+*/
+    VTABLE void init() {
+        PARROT_IMAGEIOSIZE(SELF)->todo = Parrot_pmc_new(INTERP, enum_class_ResizablePMCArray);
+        PARROT_IMAGEIOSIZE(SELF)->pf   = PackFile_new(INTERP, 0);
+        PARROT_IMAGEIOSIZE(SELF)->size = 0;
+
+        PARROT_IMAGEIOSIZE(SELF)->seen = Parrot_pmc_new(INTERP, enum_class_Hash);
+        VTABLE_set_pointer(INTERP, PARROT_IMAGEIOSIZE(SELF)->seen,
+            parrot_new_intval_hash(INTERP));
+
+        PObj_custom_mark_destroy_SETALL(SELF);
+    }
+
+
+/*
+
+=item C<void destroy()>
+
+Destroys the PMC.
+
+=cut
+
+*/
+    VTABLE void destroy() {
+        PackFile_destroy(INTERP, PARROT_IMAGEIOSIZE(SELF)->pf);
+    }
+
+/*
+
+=item C<void mark()>
+
+Marks the PMC as alive.
+
+=cut
+
+*/
+    VTABLE void mark() {
+        Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIOSIZE(SELF)->todo);
+        Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIOSIZE(SELF)->seen);
+    }
+
+/*
+
+=item C<VTABLE PMC *get_pmc()>
+
+Gets the result PMC after a thaw.
+
+=cut
+
+*/
+
+    VTABLE PMC *get_pmc() {
+        PMC *ret = Parrot_pmc_new(INTERP, enum_class_Integer);
+        VTABLE_set_integer_native(INTERP, ret, PARROT_IMAGEIOSIZE(SELF)->size);
+        return ret;
+    }
+
+/*
+
+=item C<VTABLE PMC *get_iter()>
+
+Get the C<todo> list for this freeze/thaw for iterating over.
+
+=cut
+
+*/
+
+    VTABLE PMC *get_iter() {
+        return PARROT_IMAGEIOSIZE(SELF)->todo;
+    }
+
+/*
+
+=item C<VTABLE INTVAL get_integer()>
+
+Returns the flags describing the visit action
+
+=cut
+
+*/
+
+    VTABLE INTVAL get_integer() {
+        return VISIT_FREEZE_NORMAL;
+    }
+
+/*
+
+=item C<VTABLE void push_integer(INTVAL v)>
+
+Pushes the integer C<v> onto the end of the image.
+
+=cut
+
+*/
+
+    VTABLE void push_integer(INTVAL v) {
+        size_t len = PF_size_integer() * sizeof (opcode_t);
+        PARROT_IMAGEIOSIZE(SELF)->size += len;
+    }
+
+
+/*
+
+=item C<VTABLE void push_float(FLOATVAL v)>
+
+Pushes the float C<v> onto the end of the image.
+
+=cut
+
+*/
+
+    VTABLE void push_float(FLOATVAL v)
+    {
+        size_t len = PF_size_number() * sizeof (opcode_t);
+        PARROT_IMAGEIOSIZE(SELF)->size += len;
+    }
+
+
+/*
+
+=item C<VTABLE void push_string(STRING *v)>
+
+Pushes the string C<*v> onto the end of the image.
+
+=cut
+
+*/
+
+    VTABLE void push_string(STRING *v)
+    {
+        size_t len = PF_size_string(v) * sizeof (opcode_t);
+        PARROT_IMAGEIOSIZE(SELF)->size += len;
+    }
+
+/*
+
+=item C<VTABLE void push_pmc(PMC *v)>
+
+Pushes a reference to pmc C<*v> onto the end of the image. If C<*v>
+hasn't been seen yet, it is also pushed onto the todo list.
+
+=cut
+
+*/
+
+    VTABLE void push_pmc(PMC *v) {
+        visit_todo_list_freeze(INTERP, v, SELF);
+    }
+
+    VTABLE void set_pmc(PMC *p)
+    {
+        UINTVAL header_length = GROW_TO_16_BYTE_BOUNDARY(PACKFILE_HEADER_BYTES);
+        PARROT_IMAGEIOSIZE(SELF)->size += header_length;
+
+        visit_todo_list_freeze(INTERP, p, SELF);
+        Parrot_visit_loop_visit(INTERP, SELF);
+    }
+
+/*
+
+=back
+
+=cut
+
+*/
+
+}
+
+/*
+ * Local variables:
+ *   c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */

Modified: branches/rm_cflags/src/pmc/integer.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/integer.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/integer.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -38,7 +38,7 @@
     /* Do an in-place upgrade to a Bignum of SELF and return a pointer
        to it (which is probably redundant, but whatever). */
     const INTVAL a = VTABLE_get_integer(interp, self);
-    pmc_reuse(interp, self, enum_class_BigInt, 0);
+    Parrot_pmc_reuse(interp, self, enum_class_BigInt, 0);
     VTABLE_set_integer_native(interp, self, a);
     return self;
 }
@@ -84,7 +84,7 @@
 
 */
     VTABLE PMC *clone() {
-        PMC * const clone = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC * const clone = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
         VTABLE_set_integer_native(INTERP, clone, SELF.get_integer());
         return clone;
     }
@@ -230,20 +230,20 @@
 */
 
     VTABLE void set_number_native(FLOATVAL value) {
-        pmc_reuse(INTERP, SELF, enum_class_Float, 0);
+        Parrot_pmc_reuse(INTERP, SELF, enum_class_Float, 0);
         SELF.set_number_native(value);
     }
 
 
     VTABLE void set_bool(INTVAL value) {
-        pmc_reuse(INTERP, SELF, enum_class_Boolean, 0);
+        Parrot_pmc_reuse(INTERP, SELF, enum_class_Boolean, 0);
         SELF.set_bool(value);
     }
 
 
 
     VTABLE void set_string_native(STRING *value) {
-        pmc_reuse(INTERP, SELF, enum_class_String, 0);
+        Parrot_pmc_reuse(INTERP, SELF, enum_class_String, 0);
         SELF.set_string_native(value);
     }
 
@@ -265,7 +265,7 @@
         const INTVAL c = a + b;
 
         if ((c^a) >= 0 || (c^b) >= 0) {
-            dest = pmc_new(INTERP, VTABLE_type(interp, SELF));
+            dest = Parrot_pmc_new(INTERP, VTABLE_type(interp, SELF));
 
             /* need this for e.g. Undef PMC */
             VTABLE_set_integer_native(INTERP, dest, c);
@@ -274,7 +274,7 @@
         else {
             PMC * temp;
             maybe_throw_overflow_error(interp);
-            temp = pmc_new(interp, enum_class_BigInt);
+            temp = Parrot_pmc_new(interp, enum_class_BigInt);
             VTABLE_set_integer_native(interp, temp, a);
             return VTABLE_add(interp, temp, value, dest);
         }
@@ -283,7 +283,7 @@
 
     MULTI PMC *add(Complex value, PMC *dest) {
         const INTVAL a = SELF.get_integer();
-        dest           = pmc_new(INTERP, VTABLE_type(INTERP, value));
+        dest           = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, value));
 
         VTABLE_set_number_native(INTERP, dest,
                 a + VTABLE_get_number_keyed_int(INTERP, value, 0));
@@ -297,14 +297,14 @@
     MULTI PMC *add(BigInt value, PMC *dest) {
         PMC *temp;
         maybe_throw_overflow_error(interp);
-        temp = pmc_new(interp, enum_class_BigInt);
+        temp = Parrot_pmc_new(interp, enum_class_BigInt);
         VTABLE_set_integer_native(interp, temp, SELF.get_integer());
         return VTABLE_add(interp, temp, value, dest);
     }
 
 
     MULTI PMC *add(DEFAULT value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(interp, value));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(interp, value));
 
         VTABLE_set_number_native(INTERP, dest,
                 SELF.get_integer() + VTABLE_get_number(INTERP, value));
@@ -317,7 +317,7 @@
         const INTVAL c = a + b;
 
         if ((c^a) >= 0 || (c^b) >= 0) {
-            dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+            dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
             VTABLE_set_integer_native(INTERP, dest, c);
             return dest;
@@ -325,7 +325,7 @@
         else {
             PMC *temp;
             maybe_throw_overflow_error(interp);
-            temp = pmc_new(interp, enum_class_BigInt);
+            temp = Parrot_pmc_new(interp, enum_class_BigInt);
             VTABLE_set_integer_native(interp, temp, a);
             return VTABLE_add_int(interp, temp, b, dest);
         }
@@ -354,7 +354,7 @@
     MULTI void i_add(Complex value) {
         const INTVAL a = SELF.get_integer();
 
-        pmc_reuse(INTERP, SELF, enum_class_Complex, 0);
+        Parrot_pmc_reuse(INTERP, SELF, enum_class_Complex, 0);
         VTABLE_set_number_native(INTERP, SELF,
                 SELF.get_integer() + VTABLE_get_number(INTERP, value));
     }
@@ -407,7 +407,7 @@
         const INTVAL c = a - b;
 
         if ((c^a) >= 0 || (c^~b) >= 0) {
-            dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+            dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
             VTABLE_set_integer_native(INTERP, dest, c);
             return dest;
@@ -415,7 +415,7 @@
         else {
             PMC *temp;
             maybe_throw_overflow_error(interp);
-            temp = pmc_new(interp, enum_class_BigInt);
+            temp = Parrot_pmc_new(interp, enum_class_BigInt);
             VTABLE_set_integer_native(interp, temp, a);
             return VTABLE_subtract(interp, temp, value, dest);
         }
@@ -424,7 +424,7 @@
 
     MULTI PMC *subtract(Complex value, PMC *dest) {
         const INTVAL a = SELF.get_integer();
-        dest           = pmc_new(INTERP, VTABLE_type(INTERP, value));
+        dest           = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, value));
 
         VTABLE_set_number_native(INTERP, dest,
                 a - VTABLE_get_number_keyed_int(INTERP, value, 0));
@@ -438,14 +438,14 @@
     MULTI PMC *subtract(BigInt value, PMC *dest) {
         PMC *temp;
         maybe_throw_overflow_error(interp);
-        temp = pmc_new(interp, enum_class_BigInt);
+        temp = Parrot_pmc_new(interp, enum_class_BigInt);
         VTABLE_set_integer_native(interp, temp, SELF.get_integer());
         return VTABLE_subtract(interp, temp, value, dest);
     }
 
 
     MULTI PMC *subtract(DEFAULT value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, value));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, value));
 
         VTABLE_set_number_native(INTERP, dest,
                 SELF.get_integer() - VTABLE_get_number(INTERP, value));
@@ -468,7 +468,7 @@
         const INTVAL c = a - b;
 
         if ((c^a) >= 0 || (c^~b) >= 0) {
-            dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+            dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
             VTABLE_set_integer_native(INTERP, dest, c);
             return dest;
@@ -476,7 +476,7 @@
         else {
             PMC *temp;
             maybe_throw_overflow_error(interp);
-            temp = pmc_new(interp, enum_class_BigInt);
+            temp = Parrot_pmc_new(interp, enum_class_BigInt);
             VTABLE_set_integer_native(interp, temp, a);
             return VTABLE_subtract_int(interp, temp, b, dest);
         }
@@ -515,7 +515,7 @@
     MULTI void i_subtract(Complex value) {
         const INTVAL a = SELF.get_integer();
 
-        pmc_reuse(INTERP, SELF, enum_class_Complex, 0);
+        Parrot_pmc_reuse(INTERP, SELF, enum_class_Complex, 0);
         VTABLE_set_number_native(INTERP, SELF,
                 (FLOATVAL)a - VTABLE_get_number_keyed_int(INTERP, value, 0));
         VTABLE_set_number_keyed_int(INTERP, SELF, 1,
@@ -568,7 +568,7 @@
         const double cf = (double)a * (double)b;
 
         if ((double) c == cf) {
-            dest = pmc_new(INTERP, VTABLE_type(interp, SELF));
+            dest = Parrot_pmc_new(INTERP, VTABLE_type(interp, SELF));
 
             VTABLE_set_integer_native(INTERP, dest, c);
             return dest;
@@ -576,7 +576,7 @@
         else {
             PMC *temp;
             maybe_throw_overflow_error(INTERP);
-            temp = pmc_new(interp, enum_class_BigInt);
+            temp = Parrot_pmc_new(interp, enum_class_BigInt);
             VTABLE_set_integer_native(interp, temp, a);
             return VTABLE_multiply(INTERP, temp, value, dest);
         }
@@ -600,7 +600,7 @@
 
     MULTI PMC *multiply(DEFAULT value, PMC *dest) {
         const FLOATVAL valf = VTABLE_get_number(INTERP, value);
-        dest                = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest                = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_number_native(INTERP, dest, SELF.get_number() * valf);
         return dest;
@@ -613,7 +613,7 @@
         const double cf = (double)a * (double)b;
 
         if ((double) c == cf) {
-            dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+            dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
             VTABLE_set_integer_native(INTERP, dest, c);
             return dest;
@@ -621,7 +621,7 @@
         else {
             PMC *temp;
             maybe_throw_overflow_error(INTERP);
-            temp = pmc_new(interp, enum_class_BigInt);
+            temp = Parrot_pmc_new(interp, enum_class_BigInt);
             VTABLE_set_integer_native(interp, temp, a);
             return VTABLE_multiply_int(INTERP, temp, b, dest);
         }
@@ -708,7 +708,7 @@
     MULTI PMC *divide(BigInt value, PMC *dest) {
         PMC *temp;
         maybe_throw_overflow_error(INTERP);
-        temp = pmc_new(interp, enum_class_BigInt);
+        temp = Parrot_pmc_new(interp, enum_class_BigInt);
         VTABLE_set_integer_native(interp, temp, SELF.get_integer());
         return VTABLE_divide(INTERP, temp, value, dest);
     }
@@ -720,7 +720,7 @@
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
                     "float division by zero");
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         VTABLE_set_number_native(INTERP, dest, SELF.get_number() / d);
         return dest;
     }
@@ -769,7 +769,7 @@
     MULTI PMC *floor_divide(BigInt value, PMC *dest) {
         PMC *temp;
         maybe_throw_overflow_error(INTERP);
-        temp = pmc_new(interp, enum_class_BigInt);
+        temp = Parrot_pmc_new(interp, enum_class_BigInt);
         VTABLE_set_integer_native(interp, temp, SELF.get_integer());
         return VTABLE_floor_divide(INTERP, temp, value, dest);
     }
@@ -783,7 +783,7 @@
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
                     "float division by zero");
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         f = floor(SELF.get_number() / d);
         VTABLE_set_integer_native(INTERP, dest, (INTVAL)f);
@@ -798,7 +798,7 @@
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
                     "float division by zero");
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         f = floor(SELF.get_number() / value);
         VTABLE_set_integer_native(INTERP, dest, (INTVAL)f);
@@ -813,7 +813,7 @@
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
                     "float division by zero");
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         f = floor(SELF.get_number() / value);
         VTABLE_set_integer_native(INTERP, dest, (INTVAL)f);
@@ -892,7 +892,7 @@
     MULTI PMC *modulus(BigInt value, PMC *dest) {
         PMC *temp;
         maybe_throw_overflow_error(INTERP);
-        temp = pmc_new(interp, enum_class_BigInt);
+        temp = Parrot_pmc_new(interp, enum_class_BigInt);
         VTABLE_set_integer_native(interp, temp, SELF.get_integer());
         return VTABLE_modulus(INTERP, temp, value, dest);
     }
@@ -905,7 +905,7 @@
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
                     "int modulus by zero");
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_integer_native(INTERP, dest,
                 intval_mod(SELF.get_integer(), d));
@@ -918,7 +918,7 @@
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
                     "int modulus by zero");
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_integer_native(INTERP, dest,
                 intval_mod(SELF.get_integer(), value));
@@ -931,7 +931,7 @@
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
                     "int modulus by zero");
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_integer_native(INTERP, dest,
                 intval_mod(SELF.get_integer(), (INTVAL)value));
@@ -993,7 +993,7 @@
 
         switch (value->vtable->base_type) {
           case enum_class_BigInt:
-            temp = pmc_new(INTERP, enum_class_BigInt);
+            temp = Parrot_pmc_new(INTERP, enum_class_BigInt);
             VTABLE_set_integer_native(INTERP, temp, SELF.get_integer());
             Parrot_mmd_multi_dispatch_from_c_args(interp,
                     "is_equal", "PP->I", temp, value, &retval);
@@ -1107,7 +1107,7 @@
         if ((c^a) >= 0 || (c^1) >= 0)
             SET_ATTR_iv(interp, SELF, c);
         else {
-            pmc_reuse(interp, SELF, enum_class_BigInt, 0);
+            Parrot_pmc_reuse(interp, SELF, enum_class_BigInt, 0);
             VTABLE_set_integer_native(interp, SELF, a);
             VTABLE_increment(interp, SELF);
         }
@@ -1131,7 +1131,7 @@
         if ((c^a) >= 0 || (c^~1) >= 0)
             VTABLE_set_integer_native(interp, SELF, c);
         else {
-            pmc_reuse(INTERP, SELF, enum_class_BigInt, 0);
+            Parrot_pmc_reuse(INTERP, SELF, enum_class_BigInt, 0);
             VTABLE_set_integer_native(interp, SELF, a);
             VTABLE_decrement(interp, SELF);
         }
@@ -1154,7 +1154,7 @@
         const INTVAL a = abs(SELF.get_integer());
 
         /* TT # 1245 overflow for -maxint */
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_integer_native(INTERP, dest, a);
         return dest;

Modified: branches/rm_cflags/src/pmc/key.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/key.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/key.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -54,7 +54,7 @@
 */
 
     VTABLE PMC *clone() {
-        PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
         PMC *dkey        = dest;
         PMC *key         = SELF;
 

Modified: branches/rm_cflags/src/pmc/lexinfo.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/lexinfo.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/lexinfo.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -95,7 +95,7 @@
 
     VTABLE PMC *inspect_str(STRING *what) {
         if (Parrot_str_equal(interp, what, CONST_STRING(interp, "symbols"))) {
-            PMC *result     = pmc_new(interp, enum_class_ResizableStringArray);
+            PMC *result     = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
             Hash *hash      = (Hash *)SELF.get_pointer();
             UINTVAL entries = hash->entries;
             UINTVAL found   = 0;

Modified: branches/rm_cflags/src/pmc/managedstruct.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/managedstruct.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/managedstruct.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -142,7 +142,7 @@
             void *clone_data = PARROT_MANAGEDSTRUCT(SELF)->custom_clone_priv;
             return clone_func(interp, SELF, clone_data);
         }
-        dest = pmc_new_init(interp, SELF->vtable->base_type,
+        dest = Parrot_pmc_new_init(interp, SELF->vtable->base_type,
             PARROT_MANAGEDSTRUCT(SELF)->init);
 
         if (PARROT_MANAGEDSTRUCT(SELF)->ptr)

Modified: branches/rm_cflags/src/pmc/namespace.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/namespace.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/namespace.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -36,7 +36,7 @@
     else {
         /* If we don't have a place to hang methods, make one. */
         if (PMC_IS_NULL(nsinfo->methods))
-            nsinfo->methods = pmc_new(interp, enum_class_Hash);
+            nsinfo->methods = Parrot_pmc_new(interp, enum_class_Hash);
 
         /* Insert it. */
         VTABLE_set_pmc_keyed_str(interp, nsinfo->methods, key, value);
@@ -70,7 +70,7 @@
         else {
             /* If we don't have a place to hang vtable methods, make one. */
             if (PMC_IS_NULL(vtable))
-                nsinfo->vtable = vtable = pmc_new(interp, enum_class_Hash);
+                nsinfo->vtable = vtable = Parrot_pmc_new(interp, enum_class_Hash);
 
             /* Insert it. */
             VTABLE_set_pmc_keyed_int(interp, vtable, sub->vtable_index, value);
@@ -312,7 +312,7 @@
             }
             else {
                 /* create new tuple */
-                new_tuple = pmc_new(INTERP, enum_class_FixedPMCArray);
+                new_tuple = Parrot_pmc_new(INTERP, enum_class_FixedPMCArray);
 
                 /* flag it as special */
                 PObj_get_FLAGS(new_tuple) |= FPA_is_ns_ext;
@@ -469,6 +469,7 @@
 Return the given namespace item or PMCNULL. If the named item is either
 a NameSpace or a var, the var is returned.
 
+TT #1472
 TOTAL KLUDGE.  ON THE CHOPPING BLOCK.
 
 =cut
@@ -657,7 +658,7 @@
 */
 
     METHOD get_name() {
-        PMC * const ar = pmc_new(INTERP, enum_class_ResizableStringArray);
+        PMC * const ar = Parrot_pmc_new(INTERP, enum_class_ResizableStringArray);
         INTVAL elements = 0;
         PMC *ns        = SELF;
 

Modified: branches/rm_cflags/src/pmc/nci.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/nci.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/nci.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -254,7 +254,7 @@
         Parrot_NCI_attributes *nci_info_ret;
         void                  *orig_func;
 
-        PMC * const ret     = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC * const ret     = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
         nci_info_ret        = PARROT_NCI(ret);
 
         /* FIXME if data is malloced (JIT/i386!) then we need

Modified: branches/rm_cflags/src/pmc/object.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/object.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/object.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -126,7 +126,7 @@
     GETATTR_Class_meth_cache(interp, _class, cache);
 
     if (PMC_IS_NULL(cache)) {
-        cache = pmc_new(interp, enum_class_Hash);
+        cache = Parrot_pmc_new(interp, enum_class_Hash);
         SETATTR_Class_meth_cache(interp, _class, cache);
     }
 
@@ -812,7 +812,7 @@
         UNLOCK_INTERPRETER(master);
 
         ret = SELF;
-        _true = pmc_new(INTERP, enum_class_Integer);
+        _true = Parrot_pmc_new(INTERP, enum_class_Integer);
 
         /* Setting the '_ro' property switches to the read-only vtable */
         VTABLE_set_integer_native(INTERP, _true, 1);

Modified: branches/rm_cflags/src/pmc/opcode.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/opcode.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/opcode.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -81,10 +81,18 @@
         return attrs->full_name_cache;
     }
 
-    METHOD op_count() {
+    VTABLE INTVAL elements() {
         Parrot_Opcode_attributes * const attrs = PARROT_OPCODE(SELF);
-        INTVAL count = attrs->info->op_count;
-        RETURN(INTVAL count);
+        if (!attrs->info)
+            return -1;
+        return attrs->info->op_count - 1;
+    }
+
+    VTABLE INTVAL get_integer_keyed_int(INTVAL i) {
+        Parrot_Opcode_attributes * const attrs = PARROT_OPCODE(SELF);
+        return i < attrs->info->op_count - 1
+               ? (INTVAL)attrs->info->types[i]
+               : -1;
     }
 }
 

Modified: branches/rm_cflags/src/pmc/oplib.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/oplib.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/oplib.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -18,12 +18,14 @@
 
 /* TODO: Since Opcode PMCs are essentially read-only after initialization
          here, we should cache them. A FixedPMCArray would be okay, an
-         INTVAL->PMC HASH might be better, since it's unlike that we will
+         INTVAL->PMC HASH might be better, since it's unlikely that we will
          need to cache even a majority of the ~1300 ops. */
 static PMC *OPLIB_PMC_INSTANCE;
-pmclass OpLib {
+static PMC *OPLIB_OPCODE_CACHE;
+pmclass OpLib singleton {
     void class_init() {
         OPLIB_PMC_INSTANCE = NULL;
+        OPLIB_OPCODE_CACHE = NULL;
     }
 
     VTABLE void *get_pointer() {
@@ -34,6 +36,16 @@
         OPLIB_PMC_INSTANCE = (PMC *)ptr;
     }
 
+    VTABLE void init() {
+        if (OPLIB_OPCODE_CACHE == NULL)
+            OPLIB_OPCODE_CACHE = Parrot_pmc_new(INTERP, enum_class_Hash);
+    }
+
+    VTABLE void mark() {
+        if (OPLIB_OPCODE_CACHE != NULL)
+            Parrot_gc_mark_PMC_alive(INTERP, OPLIB_OPCODE_CACHE);
+    }
+
     /* Look up an opnumber given the name of the op. First we look for the
        specific name, then the more general short name. */
     VTABLE INTVAL get_integer_keyed_str(STRING *name) {
@@ -51,10 +63,16 @@
     }
 
     VTABLE PMC* get_pmc_keyed_str(STRING *name) {
-        PMC * const op = pmc_new_noinit(INTERP, enum_class_Opcode);
-        VTABLE_set_string_native(INTERP, op, name);
-        PObj_custom_mark_SET(op);
-        return op;
+        if (VTABLE_defined_keyed_str(INTERP, OPLIB_OPCODE_CACHE, name)) {
+            PMC * const op = VTABLE_get_pmc_keyed_str(INTERP, OPLIB_OPCODE_CACHE, name);
+            return op;
+        } else {
+            PMC * const op = Parrot_pmc_new_noinit(INTERP, enum_class_Opcode);
+            VTABLE_set_string_native(INTERP, op, name);
+            PObj_custom_mark_SET(op);
+            VTABLE_set_pmc_keyed_str(INTERP, OPLIB_OPCODE_CACHE, name, op);
+            return op;
+        }
     }
 
     VTABLE PMC* get_pmc_keyed(PMC *key) {
@@ -63,10 +81,15 @@
     }
 
     VTABLE PMC* get_pmc_keyed_int(INTVAL value) {
-        PMC * const op = pmc_new_noinit(INTERP, enum_class_Opcode);
-        VTABLE_set_integer_native(INTERP, op, value);
-        PObj_custom_mark_SET(op);
-        return op;
+        if (value > interp->op_lib->op_count)
+            Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
+                "OpLib: Opcode index %d out of bounds", value);
+        else {
+            const char * const name = interp->op_info_table[value].full_name;
+            const INTVAL len = strlen(name);
+            STRING * const newstr = Parrot_str_new(INTERP, name, len);
+            return VTABLE_get_pmc_keyed_str(INTERP, SELF, newstr);
+        }
     }
 
     VTABLE INTVAL get_integer() {

Modified: branches/rm_cflags/src/pmc/orderedhash.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/orderedhash.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/orderedhash.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -119,7 +119,7 @@
 /* Helpers for boxing values */
 static PMC*
 box_string(PARROT_INTERP, STRING *str) {
-    PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
+    PMC * const ret = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
                 enum_class_String));
     VTABLE_set_string_native(interp, ret, str);
     return ret;
@@ -127,7 +127,7 @@
 
 static PMC*
 box_integer(PARROT_INTERP, INTVAL val) {
-    PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
+    PMC * const ret = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
                 enum_class_Integer));
     VTABLE_set_integer_native(interp, ret, val);
     return ret;
@@ -135,7 +135,7 @@
 
 static PMC*
 box_number(PARROT_INTERP, FLOATVAL val) {
-    PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
+    PMC * const ret = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
                 enum_class_Float));
     VTABLE_set_number_native(interp, ret, val);
     return ret;
@@ -162,7 +162,7 @@
                 mem_allocate_zeroed_typed(Parrot_OrderedHash_attributes);
 
         PMC_data(SELF)  = attrs;
-        attrs->hash     = pmc_new(INTERP, enum_class_Hash);
+        attrs->hash     = Parrot_pmc_new(INTERP, enum_class_Hash);
         attrs->first    = PMCNULL;
         attrs->last     = PMCNULL;
 
@@ -200,7 +200,7 @@
 */
 
     VTABLE PMC *get_iter() {
-        return pmc_new_init(INTERP, enum_class_OrderedHashIterator, SELF);
+        return Parrot_pmc_new_init(INTERP, enum_class_OrderedHashIterator, SELF);
     }
 
 /*
@@ -258,7 +258,7 @@
         }
 
         /* Create new entry */
-        list_entry = pmc_new(INTERP, enum_class_FixedPMCArray);
+        list_entry = Parrot_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);
@@ -326,7 +326,7 @@
         /* 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);
+        PMC *pkey = Parrot_pmc_new(INTERP, enum_class_String);
         VTABLE_set_string_native(INTERP, pkey, key);
         VTABLE_set_pmc_keyed(INTERP, SELF, pkey, value);
     }
@@ -381,7 +381,7 @@
     }
 
     VTABLE PMC *get_pmc_keyed_str(STRING *key) {
-        PMC *pkey = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_String));
+        PMC *pkey = Parrot_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);
     }
@@ -495,21 +495,21 @@
     }
 
     VTABLE void set_integer_keyed_int(INTVAL idx, INTVAL value) {
-        PMC * const v = pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
+        PMC * const v = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
                     enum_class_Integer));
         VTABLE_set_integer_native(INTERP, v, value);
         SELF.set_pmc_keyed_int(idx, v);
     }
 
     VTABLE void set_number_keyed_int(INTVAL idx, FLOATVAL value) {
-        PMC * const v = pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
+        PMC * const v = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
                     enum_class_Float));
         VTABLE_set_number_native(INTERP, v, value);
         SELF.set_pmc_keyed_int(idx, v);
     }
 
     VTABLE void set_string_keyed_int(INTVAL idx, STRING *value) {
-        PMC * const v = pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
+        PMC * const v = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
                     enum_class_String));
         VTABLE_set_string_native(INTERP, v, value);
         SELF.set_pmc_keyed_int(idx, v);
@@ -704,7 +704,7 @@
 */
 
     VTABLE PMC *clone() {
-        PMC  * const dest   = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC  * const dest   = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
         Parrot_OrderedHash_attributes *clone_attrs =
                 PARROT_ORDEREDHASH(dest);
 

Modified: branches/rm_cflags/src/pmc/os.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/os.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/os.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -237,7 +237,7 @@
                 errmsg);
         }
         else {
-            PMC * const array = pmc_new(INTERP, enum_class_FixedPMCArray);
+            PMC * const array = Parrot_pmc_new(INTERP, enum_class_FixedPMCArray);
             VTABLE_set_integer_native(INTERP, array, 13);
 
             VTABLE_set_integer_keyed_int(INTERP, array,  0,
@@ -315,7 +315,7 @@
                 errmsg);
         }
         else {
-            PMC * const array = pmc_new(INTERP, enum_class_FixedPMCArray);
+            PMC * const array = Parrot_pmc_new(INTERP, enum_class_FixedPMCArray);
             VTABLE_set_integer_native(INTERP, array, 13);
 
             VTABLE_set_integer_keyed_int(INTERP, array,  0,
@@ -490,7 +490,7 @@
                 errmsg);
         }
 
-        array = pmc_new(INTERP, enum_class_ResizableStringArray);
+        array = Parrot_pmc_new(INTERP, enum_class_ResizableStringArray);
 
         while ((dirent = readdir(dir)) != NULL) {
             retval = Parrot_str_new(INTERP, dirent->d_name, 0) ;

Modified: branches/rm_cflags/src/pmc/packfile.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/packfile.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/packfile.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -71,7 +71,7 @@
         PackFile                   *pf;
 
         attrs->uuid     = Parrot_str_new_noinit(INTERP, enum_stringrep_one, 0);
-        attrs->directory = pmc_new(INTERP, enum_class_PackfileDirectory);
+        attrs->directory = Parrot_pmc_new(INTERP, enum_class_PackfileDirectory);
 
         /* Create dummy PackFile and copy default attributes to self */
         pf = PackFile_new(interp, 0);

Modified: branches/rm_cflags/src/pmc/packfileannotations.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/packfileannotations.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/packfileannotations.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -49,7 +49,7 @@
         Parrot_PackfileAnnotations_attributes * attrs =
                 PMC_data_typed(SELF, Parrot_PackfileAnnotations_attributes*);
 
-        attrs->annotations = pmc_new(interp, enum_class_ResizablePMCArray);
+        attrs->annotations = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
         /*
         Don't initialize C<const_table>. It will be set to NULL bu auto_attrs
         handling. And should be set to proper PMC in set_directory.
@@ -220,7 +220,7 @@
         for (i = 0; i < a->num_entries; ++i) {
             PackFile_Annotations_Entry *entry = a->entries[i];
             PackFile_Annotations_Key   *key   = a->keys[entry->key];
-            annotation = pmc_new(interp, enum_class_PackfileAnnotation);
+            annotation = Parrot_pmc_new(interp, enum_class_PackfileAnnotation);
 
             /* Poke directly to annotation attributes. */
             annotation_attrs         = PARROT_PACKFILEANNOTATION(annotation);
@@ -289,9 +289,9 @@
                 ...
             ]
         */
-        keys        = pmc_new(interp, enum_class_Hash);
-        names       = pmc_new(interp, enum_class_ResizableIntegerArray);
-        types       = pmc_new(interp, enum_class_ResizableIntegerArray);
+        keys        = Parrot_pmc_new(interp, enum_class_Hash);
+        names       = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
+        types       = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
         last_key_id = -1;
 
         /* Iterate over stored annotations and create Key if required. */
@@ -306,7 +306,7 @@
             PMC * key_array = VTABLE_get_pmc_keyed_str(interp, keys, entity_attrs->name);
             if (PMC_IS_NULL(key_array)) {
                 /* Never see this name before. Create new FIA and add to keys. */
-                key_array = pmc_new(interp, enum_class_FixedIntegerArray);
+                key_array = Parrot_pmc_new(interp, enum_class_FixedIntegerArray);
                 VTABLE_set_integer_native(interp, key_array, 3);
                 VTABLE_set_integer_keyed_int(interp, key_array, 0, -1);
                 VTABLE_set_integer_keyed_int(interp, key_array, 1, -1);

Modified: branches/rm_cflags/src/pmc/packfileconstanttable.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/packfileconstanttable.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/packfileconstanttable.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -45,8 +45,8 @@
         Parrot_PackfileConstantTable_attributes * attrs =
                 PMC_data_typed(SELF, Parrot_PackfileConstantTable_attributes*);
 
-        attrs->constants = pmc_new(interp, enum_class_ResizablePMCArray);
-        attrs->types     = pmc_new(interp, enum_class_ResizableIntegerArray);
+        attrs->constants = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+        attrs->types     = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
 
         PObj_custom_mark_SET(SELF);
         PMC_data(SELF) = attrs;
@@ -323,6 +323,29 @@
 
 /*
 
+=item C<void set_main(INTVAL index)>
+
+Set the :main flag in a Sub in the constant table.
+
+Experimental. Use with care. There is no way to set the
+private flags from PIR, so we need something like this.
+
+If something goes wrong, blame NotFound.
+
+=cut
+
+*/
+    METHOD set_main(INTVAL index) {
+        PMC *mainsub = SELF.get_pmc_keyed_int(index);
+        if (mainsub->vtable->base_type != enum_class_Sub)
+            Parrot_ex_throw_from_c_args(interp, NULL,
+                EXCEPTION_INVALID_OPERATION,
+                "Attempt to set main flag in a non Sub");
+        SUB_FLAG_flag_SET(PF_MAIN, mainsub);
+    }
+
+/*
+
 =item C<INTVAL get_or_create_constant()>
 
 Get or create constant for passed value.

Modified: branches/rm_cflags/src/pmc/packfiledirectory.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/packfiledirectory.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/packfiledirectory.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -42,7 +42,7 @@
         Parrot_PackfileDirectory_attributes * attrs =
                 PMC_data_typed(SELF, Parrot_PackfileDirectory_attributes*);
 
-        attrs->hash = pmc_new(interp, enum_class_Hash);
+        attrs->hash = Parrot_pmc_new(interp, enum_class_Hash);
 
         PObj_custom_mark_SET(SELF);
     }
@@ -110,7 +110,7 @@
                 break;
             }
 
-            segment = pmc_new(interp, pmc_type);
+            segment = Parrot_pmc_new(interp, pmc_type);
             name    = pfseg->name;
             VTABLE_set_pmc_keyed_str(interp, SELF, name, segment);
 

Modified: branches/rm_cflags/src/pmc/packfilefixuptable.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/packfilefixuptable.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/packfilefixuptable.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -42,7 +42,7 @@
         Parrot_PackfileFixupTable_attributes * attrs =
                 PMC_data_typed(SELF, Parrot_PackfileFixupTable_attributes*);
 
-        attrs->entries = pmc_new(interp, enum_class_ResizablePMCArray);
+        attrs->entries = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
 
         PObj_custom_mark_SET(SELF);
     }
@@ -89,7 +89,7 @@
 
         for (i = 0; i < table->fixup_count; ++i) {
             val = table->fixups[i];
-            entry = pmc_new(interp, enum_class_PackfileFixupEntry);
+            entry = Parrot_pmc_new(interp, enum_class_PackfileFixupEntry);
             VTABLE_set_pointer(interp, entry, (void*)val);
             VTABLE_set_pmc_keyed_int(interp, attrs->entries, i, entry);
         }

Modified: branches/rm_cflags/src/pmc/packfilerawsegment.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/packfilerawsegment.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/packfilerawsegment.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -44,7 +44,7 @@
         Parrot_PackfileRawSegment_attributes * attrs =
                 PMC_data_typed(SELF, Parrot_PackfileRawSegment_attributes*);
 
-        attrs->opcodes = pmc_new(interp, enum_class_ResizableIntegerArray);
+        attrs->opcodes = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
         attrs->type    = PF_BYTEC_SEG;
 
         PObj_custom_mark_SET(SELF);

Modified: branches/rm_cflags/src/pmc/parrotinterpreter.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/parrotinterpreter.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/parrotinterpreter.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -53,7 +53,7 @@
     /* we block GC runs while cloning since C<d> is not yet running */
     Parrot_block_GC_mark(d);
 
-    d->scheduler = pmc_new(d, enum_class_Scheduler);
+    d->scheduler = Parrot_pmc_new(d, enum_class_Scheduler);
     d->scheduler = VTABLE_share_ro(d, d->scheduler);
 
     /* can't copy directly, unless you want double-frees */
@@ -176,16 +176,6 @@
     new_interp->current_cont = NEED_CONTINUATION;
 }
 
-static int
-recursion_limit(PARROT_INTERP, PMC *self, int l)
-{
-    const int ret           = interp->recursion_limit;
-    UNUSED(self)
-
-    interp->recursion_limit = l;
-    return ret;
-}
-
 pmclass ParrotInterpreter no_ro {
     ATTR struct parrot_interp_t *interp; /* this PMC's interpreter */
     ATTR INTVAL                  tid;    /* thread id */
@@ -200,24 +190,28 @@
 
 =over 4
 
-=item C<void class_init()>
+=item C<yield>
 
-Class initialization.
+Yield the current thread
+
+=item C<recursion_limit(INTVAL l :optional, INTVAL has_l :opt_flag )>
+
+Gets the recursion limit of the interpreter, optionally setting it to something
+new.
 
 =cut
 
 */
 
-    void class_init() {
-        const int typ = enum_class_ParrotInterpreter;
-
-        /* TODO unify and fix signatures */
-        register_nci_method(INTERP, typ,
-                F2DPTR(pt_thread_yield), "yield", "v");
+    METHOD yield() {
+        pt_thread_yield();
+    }
 
-        /* misc functions */
-        register_nci_method(INTERP, typ,
-                F2DPTR(recursion_limit), "recursion_limit", "iJOi");
+    METHOD recursion_limit(INTVAL l :optional, INTVAL has_l :opt_flag) {
+        const INTVAL ret = INTERP->recursion_limit;
+        if (has_l)
+            INTERP->recursion_limit = l;
+        RETURN(INTVAL ret);
     }
 
 /*
@@ -305,7 +299,7 @@
     VTABLE void set_pointer(void *value) {
 
         /* XXX: init_world in src/global_setup.c needs to create a
-         * ParrotInterpreter through pmc_new_noinit.  If this PMC hasn't been
+         * ParrotInterpreter through Parrot_pmc_new_noinit.  If this PMC hasn't been
          * initialized, cheat by initializing instead. */
         if (!PMC_data(SELF)) {
             Parrot_ParrotInterpreter_attributes *attrs =
@@ -559,7 +553,7 @@
                         pc - seg->base.data, NULL);
             }
 
-            return pmc_new(interp, enum_class_Hash);
+            return Parrot_pmc_new(interp, enum_class_Hash);
         }
 
         Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_ATTRIB_NOT_FOUND,
@@ -621,7 +615,7 @@
 */
 
     VTABLE PMC *clone() {
-        PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
 
         clone_interpreter(PMC_interp(dest),
                           PMC_interp(SELF), PARROT_CLONE_DEFAULT);

Modified: branches/rm_cflags/src/pmc/parrotlibrary.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/parrotlibrary.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/parrotlibrary.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -77,7 +77,7 @@
 */
 
     VTABLE PMC *clone() {
-        PMC * const dest     = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC * const dest     = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
         PMC_oplib_init(dest) = PMC_oplib_init(SELF);
         PMC_dlhandle(dest)   = PMC_dlhandle(SELF);
 

Modified: branches/rm_cflags/src/pmc/parrotthread.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/parrotthread.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/parrotthread.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -71,7 +71,7 @@
     interp->flags &= ~PARROT_THR_COPY_INTERP; /* XXX */
     pt_thread_run(interp, thread, sub, args);
 
-    pmc_reuse(interp, thread, enum_class_ParrotRunningThread, 0);
+    Parrot_pmc_reuse(interp, thread, enum_class_ParrotRunningThread, 0);
 
     PObj_custom_mark_CLEAR(thread);
     VTABLE_set_integer_native(interp, thread, tid);
@@ -79,12 +79,6 @@
     return tid;
 }
 
-static INTVAL do_thread_run_clone_default(PARROT_INTERP,
-                                          PMC *thread, PMC *sub, PMC *args) {
-    return do_thread_run(interp, thread, PARROT_CLONE_DEFAULT, sub, args);
-}
-
-
 pmclass ParrotThread extends ParrotInterpreter no_ro {
 
 /*
@@ -103,17 +97,17 @@
 
 */
 
-    void class_init() {
-        const int typ = enum_class_ParrotThread;
-
-        register_nci_method(INTERP, typ,
-                F2DPTR(do_thread_run), "run", "IJOIP@");
+    METHOD run(INTVAL clone_flags, PMC *sub, PMC *args :slurpy) {
+        const INTVAL retval = do_thread_run(INTERP, SELF, clone_flags, sub, args);
+        RETURN(INTVAL retval);
+    }
 
-        /* XXX appropriate name given that this won't clone globals? */
-        register_nci_method(INTERP, typ,
-                F2DPTR(do_thread_run_clone_default), "run_clone", "IJOP@");
+    METHOD run_clone(PMC *sub, PMC *args :slurpy) {
+        const INTVAL retval = do_thread_run(INTERP, SELF, PARROT_CLONE_DEFAULT, sub, args);
+        RETURN(INTVAL retval)
     }
 
+
 /*
 
 =item C<void init()>

Modified: branches/rm_cflags/src/pmc/pmcproxy.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/pmcproxy.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/pmcproxy.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -79,7 +79,7 @@
     VTABLE void init() {
         Parrot_Class_attributes * const _pmc =
                 (Parrot_Class_attributes *) PMC_data(SELF);
-        PMC          * const new_attribute   = pmc_new(interp, enum_class_Hash);
+        PMC          * const new_attribute   = Parrot_pmc_new(interp, enum_class_Hash);
         STRING       * const name            = CONST_STRING(interp, "proxy");
 
         /* Set flag for custom GC mark. */
@@ -89,16 +89,16 @@
         _pmc->id               = 0;
         _pmc->name             = CONST_STRING(interp, "");
         _pmc->_namespace       = PMCNULL;
-        _pmc->parents          = pmc_new(interp, enum_class_ResizablePMCArray);
-        _pmc->all_parents      = pmc_new(interp, enum_class_ResizablePMCArray);
-        _pmc->roles            = pmc_new(interp, enum_class_ResizablePMCArray);
-        _pmc->methods          = pmc_new(interp, enum_class_Hash);
-        _pmc->vtable_overrides = pmc_new(interp, enum_class_Hash);
-        _pmc->parent_overrides = pmc_new(interp, enum_class_Hash);
-        _pmc->attrib_metadata  = pmc_new(interp, enum_class_Hash);
+        _pmc->parents          = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+        _pmc->all_parents      = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+        _pmc->roles            = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+        _pmc->methods          = Parrot_pmc_new(interp, enum_class_Hash);
+        _pmc->vtable_overrides = Parrot_pmc_new(interp, enum_class_Hash);
+        _pmc->parent_overrides = Parrot_pmc_new(interp, enum_class_Hash);
+        _pmc->attrib_metadata  = Parrot_pmc_new(interp, enum_class_Hash);
         _pmc->attrib_index     = PMCNULL;
         _pmc->attrib_cache     = PMCNULL;
-        _pmc->resolve_method   = pmc_new(interp, enum_class_ResizablePMCArray);
+        _pmc->resolve_method   = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
 
         /* Set up the attribute storage for the proxy instance */
         VTABLE_set_string_keyed_str(interp, new_attribute, CONST_STRING(interp, "name"), name);
@@ -194,9 +194,9 @@
         Parrot_Class_attributes * const _pmc = PARROT_CLASS(SELF);
 
         if (!PMC_IS_NULL(init))
-            return pmc_new_init(interp, _pmc->id, init);
+            return Parrot_pmc_new_init(interp, _pmc->id, init);
 
-        return pmc_new(interp, _pmc->id);
+        return Parrot_pmc_new(interp, _pmc->id);
     }
 
 /*
@@ -266,6 +266,7 @@
 
         return 0;
     }
+
 /*
 
 =item C<INTVAL isa(STRING *classname)>
@@ -315,7 +316,7 @@
     VTABLE INTVAL does(STRING *role_name) {
         Parrot_Class_attributes *_class  = PARROT_CLASS(SELF);
         INTVAL                   id      = _class->id;
-        PMC                     *proxied = pmc_new(interp, id);
+        PMC                     *proxied = Parrot_pmc_new(interp, id);
 
         if (VTABLE_does(interp, proxied, role_name))
             return 1;
@@ -359,7 +360,7 @@
         STRING * const meth_str    = CONST_STRING(interp, "methods");
         STRING * const parents_str = CONST_STRING(interp, "parents");
 
-        PMC * const metadata = pmc_new(interp, enum_class_Hash);
+        PMC * const metadata = Parrot_pmc_new(interp, enum_class_Hash);
 
         VTABLE_set_pmc_keyed_str(interp, metadata, name_str,
             VTABLE_inspect_str(interp, SELF, name_str));
@@ -382,6 +383,7 @@
 =cut
 
 */
+
     METHOD name() {
         Parrot_Class_attributes * const _pmc     = PARROT_CLASS(SELF);
         STRING       * const ret_name = _pmc->name;
@@ -397,6 +399,7 @@
 =cut
 
 */
+
     METHOD get_namespace() {
         Parrot_Class_attributes * const _pmc          = PARROT_CLASS(SELF);
         PMC          * const ret_namespace = _pmc->_namespace;
@@ -412,6 +415,7 @@
 =cut
 
 */
+
     METHOD new(PMC *args :optional, int got_args :opt_flag) {
         PMC * const obj = VTABLE_instantiate(interp, SELF, args);
         UNUSED(got_args);
@@ -427,6 +431,7 @@
 =cut
 
 */
+
     METHOD methods() {
         PMC * const ret_methods = VTABLE_inspect_str(interp, SELF, CONST_STRING(interp, "methods"));
         RETURN(PMC *ret_methods);
@@ -441,6 +446,7 @@
 =cut
 
 */
+
     METHOD parents() {
         PMC * const ret_parents = VTABLE_inspect_str(interp, SELF, CONST_STRING(interp, "parents"));
         RETURN(PMC *ret_parents);
@@ -456,6 +462,7 @@
 =cut
 
 */
+
     METHOD inspect(STRING *what :optional, int got_what :opt_flag) {
         /* Just delegate to the appropriate vtable method. */
         PMC * const found =

Modified: branches/rm_cflags/src/pmc/pointer.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/pointer.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/pointer.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -67,7 +67,7 @@
 */
 
     VTABLE PMC *clone() {
-        PMC * const dest = pmc_new_noinit(INTERP, SELF->vtable->base_type);
+        PMC * const dest = Parrot_pmc_new_noinit(INTERP, SELF->vtable->base_type);
         PObj_custom_mark_SET(dest);
         PMC_data(dest) = PMC_data(SELF);
         return dest;

Modified: branches/rm_cflags/src/pmc/resizablebooleanarray.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/resizablebooleanarray.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/resizablebooleanarray.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -373,7 +373,7 @@
         UINTVAL         tail_pos, head_pos;
         unsigned char * my_bit_array, * dest_bit_array;
 
-        PMC * const     dest = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC * const     dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
 
         GET_ATTR_bit_array(INTERP, SELF, my_bit_array);
         GET_ATTR_size(INTERP, SELF, tail_pos);

Modified: branches/rm_cflags/src/pmc/resizablepmcarray.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/resizablepmcarray.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/resizablepmcarray.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -366,7 +366,7 @@
     VTABLE void push_float(FLOATVAL value) {
 
         INTVAL size = PMC_size(SELF);
-        PMC   *val  = pmc_new(INTERP, enum_class_Float);
+        PMC   *val  = Parrot_pmc_new(INTERP, enum_class_Float);
 
         VTABLE_set_number_native(INTERP, val, value);
         SELF.set_pmc_keyed_int(size, val);
@@ -377,7 +377,7 @@
     VTABLE void push_integer(INTVAL value) {
 
         INTVAL size = PMC_size(SELF);
-        PMC   *val  = pmc_new(INTERP, enum_class_Integer);
+        PMC   *val  = Parrot_pmc_new(INTERP, enum_class_Integer);
 
         VTABLE_set_integer_native(INTERP, val, value);
         SELF.set_pmc_keyed_int(size, val);
@@ -397,7 +397,7 @@
     VTABLE void push_string(STRING *value) {
 
         INTVAL size = PMC_size(SELF);
-        PMC   *val  = pmc_new(INTERP, enum_class_String);
+        PMC   *val  = Parrot_pmc_new(INTERP, enum_class_String);
 
         VTABLE_assign_string_native(INTERP, val, value);
         SELF.set_pmc_keyed_int(size, val);
@@ -501,7 +501,7 @@
     VTABLE void unshift_float(FLOATVAL value) {
 
         INTVAL  size = PMC_size(SELF);
-        PMC    *val  = pmc_new(INTERP, enum_class_Float);
+        PMC    *val  = Parrot_pmc_new(INTERP, enum_class_Float);
         PMC   **data;
         INTVAL  i;
 
@@ -521,7 +521,7 @@
     VTABLE void unshift_integer(INTVAL value) {
 
         INTVAL  size = PMC_size(SELF);
-        PMC    *val  = pmc_new(INTERP, enum_class_Integer);
+        PMC    *val  = Parrot_pmc_new(INTERP, enum_class_Integer);
         PMC    **data;
         INTVAL   i;
 
@@ -559,7 +559,7 @@
     VTABLE void unshift_string(STRING *value) {
 
         INTVAL  size = PMC_size(SELF);
-        PMC    *val  = pmc_new(INTERP, enum_class_String);
+        PMC    *val  = Parrot_pmc_new(INTERP, enum_class_String);
         PMC   **data;
         INTVAL  i;
 

Modified: branches/rm_cflags/src/pmc/resizablestringarray.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/resizablestringarray.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/resizablestringarray.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -144,7 +144,7 @@
 
     VTABLE PMC *pop_pmc() {
         STRING *strval = SELF.pop_string();
-        PMC    *value  = pmc_new(INTERP, enum_class_String);
+        PMC    *value  = Parrot_pmc_new(INTERP, enum_class_String);
 
         VTABLE_set_string_native(INTERP, value, strval);
 
@@ -308,7 +308,7 @@
 
     VTABLE PMC *shift_pmc() {
         STRING *strval = SELF.shift_string();
-        PMC    *value  = pmc_new(INTERP, enum_class_String);
+        PMC    *value  = Parrot_pmc_new(INTERP, enum_class_String);
 
         VTABLE_set_string_native(INTERP, value, strval);
 
@@ -374,7 +374,7 @@
 */
 
     VTABLE void push_integer(INTVAL value) {
-        PMC    *ret = pmc_new(INTERP, enum_class_String);
+        PMC    *ret = Parrot_pmc_new(INTERP, enum_class_String);
         STRING *val;
 
         VTABLE_set_integer_native(INTERP, ret, value);
@@ -394,7 +394,7 @@
 */
 
     VTABLE void push_float(FLOATVAL value) {
-        PMC    *ret = pmc_new(INTERP, enum_class_String);
+        PMC    *ret = Parrot_pmc_new(INTERP, enum_class_String);
         STRING *val;
 
         VTABLE_set_number_native(INTERP, ret, value);
@@ -424,7 +424,7 @@
                     "ResizableStringArray: Can't shift from an empty array!");
 
         value = SELF.get_string_keyed_int(0);
-        ret   = pmc_new(INTERP, enum_class_String);
+        ret   = Parrot_pmc_new(INTERP, enum_class_String);
 
         VTABLE_set_string_native(INTERP, ret, value);
         SELF.delete_keyed_int(0);
@@ -486,7 +486,7 @@
 */
 
     VTABLE void unshift_integer(INTVAL value) {
-        PMC    *ret = pmc_new(INTERP, enum_class_String);
+        PMC    *ret = Parrot_pmc_new(INTERP, enum_class_String);
         STRING *val;
 
         VTABLE_set_integer_native(INTERP, ret, value);
@@ -506,7 +506,7 @@
 */
 
     VTABLE void unshift_float(FLOATVAL value) {
-        PMC    *ret = pmc_new(INTERP, enum_class_String);
+        PMC    *ret = Parrot_pmc_new(INTERP, enum_class_String);
         STRING *val;
 
         VTABLE_set_number_native(INTERP, ret, value);

Modified: branches/rm_cflags/src/pmc/role.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/role.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/role.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -230,9 +230,9 @@
         /* Set up the object. */
         role->name            = CONST_STRING(interp, "");
         role->_namespace      = PMCNULL;
-        role->roles           = pmc_new(interp, enum_class_ResizablePMCArray);
-        role->methods         = pmc_new(interp, enum_class_Hash);
-        role->attrib_metadata = pmc_new(interp, enum_class_Hash);
+        role->roles           = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+        role->methods         = Parrot_pmc_new(interp, enum_class_Hash);
+        role->attrib_metadata = Parrot_pmc_new(interp, enum_class_Hash);
     }
 
     VTABLE void init_pmc(PMC *init_data) {
@@ -276,7 +276,7 @@
 
     VTABLE void add_attribute(STRING *name, PMC *type) {
         Parrot_Role_attributes * const role  = PARROT_ROLE(SELF);
-        PMC           * const new_attribute  = pmc_new(interp, enum_class_Hash);
+        PMC           * const new_attribute  = Parrot_pmc_new(interp, enum_class_Hash);
 
         /* Set name and type. */
         VTABLE_set_string_keyed_str(interp, new_attribute, CONST_STRING(interp, "name"), name);
@@ -388,7 +388,7 @@
         PMC         *found;
 
         if (Parrot_str_equal(interp, what, CONST_STRING(interp, "name"))) {
-            found = pmc_new(interp, enum_class_String);
+            found = Parrot_pmc_new(interp, enum_class_String);
             VTABLE_set_string_native(interp, found, role->name);
         }
         else if (Parrot_str_equal(interp, what, CONST_STRING(interp, "namespace"))) {
@@ -414,7 +414,7 @@
         if (found->vtable->base_type == enum_class_Hash) {
             /* for Hash return values, create and return a shallow
              * clone because the VTABLE_clone does a deep clone */
-            PMC * const hash = pmc_new(interp, enum_class_Hash);
+            PMC * const hash = Parrot_pmc_new(interp, enum_class_Hash);
             PMC * const iter = VTABLE_get_iter(interp, found);
             while (VTABLE_get_bool(interp, iter)) {
                 STRING * key = VTABLE_shift_string(interp, iter);
@@ -441,7 +441,7 @@
     VTABLE PMC *inspect() {
         /* Create a hash, then use inspect_str to get all of the data to
          * fill it up with. */
-        PMC * const metadata = pmc_new(interp, enum_class_Hash);
+        PMC * const metadata = Parrot_pmc_new(interp, enum_class_Hash);
 
         STRING * const name       = CONST_STRING(interp, "name");
         STRING * const _namespace = CONST_STRING(interp, "namespace");
@@ -583,7 +583,7 @@
         if (got_name) {
             /* We'll build a hash just containing the name, then give this to
              * init_role_from_hash - saves some code duplication. */
-            PMC *naming_hash = pmc_new(interp, enum_class_Hash);
+            PMC *naming_hash = Parrot_pmc_new(interp, enum_class_Hash);
             VTABLE_set_string_keyed_str(interp, naming_hash, CONST_STRING(interp, "name"), name);
             init_role_from_hash(interp, SELF, naming_hash);
         }

Modified: branches/rm_cflags/src/pmc/scalar.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/scalar.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/scalar.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -39,15 +39,15 @@
 
         if (self_type == enum_class_Boolean)
             /* doesn't morph */
-            pmc_reuse(INTERP, SELF, val_type, 0);
+            Parrot_pmc_reuse(INTERP, SELF, val_type, 0);
 
         if (val_type == enum_class_Undef) {
-            pmc_reuse(INTERP, SELF, val_type, 0);
+            Parrot_pmc_reuse(INTERP, SELF, val_type, 0);
             return;
         }
 
         if (VTABLE_isa(INTERP, value, CONST_STRING(INTERP, "Undef"))) {
-            pmc_reuse(INTERP, SELF, enum_class_Undef, 0);
+            Parrot_pmc_reuse(INTERP, SELF, enum_class_Undef, 0);
             return;
         }
 
@@ -68,7 +68,7 @@
             SELF.set_string_native(v);
             return;
         }
-        pmc_reuse(INTERP, SELF, val_type, 0);
+        Parrot_pmc_reuse(INTERP, SELF, val_type, 0);
         SELF.set_pmc(value);
     }
 
@@ -112,7 +112,7 @@
     MULTI PMC *add(Complex value, PMC *dest) {
         const FLOATVAL a = SELF.get_number();
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, value));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, value));
 
         VTABLE_set_number_native(INTERP, dest,
                 a + VTABLE_get_number_keyed_int(INTERP, value, 0));
@@ -122,7 +122,7 @@
     }
 
     MULTI PMC *add(DEFAULT value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_number_native(INTERP, dest,
                 SELF.get_number() + VTABLE_get_number(INTERP, value));
@@ -130,7 +130,7 @@
     }
 
     VTABLE PMC *add_int(INTVAL value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_number_native(INTERP, dest,
                 SELF.get_number() + (FLOATVAL)value);
@@ -138,7 +138,7 @@
     }
 
     VTABLE PMC *add_float(FLOATVAL value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_number_native(INTERP, dest,
                 SELF.get_number() + value);
@@ -148,7 +148,7 @@
     MULTI void i_add(Complex value) {
         const FLOATVAL a = SELF.get_number();
 
-        pmc_reuse(INTERP, SELF, enum_class_Complex, 0);
+        Parrot_pmc_reuse(INTERP, SELF, enum_class_Complex, 0);
         VTABLE_set_number_native(INTERP, SELF,
                 a + VTABLE_get_number_keyed_int(INTERP, value, 0));
         VTABLE_set_number_keyed_int(INTERP, SELF, 1,
@@ -195,7 +195,7 @@
 
     MULTI PMC *subtract(Complex value, PMC *dest) {
         const FLOATVAL a = SELF.get_number();
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, value));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, value));
 
         VTABLE_set_number_native(INTERP, dest,
                 a - VTABLE_get_number_keyed_int(INTERP, value, 0));
@@ -205,14 +205,14 @@
     }
 
     MULTI PMC *subtract(DEFAULT value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         VTABLE_set_number_native(INTERP, dest,
                 SELF.get_number() - VTABLE_get_number(INTERP, value));
         return dest;
     }
 
     VTABLE PMC *subtract_int(INTVAL value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_number_native(INTERP, dest,
                 SELF.get_number() - (FLOATVAL)value);
@@ -220,7 +220,7 @@
     }
 
     VTABLE PMC *subtract_float(FLOATVAL value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_number_native(INTERP, dest,
                 SELF.get_number() - value);
@@ -230,7 +230,7 @@
     MULTI void i_subtract(Complex value) {
         const FLOATVAL a = SELF.get_number();
 
-        pmc_reuse(INTERP, SELF, enum_class_Complex, 0);
+        Parrot_pmc_reuse(INTERP, SELF, enum_class_Complex, 0);
         VTABLE_set_number_native(INTERP, SELF,
                 a - VTABLE_get_number_keyed_int(INTERP, value, 0));
         VTABLE_set_number_keyed_int(INTERP, SELF, 1,
@@ -272,7 +272,7 @@
     }
 
     MULTI PMC *multiply(DEFAULT value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_number_native(INTERP, dest,
             SELF.get_number() * VTABLE_get_number(INTERP, value));
@@ -280,7 +280,7 @@
     }
 
     VTABLE PMC *multiply_int(INTVAL value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_number_native(INTERP, dest,
             SELF.get_number() * value);
@@ -288,7 +288,7 @@
     }
 
     VTABLE PMC *multiply_float(FLOATVAL value, PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_number_native(INTERP, dest,
             SELF.get_number() * value);
@@ -344,7 +344,7 @@
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
                 "float division by zero");
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_number_native(INTERP, dest, SELF.get_number() / d);
         return dest;
@@ -355,7 +355,7 @@
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
                 "float division by zero");
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_number_native(INTERP, dest, SELF.get_number() / value);
         return dest;
@@ -366,7 +366,7 @@
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
                 "float division by zero");
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_number_native(INTERP, dest, SELF.get_number() / value);
         return dest;
@@ -427,7 +427,7 @@
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
                 "float division by zero");
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         d    = floor(SELF.get_number() / d);
 
         VTABLE_set_integer_native(INTERP, dest, (INTVAL)d);
@@ -439,7 +439,7 @@
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
                 "float division by zero");
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_number_native(INTERP, dest,
                 floor(SELF.get_number() / value));
@@ -451,7 +451,7 @@
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
                 "float division by zero");
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_number_native(INTERP, dest,
                 floor(SELF.get_number() / value));
@@ -517,7 +517,7 @@
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
                 "float modulus by zero");
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_number_native(INTERP, dest,
                 floatval_mod(SELF.get_number(), d));
@@ -529,7 +529,7 @@
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
                 "float modulus by zero");
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_number_native(INTERP, dest,
                 floatval_mod(SELF.get_number(), (FLOATVAL)value));
@@ -541,7 +541,7 @@
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
                 "float modulus by zero");
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_number_native(INTERP, dest,
                 floatval_mod(SELF.get_number(), value));
@@ -592,7 +592,7 @@
     VTABLE PMC *neg(PMC *dest) {
         const INTVAL a = -SELF.get_integer();
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_integer_native(INTERP, dest, a);
         return dest;
@@ -630,7 +630,7 @@
         STRING * const s = Parrot_str_concat(INTERP, SELF.get_string(),
             VTABLE_get_string(INTERP, value), 0);
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_string_native(INTERP, dest, s);
         return dest;
@@ -640,7 +640,7 @@
         STRING * const s = Parrot_str_concat(INTERP,
             SELF.get_string(), value, 0);
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_string_native(INTERP, dest, s);
         return dest;
@@ -679,7 +679,7 @@
         STRING * const s = SELF.get_string();
         const UINTVAL  n = (UINTVAL)VTABLE_get_integer(INTERP, value);
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_string_native(INTERP, dest,
             Parrot_str_repeat(INTERP, s, n));
@@ -690,7 +690,7 @@
         STRING * const s = SELF.get_string();
         const UINTVAL  n = value;
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_string_native(INTERP, dest,
             Parrot_str_repeat(INTERP, s, n));
@@ -862,7 +862,7 @@
         else if (value_bool && ! my_bool)
             return value;
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         VTABLE_set_bool(INTERP, dest, 0);
         return dest;
     }
@@ -883,7 +883,7 @@
     VTABLE PMC *logical_not(PMC *dest) {
         const INTVAL a = ! SELF.get_bool();
 
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
         VTABLE_set_bool(INTERP, dest, a);
         return dest;
@@ -934,7 +934,7 @@
 */
     VTABLE PMC *share_ro() {
         PMC         *ret  = pt_shared_fixup(INTERP, SELF);
-        PMC * const _true = pmc_new(INTERP, enum_class_Integer);
+        PMC * const _true = Parrot_pmc_new(INTERP, enum_class_Integer);
 
         VTABLE_set_integer_native(INTERP, _true, 1);
 

Modified: branches/rm_cflags/src/pmc/scheduler.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/scheduler.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/scheduler.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -57,11 +57,11 @@
         /* Set up the core struct. */
         core_struct->id          = 0;
         core_struct->max_tid     = 0;
-        core_struct->task_list   = pmc_new(interp, enum_class_Hash);
-        core_struct->task_index  = pmc_new(interp, enum_class_ResizableIntegerArray);
-        core_struct->wait_index  = pmc_new(interp, enum_class_ResizablePMCArray);
-        core_struct->handlers    = pmc_new(interp, enum_class_ResizablePMCArray);
-        core_struct->messages    = pmc_new(interp, enum_class_ResizablePMCArray);
+        core_struct->task_list   = Parrot_pmc_new(interp, enum_class_Hash);
+        core_struct->task_index  = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
+        core_struct->wait_index  = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+        core_struct->handlers    = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+        core_struct->messages    = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
         core_struct->interp      = INTERP;
         MUTEX_INIT(core_struct->msg_lock);
     }

Modified: branches/rm_cflags/src/pmc/sockaddr.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/sockaddr.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/sockaddr.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -80,7 +80,7 @@
 */
 
     VTABLE PMC *clone() {
-        PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
         memcpy(PARROT_SOCKADDR(dest)->pointer, PARROT_SOCKADDR(SELF)->pointer,
                 sizeof (struct sockaddr_in));
         return dest;

Modified: branches/rm_cflags/src/pmc/string.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/string.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/string.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -71,7 +71,7 @@
 */
 
     VTABLE PMC *clone() {
-        PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
         VTABLE_set_string_native(INTERP, dest, SELF.get_string());
         return dest;
     }
@@ -461,7 +461,7 @@
     }
 
     VTABLE PMC *get_pmc_keyed_int(INTVAL pos) {
-        PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
         VTABLE_set_string_native(INTERP, dest, SELF.get_string_keyed_int(pos));
         return dest;
     }
@@ -536,7 +536,7 @@
 */
 
     METHOD to_int(INTVAL base) {
-        PMC *result = pmc_new(INTERP, Parrot_get_ctx_HLL_type(interp,
+        PMC *result = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(interp,
                         enum_class_Integer));
 
         /* TODO verify encoding */
@@ -611,7 +611,7 @@
     }
 
     VTABLE PMC *get_iter() {
-        return pmc_new_init(INTERP, enum_class_StringIterator, SELF);
+        return Parrot_pmc_new_init(INTERP, enum_class_StringIterator, SELF);
     }
 
 /*

Modified: branches/rm_cflags/src/pmc/stringhandle.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/stringhandle.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/stringhandle.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -94,7 +94,7 @@
 
     VTABLE PMC *clone() {
         Parrot_StringHandle_attributes * const old_struct  = PARROT_STRINGHANDLE(SELF);
-        PMC * const copy = pmc_new(INTERP, enum_class_StringHandle);
+        PMC * const copy = Parrot_pmc_new(INTERP, enum_class_StringHandle);
         Parrot_StringHandle_attributes * const data_struct = PARROT_STRINGHANDLE(copy);
 
         if (old_struct->stringhandle != NULL)

Modified: branches/rm_cflags/src/pmc/stringiterator.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/stringiterator.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/stringiterator.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -73,7 +73,7 @@
         Parrot_StringIterator_attributes * const attrs =
                 PARROT_STRINGITERATOR(SELF);
         PMC                              * const clone =
-                pmc_new_init(INTERP, enum_class_StringIterator, attrs->string);
+                Parrot_pmc_new_init(INTERP, enum_class_StringIterator, attrs->string);
         Parrot_StringIterator_attributes * const clone_attrs =
                 PARROT_STRINGITERATOR(clone);
 
@@ -184,7 +184,7 @@
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
                 "StopIteration");
 
-        ret = pmc_new(INTERP, Parrot_get_ctx_HLL_type(interp, enum_class_String));
+        ret = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(interp, enum_class_String));
         VTABLE_set_string_native(INTERP, ret,
                 VTABLE_get_string_keyed_int(INTERP, attrs->string, attrs->pos++));
         return ret;
@@ -248,7 +248,7 @@
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
                 "StopIteration");
 
-        ret = pmc_new(INTERP, Parrot_get_ctx_HLL_type(interp, enum_class_String));
+        ret = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(interp, enum_class_String));
         VTABLE_set_string_native(INTERP, ret,
                 VTABLE_get_string_keyed_int(INTERP, attrs->string, --attrs->pos));
         return ret;

Modified: branches/rm_cflags/src/pmc/sub.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/sub.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/sub.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -388,7 +388,7 @@
          * create new context, place it in interpreter */
         context = Parrot_pcc_get_signature(INTERP, caller_ctx);
         if (PMC_IS_NULL(context))
-            context = pmc_new(INTERP, enum_class_CallContext);
+            context = Parrot_pmc_new(INTERP, enum_class_CallContext);
         CURRENT_CONTEXT(INTERP) = context;
         Parrot_pcc_set_caller_ctx(INTERP, context, caller_ctx);
         Parrot_pcc_allocate_registers(INTERP, context, sub->n_regs_used);
@@ -425,7 +425,7 @@
          *      and factor out common code with coroutine pmc
          */
         if (!PMC_IS_NULL(sub->lex_info)) {
-            Parrot_pcc_set_lex_pad(interp, context, pmc_new_init(INTERP,
+            Parrot_pcc_set_lex_pad(interp, context, Parrot_pmc_new_init(INTERP,
                     Parrot_get_ctx_HLL_type(interp, enum_class_LexPad),
                     sub->lex_info));
             VTABLE_set_pointer(INTERP, Parrot_pcc_get_lex_pad(interp, context), context);
@@ -458,7 +458,7 @@
                     Parrot_pcc_set_sub(interp, dummy, outer_pmc);
 
                     if (!PMC_IS_NULL(outer_sub->lex_info)) {
-                        Parrot_pcc_set_lex_pad(interp, dummy, pmc_new_init(INTERP,
+                        Parrot_pcc_set_lex_pad(interp, dummy, Parrot_pmc_new_init(INTERP,
                                Parrot_get_ctx_HLL_type(interp, enum_class_LexPad),
                                outer_sub->lex_info));
                         VTABLE_set_pointer(INTERP, Parrot_pcc_get_lex_pad(interp, dummy), dummy);
@@ -506,7 +506,7 @@
 */
 
     VTABLE PMC *clone() {
-        PMC        * const ret = pmc_new(INTERP, SELF->vtable->base_type);
+        PMC        * const ret = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
         Parrot_Sub_attributes *dest_sub;
         Parrot_Sub_attributes *sub;
 
@@ -761,7 +761,7 @@
     {
         /* Create a hash, then use inspect_str to get all of the data to
          * fill it up with. */
-        PMC    * const metadata           = pmc_new(interp, enum_class_Hash);
+        PMC    * const metadata           = Parrot_pmc_new(interp, enum_class_Hash);
         STRING * const pos_required_str   = CONST_STRING(interp, "pos_required");
         STRING * const pos_optional_str   = CONST_STRING(interp, "pos_optional");
         STRING * const named_required_str = CONST_STRING(interp, "named_required");
@@ -908,7 +908,7 @@
                 "Unknown introspection value '%S'", what);
         }
 
-        retval = pmc_new(INTERP, enum_class_Integer);
+        retval = Parrot_pmc_new(INTERP, enum_class_Integer);
         VTABLE_set_integer_native(INTERP, retval, count_found);
         return retval;
     }
@@ -1064,7 +1064,7 @@
         if (PMC_IS_NULL(sub->lex_info)) {
             const INTVAL lex_info_id = Parrot_get_ctx_HLL_type(interp,
                                            enum_class_LexInfo);
-            sub->lex_info = pmc_new_init(interp, lex_info_id, SELF);
+            sub->lex_info = Parrot_pmc_new_init(interp, lex_info_id, SELF);
         }
 
         /* If we've got a context around for the outer sub, set it as the

Modified: branches/rm_cflags/src/pmc/task.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/task.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/task.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -180,7 +180,7 @@
     VTABLE PMC *clone() {
         /* Create the new task PMC, of the same type of this one (we may
          * have been subclassed). */
-        PMC * const copy  = pmc_new(interp, SELF->vtable->base_type);
+        PMC * const copy  = Parrot_pmc_new(interp, SELF->vtable->base_type);
         Parrot_Task_attributes * const new_struct = PARROT_TASK(copy);
         Parrot_Task_attributes * const old_struct = PARROT_TASK(SELF);
 
@@ -206,27 +206,27 @@
         PMC *value;
 
         if (Parrot_str_equal(interp, name, CONST_STRING(interp, "id"))) {
-            value = pmc_new(interp, enum_class_Integer);
+            value = Parrot_pmc_new(interp, enum_class_Integer);
             VTABLE_set_integer_native(interp, value, core_struct->id);
         }
         else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "type"))) {
-            value = pmc_new(interp, enum_class_String);
+            value = Parrot_pmc_new(interp, enum_class_String);
             VTABLE_set_string_native(interp, value, core_struct->type);
         }
         else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "subtype"))) {
-            value = pmc_new(interp, enum_class_String);
+            value = Parrot_pmc_new(interp, enum_class_String);
             VTABLE_set_string_native(interp, value, core_struct->subtype);
         }
         else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "priority"))) {
-            value = pmc_new(interp, enum_class_Integer);
+            value = Parrot_pmc_new(interp, enum_class_Integer);
             VTABLE_set_integer_native(interp, value, core_struct->priority);
         }
         else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "status"))) {
-            value = pmc_new(interp, enum_class_String);
+            value = Parrot_pmc_new(interp, enum_class_String);
             VTABLE_set_string_native(interp, value, core_struct->status);
         }
         else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "birthtime"))) {
-            value = pmc_new(interp, enum_class_Float);
+            value = Parrot_pmc_new(interp, enum_class_Float);
             VTABLE_set_number_native(interp, value, core_struct->birthtime);
         }
         else {

Modified: branches/rm_cflags/src/pmc/undef.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/undef.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/undef.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -41,7 +41,7 @@
 
     VTABLE void set_pmc(PMC *other) {
         if (!PObj_is_object_TEST(other)) {
-            pmc_reuse(INTERP, SELF, other->vtable->base_type, 0);
+            Parrot_pmc_reuse(INTERP, SELF, other->vtable->base_type, 0);
             VTABLE_set_pmc(INTERP, SELF, other);
         }
         else {
@@ -127,7 +127,7 @@
 */
 
     VTABLE void set_integer_native(INTVAL value) {
-        pmc_reuse(INTERP, SELF, enum_class_Integer, 0);
+        Parrot_pmc_reuse(INTERP, SELF, enum_class_Integer, 0);
         VTABLE_set_integer_native(INTERP, SELF, value);
     }
 
@@ -156,7 +156,7 @@
 */
 
     VTABLE void set_number_native(FLOATVAL value) {
-        pmc_reuse(INTERP, SELF, enum_class_Float, 0);
+        Parrot_pmc_reuse(INTERP, SELF, enum_class_Float, 0);
         VTABLE_set_number_native(INTERP, SELF, value);
     }
 
@@ -188,7 +188,7 @@
 */
 
     VTABLE void set_string_native(STRING *value) {
-        pmc_reuse(interp, SELF, enum_class_String, 0);
+        Parrot_pmc_reuse(interp, SELF, enum_class_String, 0);
         VTABLE_set_string_native(INTERP, SELF, value);
     }
 
@@ -217,7 +217,7 @@
 */
 
     VTABLE PMC *logical_not(PMC *dest) {
-        dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
         VTABLE_set_bool(INTERP, dest, 1);
         return dest;
     }
@@ -264,7 +264,7 @@
 */
 
     VTABLE PMC *clone() {
-        return pmc_new(INTERP, SELF->vtable->base_type);
+        return Parrot_pmc_new(INTERP, SELF->vtable->base_type);
     }
 
 /*

Modified: branches/rm_cflags/src/pmc/unmanagedstruct.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/unmanagedstruct.pmc	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc/unmanagedstruct.pmc	Mon Feb 22 02:43:55 2010	(r44285)
@@ -386,7 +386,7 @@
             PMC *sig = VTABLE_getprop(interp, ptr, signature_str);
             if (VTABLE_defined(interp, sig)) {
                 STRING *sig_str = VTABLE_get_string(interp, sig);
-                ret             = pmc_new(interp, enum_class_NCI);
+                ret             = Parrot_pmc_new(interp, enum_class_NCI);
                 VTABLE_set_pointer_keyed_str(interp, ret, sig_str,
                             *(PMC **)p);
             }
@@ -703,7 +703,7 @@
 */
 
     VTABLE PMC *clone() {
-        PMC *clone = pmc_new(INTERP, enum_class_UnManagedStruct);
+        PMC *clone = Parrot_pmc_new(INTERP, enum_class_UnManagedStruct);
         mem_sys_memmove(PMC_data(clone), PMC_data(SELF),
                 sizeof (Parrot_UnManagedStruct_attributes));
         PARROT_UNMANAGEDSTRUCT(clone)->init =

Modified: branches/rm_cflags/src/pmc_freeze.c
==============================================================================
--- branches/rm_cflags/src/pmc_freeze.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/pmc_freeze.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -54,11 +54,37 @@
 Parrot_freeze(PARROT_INTERP, ARGIN(PMC *pmc))
 {
     ASSERT_ARGS(Parrot_freeze)
-    PMC *image = pmc_new(interp, enum_class_ImageIO);
+    PMC *image = Parrot_pmc_new(interp, enum_class_ImageIO);
     VTABLE_set_pmc(interp, image, pmc);
     return VTABLE_get_string(interp, image);
 }
 
+/*
+
+=item C<INTVAL Parrot_freeze_size(PARROT_INTERP, PMC *pmc)>
+
+Get the size of an image to be frozen without allocating a large buffer.
+
+Used in C<Packfile_Constant_pack_size>.
+
+=cut
+
+*/
+
+PARROT_EXPORT
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
+INTVAL
+Parrot_freeze_size(PARROT_INTERP, ARGIN(PMC *pmc))
+{
+    ASSERT_ARGS(Parrot_freeze_size)
+    PMC *result;
+    PMC *visitor = Parrot_pmc_new(interp, enum_class_ImageIOSize);
+    VTABLE_set_pmc(interp, visitor, pmc);
+    result = VTABLE_get_pmc(interp, visitor);
+    return VTABLE_get_integer(interp, result);
+}
+
 
 /*
 
@@ -84,7 +110,7 @@
 {
     ASSERT_ARGS(Parrot_thaw)
 
-    PMC        *info     = pmc_new(interp, enum_class_ImageIO);
+    PMC        *info     = Parrot_pmc_new(interp, enum_class_ImageIO);
     int         gc_block = 0;
     PMC        *result;
 
@@ -105,8 +131,8 @@
         gc_block = 1;
     }
 
-    VTABLE_set_pointer(interp, info, &result);
     VTABLE_set_string_native(interp, info, image);
+    result = VTABLE_get_pmc(interp, info);
 
     if (gc_block) {
         Parrot_unblock_GC_mark(interp);
@@ -160,6 +186,72 @@
     return VTABLE_clone(interp, pmc);
 }
 
+/*
+
+=item C<void Parrot_visit_loop_visit(PARROT_INTERP, PMC *info)>
+
+Iterate a visitor PMC visiting each encountered target PMC.
+
+=cut
+
+*/
+
+void
+Parrot_visit_loop_visit(PARROT_INTERP, ARGIN(PMC *info)) {
+    ASSERT_ARGS(Parrot_visit_loop_visit)
+
+    INTVAL      i;
+    PMC * const todo    = VTABLE_get_iter(interp, info);
+
+    /* can't cache upper limit, visit may append items */
+    for (i = 0; i < VTABLE_elements(interp, todo); i++) {
+        PMC *current = VTABLE_get_pmc_keyed_int(interp, todo, i);
+        if (!current)
+            Parrot_ex_throw_from_c_args(interp, NULL, 1,
+                    "NULL current PMC in visit_loop_todo_list");
+
+        PARROT_ASSERT(current->vtable);
+
+        VTABLE_visit(interp, current, info);
+
+        VISIT_PMC(interp, info, PMC_metadata(current));
+    }
+}
+
+/*
+
+=item C<void Parrot_visit_loop_thawfinish(PARROT_INTERP, PMC *info)>
+
+Iterate a visitor PMC thawfinishing each encountered target PMC.
+
+=cut
+
+*/
+
+void
+Parrot_visit_loop_thawfinish(PARROT_INTERP, ARGIN(PMC *info)) {
+    ASSERT_ARGS(Parrot_visit_loop_thawfinish)
+
+    /* call thawfinish for each processed PMC */
+    /*
+     * Thaw in reverse order. We have to fully thaw younger PMCs
+     * before use them in older.
+     *
+     * XXX There are no younger or older pmcs in a directed graph
+     *     that allows cycles. Any code that requires a specific
+     *      order here is likely broken.
+     */
+
+    PMC * const todo    = VTABLE_get_iter(interp, info);
+    const INTVAL n = VTABLE_elements(interp, todo);
+    int          i;
+
+    for (i = n-1; i >= 0; --i) {
+        PMC *current = VTABLE_get_pmc_keyed_int(interp, todo, i);
+        if (!PMC_IS_NULL(current))
+            VTABLE_thawfinish(interp, current, info);
+    }
+}
 
 /*
 

Modified: branches/rm_cflags/src/runcore/profiling.c
==============================================================================
--- branches/rm_cflags/src/runcore/profiling.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/runcore/profiling.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -233,7 +233,7 @@
     }
 
     /* put profile_filename in the gc root set so it won't get collected */
-    gc_register_pmc(interp, (PMC *) runcore->profile_filename);
+    Parrot_pmc_gc_register(interp, (PMC *) runcore->profile_filename);
 
     Profiling_first_loop_SET(runcore);
 

Modified: branches/rm_cflags/src/scheduler.c
==============================================================================
--- branches/rm_cflags/src/scheduler.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/scheduler.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -79,7 +79,7 @@
         /* Add the very first interpreter to the list of interps. */
         pt_add_to_interpreters(interp, NULL);
 
-        scheduler = pmc_new(interp, enum_class_Scheduler);
+        scheduler = Parrot_pmc_new(interp, enum_class_Scheduler);
         scheduler = VTABLE_share_ro(interp, scheduler);
 
         interp->scheduler = scheduler;
@@ -290,7 +290,7 @@
         INTVAL repeat, ARGIN_NULLOK(PMC *sub))
 {
     ASSERT_ARGS(Parrot_cx_schedule_timer)
-    PMC * const timer = pmc_new(interp, enum_class_Timer);
+    PMC * const timer = Parrot_pmc_new(interp, enum_class_Timer);
 
     VTABLE_set_number_keyed_int(interp, timer, PARROT_TIMER_NSEC, duration);
     VTABLE_set_number_keyed_int(interp, timer, PARROT_TIMER_INTERVAL, interval);
@@ -356,7 +356,7 @@
         ARGIN(PMC *user_data), ARGIN(char *ext_data))
 {
     ASSERT_ARGS(Parrot_cx_schedule_callback)
-    PMC *callback = pmc_new(interp, enum_class_Task);
+    PMC *callback = Parrot_pmc_new(interp, enum_class_Task);
     Parrot_Task_attributes * const task_struct = PARROT_TASK(callback);
 
     task_struct->type    = CONST_STRING(interp, "callback");
@@ -483,7 +483,8 @@
 {
     ASSERT_ARGS(Parrot_cx_add_handler_local)
     if (PMC_IS_NULL(Parrot_pcc_get_handlers(interp, interp->ctx)))
-        Parrot_pcc_set_handlers(interp, interp->ctx, pmc_new(interp, enum_class_ResizablePMCArray));
+        Parrot_pcc_set_handlers(interp, interp->ctx, Parrot_pmc_new(interp,
+                                                                    enum_class_ResizablePMCArray));
 
     VTABLE_unshift_pmc(interp, Parrot_pcc_get_handlers(interp, interp->ctx), handler);
 
@@ -730,7 +731,7 @@
     ASSERT_ARGS(Parrot_cx_send_message)
     if (interp->scheduler) {
         Parrot_Scheduler_attributes * sched_struct = PARROT_SCHEDULER(interp->scheduler);
-        PMC *message = pmc_new(interp, enum_class_SchedulerMessage);
+        PMC *message = Parrot_pmc_new(interp, enum_class_SchedulerMessage);
         VTABLE_set_string_native(interp, message, messagetype);
         message = VTABLE_share_ro(interp, message);
 

Modified: branches/rm_cflags/src/string/api.c
==============================================================================
--- branches/rm_cflags/src/string/api.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/string/api.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -3428,7 +3428,7 @@
     if (STRING_IS_NULL(delim) || STRING_IS_NULL(str))
         return PMCNULL;
 
-    res  = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_ResizableStringArray));
+    res  = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_ResizableStringArray));
     slen = Parrot_str_byte_length(interp, str);
 
     if (!slen)

Modified: branches/rm_cflags/src/sub.c
==============================================================================
--- branches/rm_cflags/src/sub.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/sub.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -64,7 +64,7 @@
 new_ret_continuation_pmc(PARROT_INTERP, ARGIN_NULLOK(opcode_t *address))
 {
     ASSERT_ARGS(new_ret_continuation_pmc)
-    PMC* const continuation = pmc_new(interp, enum_class_RetContinuation);
+    PMC* const continuation = Parrot_pmc_new(interp, enum_class_RetContinuation);
     VTABLE_set_pointer(interp, continuation, address);
     return continuation;
 }
@@ -612,7 +612,7 @@
         }
 
         /* Get the Sub PMC itself. */
-        key = pmc_new(interp, enum_class_String);
+        key = Parrot_pmc_new(interp, enum_class_String);
         VTABLE_set_string_native(interp, key, CONST_STRING(interp, "Sub"));
         sub_pmc = VTABLE_get_attr_keyed(interp, subclass, key, CONST_STRING(interp, "proxy"));
         if (sub_pmc->vtable->base_type == enum_class_Sub) {

Modified: branches/rm_cflags/src/thread.c
==============================================================================
--- branches/rm_cflags/src/thread.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/thread.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -182,7 +182,7 @@
     else if (VTABLE_isa(from, arg, _multi_sub)) {
         INTVAL i = 0;
         const INTVAL n = VTABLE_elements(from, arg);
-        ret_val  = pmc_new(interp, enum_class_MultiSub);
+        ret_val  = Parrot_pmc_new(interp, enum_class_MultiSub);
 
         for (i = 0; i < n; ++i) {
             PMC *const orig = VTABLE_get_pmc_keyed_int(from, arg, i);
@@ -282,7 +282,7 @@
     old_size = VTABLE_get_integer(old_interp, args);
 
     /* XXX should this be a different type? */
-    ret_val = pmc_new(interp, enum_class_FixedPMCArray);
+    ret_val = Parrot_pmc_new(interp, enum_class_FixedPMCArray);
     VTABLE_set_integer_native(interp, ret_val, old_size);
 
     for (i = 0; i < old_size; ++i) {
@@ -614,7 +614,7 @@
             PMC *sub_ns = VTABLE_get_pmc_keyed_str(d, dest_ns, key);
             if (PMC_IS_NULL(sub_ns) || sub_ns->vtable->base_type !=
                     enum_class_NameSpace) {
-                sub_ns = pmc_new(d, enum_class_NameSpace);
+                sub_ns = Parrot_pmc_new(d, enum_class_NameSpace);
                 VTABLE_set_pmc_keyed_str(d, dest_ns, key, sub_ns);
             }
             pt_ns_clone(s, d, sub_ns, s, val);
@@ -746,7 +746,7 @@
      * XXX FIXME move this elsewhere? at least the set_pmc_keyed_int
      */
     old_dest_interp = dest_interp;
-    dest_interp     = pmc_new_noinit(interpreter, enum_class_ParrotThread);
+    dest_interp     = Parrot_pmc_new_noinit(interpreter, enum_class_ParrotThread);
 
     /* so it's not accidentally deleted */
     VTABLE_set_pointer(interp, old_dest_interp, NULL);
@@ -1302,7 +1302,7 @@
              * dying interpreter, so register it in parent's GC registry
              * XXX is this still needed?
              */
-            gc_register_pmc(parent, parent_ret);
+            Parrot_pmc_gc_register(parent, parent_ret);
             Parrot_unblock_GC_mark(parent);
             retval = parent_ret;
         }
@@ -1326,7 +1326,7 @@
          * value, caller gets it now
          */
         if (retval)
-            gc_unregister_pmc(parent, retval);
+            Parrot_pmc_gc_unregister(parent, retval);
 
         return retval;
     }

Modified: branches/rm_cflags/src/utils.c
==============================================================================
--- branches/rm_cflags/src/utils.c	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/src/utils.c	Mon Feb 22 02:43:55 2010	(r44285)
@@ -545,7 +545,7 @@
 {
     ASSERT_ARGS(tm_to_array)
 
-    PMC * const Array = pmc_new(interp,
+    PMC * const Array = Parrot_pmc_new(interp,
         Parrot_get_ctx_HLL_type(interp, enum_class_FixedIntegerArray));
     VTABLE_set_integer_native(interp, Array, 9);
 

Modified: branches/rm_cflags/t/codingstd/c_function_docs.t
==============================================================================
--- branches/rm_cflags/t/codingstd/c_function_docs.t	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/t/codingstd/c_function_docs.t	Mon Feb 22 02:43:55 2010	(r44285)
@@ -1,5 +1,5 @@
 #! perl
-# Copyright (C) 2006-2009, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
 # $Id$
 
 use strict;
@@ -105,21 +105,16 @@
 config/gen/platform/darwin/dl.c
 config/gen/platform/darwin/memalign.c
 config/gen/platform/generic/dl.c
-config/gen/platform/generic/env.c
 config/gen/platform/generic/exec.c
 config/gen/platform/generic/math.c
 config/gen/platform/generic/memalign.c
-config/gen/platform/generic/memexec.c
 config/gen/platform/generic/stat.c
 config/gen/platform/generic/time.c
 config/gen/platform/netbsd/math.c
 config/gen/platform/openbsd/math.c
-config/gen/platform/openbsd/memexec.c
 config/gen/platform/solaris/math.c
 config/gen/platform/solaris/time.c
-examples/c/pbc_info.c
 examples/compilers/japhc.c
-src/atomic/gcc_x86.c
 src/gc/generational_ms.c
 src/io/io_string.c
 src/string/charset/ascii.c
@@ -127,7 +122,6 @@
 src/string/charset/iso-8859-1.c
 src/string/charset/unicode.c
 src/tsq.c
-include/parrot/atomic/gcc_pcc.h
 
 # Local Variables:
 #   mode: cperl

Modified: branches/rm_cflags/t/codingstd/c_parens.t
==============================================================================
--- branches/rm_cflags/t/codingstd/c_parens.t	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/t/codingstd/c_parens.t	Mon Feb 22 02:43:55 2010	(r44285)
@@ -1,5 +1,5 @@
 #! perl
-# Copyright (C) 2006-2009, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
 # $Id$
 
 use strict;
@@ -92,7 +92,7 @@
         for my $line (@lines) {
             # skip #defines and typedefs
             next if $line =~ m{(?:(#\s*define|^\s*typedef))};
-            if ( $line =~ m{ ( (?<!\w) (?:$keywords) (?: \( | \ \s+ \( ) ) }xo ) {
+            if ( $line =~ m{ ( (?<!\w) (?:$keywords) (?: \( ) ) }xo ) {
                 my $paren = $1;
 
                 # ops use the same names as some C keywords, so skip

Modified: branches/rm_cflags/t/codingstd/copyright.t
==============================================================================
--- branches/rm_cflags/t/codingstd/copyright.t	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/t/codingstd/copyright.t	Mon Feb 22 02:43:55 2010	(r44285)
@@ -135,10 +135,6 @@
         reason  => 'sample code used in testing',
     },
     {
-        file    => 'tools/build/nativecall.pl',
-        reason  => 'heredoc text for generated file',
-    },
-    {
         file    => 'tools/build/vtable_extend.pl',
         reason  => 'heredoc text for generated file',
     },

Modified: branches/rm_cflags/t/codingstd/linelength.t
==============================================================================
--- branches/rm_cflags/t/codingstd/linelength.t	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/t/codingstd/linelength.t	Mon Feb 22 02:43:55 2010	(r44285)
@@ -125,7 +125,7 @@
 compilers/pirc/macro/macroparser.h
 compilers/pirc/src/hdocprep.l
 compilers/pirc/src/hdocprep.c
-# generated by tools/build/nativecall.pir
+# generated by tools/dev/nci_thunk_gen.pir
 src/nci/core_thunks.c
 src/nci/extra_thunks.c
 # these ones include long POD

Modified: branches/rm_cflags/t/codingstd/trailing_space.t
==============================================================================
--- branches/rm_cflags/t/codingstd/trailing_space.t	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/t/codingstd/trailing_space.t	Mon Feb 22 02:43:55 2010	(r44285)
@@ -70,7 +70,7 @@
 # vim: expandtab shiftwidth=4:
 
 __DATA__
-# generated by tools/build/nativecall.pir
+# generated by tools/dev/nci_thunk_gen.pir
 src/nci/core_thunks.c
 src/nci/extra_thunks.c
 

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

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

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

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

Copied: branches/rm_cflags/t/op/errorson.t (from r44284, trunk/t/op/errorson.t)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/rm_cflags/t/op/errorson.t	Mon Feb 22 02:43:55 2010	(r44285, copy of r44284, trunk/t/op/errorson.t)
@@ -0,0 +1,48 @@
+#!parrot
+# Copyright (C) 2010, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+t/op/errorson.t - Test the errorson opcode
+
+=head1 SYNOPSIS
+
+% prove t/op/errorson.t
+
+=head1 DESCRIPTION
+
+Tests that the errorson opcode turns exception-throwing on and off correctly.
+
+=cut
+
+.sub test_main :main
+    .include 'test_more.pir'
+    .include 'errors.pasm'
+
+    plan(1)
+    test_find_name()
+.end
+
+.sub test_find_name
+       errorson .PARROT_ERRORS_GLOBALS_FLAG
+       push_eh myhandler
+       $P0 = find_name "i_better_not_exist_or_this_thing_is_crazy"
+       pop_eh
+       if null $P0 goto wasnull
+       ok(0, "variable not null, must have existed somehow. inconceivable!")
+       .return()
+wasnull:
+       todo(0,'errorson did not throw an exception for calling find_name on an unbound variable with PARROT_ERRORS_GLOBALS_FLAG')
+       .return()
+myhandler:
+       pop_eh
+       ok(1,'errorson threw an exception for calling find_name on an unbound variable with PARROT_ERRORS_GLOBALS_FLAG')
+.end
+
+# Local Variables:
+#   mode: pir
+#   cperl-indent-level: 4
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:

Copied: branches/rm_cflags/t/op/gc-leaky.t (from r44284, trunk/t/op/gc-leaky.t)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/rm_cflags/t/op/gc-leaky.t	Mon Feb 22 02:43:55 2010	(r44285, copy of r44284, trunk/t/op/gc-leaky.t)
@@ -0,0 +1,73 @@
+#!./parrot
+# Copyright (C) 2010, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+t/op/gc-leaky.t - test for memory leaks in the Garbage Collector
+
+=head1 SYNOPSIS
+
+    % prove t/op/gc-leaky.t
+
+=head1 DESCRIPTION
+
+Tests that we actually do a GC mark and sweep after a large number of PMC's have
+been created. Test suggested by chromatic++ . More tests are needed to close
+TT1465 - http://trac.parrot.org/parrot/ticket/1465 .
+
+=cut
+
+# 20:57 <chromatic> For every million PMCs allocated, see that the GC has performed a mark/sweep.
+
+.include 'interpinfo.pasm'
+
+.sub _main :main
+    .include 'test_more.pir'
+
+    plan(2)
+
+    $S0 = interpinfo .INTERPINFO_GC_SYS_NAME
+    if $S0 == "inf" goto dont_run_hanging_tests
+
+    test_gc_mark_sweep()
+
+    goto test_end
+  dont_run_hanging_tests:
+    ok(1, "#TODO - Test disabled on gc_inf")
+    ok(1, "#TODO - Test disabled on gc_inf")
+  test_end:
+.end
+
+.sub test_gc_mark_sweep
+    .local int counter
+    counter = 0
+    loop:
+        $P0 = box 0
+        inc counter
+        if counter > 1e6 goto done
+        goto loop
+    done:
+        say ""
+        $I1 = interpinfo.INTERPINFO_GC_COLLECT_RUNS
+        $I2 = interpinfo.INTERPINFO_GC_MARK_RUNS
+
+        $I3 = isge $I1, 1
+        $I4 = isge $I2, 1
+
+        $S1 = $I1
+        $S0 = "performed " . $S1
+        $S0 .= " (which should be >=1) GC collect runs"
+        ok($I2,$S0)
+
+        $S1 = $I2
+        $S0 = "performed " . $S1
+        $S0 .= " (which should be >=1) GC mark runs"
+        ok($I2,$S0)
+.end
+
+# Local Variables:
+#   mode: pir
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:

Modified: branches/rm_cflags/t/op/string_mem.t
==============================================================================
--- branches/rm_cflags/t/op/string_mem.t	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/t/op/string_mem.t	Mon Feb 22 02:43:55 2010	(r44285)
@@ -37,7 +37,6 @@
 .sub _main :main
     .include 'test_more.pir'
 
-    .local pmc _
     plan(TESTS)
 
     test_stringinfo()
@@ -52,7 +51,6 @@
 .end
 
 .sub test_stringinfo
-    .local pmc _
 
     $S1 = "Hello, world"
     $S0 = $S1

Copied: branches/rm_cflags/t/pmc/imageio.t (from r44284, trunk/t/pmc/imageio.t)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/rm_cflags/t/pmc/imageio.t	Mon Feb 22 02:43:55 2010	(r44285, copy of r44284, trunk/t/pmc/imageio.t)
@@ -0,0 +1,79 @@
+#! parrot
+# Copyright (C) 2010, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+t/pmc/imageio.t - test ImageIO PMC
+
+=head1 SYNOPSIS
+
+    % prove t/pmc/imagio.t
+
+=head1 DESCRIPTION
+
+Tests the ImageIO PMC.
+
+=cut
+
+.sub main :main
+    .include 'test_more.pir'
+
+    plan(11)
+
+    .local pmc imageio
+    imageio = new ['ImageIO']
+    ok(1, 'instantiated ImageIO')
+
+    .local pmc test_pmc
+    test_pmc = 'get_test_simple'()
+    setref imageio, test_pmc
+    $S0 = imageio
+    ok($S0, 'frozen PMC is true (simple)')
+    $S1 = freeze test_pmc
+    is($S0, $S1, 'freeze gives same image as ImageIO (simple)')
+
+    imageio = new ['ImageIO']
+    imageio = $S0
+    $P0 = deref imageio
+    ok($P0, 'thawed PMC is true (simple)')
+    $P1 = thaw $S1
+    is($P0, $P1, 'thaw gives same PMC as ImageIO (simple)')
+    is($P0, test_pmc, 'round trip gives same PMC (simple)')
+
+    imageio = new ['ImageIO']
+    test_pmc = 'get_test_aggregate'()
+    setref imageio, test_pmc
+    $S0 = imageio
+    ok($S0, 'frozen PMC is true (aggregate)')
+    $S1 = freeze test_pmc
+    is($S0, $S1, 'freeze gives same image as ImageIO (aggregate)')
+
+    imageio = new ['ImageIO']
+    imageio = $S0
+    $P0 = deref imageio
+    ok($P0, 'thawed PMC is true (aggregate)')
+    $P1 = thaw $S1
+    is_deeply($P0, $P1, 'thaw gives same PMC as ImageIO (aggregate)')
+    is_deeply($P0, test_pmc, 'round trip gives same PMC (aggregate)')
+.end
+
+.sub get_test_simple
+    $P0 = new ['Integer']
+    $P0 = -99
+    .return ($P0)
+.end
+
+.sub get_test_aggregate
+    $P0 = new ['ResizableStringArray']
+    $P0[0] = 'parrot'
+    $P0[1] = '???'
+    $P0[2] = 'profit'
+    .return ($P0)
+.end
+
+# Local Variables:
+#   mode: pir
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir

Copied: branches/rm_cflags/t/pmc/imageiosize.t (from r44284, trunk/t/pmc/imageiosize.t)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/rm_cflags/t/pmc/imageiosize.t	Mon Feb 22 02:43:55 2010	(r44285, copy of r44284, trunk/t/pmc/imageiosize.t)
@@ -0,0 +1,74 @@
+#! parrot
+# Copyright (C) 2010, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+t/pmc/imageiosize.t - test ImageIOSize PMC
+
+=head1 SYNOPSIS
+
+    % prove t/pmc/imagiosize.t
+
+=head1 DESCRIPTION
+
+Tests the ImageIOSize PMC.
+
+=cut
+
+.sub main :main
+    .include 'test_more.pir'
+
+    plan(4)
+
+    .local pmc iios
+    iios = new ['ImageIOSize']
+    ok(1, 'instantiated ImageIOSize')
+
+    .local pmc test_pmc
+    test_pmc = null
+    setref iios, test_pmc
+    $P0 = deref iios
+    $S0 = freeze test_pmc
+    $I0 = $P0
+    $I1 = length $S0
+    is($I0, $I1, 'gets the same size as freeze (null)')
+
+    iios = new ['ImageIOSize']
+    test_pmc = 'get_test_simple'()
+    setref iios, test_pmc
+    $P0 = deref iios
+    $S0 = freeze test_pmc
+    $I0 = $P0
+    $I1 = length $S0
+    is($I0, $I1, 'gets the same size as freeze (simple)')
+
+    iios = new ['ImageIOSize']
+    test_pmc = 'get_test_aggregate'()
+    setref iios, test_pmc
+    $P0 = deref iios
+    $S0 = freeze test_pmc
+    $I0 = $P0
+    $I1 = length $S0
+    is($I0, $I1, 'gets the same size as freeze (aggregate)')
+.end
+
+.sub get_test_simple
+    $P0 = new ['Integer']
+    $P0 = -99
+    .return ($P0)
+.end
+
+.sub get_test_aggregate
+    $P0 = new ['ResizableStringArray']
+    $P0[0] = 'parrot'
+    $P0[1] = '???'
+    $P0[2] = 'profit'
+    .return ($P0)
+.end
+
+# Local Variables:
+#   mode: pir
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir

Modified: branches/rm_cflags/t/pmc/oplib.t
==============================================================================
--- branches/rm_cflags/t/pmc/oplib.t	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/t/pmc/oplib.t	Mon Feb 22 02:43:55 2010	(r44285)
@@ -14,7 +14,7 @@
 
 .sub main :main
     .include 'test_more.pir'
-    plan(1)
+    plan(2)
     get_singleton()
 .end
 
@@ -23,8 +23,12 @@
     $I0 = isnull $P0
     is($I0, 0)
 
-    # TODO: How to test that this is actually a singleton?
-    #$P1 = new ['OpLib']
-    #is($P0, $P1)
+    $P1 = new ['OpLib']
+    eq_addr $P0, $P1, ok
+    ok(0, "all OpLibs aren't identical")
+    goto end
+ok:
+    ok(1, "all OpLibs are identical")
+end:
 .end
 

Modified: branches/rm_cflags/t/src/embed.t
==============================================================================
--- branches/rm_cflags/t/src/embed.t	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/t/src/embed.t	Mon Feb 22 02:43:55 2010	(r44285)
@@ -93,7 +93,7 @@
 "\n",
         &errstr
     );
-    Parrot_call_sub(interp, code, "v");
+    Parrot_ext_call(interp, code, "->");
 
     Parrot_destroy(interp);
     return 0;
@@ -160,7 +160,7 @@
     subname = Parrot_new_string(interp, "hello", 5, (const char *)NULL, 0);
     sub = Parrot_PMC_get_pmc_strkey(interp, parrotns,  subname);
     /* Execute it */
-    Parrot_call_sub(interp, sub, "v");
+    Parrot_ext_call(interp, sub, "->");
 
     Parrot_destroy(interp);
     return 0;
@@ -216,7 +216,7 @@
         &errstr
     );
     hellosub = Parrot_sub_new_from_c_func(interp, (void (*)())& hello, "vJ");
-    Parrot_call_sub(interp, code, "vP", hellosub);
+    Parrot_ext_call(interp, code, "P->", hellosub);
 
     Parrot_destroy(interp);
     return 0;
@@ -285,7 +285,7 @@
     Parrot_PMC_set_pmc_strkey(interp, parrotns, helloname, hellosub);
 
     /* Call it */
-    discard = Parrot_call_sub(interp, code, "v");
+    Parrot_ext_call(interp, code, "->");
 
     Parrot_destroy(interp);
     return 0;

Modified: branches/rm_cflags/t/src/extend.t
==============================================================================
--- branches/rm_cflags/t/src/extend.t	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/t/src/extend.t	Mon Feb 22 02:43:55 2010	(r44285)
@@ -446,7 +446,7 @@
 
     Parrot_pbc_load(interp, pf);
     sub = Parrot_find_global_cur(interp, name);
-    Parrot_call_sub(interp, sub, "v");
+    Parrot_ext_call(interp, sub, "->");
     Parrot_eprintf(interp, "back\\n");
 
     /* win32 seems to buffer stderr ? */
@@ -454,12 +454,12 @@
 
     name = Parrot_str_new_constant(interp, "_sub2");
     sub  = Parrot_find_global_cur(interp, name);
-    arg  = pmc_new(interp, enum_class_String);
+    arg  = Parrot_pmc_new(interp, enum_class_String);
 
     Parrot_PMC_set_string_native(interp, arg,
                  Parrot_str_new(interp, "hello ", 0));
 
-    Parrot_call_sub(interp, sub, "vP", arg);
+    Parrot_ext_call(interp, sub, "P->", arg);
     Parrot_eprintf(interp, "back\\n");
 
     return NULL;
@@ -512,7 +512,7 @@
 
     name = Parrot_str_new_constant(interp, "_sub2");
     sub  = Parrot_find_global_cur(interp, name);
-    arg  = pmc_new(interp, enum_class_String);
+    arg  = Parrot_pmc_new(interp, enum_class_String);
 
     Parrot_PMC_set_string_native(interp, arg,
                  Parrot_str_new(interp, "hello ", 0));
@@ -581,7 +581,7 @@
 
     Parrot_pbc_load(interp, pf);
     sub  = Parrot_find_global_cur(interp, name);
-    arg  = pmc_new(interp, enum_class_String);
+    arg  = Parrot_pmc_new(interp, enum_class_String);
 
     Parrot_PMC_set_string_native(interp, arg,
                  Parrot_str_new(interp, "hello ", 0));
@@ -657,7 +657,7 @@
         interp->current_runloop_id++;
 
         Parrot_ex_add_c_handler(interp, &jump_point);
-        Parrot_call_sub(interp, sub, "v");
+        Parrot_ext_call(interp, sub, "->");
     }
 
     Parrot_eprintf(interp, "back\\n");
@@ -781,7 +781,7 @@
     foo_name = Parrot_str_new_constant( interp, "foo" );
     sub      = Parrot_find_global_cur( interp, foo_name );
 
-    retval   = (PMC *) Parrot_call_sub( interp, sub, "V", "" );
+    Parrot_ext_call(interp, sub, "->");
 
     Parrot_exit(interp, 0);
     return 0;
@@ -812,7 +812,7 @@
     Parrot_pbc_load( interp, pf );
 
     sub      = Parrot_find_global_cur( interp, Parrot_str_new_constant( interp, "add" ) );
-    result   = Parrot_call_sub_ret_int( interp, sub, "III", 100, 200 );
+    Parrot_ext_call(interp, sub, "II->I", 100, 200, &result);
     printf( "Result is %d.\\n", result );
 
     Parrot_exit(interp, 0);

Deleted: branches/rm_cflags/tools/build/nativecall.pir
==============================================================================
--- branches/rm_cflags/tools/build/nativecall.pir	Mon Feb 22 02:43:55 2010	(r44284)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,1017 +0,0 @@
-# Copyright (C) 2010, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-tools/build/nativecall.pir - Build up the native call routines
-
-=head1 SYNOPSIS
-
-    % ./parrot tools/build/nativecall.pir -o src/nci/extra_thunks.c <src/nci/extra_thunks.nci
-
-=head1 DESCRIPTION
-
-This script creates Native Call Interface files. It parses a file of function
-signatures of the form:
-
- <return-type-specifier><ws><parameter-type-specifiers>[<ws>][#<comment>]
-    ...
-Empty lines and lines containing only whitespace or comment are ignored.
-The types specifiers are documented in F<src/nci/extra_thunks.nci>.
-
-=head1 SEE ALSO
-
-F<src/nci/extra_thunks.nci>.
-F<docs/pdds/pdd16_native_call.pod>.
-
-=cut
-
-.macro_const VERSION 0.01
-
-.macro_const SIG_TABLE_GLOBAL_NAME  'signature_table'
-.macro_const OPTS_GLOBAL_NAME       'options'
-
-.sub 'main' :main
-    .param pmc argv
-
-    # initialize global variables
-    'gen_sigtable'()
-    'get_options'(argv)
-
-    .local string targ
-    targ = 'read_from_opts'('target')
-
-    .local pmc sigs
-    sigs = 'read_sigs'()
-
-    $S0 = 'read_from_opts'('output')
-    $P0 = open $S0, 'w'
-    setstdout $P0
-
-    if targ == 'head'   goto get_targ
-    if targ == 'thunks' goto get_targ
-    if targ == 'loader' goto get_targ
-    if targ == 'coda'   goto get_targ
-    if targ == 'all'    goto all
-    if targ == 'names'  goto names
-    if targ == 'signatures'   goto signatures
-
-    # unknown target
-    $S0 = 'sprintf'("Unknown target type '%s'", targ)
-    die $S0
-
-  all:
-    $S0 = 'get_head'(sigs)
-    say $S0
-    $S0 = 'get_thunks'(sigs)
-    say $S0
-    $S0 = 'get_loader'(sigs)
-    say $S0
-    $S0 = 'get_coda'(sigs)
-    say $S0
-    exit 0
-
-  get_targ:
-    $S0 = concat 'get_', targ
-    $P0 = get_global $S0
-    $S1 = $P0(sigs)
-    say $S1
-    exit 0
-
-  names:
-    die "names not yet implemented"
-  signatures:
-    die "signatures not yet implemented"
-.end
-
-# getopt stuff {{{
-
-.macro_const OUTPUT                 'output'
-.macro_const THUNK_STORAGE_CLASS    'thunk-storage-class'
-.macro_const THUNK_NAME_PROTO       'thunk-name-proto'
-.macro_const LOADER_STORAGE_CLASS   'loader-storage-class'
-.macro_const LOADER_NAME            'loader-name'
-.macro_const CORE                   'core'
-
-.sub 'get_options'
-    .param pmc argv
-
-    load_bytecode 'Getopt/Obj.pbc'
-
-    .local pmc getopt
-    getopt = new ['Getopt';'Obj']
-    push getopt, 'help|h'
-    push getopt, 'version|v'
-    push getopt, 'core'
-    push getopt, 'output|o=s'
-    push getopt, 'target=s'
-    push getopt, 'thunk-storage-class=s'
-    push getopt, 'thunk-name-proto=s'
-    push getopt, 'loader-storage-class=s'
-    push getopt, 'loader-name=s'
-
-    .local string prog_name
-    prog_name = shift argv
-
-    .local pmc opt
-    opt = getopt.'get_options'(argv)
-
-    $I0 = opt['help']
-    if $I0 goto print_help
-
-    $I0 = opt['version']
-    if $I0 goto print_version
-
-    'fixup_opts'(opt)
-
-    set_global .OPTS_GLOBAL_NAME, opt
-    .return()
-
-  print_help:
-    'usage'(prog_name)
-  print_version:
-    'version'(prog_name)
-.end
-
-.sub 'usage'
-    .param string prog_name
-    print prog_name
-    say ' - Parrot NCI thunk library creation utility'
-    say <<'USAGE'
-
-Creates a C file of routines suitable for use as Parrot NCI thunks.
-
-Usage ./parrot nativecall.pir [options] -o output_c_file.c <input_signature_list.nci
-
-Options
-    --help              print this message and exit
-    --version           print the version number of this utility
-    --core              output a thunks file suitable for inclusion in Parrot core. Default is no.
-    -o --output <file>  specify output file to use.
-    --target <target>   select what to output (valid options are 'head', 'thunks',
-                        'loader', 'coda', 'all', 'names', and 'signatures'). Default value is 'all'
-    --thunk-storage-class <storage class>
-                        set the storage class used for the thunks. Default value is 'static'.
-    --thunk-name-proto <printf prototype>
-                        set the prototype used for the thunk function names. Must be a printf
-                        format with arity 1. Default value is 'pcf_%s'
-    --loader-storage-class
-                        set the storage class used for the loader function. Default value is none.
-    --loader-name       set the name used for the loader function. Default value is 'Parrot_load_nci_thunks'.
-USAGE
-    exit 0
-.end
-
-.sub 'version'
-    .param string prog_name
-    print prog_name
-    print ' version '
-    say .VERSION
-    exit 0
-.end
-
-.sub 'fixup_opts'
-    .param pmc opts
-
-    $I0 = defined opts['core']
-    if $I0 goto in_core
-        opts['core'] = ''
-        goto end_core
-    in_core:
-        opts['core'] = 'true'
-    end_core:
-
-    $I0 = defined opts['target']
-    if $I0 goto end_target
-        opts['target'] = 'all'
-    end_target:
-
-    $I0 = defined opts['thunk-storage-class']
-    if $I0 goto end_thunk_storage_class
-        opts['thunk-storage-class'] = 'static'
-    end_thunk_storage_class:
-
-    $I0 = defined opts['thunk-name-proto']
-    if $I0 goto end_thunk_name_proto
-        opts['thunk-name-proto'] = 'pcf_%s'
-    end_thunk_name_proto:
-
-    $S0 = opts['thunk-name-proto']
-    $I0 = 'printf_arity'($S0)
-    if $I0 == 1 goto end_thunk_name_proto_printf_arity
-        'sprintf'("Provided proto for 'thunk-name-proto' is of incorrect arity %i (expected 1)", $I0)
-        die $S0
-    end_thunk_name_proto_printf_arity:
-
-    $I0 = defined opts['loader-storage-class']
-    if $I0 goto end_loader_storage_class
-        opts['loader-storage-class'] = ''
-    end_loader_storage_class:
-
-    $I0 = defined opts['loader-name']
-    if $I0 goto end_loader_name
-        opts['loader-name'] = 'Parrot_load_nci_thunks'
-    end_loader_name:
-.end
-
-.sub 'read_from_opts'
-    .param string key
-
-    .local pmc opts
-    opts = get_global .OPTS_GLOBAL_NAME
-
-    $I0 = defined opts[key]
-    unless $I0 goto not_present
-
-    $S0 = opts[key]
-    .return ($S0)
-
-  not_present:
-    $S0 = 'sprintf'("Parameter '%s' required but not provided", key)
-    die $S0
-.end
-
-# }}}
-
-# get_{head,thunks,loader,coda} {{{
-
-.sub 'get_head'
-    .param pmc ignored :slurpy
-
-    .local string in_core
-    in_core = 'read_from_opts'(.CORE)
-
-    .local string ext_defn
-    ext_defn = ''
-    if in_core goto end_ext_defn
-        ext_defn = '#define PARROT_IN_EXTENSION'
-    end_ext_defn:
-
-    .local string c_file
-    c_file = 'read_from_opts'(.OUTPUT)
-
-    .local string str_file
-    str_file = clone c_file
-    substr str_file, -2, 2, '.str'
-    strip_str_file_loop:
-        $I0 = index str_file, '/'
-        if $I0 < 0 goto end_strip_str_file_loop
-        $I0 += 1
-        str_file = substr str_file, $I0
-        goto strip_str_file_loop
-    end_strip_str_file_loop:
-
-    .local string head
-    head = 'sprintf'(<<'HEAD', c_file, ext_defn, str_file)
-/* ex: set ro ft=c:
- * !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
- *
- * This file is generated automatically by tools/build/nativecall.pir
- *
- * Any changes made here will be lost!
- *
- */
-
-/* %s
- *  Copyright (C) 2010, Parrot Foundation.
- *  SVN Info
- *     $Id$
- *  Overview:
- *     Native Call Interface routines. The code needed to build a
- *     parrot to C call frame is in here
- *  Data Structure and Algorithms:
- *  History:
- *  Notes:
- *  References:
- */
-
-%s
-#include "parrot/parrot.h"
-#include "pmc/pmc_nci.h"
-
-
-#ifdef PARROT_IN_EXTENSION
-/* external libraries can't have strings statically compiled into parrot */
-#  define CONST_STRING(i, s) Parrot_str_new_constant((i), (s))
-#else
-#  include "%s"
-#endif
-
-/* HEADERIZER HFILE: none */
-/* HEADERIZER STOP */
-
-/* All our static functions that call in various ways. Yes, terribly
-   hackish, but that is just fine */
-
-HEAD
-    .return (head)
-.end
-
-.sub 'get_thunks'
-    .param pmc sigs
-    .local string code
-    .local int i, n
-    code = ''
-    i = 0
-    n = sigs
-    loop:
-        if i >= n goto end_loop
-
-        .local pmc sig
-        sig = sigs[i]
-        $S0 = 'sig_to_fn_code'(sig :flat)
-        code = concat code, $S0
-
-        inc i
-        goto loop
-    end_loop:
-    .return (code)
-.end
-
-.sub 'get_loader'
-    .param pmc sigs
-
-    $S0 = 'read_from_opts'(.LOADER_STORAGE_CLASS)
-    $S1 = 'read_from_opts'(.LOADER_NAME)
-    .local string code
-    code = 'sprintf'(<<'FN_HEADER', $S0, $S1)
-
-%s void
-%s(PARROT_INTERP)
-{
-    PMC        *iglobals;
-    PMC        *temp_pmc;
-
-    PMC        *HashPointer   = NULL;
-
-    iglobals = interp->iglobals;
-    if (PMC_IS_NULL(iglobals))
-        PANIC(interp, "iglobals isn't created yet");
-
-    HashPointer = VTABLE_get_pmc_keyed_int(interp, iglobals,
-            IGLOBALS_NCI_FUNCS);
-    if (PMC_IS_NULL(HashPointer))
-        PANIC(interp, "iglobals.nci_funcs isn't created yet");
-
-FN_HEADER
-
-    .local int i, n
-    i = 0
-    n = sigs
-    loop:
-        if i >= n goto end_loop
-
-        .local pmc sig
-        sig = shift sigs
-
-        .local string fn_name
-        fn_name = 'sig_to_fn_name'(sig :flat)
-
-        .local string key
-        key = join '', sig
-
-        $S0 = 'sprintf'(<<'TEMPLATE', fn_name, key)
-    temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
-    VTABLE_set_pointer(interp, temp_pmc, (void *)%s);
-    VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "%s"), temp_pmc);
-
-TEMPLATE
-        code = concat code, $S0
-
-        inc i
-        goto loop
-    end_loop:
-
-    code = concat code, <<'FN_FOOTER'
-}
-FN_FOOTER
-
-    .return (code)
-.end
-
-.sub 'get_coda'
-    .param pmc ignored :slurpy
-    .return (<<'CODA')
-
-/*
- * Local variables:
- *   c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
-CODA
-.end
-
-# }}}
-
-# sig_to_* {{{
-
-.sub 'sig_to_fn_code'
-    .param pmc args :slurpy
-
-    .local string fn_decl
-    fn_decl = 'sig_to_fn_decl'(args :flat)
-
-    .local string var_decls
-    var_decls = 'sig_to_var_decls'(args :flat)
-
-    .local string preamble
-    preamble = 'sig_to_preamble'(args :flat)
-
-    .local string call
-    call = 'sig_to_call'(args :flat)
-
-    .local string postamble
-    postamble = 'sig_to_postamble'(args :flat)
-
-    .local string fn_code
-    fn_code = 'sprintf'("%s{\n%s%s%s%s}\n", fn_decl, var_decls, preamble, call, postamble)
-
-    .return (fn_code)
-.end
-
-.sub 'sig_to_postamble'
-    .param string ret
-    .param string params
-
-    .local string final_assign
-    $P0 = 'map_from_sig_table'(ret, 'ret_assign')
-    final_assign = $P0[0]
-
-    .local string extra_postamble
-    $P0 = 'map_from_sig_table'(params, 'postamble_tmpl')
-    'fill_tmpls_ascending_ints'($P0)
-    extra_postamble = join "\n", $P0
-
-    .local string postamble
-    postamble = 'sprintf'(<<'TEMPLATE', final_assign, extra_postamble)
-    %s
-    %s
-TEMPLATE
-    .return (postamble)
-.end
-
-.sub 'sig_to_call'
-    .param string ret
-    .param string params
-
-    .local string return_assign
-    $P0 = 'map_from_sig_table'(ret, 'func_call_assign')
-    return_assign = $P0[0]
-
-    .local string ret_cast
-    $P0 = 'map_from_sig_table'(ret, 'as_return')
-    ret_cast = $P0[0]
-    if ret_cast == 'void' goto void_fn
-        ret_cast = 'sprintf'('(%s)', ret_cast)
-        goto end_ret_cast
-    void_fn:
-        ret_cast = ''
-    end_ret_cast:
-
-    .local string call_params
-    $P0 = 'map_from_sig_table'(params, 'call_param_tmpl')
-    'fill_tmpls_ascending_ints'($P0)
-    call_params = join ', ', $P0
-
-    .local string call
-    call = 'sprintf'(<<'TEMPLATE', return_assign, ret_cast, call_params)
-    GETATTR_NCI_orig_func(interp, self, orig_func);
-    fn_pointer = (func_t)D2FPTR(orig_func);
-    %s %s(*fn_pointer)(%s);
-TEMPLATE
-    .return (call)
-.end
-
-.sub 'sig_to_preamble'
-    .param string ret
-    .param string params
-
-    unless params goto return
-
-    .local string sig
-    $P0 = 'map_from_sig_table'(params, 'sig_char')
-    sig = join "", $P0
-
-    .local string fill_params
-    $P0 = 'map_from_sig_table'(params, 'fill_params_tmpl')
-    'fill_tmpls_ascending_ints'($P0)
-    fill_params = join "", $P0
-
-    .local string extra_preamble
-    $P0 = 'map_from_sig_table'(params, 'preamble_tmpl')
-    'fill_tmpls_ascending_ints'($P0)
-    extra_preamble = join "", $P0
-
-    .local string preamble
-    preamble = 'sprintf'(<<'TEMPLATE', sig, fill_params, extra_preamble)
-    Parrot_pcc_fill_params_from_c_args(interp, call_object, "%s"%s);
-    %s
-TEMPLATE
-
-  return:
-    .return (preamble)
-.end
-
-.sub 'sig_to_var_decls'
-    .param string ret
-    .param string params
-
-    .local string ret_csig
-    $P0 = 'map_from_sig_table'(ret, 'as_return')
-    ret_csig = $P0[0]
-
-    .local string params_csig
-    $P0 = 'map_from_sig_table'(params, 'as_proto')
-    params_csig = join ', ', $P0
-
-    .local string ret_tdecl
-    ret_tdecl = ""
-    $P0 = 'map_from_sig_table'(ret, 'return_type')
-    $S0 = $P0[0]
-    unless $S0 goto end_ret_type
-    if $S0 == 'void' goto end_ret_type
-        $S0 = 'sprintf'("%s return_data;\n", $S0)
-        ret_tdecl = concat ret_tdecl, $S0
-    end_ret_type:
-    $P0 = 'map_from_sig_table'(ret, 'final_dest')
-    $S0 = $P0[0]
-    unless $S0 goto end_final_dest
-        $S0 = concat $S0, "\n"
-        ret_tdecl = concat ret_tdecl, $S0
-    end_final_dest:
-
-    .local string params_tdecl
-    $P0 = 'map_from_sig_table'(params, 'temp_tmpl')
-    'fill_tmpls_ascending_ints'($P0)
-    $P0 = 'grep_for_true'($P0)
-    params_tdecl = join ";\n    ", $P0
-
-    .local string var_decls
-    var_decls = 'sprintf'(<<'TEMPLATE', ret_csig, params_csig, ret_tdecl, params_tdecl)
-    typedef %s(* func_t)(%s);
-    func_t fn_pointer;
-    void *orig_func;
-    PMC *ctx         = CURRENT_CONTEXT(interp);
-    PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
-    %s
-    %s;
-TEMPLATE
-
-    .return (var_decls)
-.end
-
-.sub 'sig_to_fn_decl'
-    .param pmc sig :slurpy
-    .local string storage_class, fn_name, fn_decl
-    storage_class = 'read_from_opts'(.THUNK_STORAGE_CLASS)
-    fn_name = 'sig_to_fn_name'(sig :flat)
-    fn_decl = 'sprintf'(<<'TEMPLATE', storage_class, fn_name)
-%s void
-%s(PARROT_INTERP, PMC *self)
-TEMPLATE
-    .return (fn_decl)
-.end
-
-.sub 'sig_to_fn_name'
-    .param string ret
-    .param string params
-
-    .local string fix_params
-    $P0 = 'map_from_sig_table'(params, 'cname')
-    fix_params = join '', $P0
-
-
-    $S0 = 'sprintf'('%s_%s', ret, fix_params)
-    $S1 = 'read_from_opts'(.THUNK_NAME_PROTO)
-    $S2 = 'sprintf'($S1, $S0)
-    .return ($S2)
-.end
-
-.sub 'map_from_sig_table'
-    .param string sig
-    .param string field_name
-
-    .local pmc sig_table
-    sig_table = get_global .SIG_TABLE_GLOBAL_NAME
-
-    $P0 = split '', sig
-
-    .local pmc result
-    result = new ['ResizableStringArray']
-    $I0 = $P0
-    result = $I0
-
-    $I0 = $P0
-    $I1 = 0
-    loop:
-        if $I1 >= $I0 goto end_loop
-        $S0 = $P0[$I1]
-        $S1 = sig_table[$S0; field_name]
-        result[$I1] = $S1
-        inc $I1
-        goto loop
-    end_loop:
-
-    .return (result)
-.end
-
-# }}}
-
-# read_sigs {{{
-
-.sub 'read_sigs'
-    .local pmc stdin, seen, sigs
-    stdin = getstdin
-    seen  = new ['Hash']
-    sigs  = new ['ResizablePMCArray']
-
-    .local int lineno
-    lineno = 0
-    read_loop:
-        unless stdin goto end_read_loop
-
-        .local string ret_sig, param_sig, full_sig
-        (ret_sig, param_sig) = 'read_one_sig'(stdin)
-        inc lineno
-        full_sig = concat ret_sig, param_sig
-
-        # filter out empty sigs (and empty lines)
-        unless full_sig goto read_loop
-
-        # de-dup sigs
-        $I0 = seen[full_sig]
-        unless $I0 goto unseen
-            $S0 = 'sprintf'("Ignored signature '%s' on line %d (previously seen on line %d)\n", full_sig, lineno, $I0)
-            printerr $S0
-            goto read_loop
-        unseen:
-        seen[full_sig] = lineno
-
-        .local pmc sig
-        sig = new ['ResizableStringArray']
-        sig = 2
-        sig[0] = ret_sig
-        sig[1] = param_sig
-        push sigs, sig
-
-        goto read_loop
-    end_read_loop:
-
-    .return (sigs)
-.end
-
-.sub 'read_one_sig'
-    .param pmc fh
-
-    .local string line
-    line = readline fh
-
-    # handle comments
-    $I0 = index line, '#'
-    if $I0 < 0 goto end_comment
-        line = substr line, 0, $I0
-    end_comment:
-
-    # convert whitespace into spaces
-    $S0 = '\t'
-    whitespace_loop:
-        $I0 = index line, $S0
-        if $I0 < 0 goto end_whitespace_loop
-        substr line, $I0, 1, ' '
-        goto whitespace_loop
-    end_whitespace_loop:
-
-    if $S0 == "\n" goto end_whitespace
-        $S0 = "\n"
-        goto whitespace_loop
-    end_whitespace:
-
-    # turn multiple spaces into a single space
-    multispace_loop:
-        $I0 = index line, '  '
-        if $I0 < 0 goto end_multispace_loop
-        $S0 = substr line, $I0, 2, ' '
-        goto multispace_loop
-    end_multispace_loop:
-
-    # remove leading whitespace
-    $S0 = substr line, 0, 1
-    unless $S0 == ' ' goto end_leading
-        $S0 = substr line, 0, 1, ''
-    end_leading:
-
-    # handle empty (or whitespace only) lines
-    if line == '' goto ret
-    if line == ' ' goto ret
-
-    # remove trailing whitespace
-    $S0 = substr line, -1, 1
-    unless $S0 == ' ' goto end_trailing
-        $S0 = substr line, -1, 1, ''
-    end_trailing:
-
-    # read the signature
-    .local string ret_sig, param_sig
-    $P0 = split ' ', line
-    ret_sig   = $P0[0]
-    param_sig = $P0[1]
-
-  ret:
-    .return (ret_sig, param_sig)
-.end
-
-#}}}
-
-# gen_sigtable {{{
-
-.sub 'gen_sigtable'
-    $S0 = 'sigtable_json'()
-    $P0 = 'decode_table'($S0)
-    'fixup_table'($P0)
-    set_global .SIG_TABLE_GLOBAL_NAME, $P0
-.end
-
-.sub 'decode_table'
-    .param string json
-
-    .local pmc compiler
-    load_bytecode 'data_json.pbc'
-    compiler = compreg 'data_json'
-
-    .local pmc table
-    $P0 = compiler.'compile'(json)
-    table = $P0()
-
-    .return (table)
-.end
-
-.sub 'fixup_table'
-    .param pmc table
-
-    .local pmc table_iter
-    table_iter = iter table
-  iter_loop:
-    unless table_iter goto iter_end
-
-    .local string k
-    .local pmc v
-    k = shift table_iter
-    v = table[k]
-
-    $I0 = exists v['cname']
-    if $I0 goto has_cname
-        v['cname'] = k
-    has_cname:
-
-    $I0 = exists v['as_return']
-    if $I0 goto has_as_return
-        $S0 = v['as_proto']
-        v['as_return'] = $S0
-    has_as_return:
-
-    $I0 = exists v['return_type']
-    if $I0 goto has_return_type
-        $S0 = v['as_proto']
-        v['return_type'] = $S0
-    has_return_type:
-
-    $I0 = exists v['ret_assign']
-    $I1 = exists v['sig_char']
-    $I1 = !$I1
-    $I0 = $I0 || $I1 # not (not exists v[ret_assign] and exists v[sig_char])
-    if $I0 goto has_ret_assign
-        $S0 = 'Parrot_pcc_fill_returns_from_c_args(interp, call_object, "'
-        $S1 = v['sig_char']
-        $S0 = concat $S0, $S1
-        $S0 = concat $S0, '", return_data);'
-        v['ret_assign'] = $S0
-    has_ret_assign:
-
-    $I0 = exists v['func_call_assign']
-    if $I0 goto has_func_call_assign
-        v['func_call_assign'] = 'return_data = '
-    has_func_call_assign:
-
-    $I0 = exists v['temp_tmpl']
-    if $I0 goto has_temp_tmpl
-        $S0 = v['return_type']
-        $S0 = concat $S0, " t_%i"
-        v['temp_tmpl'] = $S0
-    has_temp_tmpl:
-
-    $I0 = exists v['fill_params_tmpl']
-    if $I0 goto has_fill_params_tmpl
-        v['fill_params_tmpl'] = ', &t_%i'
-    has_fill_params_tmpl:
-
-    $I0 = exists v['call_param_tmpl']
-    if $I0 goto has_call_param_tmpl
-        v['call_param_tmpl'] = 't_%i'
-    has_call_param_tmpl:
-
-    goto iter_loop
-  iter_end:
-
-    .return ()
-.end
-
-.sub 'sigtable_json'
-    .const string retv = <<'JSON'
-{
-    "p": { "as_proto":   "void *",
-           "final_dest": "PMC * final_destination = PMCNULL;",
-           "temp_tmpl": "PMC *t_%i",
-           "sig_char":   "P",
-           "call_param_tmpl": "PMC_IS_NULL((PMC*)t_%i) ? (void *)NULL : VTABLE_get_pointer(interp, t_%i)",
-           "ret_assign": "if (return_data != NULL) {
-                             final_destination = pmc_new(interp, enum_class_UnManagedStruct);
-                             VTABLE_set_pointer(interp, final_destination, return_data);
-                          }
-                          Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"P\", final_destination);" },
-    "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 *",
-           "final_dest": "STRING *final_destination;",
-           "ret_assign": "final_destination = Parrot_str_new(interp, return_data, 0);
-                          Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"S\", final_destination);",
-           "sig_char": "S",
-           "temp_tmpl": "char *t_%i; STRING *ts_%i",
-           "fill_params_tmpl": ", &ts_%i",
-           "preamble_tmpl": "t_%i = ts_%i ? Parrot_str_to_cstring(interp, ts_%i) : (char *)NULL;",
-           "postamble_tmpl": "if (t_%i) Parrot_str_free_cstring(t_%i);" },
-    "v": { "as_proto": "void",
-           "return_type": "void *",
-           "sig_char": "v",
-           "ret_assign": "",
-           "func_call_assign": "" },
-    "P": { "as_proto": "PMC *", "sig_char": "P" },
-    "O": { "as_proto": "PMC *", "returns": "", "sig_char": "Pi" },
-    "J": { "as_proto": "PARROT_INTERP",
-           "returns": "",
-           "fill_params_tmpl": "",
-           "call_param_tmpl": "interp",
-           "temp_tmpl": "",
-           "sig_char": "" },
-    "S": { "as_proto": "STRING *", "sig_char": "S" },
-    "I": { "as_proto": "INTVAL", "sig_char": "I" },
-    "N": { "as_proto": "FLOATVAL", "sig_char": "N" },
-    "b": { "as_proto": "void *",
-           "as_return": "",
-           "sig_char": "S",
-           "temp_tmpl":"STRING *t_%i",
-           "call_param_tmpl": "Buffer_bufstart(t_%i)" },
-    "B": { "as_proto": "char **",
-           "as_return": "",
-           "sig_char": "S",
-           "fill_params_tmpl": ", &ts_%i",
-           "temp_tmpl": "char *t_%i; STRING *ts_%i",
-           "preamble_tmpl": "t_%i = ts_%i ? Parrot_str_to_cstring(interp, ts_%i) : (char *) NULL;",
-           "call_param_tmpl": "&t_%i",
-           "postamble_tmpl": "if (t_%i) Parrot_str_free_cstring(t_%i);" },
-    "2": { "as_proto": "short *",
-           "sig_char": "P",
-           "return_type": "short",
-           "ret_assign": "Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"I\", return_data);",
-           "temp_tmpl": "PMC *t_%i; short i_%i",
-           "preamble_tmpl": "i_%i = VTABLE_get_integer(interp, t_%i);",
-           "call_param_tmpl": "&i_%i",
-           "postamble_tmpl": "VTABLE_set_integer_native(interp, t_%i, i_%i);" },
-    "3": { "as_proto": "int *",
-           "sig_char": "P",
-           "return_type": "int",
-           "ret_assign": "Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"I\", return_data);",
-           "temp_tmpl": "PMC *t_%i; int i_%i",
-           "preamble_tmpl": "i_%i = VTABLE_get_integer(interp, t_%i);",
-           "call_param_tmpl": "&i_%i",
-           "postamble_tmpl": "VTABLE_set_integer_native(interp, t_%i, i_%i);" },
-    "4": { "as_proto": "long *",
-           "sig_char": "P",
-           "return_type": "long",
-           "ret_assign": "Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"I\", return_data);",
-           "temp_tmpl": "PMC *t_%i; long i_%i",
-           "preamble_tmpl": "i_%i = VTABLE_get_integer(interp, t_%i);",
-           "call_param_tmpl": "&i_%i",
-           "postamble_tmpl": "VTABLE_set_integer_native(interp, t_%i, i_%i);" },
-    "L": { "as_proto": "long *", "as_return": "" },
-    "T": { "as_proto": "char **", "as_return": "" },
-    "V": { "as_proto": "void **",
-           "as_return": "",
-           "sig_char": "P",
-           "temp_tmpl": "PMC *t_%i; void *v_%i",
-           "preamble_tmpl": "v_%i = VTABLE_get_pointer(interp, t_%i);",
-           "call_param_tmpl": "&v_%i",
-           "postamble_tmpl": "VTABLE_set_pointer(interp, t_%i, v_%i);" },
-    "@": { "as_proto": "PMC *", "as_return": "", "cname": "xAT_", "sig_char": "Ps" }
-}
-JSON
-    .return (retv)
-.end
-
-# }}}
-
-# utility fn's {{{
-
-.sub 'sprintf'
-    .param string tmpl
-    .param pmc args :slurpy
-    $S0 = sprintf tmpl, args
-    .return ($S0)
-.end
-
-.sub 'fill_tmpls_ascending_ints'
-    .param pmc tmpls
-    .local int idx, n
-
-    idx = 0
-    n = tmpls
-    loop:
-        if idx >= n goto end_loop
-        $S0 = tmpls[idx]
-        $I0 = 'printf_arity'($S0)
-        $P0 = 'xtimes'(idx, $I0)
-        $S1 = sprintf $S0, $P0
-        tmpls[idx] = $S1
-        inc idx
-        goto loop
-    end_loop:
-.end
-
-.sub 'printf_arity'
-    .param string tmpl
-
-    .local int count, idx
-    idx = 0
-    count = 0
-
-    loop:
-        idx = index tmpl, '%', idx
-        if idx < 0 goto end_loop
-
-        # check against '%%' escapes
-        $I0 = idx + 1
-        $S0 = substr tmpl, $I0, 1
-        unless $S0 == '%' goto is_valid_placeholder
-            idx = idx + 2 # skip both '%'s
-            goto loop
-        is_valid_placeholder:
-
-        inc idx
-        inc count
-        goto loop
-    end_loop:
-
-    .return (count)
-.end
-
-.sub 'xtimes'
-    .param pmc what
-    .param int times
-
-    .local pmc retv
-    retv = new ['ResizablePMCArray']
-    retv = times
-
-    $I0 = 0
-    loop:
-        if $I0 >= times goto end_loop
-        retv[$I0] = what
-        inc $I0
-        goto loop
-    end_loop:
-
-    .return (retv)
-.end
-
-.sub 'grep_for_true'
-    .param pmc input
-    .local pmc output
-    .local int i, n
-    output = new ['ResizableStringArray']
-    i = 0
-    n = input
-    loop:
-        if i >= n goto end_loop
-        $S0 = input[i]
-        unless $S0 goto end_cond
-            push output, $S0
-        end_cond:
-        inc i
-        goto loop
-    end_loop:
-    .return (output)
-.end
-
-# }}}
-
-# Local Variables:
-#   mode: pir
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4 ft=pir:
-

Modified: branches/rm_cflags/tools/dev/mk_language_shell.pl
==============================================================================
--- branches/rm_cflags/tools/dev/mk_language_shell.pl	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/tools/dev/mk_language_shell.pl	Mon Feb 22 02:43:55 2010	(r44285)
@@ -665,10 +665,10 @@
             * specify it?
             */
             /*
-            array_t = pmc_type(INTERP,
+            array_t = Parrot_pmc_get_type_str(INTERP,
                 string_from_literal(INTERP, "@lang@"));
             */
-            property = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+            property = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
 
             VTABLE_set_integer_native(INTERP, property, 1);
             VTABLE_set_integer_keyed_int(INTERP, property, 0,

Modified: branches/rm_cflags/tools/dev/mk_nci_thunks.pl
==============================================================================
--- branches/rm_cflags/tools/dev/mk_nci_thunks.pl	Sun Feb 21 23:49:46 2010	(r44284)
+++ branches/rm_cflags/tools/dev/mk_nci_thunks.pl	Mon Feb 22 02:43:55 2010	(r44285)
@@ -25,7 +25,7 @@
     my $nci_file = "src/nci/$_.nci";
     my $loader_name = "Parrot_nci_load_$_";
     print "$nci_file > $c_file\n";
-    system("./parrot tools/build/nativecall.pir " .
+    system("./parrot tools/dev/nci_thunk_gen.pir " .
             "--core " .
             "--loader-name=$loader_name " .
             "--output=$c_file " .

Copied: branches/rm_cflags/tools/dev/nci_thunk_gen.pir (from r44284, trunk/tools/dev/nci_thunk_gen.pir)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/rm_cflags/tools/dev/nci_thunk_gen.pir	Mon Feb 22 02:43:55 2010	(r44285, copy of r44284, trunk/tools/dev/nci_thunk_gen.pir)
@@ -0,0 +1,1127 @@
+# Copyright (C) 2010, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+tools/dev/nci_thunk_gen.pir - Build up native call thunk routines
+
+=head1 SYNOPSIS
+
+    % ./parrot tools/dev/nci_thunk_gen.pir -o src/nci/extra_thunks.c <src/nci/extra_thunks.nci
+
+=head1 DESCRIPTION
+
+This script creates Native Call Interface files. It parses a file of function
+signatures of the form:
+
+ <return-type-specifier><ws><parameter-type-specifiers>[<ws>][#<comment>]
+    ...
+Empty lines and lines containing only whitespace or comment are ignored.
+The types specifiers are documented in F<src/nci/extra_thunks.nci>.
+
+=head1 SEE ALSO
+
+F<src/nci/extra_thunks.nci>.
+F<docs/pdds/pdd16_native_call.pod>.
+
+=cut
+
+.macro_const VERSION 0.01
+
+.macro_const OPTS_GLOBAL_NAME       'options'
+
+.sub 'main' :main
+    .param pmc argv
+
+    # initialize global variables
+    'get_options'(argv)
+
+    .local string targ
+    targ = 'read_from_opts'('target')
+
+    .local pmc sigs
+    sigs = 'read_sigs'()
+
+    $S0 = 'read_from_opts'('output')
+    $P0 = open $S0, 'w'
+    setstdout $P0
+
+    if targ == 'head'          goto get_targ
+    if targ == 'thunks'        goto get_targ
+    if targ == 'loader'        goto get_targ
+    if targ == 'loader-dynext' goto get_dynext_loader
+    if targ == 'coda'          goto get_targ
+    if targ == 'all'           goto all
+    if targ == 'all-dynext'    goto all_dynext
+    if targ == 'names'         goto names
+    if targ == 'signatures'    goto signatures
+
+    # unknown target
+    $S0 = 'sprintf'("Unknown target type '%s'", targ)
+    die $S0
+
+  all:
+    $S0 = 'get_head'(sigs)
+    say $S0
+    $S0 = 'get_thunks'(sigs)
+    say $S0
+    $S0 = 'get_loader'(sigs)
+    say $S0
+    $S0 = 'get_coda'(sigs)
+    say $S0
+    exit 0
+
+  all_dynext:
+    $S0 = 'get_head'(sigs)
+    say $S0
+    $S0 = 'get_thunks'(sigs)
+    say $S0
+    $S0 = 'get_dynext_loader'(sigs)
+    say $S0
+    $S0 = 'get_coda'(sigs)
+    say $S0
+    exit 0
+
+  get_dynext_loader:
+    $S0 = 'get_dynext_loader'(sigs)
+    say $S0
+    exit 0
+
+  get_targ:
+    $S0 = concat 'get_', targ
+    $P0 = get_global $S0
+    $S1 = $P0(sigs)
+    say $S1
+    exit 0
+
+  names:
+    die "names not yet implemented"
+  signatures:
+    die "signatures not yet implemented"
+.end
+
+# getopt stuff {{{
+
+.macro_const OUTPUT                 'output'
+.macro_const THUNK_STORAGE_CLASS    'thunk-storage-class'
+.macro_const THUNK_NAME_PROTO       'thunk-name-proto'
+.macro_const LOADER_STORAGE_CLASS   'loader-storage-class'
+.macro_const LOADER_NAME            'loader-name'
+.macro_const CORE                   'core'
+
+.sub 'get_options'
+    .param pmc argv
+
+    load_bytecode 'Getopt/Obj.pbc'
+
+    .local pmc getopt
+    getopt = new ['Getopt';'Obj']
+    push getopt, 'help|h'
+    push getopt, 'version|v'
+    push getopt, 'core'
+    push getopt, 'dynext'
+    push getopt, 'output|o=s'
+    push getopt, 'target=s'
+    push getopt, 'thunk-storage-class=s'
+    push getopt, 'thunk-name-proto=s'
+    push getopt, 'loader-storage-class=s'
+    push getopt, 'loader-name=s'
+
+    .local string prog_name
+    prog_name = shift argv
+
+    .local pmc opt
+    opt = getopt.'get_options'(argv)
+
+    $I0 = opt['help']
+    if $I0 goto print_help
+
+    $I0 = opt['version']
+    if $I0 goto print_version
+
+    'fixup_opts'(opt)
+
+    set_global .OPTS_GLOBAL_NAME, opt
+    .return()
+
+  print_help:
+    'usage'(prog_name)
+  print_version:
+    'version'(prog_name)
+.end
+
+.sub 'usage'
+    .param string prog_name
+    print prog_name
+    say ' - Parrot NCI thunk library creation utility'
+    say <<'USAGE'
+
+Creates a C file of routines suitable for use as Parrot NCI thunks.
+
+Usage ./parrot nci_thunk_gen.pir [options] -o output_c_file.c <input_signature_list.nci
+
+Options
+    --help              print this message and exit
+    --version           print the version number of this utility
+    --core              output a thunks file suitable for inclusion in Parrot core. Default is no.
+    -o --output <file>  specify output file to use.
+    --target <target>   select what to output (valid options are 'head', 'thunks',
+                        'loader', 'coda', 'all', 'names', and 'signatures'). Default value is 'all'
+    --thunk-storage-class <storage class>
+                        set the storage class used for the thunks. Default value is 'static'.
+    --thunk-name-proto <printf prototype>
+                        set the prototype used for the thunk function names. Must be a printf
+                        format with arity 1. Default value is 'pcf_%s'
+    --loader-storage-class
+                        set the storage class used for the loader function. Default value is none.
+    --loader-name       set the name used for the loader function. Default value is 'Parrot_load_nci_thunks'.
+USAGE
+    exit 0
+.end
+
+.sub 'version'
+    .param string prog_name
+    print prog_name
+    print ' version '
+    say .VERSION
+    exit 0
+.end
+
+.sub 'fixup_opts'
+    .param pmc opts
+
+    $I0 = defined opts['core']
+    if $I0 goto in_core
+        opts['core'] = ''
+        goto end_core
+    in_core:
+        opts['core'] = 'true'
+    end_core:
+
+    $I0 = defined opts['dynext']
+    if $I0 goto is_dynext
+        opts['dynext'] = ''
+        goto end_dynext
+    is_dynext:
+        $I0 = defined opts['target']
+        if $I0 goto end_dynext_target
+            opts['target'] = 'all-dynext'
+        end_dynext_target:
+
+        $I0 = defined opts['loader-storage-class']
+        if $I0 goto end_dynext_loader_storage_class
+            opts['loader-storage-class'] = 'PARROT_DYNEXT_EXPORT'
+        end_dynext_loader_storage_class:
+
+        $I0 = defined opts['loader-name']
+        if $I0 goto end_dynext_loader_name
+            $S0 = opts['output']
+            ($S0, $S1, $S0) = 'file_basename'($S0, '.c')
+            $S0 = 'sprintf'('Parrot_lib_%s_init', $S1)
+            opts['loader-name'] = $S0
+        end_dynext_loader_name:
+    end_dynext:
+
+    $I0 = defined opts['target']
+    if $I0 goto end_target
+        opts['target'] = 'all'
+    end_target:
+
+    $I0 = defined opts['thunk-storage-class']
+    if $I0 goto end_thunk_storage_class
+        opts['thunk-storage-class'] = 'static'
+    end_thunk_storage_class:
+
+    $I0 = defined opts['thunk-name-proto']
+    if $I0 goto end_thunk_name_proto
+        opts['thunk-name-proto'] = 'pcf_%s'
+    end_thunk_name_proto:
+
+    $S0 = opts['thunk-name-proto']
+    $I0 = 'printf_arity'($S0)
+    if $I0 == 1 goto end_thunk_name_proto_printf_arity
+        'sprintf'("Provided proto for 'thunk-name-proto' is of incorrect arity %i (expected 1)", $I0)
+        die $S0
+    end_thunk_name_proto_printf_arity:
+
+    $I0 = defined opts['loader-storage-class']
+    if $I0 goto end_loader_storage_class
+        opts['loader-storage-class'] = ''
+    end_loader_storage_class:
+
+    $I0 = defined opts['loader-name']
+    if $I0 goto end_loader_name
+        opts['loader-name'] = 'Parrot_load_nci_thunks'
+    end_loader_name:
+.end
+
+.sub 'read_from_opts'
+    .param string key
+
+    .local pmc opts
+    opts = get_global .OPTS_GLOBAL_NAME
+
+    $I0 = defined opts[key]
+    unless $I0 goto not_present
+
+    $S0 = opts[key]
+    .return ($S0)
+
+  not_present:
+    $S0 = 'sprintf'("Parameter '%s' required but not provided", key)
+    die $S0
+.end
+
+# }}}
+
+# get_{head,thunks,loader,dynext_loader,coda} {{{
+
+.sub 'get_head'
+    .param pmc ignored :slurpy
+
+    .local string in_core
+    in_core = 'read_from_opts'(.CORE)
+
+    .local string ext_defn
+    ext_defn = ''
+    if in_core goto end_ext_defn
+        ext_defn = '#define PARROT_IN_EXTENSION'
+    end_ext_defn:
+
+    .local string c_file
+    c_file = 'read_from_opts'(.OUTPUT)
+
+    .local string str_file
+    ($S0, str_file, $S0) = 'file_basename'(c_file, '.c')
+    str_file = concat str_file, '.str'
+
+    .local string head
+    head = 'sprintf'(<<'HEAD', c_file, ext_defn, str_file)
+/* ex: set ro ft=c:
+ * !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
+ *
+ * This file is generated automatically by tools/dev/nci_thunk_gen.pir
+ *
+ * Any changes made here will be lost!
+ *
+ */
+
+/* %s
+ *  Copyright (C) 2010, Parrot Foundation.
+ *  SVN Info
+ *     $Id$
+ *  Overview:
+ *     Native Call Interface routines. The code needed to build a
+ *     parrot to C call frame is in here
+ *  Data Structure and Algorithms:
+ *  History:
+ *  Notes:
+ *  References:
+ */
+
+%s
+#include "parrot/parrot.h"
+#include "pmc/pmc_nci.h"
+
+
+#ifdef PARROT_IN_EXTENSION
+/* external libraries can't have strings statically compiled into parrot */
+#  define CONST_STRING(i, s) Parrot_str_new_constant((i), (s))
+#else
+#  include "%s"
+#endif
+
+/* HEADERIZER HFILE: none */
+/* HEADERIZER STOP */
+
+/* All our static functions that call in various ways. Yes, terribly
+   hackish, but that is just fine */
+
+PARROT_DYNEXT_EXPORT void Parrot_glut_nci_loader(PARROT_INTERP);
+
+HEAD
+    .return (head)
+.end
+
+.sub 'get_thunks'
+    .param pmc sigs
+    .local string code
+    .local int i, n
+    code = ''
+    i = 0
+    n = sigs
+    loop:
+        if i >= n goto end_loop
+
+        .local pmc sig
+        sig = sigs[i]
+        $S0 = 'sig_to_fn_code'(sig :flat)
+        code = concat code, $S0
+
+        inc i
+        goto loop
+    end_loop:
+    .return (code)
+.end
+
+.sub 'get_loader'
+    .param pmc sigs
+
+    $S0 = 'read_from_opts'(.LOADER_STORAGE_CLASS)
+    $S1 = 'read_from_opts'(.LOADER_NAME)
+    .local string code
+    code = 'sprintf'(<<'FN_HEADER', $S0, $S1)
+
+%s void
+%s(PARROT_INTERP)
+{
+    PMC *iglobals;
+    PMC *nci_funcs;
+    PMC *temp_pmc;
+
+    iglobals = interp->iglobals;
+    PARROT_ASSERT(!(PMC_IS_NULL(iglobals)));
+
+    nci_funcs = VTABLE_get_pmc_keyed_int(interp, iglobals,
+            IGLOBALS_NCI_FUNCS);
+    PARROT_ASSERT(!(PMC_IS_NULL(nci_funcs)));
+
+FN_HEADER
+
+    .local int i, n
+    i = 0
+    n = sigs
+    loop:
+        if i >= n goto end_loop
+
+        .local pmc sig
+        sig = shift sigs
+
+        .local string fn_name
+        fn_name = 'sig_to_fn_name'(sig :flat)
+
+        .local string key
+        key = join '', sig
+
+        $S0 = 'sprintf'(<<'TEMPLATE', fn_name, key)
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+    VTABLE_set_pointer(interp, temp_pmc, (void *)%s);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "%s"), temp_pmc);
+
+TEMPLATE
+        code = concat code, $S0
+
+        inc i
+        goto loop
+    end_loop:
+
+    code = concat code, <<'FN_FOOTER'
+}
+FN_FOOTER
+
+    .return (code)
+.end
+
+.sub 'get_dynext_loader'
+    .param pmc sigs
+
+    $S0 = 'read_from_opts'(.LOADER_STORAGE_CLASS)
+    $S1 = 'read_from_opts'(.LOADER_NAME)
+    .local string code
+    code = 'sprintf'(<<'FN_HEADER', $S0, $S1)
+
+%s void
+%s(PARROT_INTERP, SHIM(PMC *lib))
+{
+    PMC *iglobals;
+    PMC *nci_funcs;
+    PMC *temp_pmc;
+
+    iglobals = interp->iglobals;
+    PARROT_ASSERT(!(PMC_IS_NULL(iglobals)));
+
+    nci_funcs = VTABLE_get_pmc_keyed_int(interp, iglobals,
+            IGLOBALS_NCI_FUNCS);
+    PARROT_ASSERT(!(PMC_IS_NULL(nci_funcs)));
+
+FN_HEADER
+
+    .local int i, n
+    i = 0
+    n = sigs
+    loop:
+        if i >= n goto end_loop
+
+        .local pmc sig
+        sig = shift sigs
+
+        .local string fn_name
+        fn_name = 'sig_to_fn_name'(sig :flat)
+
+        .local string key
+        key = join '', sig
+
+        $S0 = 'sprintf'(<<'TEMPLATE', fn_name, key)
+    temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+    VTABLE_set_pointer(interp, temp_pmc, (void *)%s);
+    VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "%s"), temp_pmc);
+
+TEMPLATE
+        code = concat code, $S0
+
+        inc i
+        goto loop
+    end_loop:
+
+    code = concat code, <<'FN_FOOTER'
+}
+FN_FOOTER
+
+    .return (code)
+.end
+
+.sub 'get_coda'
+    .param pmc ignored :slurpy
+    .return (<<'CODA')
+
+/*
+ * Local variables:
+ *   c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
+CODA
+.end
+
+# }}}
+
+# sig_to_* {{{
+
+.sub 'sig_to_fn_code'
+    .param pmc args :slurpy
+
+    .local string fn_decl
+    fn_decl = 'sig_to_fn_decl'(args :flat)
+
+    .local string var_decls
+    var_decls = 'sig_to_var_decls'(args :flat)
+
+    .local string preamble
+    preamble = 'sig_to_preamble'(args :flat)
+
+    .local string call
+    call = 'sig_to_call'(args :flat)
+
+    .local string postamble
+    postamble = 'sig_to_postamble'(args :flat)
+
+    .local string fn_code
+    fn_code = 'sprintf'("%s{\n%s%s%s%s}\n", fn_decl, var_decls, preamble, call, postamble)
+
+    .return (fn_code)
+.end
+
+.sub 'sig_to_postamble'
+    .param string ret
+    .param string params
+
+    .local string final_assign
+    $P0 = 'map_from_sig_table'(ret, 'ret_assign')
+    final_assign = $P0[0]
+
+    .local string extra_postamble
+    $P0 = 'map_from_sig_table'(params, 'postamble_tmpl')
+    'fill_tmpls_ascending_ints'($P0)
+    extra_postamble = join "\n", $P0
+
+    .local string postamble
+    postamble = 'sprintf'(<<'TEMPLATE', final_assign, extra_postamble)
+    %s
+    %s
+TEMPLATE
+    .return (postamble)
+.end
+
+.sub 'sig_to_call'
+    .param string ret
+    .param string params
+
+    .local string return_assign
+    $P0 = 'map_from_sig_table'(ret, 'func_call_assign')
+    return_assign = $P0[0]
+
+    .local string ret_cast
+    $P0 = 'map_from_sig_table'(ret, 'as_return')
+    ret_cast = $P0[0]
+    if ret_cast == 'void' goto void_fn
+        ret_cast = 'sprintf'('(%s)', ret_cast)
+        goto end_ret_cast
+    void_fn:
+        ret_cast = ''
+    end_ret_cast:
+
+    .local string call_params
+    $P0 = 'map_from_sig_table'(params, 'call_param_tmpl')
+    'fill_tmpls_ascending_ints'($P0)
+    call_params = join ', ', $P0
+
+    .local string call
+    call = 'sprintf'(<<'TEMPLATE', return_assign, ret_cast, call_params)
+    GETATTR_NCI_orig_func(interp, self, orig_func);
+    fn_pointer = (func_t)D2FPTR(orig_func);
+    %s %s(*fn_pointer)(%s);
+TEMPLATE
+    .return (call)
+.end
+
+.sub 'sig_to_preamble'
+    .param string ret
+    .param string params
+
+    unless params goto return
+
+    .local string sig
+    $P0 = 'map_from_sig_table'(params, 'sig_char')
+    sig = join "", $P0
+
+    .local string fill_params
+    $P0 = 'map_from_sig_table'(params, 'fill_params_tmpl')
+    'fill_tmpls_ascending_ints'($P0)
+    fill_params = join "", $P0
+
+    .local string extra_preamble
+    $P0 = 'map_from_sig_table'(params, 'preamble_tmpl')
+    'fill_tmpls_ascending_ints'($P0)
+    extra_preamble = join "", $P0
+
+    .local string preamble
+    preamble = 'sprintf'(<<'TEMPLATE', sig, fill_params, extra_preamble)
+    Parrot_pcc_fill_params_from_c_args(interp, call_object, "%s"%s);
+    %s
+TEMPLATE
+
+  return:
+    .return (preamble)
+.end
+
+.sub 'sig_to_var_decls'
+    .param string ret
+    .param string params
+
+    .local string ret_csig
+    $P0 = 'map_from_sig_table'(ret, 'as_return')
+    ret_csig = $P0[0]
+
+    .local string params_csig
+    $P0 = 'map_from_sig_table'(params, 'as_proto')
+    params_csig = join ', ', $P0
+
+    .local string ret_tdecl
+    ret_tdecl = ""
+    $P0 = 'map_from_sig_table'(ret, 'return_type')
+    $S0 = $P0[0]
+    unless $S0 goto end_ret_type
+    if $S0 == 'void' goto end_ret_type
+        $S0 = 'sprintf'("%s return_data;\n", $S0)
+        ret_tdecl = concat ret_tdecl, $S0
+    end_ret_type:
+    $P0 = 'map_from_sig_table'(ret, 'final_dest')
+    $S0 = $P0[0]
+    unless $S0 goto end_final_dest
+        $S0 = concat $S0, "\n"
+        ret_tdecl = concat ret_tdecl, $S0
+    end_final_dest:
+
+    .local string params_tdecl
+    $P0 = 'map_from_sig_table'(params, 'temp_tmpl')
+    'fill_tmpls_ascending_ints'($P0)
+    $P0 = 'grep_for_true'($P0)
+    params_tdecl = join ";\n    ", $P0
+
+    .local string var_decls
+    var_decls = 'sprintf'(<<'TEMPLATE', ret_csig, params_csig, ret_tdecl, params_tdecl)
+    typedef %s(* func_t)(%s);
+    func_t fn_pointer;
+    void *orig_func;
+    PMC *ctx         = CURRENT_CONTEXT(interp);
+    PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+    %s
+    %s;
+TEMPLATE
+
+    .return (var_decls)
+.end
+
+.sub 'sig_to_fn_decl'
+    .param pmc sig :slurpy
+    .local string storage_class, fn_name, fn_decl
+    storage_class = 'read_from_opts'(.THUNK_STORAGE_CLASS)
+    fn_name = 'sig_to_fn_name'(sig :flat)
+    fn_decl = 'sprintf'(<<'TEMPLATE', storage_class, fn_name)
+%s void
+%s(PARROT_INTERP, PMC *self)
+TEMPLATE
+    .return (fn_decl)
+.end
+
+.sub 'sig_to_fn_name'
+    .param string ret
+    .param string params
+
+    .local string fix_params
+    $P0 = 'map_from_sig_table'(params, 'cname')
+    fix_params = join '', $P0
+
+
+    $S0 = 'sprintf'('%s_%s', ret, fix_params)
+    $S1 = 'read_from_opts'(.THUNK_NAME_PROTO)
+    $S2 = 'sprintf'($S1, $S0)
+    .return ($S2)
+.end
+
+.sub 'map_from_sig_table'
+    .param string sig
+    .param string field_name
+
+    .local pmc sig_table
+    .const 'Sub' sig_table = 'get_sigtable'
+
+    $P0 = split '', sig
+
+    .local pmc result
+    result = new ['ResizableStringArray']
+    $I0 = $P0
+    result = $I0
+
+    $I0 = $P0
+    $I1 = 0
+    loop:
+        if $I1 >= $I0 goto end_loop
+        $S0 = $P0[$I1]
+        $S1 = sig_table[$S0; field_name]
+        result[$I1] = $S1
+        inc $I1
+        goto loop
+    end_loop:
+
+    .return (result)
+.end
+
+# }}}
+
+# read_sigs {{{
+
+.sub 'read_sigs'
+    .local pmc stdin, seen, sigs
+    stdin = getstdin
+    seen  = new ['Hash']
+    sigs  = new ['ResizablePMCArray']
+
+    .local int lineno
+    lineno = 0
+    read_loop:
+        unless stdin goto end_read_loop
+
+        .local string ret_sig, param_sig, full_sig
+        (ret_sig, param_sig) = 'read_one_sig'(stdin)
+        inc lineno
+        full_sig = concat ret_sig, param_sig
+
+        # filter out empty sigs (and empty lines)
+        unless full_sig goto read_loop
+
+        # de-dup sigs
+        $I0 = seen[full_sig]
+        unless $I0 goto unseen
+            $S0 = 'sprintf'("Ignored signature '%s' on line %d (previously seen on line %d)\n", full_sig, lineno, $I0)
+            printerr $S0
+            goto read_loop
+        unseen:
+        seen[full_sig] = lineno
+
+        .local pmc sig
+        sig = new ['ResizableStringArray']
+        sig = 2
+        sig[0] = ret_sig
+        sig[1] = param_sig
+        push sigs, sig
+
+        goto read_loop
+    end_read_loop:
+
+    .return (sigs)
+.end
+
+.sub 'read_one_sig'
+    .param pmc fh
+
+    .local string line
+    line = readline fh
+
+    # handle comments
+    $I0 = index line, '#'
+    if $I0 < 0 goto end_comment
+        line = substr line, 0, $I0
+    end_comment:
+
+    # convert whitespace into spaces
+    $S0 = '\t'
+    whitespace_loop:
+        $I0 = index line, $S0
+        if $I0 < 0 goto end_whitespace_loop
+        substr line, $I0, 1, ' '
+        goto whitespace_loop
+    end_whitespace_loop:
+
+    if $S0 == "\n" goto end_whitespace
+        $S0 = "\n"
+        goto whitespace_loop
+    end_whitespace:
+
+    # turn multiple spaces into a single space
+    multispace_loop:
+        $I0 = index line, '  '
+        if $I0 < 0 goto end_multispace_loop
+        $S0 = substr line, $I0, 2, ' '
+        goto multispace_loop
+    end_multispace_loop:
+
+    # remove leading whitespace
+    $S0 = substr line, 0, 1
+    unless $S0 == ' ' goto end_leading
+        $S0 = substr line, 0, 1, ''
+    end_leading:
+
+    # handle empty (or whitespace only) lines
+    if line == '' goto ret
+    if line == ' ' goto ret
+
+    # remove trailing whitespace
+    $S0 = substr line, -1, 1
+    unless $S0 == ' ' goto end_trailing
+        $S0 = substr line, -1, 1, ''
+    end_trailing:
+
+    # read the signature
+    .local string ret_sig, param_sig
+    $P0 = split ' ', line
+    ret_sig   = $P0[0]
+    param_sig = $P0[1]
+
+  ret:
+    .return (ret_sig, param_sig)
+.end
+
+#}}}
+
+# get_sigtable {{{
+
+.sub 'get_sigtable' :anon :immediate
+    .const string json_table = <<'JSON'
+{
+    "p": { "as_proto":   "void *",
+           "final_dest": "PMC * final_destination = PMCNULL;",
+           "temp_tmpl": "PMC *t_%i",
+           "sig_char":   "P",
+           "call_param_tmpl": "PMC_IS_NULL((PMC*)t_%i) ? (void *)NULL : VTABLE_get_pointer(interp, t_%i)",
+           "ret_assign": "if (return_data != NULL) {
+                             final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+                             VTABLE_set_pointer(interp, final_destination, return_data);
+                          }
+                          Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"P\", final_destination);" },
+    "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 *",
+           "final_dest": "STRING *final_destination;",
+           "ret_assign": "final_destination = Parrot_str_new(interp, return_data, 0);
+                          Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"S\", final_destination);",
+           "sig_char": "S",
+           "temp_tmpl": "char *t_%i; STRING *ts_%i",
+           "fill_params_tmpl": ", &ts_%i",
+           "preamble_tmpl": "t_%i = ts_%i ? Parrot_str_to_cstring(interp, ts_%i) : (char *)NULL;",
+           "postamble_tmpl": "if (t_%i) Parrot_str_free_cstring(t_%i);" },
+    "v": { "as_proto": "void",
+           "return_type": "void *",
+           "sig_char": "v",
+           "ret_assign": "",
+           "func_call_assign": "" },
+    "P": { "as_proto": "PMC *", "sig_char": "P" },
+    "O": { "as_proto": "PMC *", "returns": "", "sig_char": "Pi" },
+    "J": { "as_proto": "PARROT_INTERP",
+           "returns": "",
+           "fill_params_tmpl": "",
+           "call_param_tmpl": "interp",
+           "temp_tmpl": "",
+           "sig_char": "" },
+    "S": { "as_proto": "STRING *", "sig_char": "S" },
+    "I": { "as_proto": "INTVAL", "sig_char": "I" },
+    "N": { "as_proto": "FLOATVAL", "sig_char": "N" },
+    "b": { "as_proto": "void *",
+           "as_return": "",
+           "sig_char": "S",
+           "temp_tmpl":"STRING *t_%i",
+           "call_param_tmpl": "Buffer_bufstart(t_%i)" },
+    "B": { "as_proto": "char **",
+           "as_return": "",
+           "sig_char": "S",
+           "fill_params_tmpl": ", &ts_%i",
+           "temp_tmpl": "char *t_%i; STRING *ts_%i",
+           "preamble_tmpl": "t_%i = ts_%i ? Parrot_str_to_cstring(interp, ts_%i) : (char *) NULL;",
+           "call_param_tmpl": "&t_%i",
+           "postamble_tmpl": "if (t_%i) Parrot_str_free_cstring(t_%i);" },
+    "2": { "as_proto": "short *",
+           "sig_char": "P",
+           "return_type": "short",
+           "ret_assign": "Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"I\", return_data);",
+           "temp_tmpl": "PMC *t_%i; short i_%i",
+           "preamble_tmpl": "i_%i = VTABLE_get_integer(interp, t_%i);",
+           "call_param_tmpl": "&i_%i",
+           "postamble_tmpl": "VTABLE_set_integer_native(interp, t_%i, i_%i);" },
+    "3": { "as_proto": "int *",
+           "sig_char": "P",
+           "return_type": "int",
+           "ret_assign": "Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"I\", return_data);",
+           "temp_tmpl": "PMC *t_%i; int i_%i",
+           "preamble_tmpl": "i_%i = VTABLE_get_integer(interp, t_%i);",
+           "call_param_tmpl": "&i_%i",
+           "postamble_tmpl": "VTABLE_set_integer_native(interp, t_%i, i_%i);" },
+    "4": { "as_proto": "long *",
+           "sig_char": "P",
+           "return_type": "long",
+           "ret_assign": "Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"I\", return_data);",
+           "temp_tmpl": "PMC *t_%i; long i_%i",
+           "preamble_tmpl": "i_%i = VTABLE_get_integer(interp, t_%i);",
+           "call_param_tmpl": "&i_%i",
+           "postamble_tmpl": "VTABLE_set_integer_native(interp, t_%i, i_%i);" },
+    "L": { "as_proto": "long *", "as_return": "" },
+    "T": { "as_proto": "char **", "as_return": "" },
+    "V": { "as_proto": "void **",
+           "as_return": "",
+           "sig_char": "P",
+           "temp_tmpl": "PMC *t_%i; void *v_%i",
+           "preamble_tmpl": "v_%i = VTABLE_get_pointer(interp, t_%i);",
+           "call_param_tmpl": "&v_%i",
+           "postamble_tmpl": "VTABLE_set_pointer(interp, t_%i, v_%i);" },
+    "@": { "as_proto": "PMC *", "as_return": "", "cname": "xAT_", "sig_char": "Ps" }
+}
+JSON
+
+    # decode table
+    .local pmc compiler
+    load_bytecode 'data_json.pbc'
+    compiler = compreg 'data_json'
+
+    .local pmc table
+    $P0 = compiler.'compile'(json_table)
+    table = $P0()
+
+    # fixup table
+    .local pmc table_iter
+    table_iter = iter table
+  iter_loop:
+    unless table_iter goto iter_end
+
+    .local string k
+    .local pmc v
+    k = shift table_iter
+    v = table[k]
+
+    $I0 = exists v['cname']
+    if $I0 goto has_cname
+        v['cname'] = k
+    has_cname:
+
+    $I0 = exists v['as_return']
+    if $I0 goto has_as_return
+        $S0 = v['as_proto']
+        v['as_return'] = $S0
+    has_as_return:
+
+    $I0 = exists v['return_type']
+    if $I0 goto has_return_type
+        $S0 = v['as_proto']
+        v['return_type'] = $S0
+    has_return_type:
+
+    $I0 = exists v['ret_assign']
+    $I1 = exists v['sig_char']
+    $I1 = !$I1
+    $I0 = $I0 || $I1 # not (not exists v[ret_assign] and exists v[sig_char])
+    if $I0 goto has_ret_assign
+        $S0 = 'Parrot_pcc_fill_returns_from_c_args(interp, call_object, "'
+        $S1 = v['sig_char']
+        $S0 = concat $S0, $S1
+        $S0 = concat $S0, '", return_data);'
+        v['ret_assign'] = $S0
+    has_ret_assign:
+
+    $I0 = exists v['func_call_assign']
+    if $I0 goto has_func_call_assign
+        v['func_call_assign'] = 'return_data = '
+    has_func_call_assign:
+
+    $I0 = exists v['temp_tmpl']
+    if $I0 goto has_temp_tmpl
+        $S0 = v['return_type']
+        $S0 = concat $S0, " t_%i"
+        v['temp_tmpl'] = $S0
+    has_temp_tmpl:
+
+    $I0 = exists v['fill_params_tmpl']
+    if $I0 goto has_fill_params_tmpl
+        v['fill_params_tmpl'] = ', &t_%i'
+    has_fill_params_tmpl:
+
+    $I0 = exists v['call_param_tmpl']
+    if $I0 goto has_call_param_tmpl
+        v['call_param_tmpl'] = 't_%i'
+    has_call_param_tmpl:
+
+    goto iter_loop
+  iter_end:
+
+    .return (table)
+.end
+
+# }}}
+
+# utility fn's {{{
+
+.sub 'sprintf'
+    .param string tmpl
+    .param pmc args :slurpy
+    $S0 = sprintf tmpl, args
+    .return ($S0)
+.end
+
+.sub 'fill_tmpls_ascending_ints'
+    .param pmc tmpls
+    .local int idx, n
+
+    idx = 0
+    n = tmpls
+    loop:
+        if idx >= n goto end_loop
+        $S0 = tmpls[idx]
+        $I0 = 'printf_arity'($S0)
+        $P0 = 'xtimes'(idx, $I0)
+        $S1 = sprintf $S0, $P0
+        tmpls[idx] = $S1
+        inc idx
+        goto loop
+    end_loop:
+.end
+
+.sub 'printf_arity'
+    .param string tmpl
+
+    .local int count, idx
+    idx = 0
+    count = 0
+
+    loop:
+        idx = index tmpl, '%', idx
+        if idx < 0 goto end_loop
+
+        # check against '%%' escapes
+        $I0 = idx + 1
+        $S0 = substr tmpl, $I0, 1
+        unless $S0 == '%' goto is_valid_placeholder
+            idx = idx + 2 # skip both '%'s
+            goto loop
+        is_valid_placeholder:
+
+        inc idx
+        inc count
+        goto loop
+    end_loop:
+
+    .return (count)
+.end
+
+.sub 'xtimes'
+    .param pmc what
+    .param int times
+
+    .local pmc retv
+    retv = new ['ResizablePMCArray']
+    retv = times
+
+    $I0 = 0
+    loop:
+        if $I0 >= times goto end_loop
+        retv[$I0] = what
+        inc $I0
+        goto loop
+    end_loop:
+
+    .return (retv)
+.end
+
+.sub 'grep_for_true'
+    .param pmc input
+    .local pmc output
+    .local int i, n
+    output = new ['ResizableStringArray']
+    i = 0
+    n = input
+    loop:
+        if i >= n goto end_loop
+        $S0 = input[i]
+        unless $S0 goto end_cond
+            push output, $S0
+        end_cond:
+        inc i
+        goto loop
+    end_loop:
+
+    .return (output)
+.end
+
+.sub 'file_basename'
+    .param string full_path
+    .param pmc extns :slurpy
+
+    .local string dir, file, extn
+    file = clone full_path
+
+    extn_loop:
+        unless extns goto end_extn_loop
+        $S0 = shift extns
+        $I0 = length $S0
+        $I1 = -$I0
+        $S1 = substr file, $I1, $I0
+        unless $S1 == $S0 goto extn_loop
+        extn = $S1
+        substr file, $I1, $I0, ''
+    end_extn_loop:
+
+    # TODO: make this portable
+    .const string file_sep = '/'
+
+    strip_dir_loop:
+        $I0 = index file, file_sep
+        if $I0 < 0 goto end_strip_dir_loop
+        inc $I0
+        $S0 = substr file, 0, $I0
+        dir = concat dir, $S0
+        file = substr file, $I0
+        goto strip_dir_loop
+    end_strip_dir_loop:
+
+    .return (dir, file, extn)
+.end
+
+# }}}
+
+# Local Variables:
+#   mode: pir
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
+


More information about the parrot-commits mailing list