[svn:parrot] r38558 - in branches/pmc_pct: . compilers/imcc compilers/json compilers/ncigen/src/builtins compilers/nqp/bootstrap compilers/nqp/src compilers/nqp/src/Grammar compilers/pct/src/PCT compilers/pge compilers/pge/PGE compilers/pirc/src compilers/tge config/auto config/auto/format config/auto/sizes config/gen config/gen/config_pm config/gen/makefiles config/gen/platform/darwin config/gen/platform/netbsd config/init config/init/hints docs docs/book docs/book/draft docs/dev docs/pdds docs/pdds/draft docs/pmc docs/project editor examples/benchmarks examples/japh examples/languages/abc examples/languages/abc/src/builtins examples/languages/squaak examples/library examples/namespace examples/nci examples/opengl examples/pasm examples/past examples/pir examples/pir/befunge examples/shootout examples/streams examples/tcl examples/tge/branch examples/tge/branch/lib examples/tutorial ext/Parrot-Embed/t ext/SQLite3 include/parrot lib/Parrot lib/Parrot/Configure/Option s lib/Parrot/Configure/Options/Conf lib/Parrot/Harness lib/Parrot/Ops2c lib/Parrot/Pmc2c lib/Parrot/Pmc2c/PMC ports/cpan ports/cygwin ports/debian ports/fedora ports/macports ports/mandriva ports/suse runtime/parrot/include runtime/parrot/library runtime/parrot/library/Config runtime/parrot/library/Data runtime/parrot/library/Digest runtime/parrot/library/Math runtime/parrot/library/NCI runtime/parrot/library/PGE runtime/parrot/library/Tcl runtime/parrot/library/YAML src src/call src/dynpmc src/gc src/interp src/jit/i386 src/ops src/pmc src/runcore t/codingstd t/compilers/pge/perl6regex t/compilers/tge t/dynpmc t/library t/pmc t/src t/steps t/tools tools/build tools/dev tools/util

cotto at svn.parrot.org cotto at svn.parrot.org
Fri May 8 00:05:27 UTC 2009


Author: cotto
Date: Fri May  8 00:05:13 2009
New Revision: 38558
URL: https://trac.parrot.org/parrot/changeset/38558

Log:
sync pmc_pct with trunk

Added:
   branches/pmc_pct/config/auto/sizes/floatval_maxmin_c.in
      - copied unchanged from r38556, trunk/config/auto/sizes/floatval_maxmin_c.in
   branches/pmc_pct/config/auto/sizes/intval_maxmin_c.in
      - copied unchanged from r38556, trunk/config/auto/sizes/intval_maxmin_c.in
   branches/pmc_pct/docs/pdds/pdd30_install.pod
      - copied unchanged from r38556, trunk/docs/pdds/pdd30_install.pod
Deleted:
   branches/pmc_pct/config/auto/format/floatval_maxmin_c.in
   branches/pmc_pct/config/auto/format/intval_maxmin_c.in
   branches/pmc_pct/config/gen/platform/darwin/dl.c
   branches/pmc_pct/docs/pdds/draft/pdd30_install.pod
Modified:
   branches/pmc_pct/   (props changed)
   branches/pmc_pct/CREDITS
   branches/pmc_pct/Configure.pl
   branches/pmc_pct/DEPRECATED.pod
   branches/pmc_pct/MANIFEST
   branches/pmc_pct/MANIFEST.SKIP
   branches/pmc_pct/MANIFEST.generated
   branches/pmc_pct/PLATFORMS
   branches/pmc_pct/compilers/imcc/imcparser.c
   branches/pmc_pct/compilers/json/postalcodes.pir
   branches/pmc_pct/compilers/json/test.pir
   branches/pmc_pct/compilers/ncigen/src/builtins/say.pir
   branches/pmc_pct/compilers/nqp/bootstrap/actions.pm
   branches/pmc_pct/compilers/nqp/bootstrap/nqp.pir
   branches/pmc_pct/compilers/nqp/src/Grammar.pg
   branches/pmc_pct/compilers/nqp/src/Grammar/Actions.pir
   branches/pmc_pct/compilers/nqp/src/builtins.pir
   branches/pmc_pct/compilers/pct/src/PCT/Dumper.pir
   branches/pmc_pct/compilers/pct/src/PCT/HLLCompiler.pir
   branches/pmc_pct/compilers/pge/PGE.pir
   branches/pmc_pct/compilers/pge/PGE/Exp.pir
   branches/pmc_pct/compilers/pge/PGE/Match.pir
   branches/pmc_pct/compilers/pge/PGE/OPTable.pir
   branches/pmc_pct/compilers/pge/PGE/P5Regex.pir
   branches/pmc_pct/compilers/pge/PGE/Perl6Regex.pir
   branches/pmc_pct/compilers/pge/PGE/Regex.pir
   branches/pmc_pct/compilers/pge/PGE/builtins.pg
   branches/pmc_pct/compilers/pge/demo.pir
   branches/pmc_pct/compilers/pirc/src/bcgen.h
   branches/pmc_pct/compilers/pirc/src/pirerr.h
   branches/pmc_pct/compilers/pirc/src/pirop.h
   branches/pmc_pct/compilers/tge/tgc.pir
   branches/pmc_pct/config/auto/arch.pm
   branches/pmc_pct/config/auto/format.pm
   branches/pmc_pct/config/auto/pmc.pm
   branches/pmc_pct/config/auto/sizes.pm
   branches/pmc_pct/config/gen/config_pm/config_lib_pasm.in
   branches/pmc_pct/config/gen/core_pmcs.pm
   branches/pmc_pct/config/gen/makefiles/pirc.in
   branches/pmc_pct/config/gen/makefiles/root.in
   branches/pmc_pct/config/gen/platform/netbsd/misc.c   (props changed)
   branches/pmc_pct/config/gen/platform/netbsd/misc.h   (props changed)
   branches/pmc_pct/config/init/defaults.pm
   branches/pmc_pct/config/init/hints/mswin32.pm
   branches/pmc_pct/docs/book/appb_patch_submission.pod   (props changed)
   branches/pmc_pct/docs/book/ch01_introduction.pod   (contents, props changed)
   branches/pmc_pct/docs/book/ch02_getting_started.pod
   branches/pmc_pct/docs/book/ch03_pir.pod   (contents, props changed)
   branches/pmc_pct/docs/book/ch04_compiler_tools.pod   (props changed)
   branches/pmc_pct/docs/book/ch07_dynpmcs.pod   (props changed)
   branches/pmc_pct/docs/book/ch08_dynops.pod   (contents, props changed)
   branches/pmc_pct/docs/book/ch09_pasm.pod   (props changed)
   branches/pmc_pct/docs/book/ch10_opcode_reference.pod   (props changed)
   branches/pmc_pct/docs/book/draft/chXX_hlls.pod   (props changed)
   branches/pmc_pct/docs/book/draft/chXX_library.pod   (props changed)
   branches/pmc_pct/docs/book/draft/chXX_testing_and_debugging.pod   (props changed)
   branches/pmc_pct/docs/dev/c_functions.pod   (props changed)
   branches/pmc_pct/docs/pmc.pod
   branches/pmc_pct/docs/pmc/subs.pod
   branches/pmc_pct/docs/project/release_manager_guide.pod
   branches/pmc_pct/editor/skeleton.pir
   branches/pmc_pct/examples/benchmarks/float4.pir
   branches/pmc_pct/examples/benchmarks/oo1.pasm
   branches/pmc_pct/examples/benchmarks/oo2.pasm
   branches/pmc_pct/examples/benchmarks/oo3.pasm
   branches/pmc_pct/examples/benchmarks/oo4.pasm
   branches/pmc_pct/examples/benchmarks/oo5.pir
   branches/pmc_pct/examples/benchmarks/oo6.pir
   branches/pmc_pct/examples/benchmarks/oofib.pir
   branches/pmc_pct/examples/benchmarks/overload.pir
   branches/pmc_pct/examples/benchmarks/vpm.pir
   branches/pmc_pct/examples/japh/japh1.pasm
   branches/pmc_pct/examples/japh/japh3.pasm
   branches/pmc_pct/examples/japh/japh4.pasm
   branches/pmc_pct/examples/japh/japh5.pasm
   branches/pmc_pct/examples/languages/abc/   (props changed)
   branches/pmc_pct/examples/languages/abc/abc.pir
   branches/pmc_pct/examples/languages/abc/src/builtins/all.pir
   branches/pmc_pct/examples/languages/squaak/   (props changed)
   branches/pmc_pct/examples/library/md5sum.pir
   branches/pmc_pct/examples/namespace/namespace_dump.pir
   branches/pmc_pct/examples/nci/sdl_blue_rectangle.pir
   branches/pmc_pct/examples/nci/xlibtest.p6
   branches/pmc_pct/examples/opengl/shapes.pir
   branches/pmc_pct/examples/opengl/static-triangle.pir
   branches/pmc_pct/examples/opengl/triangle.pir
   branches/pmc_pct/examples/pasm/hello.pasm
   branches/pmc_pct/examples/past/four_plus_one.pir
   branches/pmc_pct/examples/pir/befunge/befunge.pir
   branches/pmc_pct/examples/pir/befunge/debug.pir
   branches/pmc_pct/examples/pir/befunge/flow.pir
   branches/pmc_pct/examples/pir/befunge/io.pir
   branches/pmc_pct/examples/pir/befunge/load.pir
   branches/pmc_pct/examples/pir/befunge/maths.pir
   branches/pmc_pct/examples/pir/befunge/stack.pir
   branches/pmc_pct/examples/pir/levenshtein.pir
   branches/pmc_pct/examples/pir/queens_r.pir
   branches/pmc_pct/examples/pir/quine_ord.pir
   branches/pmc_pct/examples/pir/sudoku.pir
   branches/pmc_pct/examples/shootout/ack.pir
   branches/pmc_pct/examples/shootout/binarytrees.pir
   branches/pmc_pct/examples/shootout/fannkuch.pir
   branches/pmc_pct/examples/shootout/fasta.pir
   branches/pmc_pct/examples/shootout/harmonic.pir
   branches/pmc_pct/examples/shootout/knucleotide.pir
   branches/pmc_pct/examples/shootout/mandelbrot.pir
   branches/pmc_pct/examples/shootout/nbody.pir
   branches/pmc_pct/examples/shootout/nsieve-bits-2.pir
   branches/pmc_pct/examples/shootout/nsieve-bits.pir
   branches/pmc_pct/examples/shootout/nsieve.pir
   branches/pmc_pct/examples/shootout/partialsums-2.pir
   branches/pmc_pct/examples/shootout/partialsums.pir
   branches/pmc_pct/examples/shootout/pidigits.pir
   branches/pmc_pct/examples/shootout/random.pasm
   branches/pmc_pct/examples/shootout/random.pir
   branches/pmc_pct/examples/shootout/recursive-2.pir
   branches/pmc_pct/examples/shootout/recursive.pir
   branches/pmc_pct/examples/shootout/regexdna.pir
   branches/pmc_pct/examples/shootout/revcomp.pir
   branches/pmc_pct/examples/shootout/spectralnorm.pir
   branches/pmc_pct/examples/shootout/sumcol.pir
   branches/pmc_pct/examples/shootout/takfp.pir
   branches/pmc_pct/examples/streams/Filter.pir
   branches/pmc_pct/examples/streams/Include.pir
   branches/pmc_pct/examples/streams/Lines.pir
   branches/pmc_pct/examples/streams/Replay.pir
   branches/pmc_pct/examples/streams/SubHello.pir
   branches/pmc_pct/examples/tcl/tcltkdemo.pir
   branches/pmc_pct/examples/tge/branch/lib/Branch.pir
   branches/pmc_pct/examples/tge/branch/lib/Leaf.pir
   branches/pmc_pct/examples/tge/branch/transform.pir
   branches/pmc_pct/examples/tutorial/01_temp_var.pir
   branches/pmc_pct/examples/tutorial/02_local_var.pir
   branches/pmc_pct/examples/tutorial/03_temp_var_basic_pmcs.pir
   branches/pmc_pct/examples/tutorial/04_pod_comments.pir
   branches/pmc_pct/examples/tutorial/10_math_ops.pir
   branches/pmc_pct/examples/tutorial/11_math_ops_self_mod.pir
   branches/pmc_pct/examples/tutorial/12_math_ops_pasm.pir
   branches/pmc_pct/examples/tutorial/13_logical_ops.pir
   branches/pmc_pct/examples/tutorial/20_string_ops.pir
   branches/pmc_pct/examples/tutorial/21_string_ops_repeat.pir
   branches/pmc_pct/examples/tutorial/22_string_ops_length.pir
   branches/pmc_pct/examples/tutorial/23_string_ops_substr.pir
   branches/pmc_pct/examples/tutorial/24_string_ops_clone.pir
   branches/pmc_pct/examples/tutorial/30_arrays_basic.pir
   branches/pmc_pct/examples/tutorial/31_array_ops_split.pir
   branches/pmc_pct/examples/tutorial/32_array_ops_sprintf.pir
   branches/pmc_pct/examples/tutorial/33_hashes.pir
   branches/pmc_pct/examples/tutorial/34_multikey.pir
   branches/pmc_pct/examples/tutorial/40_file_ops.pir
   branches/pmc_pct/examples/tutorial/50_goto.pir
   branches/pmc_pct/examples/tutorial/51_if_unless.pir
   branches/pmc_pct/examples/tutorial/52_if_compare.pir
   branches/pmc_pct/examples/tutorial/53_loop.pir
   branches/pmc_pct/examples/tutorial/55_iterator.pir
   branches/pmc_pct/examples/tutorial/56_defined.pir
   branches/pmc_pct/examples/tutorial/57_exists.pir
   branches/pmc_pct/examples/tutorial/60_subroutines.pir
   branches/pmc_pct/examples/tutorial/61_namespaces.pir
   branches/pmc_pct/examples/tutorial/62_namespaces.pir
   branches/pmc_pct/examples/tutorial/70_class_object.pir
   branches/pmc_pct/examples/tutorial/81_continuation.pir
   branches/pmc_pct/examples/tutorial/82_coroutine.pir
   branches/pmc_pct/examples/tutorial/83_external_libraries.pir
   branches/pmc_pct/examples/tutorial/90_writing_tests.pir
   branches/pmc_pct/ext/Parrot-Embed/t/greet.pir
   branches/pmc_pct/ext/SQLite3/SQLite3.pir
   branches/pmc_pct/ext/SQLite3/test.pir
   branches/pmc_pct/include/parrot/call.h   (contents, props changed)
   branches/pmc_pct/include/parrot/debugger.h
   branches/pmc_pct/include/parrot/gc_api.h   (props changed)
   branches/pmc_pct/include/parrot/gc_mark_sweep.h   (props changed)
   branches/pmc_pct/include/parrot/gc_pools.h   (contents, props changed)
   branches/pmc_pct/include/parrot/io.h
   branches/pmc_pct/include/parrot/multidispatch.h
   branches/pmc_pct/include/parrot/parrot.h
   branches/pmc_pct/include/parrot/runcore_api.h   (contents, props changed)
   branches/pmc_pct/include/parrot/runcore_trace.h   (props changed)
   branches/pmc_pct/include/parrot/stacks.h
   branches/pmc_pct/include/parrot/string_funcs.h
   branches/pmc_pct/include/parrot/warnings.h
   branches/pmc_pct/lib/Parrot/Configure/Options/Conf.pm
   branches/pmc_pct/lib/Parrot/Configure/Options/Conf/Shared.pm
   branches/pmc_pct/lib/Parrot/Harness/Smoke.pm
   branches/pmc_pct/lib/Parrot/Manifest.pm
   branches/pmc_pct/lib/Parrot/Ops2c/Utils.pm
   branches/pmc_pct/lib/Parrot/Pmc2c/Attribute.pm
   branches/pmc_pct/lib/Parrot/Pmc2c/Emitter.pm
   branches/pmc_pct/lib/Parrot/Pmc2c/MethodEmitter.pm
   branches/pmc_pct/lib/Parrot/Pmc2c/PMC/RO.pm
   branches/pmc_pct/lib/Parrot/Pmc2c/PMC/default.pm
   branches/pmc_pct/lib/Parrot/Pmc2c/PMCEmitter.pm
   branches/pmc_pct/lib/Parrot/Pmc2c/Parser.pm
   branches/pmc_pct/lib/Parrot/Pmc2c/Pmc2cMain.pm
   branches/pmc_pct/ports/cpan/pause_guide.pod   (props changed)
   branches/pmc_pct/ports/cygwin/parrot-1.0.0-1.cygport   (props changed)
   branches/pmc_pct/ports/debian/libparrot-dev.install.in   (props changed)
   branches/pmc_pct/ports/debian/libparrot.install.in   (props changed)
   branches/pmc_pct/ports/debian/parrot-doc.install.in   (props changed)
   branches/pmc_pct/ports/debian/parrot.install.in   (props changed)
   branches/pmc_pct/ports/fedora/parrot.spec.fedora   (props changed)
   branches/pmc_pct/ports/macports/Portfile
   branches/pmc_pct/ports/mandriva/parrot.spec.mandriva   (props changed)
   branches/pmc_pct/ports/suse/parrot.spec.suse   (props changed)
   branches/pmc_pct/runtime/parrot/include/hllmacros.pir
   branches/pmc_pct/runtime/parrot/include/sockets.pasm
   branches/pmc_pct/runtime/parrot/library/Config/JSON.pir
   branches/pmc_pct/runtime/parrot/library/Crow.pir
   branches/pmc_pct/runtime/parrot/library/Data/Dumper.pir
   branches/pmc_pct/runtime/parrot/library/Digest/MD5.pir
   branches/pmc_pct/runtime/parrot/library/JSON.pir
   branches/pmc_pct/runtime/parrot/library/Math/Rand.pir   (props changed)
   branches/pmc_pct/runtime/parrot/library/NCI/call_toolkit_init.pir
   branches/pmc_pct/runtime/parrot/library/OpenGL.pir
   branches/pmc_pct/runtime/parrot/library/P6object.pir
   branches/pmc_pct/runtime/parrot/library/PGE/Dumper.pir
   branches/pmc_pct/runtime/parrot/library/PGE/Glob.pir
   branches/pmc_pct/runtime/parrot/library/PGE/Hs.pir
   branches/pmc_pct/runtime/parrot/library/PGE/Perl6Grammar.pir
   branches/pmc_pct/runtime/parrot/library/PGE/Text.pir
   branches/pmc_pct/runtime/parrot/library/PGE/Util.pir
   branches/pmc_pct/runtime/parrot/library/Protoobject.pir
   branches/pmc_pct/runtime/parrot/library/Range.pir
   branches/pmc_pct/runtime/parrot/library/Tcl/Glob.pir
   branches/pmc_pct/runtime/parrot/library/YAML/Dumper.pir
   branches/pmc_pct/runtime/parrot/library/ncurses.pasm
   branches/pmc_pct/runtime/parrot/library/ncurses.pir
   branches/pmc_pct/runtime/parrot/library/pcore.pir
   branches/pmc_pct/runtime/parrot/library/postgres.pasm
   branches/pmc_pct/runtime/parrot/library/postgres.pir
   branches/pmc_pct/runtime/parrot/library/random_lib.pir
   branches/pmc_pct/runtime/parrot/library/tcpstream.pir
   branches/pmc_pct/runtime/parrot/library/yaml_dumper.pir
   branches/pmc_pct/src/call/ops.c   (contents, props changed)
   branches/pmc_pct/src/call/pcc.c   (props changed)
   branches/pmc_pct/src/debug.c
   branches/pmc_pct/src/dynext.c
   branches/pmc_pct/src/dynpmc/ext.pir
   branches/pmc_pct/src/dynpmc/main.pasm
   branches/pmc_pct/src/embed.c
   branches/pmc_pct/src/exceptions.c
   branches/pmc_pct/src/gc/api.c   (props changed)
   branches/pmc_pct/src/gc/generational_ms.c   (props changed)
   branches/pmc_pct/src/gc/incremental_ms.c   (props changed)
   branches/pmc_pct/src/gc/mark_sweep.c   (props changed)
   branches/pmc_pct/src/gc/pools.c   (props changed)
   branches/pmc_pct/src/gc/system.c   (props changed)
   branches/pmc_pct/src/global.c
   branches/pmc_pct/src/hash.c
   branches/pmc_pct/src/interp/   (props changed)
   branches/pmc_pct/src/interp/inter_cb.c   (props changed)
   branches/pmc_pct/src/interp/inter_create.c   (contents, props changed)
   branches/pmc_pct/src/interp/inter_misc.c   (props changed)
   branches/pmc_pct/src/jit.c
   branches/pmc_pct/src/jit/i386/jit_emit.h
   branches/pmc_pct/src/multidispatch.c
   branches/pmc_pct/src/oo.c
   branches/pmc_pct/src/ops/core.ops
   branches/pmc_pct/src/packfile.c
   branches/pmc_pct/src/pmc/capture.pmc
   branches/pmc_pct/src/pmc/class.pmc
   branches/pmc_pct/src/pmc/codestring.pmc
   branches/pmc_pct/src/pmc/default.pmc
   branches/pmc_pct/src/pmc/exception.pmc
   branches/pmc_pct/src/pmc/fixedintegerarray.pmc
   branches/pmc_pct/src/pmc/hash.pmc
   branches/pmc_pct/src/pmc/integer.pmc
   branches/pmc_pct/src/pmc/managedstruct.pmc
   branches/pmc_pct/src/pmc/namespace.pmc
   branches/pmc_pct/src/pmc/object.pmc
   branches/pmc_pct/src/pmc/orderedhash.pmc
   branches/pmc_pct/src/pmc/pmcproxy.pmc
   branches/pmc_pct/src/pmc/scalar.pmc
   branches/pmc_pct/src/pmc_freeze.c
   branches/pmc_pct/src/runcore/cores.c   (props changed)
   branches/pmc_pct/src/runcore/main.c   (props changed)
   branches/pmc_pct/src/runcore/trace.c   (contents, props changed)
   branches/pmc_pct/src/spf_render.c
   branches/pmc_pct/src/stacks.c
   branches/pmc_pct/src/warnings.c
   branches/pmc_pct/t/codingstd/copyright.t
   branches/pmc_pct/t/codingstd/pdd_format.t
   branches/pmc_pct/t/compilers/pge/perl6regex/rx_metachars
   branches/pmc_pct/t/compilers/pge/perl6regex/rx_subrules
   branches/pmc_pct/t/compilers/tge/NoneGrammar.tg   (props changed)
   branches/pmc_pct/t/dynpmc/pair.t   (props changed)
   branches/pmc_pct/t/library/p6object.t
   branches/pmc_pct/t/pmc/key.t
   branches/pmc_pct/t/pmc/pmc.t
   branches/pmc_pct/t/src/embed.t   (props changed)
   branches/pmc_pct/t/steps/auto_sizes-01.t
   branches/pmc_pct/t/tools/pmc2c.t
   branches/pmc_pct/tools/build/c2str.pl
   branches/pmc_pct/tools/build/headerizer.pl
   branches/pmc_pct/tools/dev/bench_op.pir
   branches/pmc_pct/tools/dev/create_language.pl
   branches/pmc_pct/tools/dev/fetch_languages.pl   (contents, props changed)
   branches/pmc_pct/tools/dev/install_files.pl
   branches/pmc_pct/tools/dev/mk_gitignore.pl   (props changed)
   branches/pmc_pct/tools/dev/mk_language_shell.pl
   branches/pmc_pct/tools/dev/pbc_to_exe.pir
   branches/pmc_pct/tools/util/perlcritic-cage.conf   (props changed)

Modified: branches/pmc_pct/CREDITS
==============================================================================
--- branches/pmc_pct/CREDITS	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/CREDITS	Fri May  8 00:05:13 2009	(r38558)
@@ -8,8 +8,8 @@
     works.  It is sorted by name and formatted to allow easy
     grepping and beautification by scripts.
     The fields are: name (N), email (E), web-address (W),
-    description (D), subversion username (U) and snail-mail
-    address (S).
+    description (D), main username (U), alias usernames (A)
+    and snail-mail address (S).
 
         Thanks,
 
@@ -229,6 +229,7 @@
 U: cotto
 D: Patch for key flags in pdd08
 D: Range check in Env PMC
+A: christoph_googleacct at mksig.org
 D: Pipp
 E: christoph at mksig.org
 
@@ -291,7 +292,8 @@
 
 N: Daniel Arbelo Arrocha
 U: darbelo
-D: OpenBSD fixes and testing
+A: arbelo
+D: OpenBSD fixes and testing, gsoc2009-decnum-dynpmcs
 E: dany.arbelo at gmail.com
 
 N: Dave Woldrich
@@ -345,6 +347,7 @@
 S: Chemnitz, Germany
 
 N: François Perrad
+A: Francois Perrad
 E: francois.perrad at gadz.org
 W: http://fperrad.googlepages.com/home
 U: fperrad
@@ -679,6 +682,7 @@
 N: Mitchell N Charity
 
 N: Moritz A Lenz
+A: Moritz Lenz
 E: moritz at faui2k3.org
 U: moritz
 D: Test infrastructure for languages/perl6/ and Perl 6 in general
@@ -945,6 +949,7 @@
 
 N: Will "Coke" Coleda
 U: coke
+A: wcoleda
 E: will at coleda.com
 D: Tcl language (partcl), APL, website, various languages/ upkeep, misc.
 

Modified: branches/pmc_pct/Configure.pl
==============================================================================
--- branches/pmc_pct/Configure.pl	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/Configure.pl	Fri May  8 00:05:13 2009	(r38558)
@@ -297,6 +297,11 @@
 
   --define=inet_aton
 
+=item C<--no-line-directives>
+
+Disables the creation of C #line directives when generating C from PMCs and
+ops. Useful when debugging internals.
+
 =back
 
 =head2 Parrot Options

Modified: branches/pmc_pct/DEPRECATED.pod
==============================================================================
--- branches/pmc_pct/DEPRECATED.pod	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/DEPRECATED.pod	Fri May  8 00:05:13 2009	(r38558)
@@ -209,23 +209,22 @@
 
 L<https://trac.parrot.org/parrot/ticket/494>
 
-=back
-
-=head1 Compiler tools
+=item Parrot_get_namespace_autobase [eligible in 1.5]
 
-=head2 P6object
+L<https://trac.parrot.org/parrot/ticket/155>
 
-=over 4
+=item Parrot_find_global_k [eligible in 1.5]
 
-=item P6protoobject stringification [eligible in 1.1]
+L<https://trac.parrot.org/parrot/ticket/156>
 
-Stringification of protoobjects will return the full name of the type
-and parentheses, per Synopsis 12.
+=item Parrot_MMD_method_name [eligible in 1.5]
 
-L<https://trac.parrot.org/parrot/ticket/168>
+L<https://trac.parrot.org/parrot/ticket/625>
 
 =back
 
+=head1 Compiler tools
+
 =head2 Parrot Grammar Engine
 
 =over 4
@@ -285,7 +284,8 @@
 =item C< $(...) > syntax  [eligible in 1.5]
 
 The C< $(...) > syntax for obtaining a result object from a Match
-object will no longer work.  The new syntax is yet to be determined.
+object will no longer work.  The new syntax is to invoke the 
+C<.ast> method on the Match object.
 
 L<https://trac.parrot.org/parrot/ticket/459>
 

Modified: branches/pmc_pct/MANIFEST
==============================================================================
--- branches/pmc_pct/MANIFEST	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/MANIFEST	Fri May  8 00:05:13 2009	(r38558)
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Thu May  7 23:31:48 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Thu May  7 23:48:29 2009 UT
 #
 # See tools/dev/install_files.pl for documentation on the
 # format of this file.
@@ -282,8 +282,6 @@
 config/auto/env/test_unsetenv_c.in                          []
 config/auto/fink.pm                                         []
 config/auto/format.pm                                       []
-config/auto/format/floatval_maxmin_c.in                     []
-config/auto/format/intval_maxmin_c.in                       []
 config/auto/funcptr.pm                                      []
 config/auto/funcptr/test_c.in                               []
 config/auto/gc.pm                                           []
@@ -335,6 +333,8 @@
 config/auto/signal/test2_c.in                               []
 config/auto/signal/test_itimer_c.in                         []
 config/auto/sizes.pm                                        []
+config/auto/sizes/floatval_maxmin_c.in                      []
+config/auto/sizes/intval_maxmin_c.in                        []
 config/auto/sizes/test2_c.in                                []
 config/auto/sizes/test3_c.in                                []
 config/auto/sizes/test_c.in                                 []
@@ -389,7 +389,6 @@
 config/gen/platform/ansi/time.c                             []
 config/gen/platform/cygwin/math.c                           []
 config/gen/platform/darwin/begin.c                          []
-config/gen/platform/darwin/dl.c                             []
 config/gen/platform/darwin/memalign.c                       []
 config/gen/platform/generic/dl.c                            []
 config/gen/platform/generic/dl.h                            []
@@ -534,7 +533,6 @@
 docs/pdds/draft/pdd14_numbers.pod                           []
 docs/pdds/draft/pdd16_native_call.pod                       []
 docs/pdds/draft/pdd29_compiler_tools.pod                    []
-docs/pdds/draft/pdd30_install.pod                           []
 docs/pdds/draft/pdd31_hll_interop.pod                       []
 docs/pdds/pdd00_pdd.pod                                     []
 docs/pdds/pdd03_calling_conventions.pod                     []
@@ -556,6 +554,7 @@
 docs/pdds/pdd26_ast.pod                                     []
 docs/pdds/pdd27_multiple_dispatch.pod                       []
 docs/pdds/pdd28_strings.pod                                 []
+docs/pdds/pdd30_install.pod                                 []
 docs/pdds/pdd_template.pod                                  []
 docs/pmc.pod                                                []
 docs/pmc/array.pod                                          [main]doc
@@ -2130,7 +2129,7 @@
 tools/dev/mk_gitignore.pl                                   []
 tools/dev/mk_inno.pl                                        []
 tools/dev/mk_inno_language.pl                               []
-tools/dev/mk_language_shell.pl                              []
+tools/dev/mk_language_shell.pl                              [devel]
 tools/dev/mk_manifest_and_skip.pl                           []
 tools/dev/mk_native_pbc                                     []
 tools/dev/mk_rpm_manifests.pl                               []

Modified: branches/pmc_pct/MANIFEST.SKIP
==============================================================================
--- branches/pmc_pct/MANIFEST.SKIP	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/MANIFEST.SKIP	Fri May  8 00:05:13 2009	(r38558)
@@ -1,6 +1,6 @@
 # ex: set ro:
 # $Id$
-# generated by tools/dev/mk_manifest_and_skip.pl Wed Apr 15 17:34:44 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sun Apr 26 13:09:44 2009 UT
 #
 # This file should contain a transcript of the svn:ignore properties
 # of the directories in the Parrot subversion repository. (Needed for
@@ -775,6 +775,9 @@
 ^src/gc/.*\.so/
 ^src/gc/Makefile$
 ^src/gc/Makefile/
+# generated from svn:ignore of 'src/interp/'
+^src/interp/.*\.str$
+^src/interp/.*\.str/
 # generated from svn:ignore of 'src/io/'
 ^src/io/.*\.o$
 ^src/io/.*\.o/

Modified: branches/pmc_pct/MANIFEST.generated
==============================================================================
--- branches/pmc_pct/MANIFEST.generated	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/MANIFEST.generated	Fri May  8 00:05:13 2009	(r38558)
@@ -69,20 +69,6 @@
 lib/Parrot/Pmc2c/PCCMETHOD_BITS.pm                [devel]lib
 lib/Parrot/PMC.pm                                 [devel]lib
 parrot.pc                                         [main]pkgconfig
-pbc_disassemble.exe                               [main]bin
-pbc_disassemble                                   [main]bin
-pbc_dump.exe                                      [main]bin
-pbc_dump                                          [main]bin
-pbc_info.exe                                      [main]bin
-pbc_info                                          [main]bin
-pbc_merge.exe                                     [main]bin
-pbc_merge                                         [main]bin
-pbc_to_exe.exe                                    [main]bin
-pbc_to_exe                                        [main]bin
-parrot_debugger.exe                               [main]bin
-parrot_debugger                                   [main]bin
-pirc.exe                                          [main]bin
-pirc                                              [main]bin
 runtime/parrot/dynext/digest_group.bundle         [library]
 runtime/parrot/dynext/digest_group.dll            [library]
 runtime/parrot/dynext/digest_group.dylib          [library]

Modified: branches/pmc_pct/PLATFORMS
==============================================================================
--- branches/pmc_pct/PLATFORMS	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/PLATFORMS	Fri May  8 00:05:13 2009	(r38558)
@@ -36,6 +36,7 @@
 --------------------------------------------------------------------------------
 aix5.3-power-gcc4.2          B8   -    -    -             Y    ?     ?  20080510
 cygwin1.7.0-x86-gcc4.3.2      4   Y    Y    -     -   -   Y    Y     Y  20090315
+dragonfly2.2.0-i386-gcc-4.1.2 4   Y    Y    -     Y   Y   Y    Y     ?  20090427
 freebsd-x86-gcc-4.2.1         4   Y    Y    Y     ?   ?   Y    Y     Y  20090415
 freebsd-amd64-gcc-4.2.1       8   Y    -    -     ?   ?   Y    Y     Y  20090419
 linux-ppc-gcc3.4.5                Y    Y    Y     ?   ?   Y    Y     ?  20080519

Modified: branches/pmc_pct/compilers/imcc/imcparser.c
==============================================================================
--- branches/pmc_pct/compilers/imcc/imcparser.c	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/imcc/imcparser.c	Fri May  8 00:05:13 2009	(r38558)
@@ -329,7 +329,7 @@
  * Intermediate Code Compiler for Parrot.
  *
  * Copyright (C) 2002 Melvin Smith <melvin.smith at mindspring.com>
- * Copyright (C) 2002-2008, Parrot Foundation.
+ * Copyright (C) 2002-2009, Parrot Foundation.
  *
  * Grammar of the PIR language parser.
  *

Modified: branches/pmc_pct/compilers/json/postalcodes.pir
==============================================================================
--- branches/pmc_pct/compilers/json/postalcodes.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/json/postalcodes.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -17,6 +17,8 @@
 
 =cut
 
+.include 'socket.pasm'
+
 .sub _main :main
     .param pmc argv
 
@@ -27,19 +29,19 @@
 
     postal = argv[1]
 
-    .local pmc sock
-    .local string address, buf, json_result
+    .local pmc sock, address
+    .local string buf, json_result
     json_result = ''
     .local int ret
     .local int len
 
     # create the socket handle
-    socket sock, 2, 1, 0
-    unless sock goto ERR
+    sock = new 'Socket'
+    sock.'socket'(.PIO_PF_INET, .PIO_SOCK_STREAM, .PIO_PROTO_TCP)
 
     # Pack a sockaddr_in structure with IP and port
-    sockaddr address, 80, 'ws.geonames.org'
-    connect ret, sock, address
+    address = sock.'sockaddr'('ws.geonames.org', 80)
+    ret = sock.'connect'(address)
 
     .local string url
     url = 'http://ws.geonames.org/postalCodeSearchJSON?maxRows=10&postalcode='
@@ -47,12 +49,12 @@
 
     $S0 = 'GET '
     $S0 .= url
-    $S0 .= " HTTP/1.0\nUser-agent: Parrot\n\n"
-    send ret, sock, $S0
-    poll ret, sock, 1, 5, 0
+    $S0 .= " HTTP/1.0\r\nUser-agent: Parrot\r\n\r\n"
+    ret = sock.'send'($S0)
 MORE:
-    recv ret, sock, buf
-    if ret < 0 goto END
+    buf = sock.'recv'()
+    ret = length buf
+    if ret <= 0 goto END
     json_result .= buf
     goto MORE
 ERR:
@@ -103,6 +105,7 @@
 
 bad_args:
     say "Usage: postcalcodes.pir <postal>"
+    .return()
 
 bad_code:
     say $P3

Modified: branches/pmc_pct/compilers/json/test.pir
==============================================================================
--- branches/pmc_pct/compilers/json/test.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/json/test.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #!../../parrot
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 
 .sub main :main

Modified: branches/pmc_pct/compilers/ncigen/src/builtins/say.pir
==============================================================================
--- branches/pmc_pct/compilers/ncigen/src/builtins/say.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/ncigen/src/builtins/say.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2008-2009, Parrot Foundation.
 # $Id$
 
 =head1

Modified: branches/pmc_pct/compilers/nqp/bootstrap/actions.pm
==============================================================================
--- branches/pmc_pct/compilers/nqp/bootstrap/actions.pm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/nqp/bootstrap/actions.pm	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2008, Parrot Foundation.
+# Copyright (C) 2008-2008, Parrot Foundation.
 # $Id$
 
 

Modified: branches/pmc_pct/compilers/nqp/bootstrap/nqp.pir
==============================================================================
--- branches/pmc_pct/compilers/nqp/bootstrap/nqp.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/nqp/bootstrap/nqp.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2008-2009, Parrot Foundation.
 # $Id$
 
 =head1 TITLE

Modified: branches/pmc_pct/compilers/nqp/src/Grammar.pg
==============================================================================
--- branches/pmc_pct/compilers/nqp/src/Grammar.pg	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/nqp/src/Grammar.pg	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, Parrot Foundation.
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 
@@ -261,7 +261,7 @@
 
 token methodop {
     '.' <ident>
-    [ 
+    [
     | '(' ~ ')' <arglist> {*}                              #= arglist
     | {*}                                                  #= null
     ]

Modified: branches/pmc_pct/compilers/nqp/src/Grammar/Actions.pir
==============================================================================
--- branches/pmc_pct/compilers/nqp/src/Grammar/Actions.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/nqp/src/Grammar/Actions.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2008, Parrot Foundation.
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 .sub '__onload' :init :load

Modified: branches/pmc_pct/compilers/nqp/src/builtins.pir
==============================================================================
--- branches/pmc_pct/compilers/nqp/src/builtins.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/nqp/src/builtins.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 .namespace []

Modified: branches/pmc_pct/compilers/pct/src/PCT/Dumper.pir
==============================================================================
--- branches/pmc_pct/compilers/pct/src/PCT/Dumper.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/pct/src/PCT/Dumper.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2009, Parrot Foundation.
 # $Id$
 
 =head1 NAME

Modified: branches/pmc_pct/compilers/pct/src/PCT/HLLCompiler.pir
==============================================================================
--- branches/pmc_pct/compilers/pct/src/PCT/HLLCompiler.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/pct/src/PCT/HLLCompiler.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 
 =head1 NAME
@@ -801,7 +802,8 @@
 
   save_output:
     if null result goto end
-    unless result goto end
+    $I0 = defined result
+    unless $I0 goto end
     .local string target
     target = adverbs['target']
     target = downcase target

Modified: branches/pmc_pct/compilers/pge/PGE.pir
==============================================================================
--- branches/pmc_pct/compilers/pge/PGE.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/pge/PGE.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 
 =head1 TITLE

Modified: branches/pmc_pct/compilers/pge/PGE/Exp.pir
==============================================================================
--- branches/pmc_pct/compilers/pge/PGE/Exp.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/pge/PGE/Exp.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 
 =head1 TITLE

Modified: branches/pmc_pct/compilers/pge/PGE/Match.pir
==============================================================================
--- branches/pmc_pct/compilers/pge/PGE/Match.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/pge/PGE/Match.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 
 =head1 NAME
@@ -240,6 +241,18 @@
 .end
 
 
+=item C<orig()>
+
+Return the original item being matched.
+
+=cut
+
+.sub 'orig' :method
+    $P0 = getattribute self, '$!target'
+    .return ($P0)
+.end
+
+
 =item C<item()>
 
 Returns the scalar value of this match -- the "result object"

Modified: branches/pmc_pct/compilers/pge/PGE/OPTable.pir
==============================================================================
--- branches/pmc_pct/compilers/pge/PGE/OPTable.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/pge/PGE/OPTable.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 
 =head1 Title

Modified: branches/pmc_pct/compilers/pge/PGE/P5Regex.pir
==============================================================================
--- branches/pmc_pct/compilers/pge/PGE/P5Regex.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/pge/PGE/P5Regex.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 
 .namespace [ "PGE";"P5Regex" ]

Modified: branches/pmc_pct/compilers/pge/PGE/Perl6Regex.pir
==============================================================================
--- branches/pmc_pct/compilers/pge/PGE/Perl6Regex.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/pge/PGE/Perl6Regex.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 
 =head1 TITLE
@@ -158,6 +159,24 @@
 
 =cut
 
+.sub 'trim'
+    .param string s
+    .local int rpos, lpos
+    rpos = length s
+    lpos = find_not_cclass .CCLASS_WHITESPACE, s, 0, rpos
+  rtrim_loop:
+    unless rpos > lpos goto rtrim_done
+    dec rpos
+    $I0 = is_cclass .CCLASS_WHITESPACE, s, rpos
+    if $I0 goto rtrim_loop
+  rtrim_done:
+    inc rpos
+    $I0 = rpos - lpos
+    $S0 = substr s, lpos, $I0
+    .return ($S0)
+.end
+
+
 .sub 'p6escapes'
     .param pmc mob
     .param pmc adverbs         :slurpy :named
@@ -223,6 +242,7 @@
   have_namepos:
     $I0 = namepos - pos
     $S0 = substr target, pos, $I0
+    $S0 = 'trim'($S0)
     $P0 = new 'CodeString'
     decnum = $P0.'charname_to_ord'($S0)
     if decnum < 0 goto err_unicode_name
@@ -241,8 +261,9 @@
   scan_xco_char_end:
     $S1 = chr decnum
     concat literal, $S1
-    $S0 = substr target, pos, 1
     unless isbracketed goto scan_xco_end
+    pos = find_not_cclass .CCLASS_WHITESPACE, target, pos, lastpos
+    $S0 = substr target, pos, 1
     if $S0 == ']' goto scan_xco_end
     if $S0 == '' goto err_missing_bracket
     if $S0 != ',' goto err_digit
@@ -1338,6 +1359,7 @@
     keypos += 3
     $I0 -= keypos
     actionkey = substr target, keypos, $I0
+    actionkey = 'trim'(actionkey)
     mob['actionkey'] = actionkey
   end:
     mob.'to'(pos)

Modified: branches/pmc_pct/compilers/pge/PGE/Regex.pir
==============================================================================
--- branches/pmc_pct/compilers/pge/PGE/Regex.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/pge/PGE/Regex.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 
 =head1 TITLE
@@ -85,6 +86,34 @@
 .end
 
 
+=item C<alpha()>
+
+Match a single alphabetic character.
+
+=cut
+
+.sub 'alpha' :method
+    .param pmc adverbs         :slurpy :named
+    .local string target
+    .local pmc mob, mfrom, mpos
+    .local int pos, lastpos
+
+    $P0 = get_hll_global ['PGE'], 'Match'
+    (mob, pos, target) = $P0.'new'(self)
+
+    lastpos = length target
+    $S0 = substr target, pos, 1
+    if $S0 == '_' goto ident_1
+    $I0 = is_cclass .CCLASS_ALPHABETIC, target, pos
+    if $I0 == 0 goto end
+  ident_1:
+    inc pos
+    mob.'to'(pos)
+  end:
+    .return (mob)
+.end
+
+
 =item C<upper()>
 
 Match a single uppercase character.
@@ -107,16 +136,6 @@
 .end
 
 
-=item C<alpha()>
-
-Match a single alphabetic character.
-
-=cut
-
-.sub "alpha" :method
-    .tailcall '!cclass'(self, .CCLASS_ALPHABETIC)
-.end
-
 =item C<digit()>
 
 Match a single digit.

Modified: branches/pmc_pct/compilers/pge/PGE/builtins.pg
==============================================================================
--- branches/pmc_pct/compilers/pge/PGE/builtins.pg	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/pge/PGE/builtins.pg	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,6 @@
+# Copyright (C) 2006-2009, Parrot Foundation.
+# $Id$
+
 grammar PGE::Grammar;
 
 token name { <ident> [ \:\: <ident> ]* }

Modified: branches/pmc_pct/compilers/pge/demo.pir
==============================================================================
--- branches/pmc_pct/compilers/pge/demo.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/pge/demo.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 
 .include "errors.pasm"

Modified: branches/pmc_pct/compilers/pirc/src/bcgen.h
==============================================================================
--- branches/pmc_pct/compilers/pirc/src/bcgen.h	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/pirc/src/bcgen.h	Fri May  8 00:05:13 2009	(r38558)
@@ -145,11 +145,13 @@
         __attribute__nonnull__(1);
 
 PARROT_IGNORABLE_RESULT
-opcode_t emit_int_arg(ARGIN(bytecode * const bc), int intval)
+opcode_t /*@alt void@*/
+emit_int_arg(ARGIN(bytecode * const bc), int intval)
         __attribute__nonnull__(1);
 
 PARROT_IGNORABLE_RESULT
-opcode_t emit_opcode(ARGIN(bytecode * const bc), opcode_t op)
+opcode_t /*@alt void@*/
+emit_opcode(ARGIN(bytecode * const bc), opcode_t op)
         __attribute__nonnull__(1);
 
 FLOATVAL get_num_const(ARGIN(bytecode * const bc), unsigned index)

Modified: branches/pmc_pct/compilers/pirc/src/pirerr.h
==============================================================================
--- branches/pmc_pct/compilers/pirc/src/pirerr.h	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/pirc/src/pirerr.h	Fri May  8 00:05:13 2009	(r38558)
@@ -19,7 +19,8 @@
         __attribute__nonnull__(2);
 
 PARROT_IGNORABLE_RESULT
-int yypirerror(
+int /*@alt void@*/
+yypirerror(
     yyscan_t yyscanner,
     ARGIN(lexer_state * const lexer),
     ARGIN(char const * const message),

Modified: branches/pmc_pct/compilers/pirc/src/pirop.h
==============================================================================
--- branches/pmc_pct/compilers/pirc/src/pirop.h	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/pirc/src/pirop.h	Fri May  8 00:05:13 2009	(r38558)
@@ -12,7 +12,8 @@
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 
 PARROT_IGNORABLE_RESULT
-int get_opinfo(ARGIN(lexer_state * const lexer))
+int /*@alt void@*/
+get_opinfo(ARGIN(lexer_state * const lexer))
         __attribute__nonnull__(1);
 
 #define ASSERT_ARGS_get_opinfo __attribute__unused__ int _ASSERT_ARGS_CHECK = \

Modified: branches/pmc_pct/compilers/tge/tgc.pir
==============================================================================
--- branches/pmc_pct/compilers/tge/tgc.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/compilers/tge/tgc.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 
 =head1 TITLE

Modified: branches/pmc_pct/config/auto/arch.pm
==============================================================================
--- branches/pmc_pct/config/auto/arch.pm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/config/auto/arch.pm	Fri May  8 00:05:13 2009	(r38558)
@@ -41,6 +41,9 @@
     my $archname = $conf->data->get('archname');
     my ( $cpuarch, $osname ) = split( /-/, $archname );
 
+    # This was added to convert IA64.ARCHREV_0 on HP-UX, TT #645
+    $archname =~ s|\.|_|g;
+
     if ($verbose) {
         print "determining operating system and cpu architecture\n";
         print "archname: <$archname>\n";

Modified: branches/pmc_pct/config/auto/format.pm
==============================================================================
--- branches/pmc_pct/config/auto/format.pm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/config/auto/format.pm	Fri May  8 00:05:13 2009	(r38558)
@@ -35,12 +35,8 @@
 
     _set_intvalfmt($conf);
 
-    _set_intvalmaxmin($conf);
-
     _set_floatvalfmt_nvsize($conf);
 
-    _set_floatvalmaxmin($conf);
-
     return 1;
 }
 
@@ -64,43 +60,6 @@
     $conf->data->set( intvalfmt   => $ivformat );
 }
 
-# This is unrelated to format, may be moved to other place later
-sub _set_intvalmaxmin {
-    my $conf = shift;
-    my $ivmin;
-    my $ivmax;
-    my $iv = $conf->data->get(qw(iv));
-
-    if ( $iv eq "int" ) {
-        $ivmin = 'INT_MIN';
-        $ivmax = 'INT_MAX';
-    }
-    elsif ( ( $iv eq "long" ) || ( $iv eq "long int" ) ) {
-        $ivmin = 'LONG_MIN';
-        $ivmax = 'LONG_MAX';
-    }
-    elsif ( ( $iv eq "long long" ) || ( $iv eq "long long int" ) ) {
-        # The assumption is that a compiler that have the long long type
-        # also provides his limit macros.
-        $ivmin = 'LLONG_MIN';
-        $ivmax = 'LLONG_MAX';
-    }
-    else {
-        die qq{Configure.pl:  Can't find limits for type '$iv'\n};
-    }
-
-    $conf->data->set( intvalmin   => $ivmin );
-    $conf->data->set( intvalmax   => $ivmax );
-
-    $conf->cc_gen('config/auto/format/intval_maxmin_c.in');
-    eval { $conf->cc_build(); };
-    if ( $@ ) {
-        $ivmin = '0';
-        $ivmax = '0';
-    }
-
-}
-
 sub _set_floatvalfmt_nvsize {
     my $conf = shift;
     my ( $nv, $floatsize, $doublesize, $ldsize ) =
@@ -134,40 +93,6 @@
     );
 }
 
-# This is unrelated to format, may be moved to other place later
-sub _set_floatvalmaxmin {
-    my $conf = shift;
-    my $nvmin;
-    my $nvmax;
-    my $nv = $conf->data->get(qw(nv));
-
-    if ( $nv eq "double" ) {
-        $nvmin = 'DBL_MIN';
-        $nvmax = 'DBL_MAX';
-    }
-    elsif ( $nv eq "long double" ) {
-
-        # Stay way from long double for now (it may be 64 or 80 bits)
-        # die "long double not supported at this time, use double.";
-        $nvmin = 'LDBL_MIN';
-        $nvmax = 'LDBL_MAX';
-    }
-    else {
-        die qq{Configure.pl:  Can't find limits for type '$nv'\n};
-    }
-
-    $conf->data->set( floatvalmin => $nvmin );
-    $conf->data->set( floatvalmax => $nvmax );
-
-    $conf->cc_gen('config/auto/format/floatval_maxmin_c.in');
-    eval { $conf->cc_build(); };
-    if ( $@ ) {
-        $nvmin = '0';
-        $nvmax = '0';
-    }
-
-}
-
 1;
 
 # Local Variables:

Deleted: branches/pmc_pct/config/auto/format/floatval_maxmin_c.in
==============================================================================
--- branches/pmc_pct/config/auto/format/floatval_maxmin_c.in	Fri May  8 00:05:13 2009	(r38557)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,24 +0,0 @@
-/*
-  Copyright (C) 2008-2009, Parrot Foundation.
-  $Id$
-*/
-
-#include <float.h>
-
-int
-main(int argc, char *argv[])
-{
-    double i, j;
-
-    i = @floatvalmin@;
-    j = @floatvalmax@;
-
-    return 0;
-}
-
-/*
- * Local variables:
- *   c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */

Deleted: branches/pmc_pct/config/auto/format/intval_maxmin_c.in
==============================================================================
--- branches/pmc_pct/config/auto/format/intval_maxmin_c.in	Fri May  8 00:05:13 2009	(r38557)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,25 +0,0 @@
-/*
-  Copyright (C) 2008-2009, Parrot Foundation.
-  $Id$
-*/
-
-#if @i_limits@ == "define"
-#  include <limits.h>
-#endif
-
-int
-main(int argc, char *argv[])
-{
-    int i, j;
-    i = @intvalmin@;
-    j = @intvalmax@;
-
-    return 0;
-}
-
-/*
- * Local variables:
- *   c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */

Modified: branches/pmc_pct/config/auto/pmc.pm
==============================================================================
--- branches/pmc_pct/config/auto/pmc.pm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/config/auto/pmc.pm	Fri May  8 00:05:13 2009	(r38558)
@@ -162,7 +162,7 @@
             unless defined $name;
     }
 
-    my @names = $self->order_pmcs_by_hierarchy( \%parents );
+    my @names = ('default', $self->order_pmcs_by_hierarchy( \%parents ));
 
     $conf->data->set(
         pmc                  => $pmc_list,

Modified: branches/pmc_pct/config/auto/sizes.pm
==============================================================================
--- branches/pmc_pct/config/auto/sizes.pm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/config/auto/sizes.pm	Fri May  8 00:05:13 2009	(r38558)
@@ -97,6 +97,10 @@
 
     $conf->cc_clean();
 
+    _set_intvalmaxmin($conf);
+
+    _set_floatvalmaxmin($conf);
+
     return 1;
 }
 
@@ -220,6 +224,59 @@
     }
 }
 
+sub _set_intvalmaxmin {
+    my $conf = shift;
+    my $ivmin;
+    my $ivmax;
+    my $iv = $conf->data->get(qw(iv));
+
+    if ( $iv eq "int" ) {
+        $ivmin = 'INT_MIN';
+        $ivmax = 'INT_MAX';
+    }
+    elsif ( ( $iv eq "long" ) || ( $iv eq "long int" ) ) {
+        $ivmin = 'LONG_MIN';
+        $ivmax = 'LONG_MAX';
+    }
+    elsif ( ( $iv eq "long long" ) || ( $iv eq "long long int" ) ) {
+        # The assumption is that a compiler that have the long long type
+        # also provides his limit macros.
+        $ivmin = 'LLONG_MIN';
+        $ivmax = 'LLONG_MAX';
+    }
+    else {
+        die qq{Configure.pl:  Cannot find limits for type '$iv'\n};
+    }
+
+    $conf->data->set( intvalmin   => $ivmin );
+    $conf->data->set( intvalmax   => $ivmax );
+}
+
+sub _set_floatvalmaxmin {
+    my $conf = shift;
+    my $nvmin;
+    my $nvmax;
+    my $nv = $conf->data->get(qw(nv));
+
+    if ( $nv eq "double" ) {
+        $nvmin = 'DBL_MIN';
+        $nvmax = 'DBL_MAX';
+    }
+    elsif ( $nv eq "long double" ) {
+
+        # Stay way from long double for now (it may be 64 or 80 bits)
+        # die "long double not supported at this time, use double.";
+        $nvmin = 'LDBL_MIN';
+        $nvmax = 'LDBL_MAX';
+    }
+    else {
+        die qq{Configure.pl:  Cannot find limits for type '$nv'\n};
+    }
+
+    $conf->data->set( floatvalmin => $nvmin );
+    $conf->data->set( floatvalmax => $nvmax );
+}
+
 1;
 
 # Local Variables:

Copied: branches/pmc_pct/config/auto/sizes/floatval_maxmin_c.in (from r38556, trunk/config/auto/sizes/floatval_maxmin_c.in)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/pmc_pct/config/auto/sizes/floatval_maxmin_c.in	Fri May  8 00:05:13 2009	(r38558, copy of r38556, trunk/config/auto/sizes/floatval_maxmin_c.in)
@@ -0,0 +1,24 @@
+/*
+  Copyright (C) 2008-2009, Parrot Foundation.
+  $Id$
+*/
+
+#include <float.h>
+
+int
+main(int argc, char *argv[])
+{
+    double i, j;
+
+    i = @floatvalmin@;
+    j = @floatvalmax@;
+
+    return 0;
+}
+
+/*
+ * Local variables:
+ *   c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */

Copied: branches/pmc_pct/config/auto/sizes/intval_maxmin_c.in (from r38556, trunk/config/auto/sizes/intval_maxmin_c.in)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/pmc_pct/config/auto/sizes/intval_maxmin_c.in	Fri May  8 00:05:13 2009	(r38558, copy of r38556, trunk/config/auto/sizes/intval_maxmin_c.in)
@@ -0,0 +1,25 @@
+/*
+  Copyright (C) 2008-2009, Parrot Foundation.
+  $Id$
+*/
+
+#if @i_limits@ == "define"
+#  include <limits.h>
+#endif
+
+int
+main(int argc, char *argv[])
+{
+    int i, j;
+    i = @intvalmin@;
+    j = @intvalmax@;
+
+    return 0;
+}
+
+/*
+ * Local variables:
+ *   c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */

Modified: branches/pmc_pct/config/gen/config_pm/config_lib_pasm.in
==============================================================================
--- branches/pmc_pct/config/gen/config_pm/config_lib_pasm.in	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/config/gen/config_pm/config_lib_pasm.in	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 .pcc_sub main:

Modified: branches/pmc_pct/config/gen/core_pmcs.pm
==============================================================================
--- branches/pmc_pct/config/gen/core_pmcs.pm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/config/gen/core_pmcs.pm	Fri May  8 00:05:13 2009	(r38558)
@@ -61,8 +61,7 @@
 END_H
 
     my @pmcs = split( / /, $conf->data->get('pmc_names') );
-    print {$OUT} "    enum_class_default,\n";
-    my $i = 1;
+    my $i = 0;
     foreach (@pmcs) {
         print {$OUT} "    enum_class_$_,\t/*  $i */\n";
         $i++;

Modified: branches/pmc_pct/config/gen/makefiles/pirc.in
==============================================================================
--- branches/pmc_pct/config/gen/makefiles/pirc.in	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/config/gen/makefiles/pirc.in	Fri May  8 00:05:13 2009	(r38558)
@@ -6,18 +6,14 @@
 # Setup some commands
 PERL          := @perl@
 RM_F          := @rm_f@
-PARROT        := ../../parrot at exe@
-TOOL_DIR      := ../..
-CC            := @cc@
 CP            := @cp@
-BUILD         := $(PERL) @build_dir@/tools/build/dynpmc.pl
-O             := @o@
-EXE           := @exe@
+PARROT        := ../../parrot at exe@
 BUILD_DIR     := @build_dir@
 RECONFIGURE   := $(PERL) @build_dir@/tools/dev/reconfigure.pl
 
-LIBPARROT     := @libparrot@
-
+CC            := @cc@
+O             := @o@
+EXE           := @exe@
 CC_INC        := -I../../include
 C_LIBS        := @libs@
 CC_SHARED     := @cc_shared@

Modified: branches/pmc_pct/config/gen/makefiles/root.in
==============================================================================
--- branches/pmc_pct/config/gen/makefiles/root.in	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/config/gen/makefiles/root.in	Fri May  8 00:05:13 2009	(r38558)
@@ -619,9 +619,9 @@
 	$(PERL) $(BUILD_TOOLS_DIR)/c2str.pl --all
 
 # classes PMC build utils and rules
-PMC2CD := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --dump
-PMC2CC := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --c
-PMC2CV := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --vtable
+PMC2CD := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --dump @no_lines_flag@
+PMC2CC := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --c @no_lines_flag@
+PMC2CV := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --vtable @no_lines_flag@
 
 .pmc.dump : # suffix rule (limited support)
 	$(PMC2CD) $<
@@ -996,7 +996,7 @@
 
 $(INC_DIR)/oplib/ops.h lib/Parrot/OpLib/core.pm : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2pm.pl \
     lib/Parrot/OpsFile.pm lib/Parrot/Op.pm $(OPS_DIR)/ops.num $(OPS_DIR)/ops.skip
-	$(PERL) $(BUILD_TOOLS_DIR)/ops2pm.pl $(OPS_FILES)
+	$(PERL) $(BUILD_TOOLS_DIR)/ops2pm.pl @no_lines_flag@ $(OPS_FILES)
 
 ###############################################################################
 #
@@ -1208,7 +1208,7 @@
 
 $(SRC_DIR)/misc$(O) : $(GENERAL_H_FILES)
 
-$(SRC_DIR)/utils$(O) : $(GENERAL_H_FILES)
+$(SRC_DIR)/utils$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/pmc/pmc_nci.h
 
 $(SRC_DIR)/spf_render$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/spf_render.str
 
@@ -1238,7 +1238,7 @@
 	lib/Parrot/OpsFile.pm lib/Parrot/Op.pm $(INC_DIR)/config.h \
 	lib/Parrot/OpLib/core.pm lib/Parrot/OpTrans/C.pm \
 	$(SRC_DIR)/pmc/pmc_continuation.h
-	$(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl C --core
+	$(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl C --core @no_lines_flag@
 
 $(OPS_DIR)/core_ops_switch$(O) : $(GENERAL_H_FILES) $(OPS_DIR)/core_ops_switch.c \
 	$(SRC_DIR)/pmc/pmc_parrotlibrary.h
@@ -1249,7 +1249,7 @@
 	lib/Parrot/OpsFile.pm lib/Parrot/Op.pm $(INC_DIR)/config.h \
 	lib/Parrot/OpLib/core.pm lib/Parrot/OpTrans/CSwitch.pm \
 	lib/Parrot/OpTrans/CPrederef.pm
-	$(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl CSwitch --core
+	$(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl CSwitch --core @no_lines_flag@
 
 @TEMP_cg_c@
 
@@ -1928,11 +1928,11 @@
 # kept in there after completion.
 SPLINT_TMP := $(TMP)/splint
 
-# Splint flags: http:////splint.org//manual//html//appB.html
+# Splint flags: http://splint.org/manual/html/appB.html
 # The dashes in the names don't make any difference to Splint, but I've
 # made them match how they are in the manual.  Otherwise, you might be
 # looking for "declundef", except that it's "decl-undef" in the docs.
-SPLINTFLAGS  := \
+SPLINTFLAGS = \
     +standard \
     -hints \
     \
@@ -1947,16 +1947,60 @@
     +posix-strict-lib \
     -skip-posix-headers \
     \
+    +ansi89-limits \
+    \
     -show-summary \
     +show-scan \
-    +time-dist \
-    \
-    +memchecks \
-    \
-    -ansi-reserved \
+    +time-dist
+
+# Watch for naming conflicts, but don't complain about str*() functions
+SPLINTFLAGS := $(SPLINTFLAGS) \
+    +ansi-reserved \
     +ansi-reserved-internal \
-    +bool-compare \
+    -iso-reserved \
+    -iso-reserved-internal
+
+# Memory safety checks
+SPLINTFLAGS := $(SPLINTFLAGS) \
     +bufferoverflow \
+    +bufferoverflowhigh \
+
+# Macro safety checks
+SPLINTFLAGS := $(SPLINTFLAGS) \
+    +macro-assign \
+    +macro-empty \
+    +macro-parens \
+    +macro-redef \
+    +macro-stmt \
+    +macro-unrecog \
+
+# Watch for unsafe comparisons
+SPLINTFLAGS := $(SPLINTFLAGS) \
+    +bool-compare \
+    +ptr-compare \
+    +real-compare \
+    +unsigned-compare
+
+# But allow us some slop in boolean comparisons
+SPLINTFLAGS := $(SPLINTFLAGS) \
+    -pred-bool-int \
+    -pred-bool-ptr \
+    -pred-bool-others \
+    -boolops \
+
+# Pointer arithmetic is OK, but watch for null pointers
+SPLINTFLAGS := $(SPLINTFLAGS) \
+    -ptr-arith \
+    +nullptrarith \
+    +ptr-negate
+
+# Check on consistency of defs
+SPLINTFLAGS := $(SPLINTFLAGS) \
+    +incon-defs \
+    +incon-defs-lib \
+
+# The rest of the flags to be organized.
+SPLINTFLAGS := $(SPLINTFLAGS) \
     +char-index \
     +cpp-names \
     +decl-undef \
@@ -1967,43 +2011,16 @@
     +format-code \
     +format-type \
     +ignore-signs \
-    +incon-defs \
-    +incon-defs-lib \
-    -iso-reserved \
-    +macro-assign \
-    +macro-empty \
-    +macro-parens \
-    +macro-redef \
-    +macro-stmt \
-    +macro-unrecog \
     +match-fields \
     +null \
-    +nullptrarith \
     +nullret \
-    -pred-bool-int \
-    -pred-bool-ptr \
-    -pred-bool-others \
-    +ptr-compare \
-    +ptr-negate \
     +strict-destroy \
     \
     +use-released \
     +strict-use-released \
-
-# I'd like the +ignore-signs to go away, but we have too many
-# cross-signedness comparisons.
-
-# Andy is working on making a decent splint target.  He's currently
-# (2/29/08) dropping all the flags that he's been working with
-# and going with the +weak settings, just to get the most egregious
-# problems uncovered.  Then, he'll be gradually adding stricter and
-# stricter settings.  The SPLINTFLAGS_OVERLY_NOISY list below represents
-# his noisy-based work at the time he reverted to weak mode.
-SPLINTFLAGS_OVERLY_NOISY := \
     -abstract \
     +aliasunique \
     +assignexpose \
-    -boolops \
     -casebreak \
     -castfcnptr \
     -charint \
@@ -2015,8 +2032,6 @@
     -globs \
     +imptype \
     -initallelements \
-    -isoreserved \
-    -isoreservedinternal \
     +longintegral \
     +matchanyintegral \
     +nestedextern \
@@ -2024,7 +2039,6 @@
     -paramuse \
     +ptrnegate \
     +readonlystrings \
-    -realcompare \
     -redef \
     -retvalint \
     -retvalother \
@@ -2039,7 +2053,6 @@
     -compdestroy \
     -compmempass \
     -globstate \
-    -modobserver \
     -mustfreefresh \
     -mustfreeonly \
     -nullstate \
@@ -2055,6 +2068,7 @@
     -temptrans \
     -unqualifiedtrans \
 
+
 # Other options we'd like to add back
 # +paramuse: As soon as we get SHIM()s in the ops
 # -includedepth 8 : Let's investigate why we do so many includes.
@@ -2062,16 +2076,15 @@
 #  values of the arrays
 # +casebreak: Auto-generated ops have way too case fallthrus right now
 # +noeffect: Right now the UNUSED(macro) trips +noeffect
-# +realcompare: Make sure we're not doing comparisons on equality on real
-#  numbers
 # +fcnuse: We have many functions that are defined but not used, but they
 #  should get hidden or ifdeffed
 # +redef, +redecl: Ops currently have tons of redefinitions
-# +boolops
 
 # added to splint target to simplify experimentation,
 # ex: make SPLINTFLAGS_TEST='-posixstrictlib +posixlib' splint
-SPLINTFLAGS_TEST := \
+
+# Don't complain about using pointers and ints as booleans
+SPLINTFLAGS_TEST := $(SPLINTFLAGS_TEST) -pred-bool
 
 splint : $(PARROT)
 	$(MKPATH) $(SPLINT_TMP)
@@ -2080,21 +2093,9 @@
 
 splint-andy :
 	$(MKPATH) $(SPLINT_TMP)
-	splint $(CC_INC) @cc_hasjit@ "-Isrc/pmc" "-Icompilers/ast" $(SPLINTFLAGS) $(SPLINTFLAGS_TEST) \
-    compilers/imcc/cfg.c \
-    compilers/imcc/debug.c \
-    compilers/imcc/imc.c \
-    compilers/imcc/imclexer.c \
-    compilers/imcc/imcparser.c \
-    compilers/imcc/instructions.c \
-    compilers/imcc/main.c \
-    compilers/imcc/optimizer.c \
-    compilers/imcc/parser_util.c \
-    compilers/imcc/pbc.c \
-    compilers/imcc/pcc.c \
-    compilers/imcc/reg_alloc.c \
-    compilers/imcc/sets.c \
-    compilers/imcc/symreg.c \
+	splint $(CC_INC) @cc_hasjit@ -DNDEBUG "-Isrc/pmc" "-Icompilers/ast" $(SPLINTFLAGS) $(SPLINTFLAGS_TEST) \
+	+partial -memchecks \
+	src/s*.c \
     | grep -v 'Source code error generation point'
 
 COVER_FLAGS := -fprofile-arcs -ftest-coverage
@@ -2301,10 +2302,10 @@
 cagecritic:
 	perlcritic -1 --profile tools/util/perlcritic-cage.conf $(CRITIC_FILES)
 
-# This target will eventually create all the headers automatically.  If you are
-# having problems with linkage in Win32 (or elsewhere), because something is
-# not PARROT_EXPORT but should be, then put PARROT_EXPORT in the C file and run "make
-# headerizer".  The .h file will get updated.
+# This target will eventually create all the headers automatically.  If you
+# are having problems with linkage in Win32 (or elsewhere), because something
+# is not PARROT_EXPORT but should be, then put PARROT_EXPORT in the C file and
+# run "make headerizer".  The .h file will get updated.
 
 HEADERIZER_O_FILES := \
     $(O_FILES) \

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

Modified: branches/pmc_pct/config/init/defaults.pm
==============================================================================
--- branches/pmc_pct/config/init/defaults.pm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/config/init/defaults.pm	Fri May  8 00:05:13 2009	(r38558)
@@ -239,6 +239,10 @@
         # Extra flags needed for libnci_test.so
         ncilib_link_extra => '',
 
+        # Flag determines if pmc2c.pl and ops2c.pl also
+        # generate #line directives. These can confuse
+        # debugging internals.
+        no_lines_flag => $conf->options->get('no-line-directives') ? '--no-lines' : '',
     );
 
     # add profiling if needed

Modified: branches/pmc_pct/config/init/hints/mswin32.pm
==============================================================================
--- branches/pmc_pct/config/init/hints/mswin32.pm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/config/init/hints/mswin32.pm	Fri May  8 00:05:13 2009	(r38558)
@@ -61,7 +61,7 @@
 
         # if we want pbc_to_exe to work, need to let some versions of the
         # compiler use more memory than they normally would
-        $ccflags .= " -Zm1000 " if $msvcversion < 13;
+        $ccflags .= " -Zm1500 " if $msvcversion < 13;
 
         my $ccwarn = '';
         # disable certain very noisy warnings

Modified: branches/pmc_pct/docs/book/ch01_introduction.pod
==============================================================================
--- branches/pmc_pct/docs/book/ch01_introduction.pod	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/docs/book/ch01_introduction.pod	Fri May  8 00:05:13 2009	(r38558)
@@ -2,43 +2,43 @@
 
 =head1 Introduction
 
-Parrot is a language-neutral virtual machine for dynamic languages, such
-as Ruby, Python, PHP, and Perl. It hosts a powerful suite of compiler
-tools tailored to dynamic languages and a next generation regular
-expression engine. Its architecture is fundamentally different than
-existing virtual machines such as the JVM or CLR, with notable advances
-including a register-based system rather than stack-based, and employing
-continuations as the core means of flow control.
-
-The name "Parrot" was inspired by Monty Python's Parrot sketch. It
-started with an April Fools' Day joke in 2001. Simon Cozens published an
-article titled "Programming Parrot", with a fictional interview between
-Guido van Rossum and Larry Wall detailing their plans to merge Python
-and Perl into a new language called Parrot
-(U<http://www.perl.com/pub/a/2001/04/01/parrot.htm>). 
+Parrot is a language-neutral virtual machine for dynamic languages such as
+Ruby, Python, PHP, and Perl. It hosts a powerful suite of compiler tools
+tailored to dynamic languages and a next generation regular expression engine.
+Its architecture is fundamentally different than existing virtual machines such
+as the JVM or CLR, with optimizations for dynamic languages included, a
+register-based system rather than stack-based, and the use of continuations as
+the core means of flow control.
+
+The name "Parrot" was inspired by Monty Python's Parrot sketch. As an April
+Fools' Day joke in 2001, Simon Cozens published "Programming Parrot", a
+fictional interview between Guido van Rossum and Larry Wall detailing their
+plans to merge Python and Perl into a new language called Parrot
+(U<http://www.perl.com/pub/a/2001/04/01/parrot.htm>).
 
 =head2 Parrot Resources
 
 The starting point for all things related to Parrot is the main website
-U<http://www.parrot.org>. Many additional resources are listed there, as
-well as recent news and information about the project and foundation. 
+U<http://www.parrot.org/>. The site lists additional resources, well as recent
+news and information about the project and the Parrot Foundation, which holds
+the copyright over Parrot and helps guide development and the community.
 
 =head3 Documentation
 
 Parrot includes extensive documentation in the distribution. The full
 documentation for the latest release is available online at
-U<http://docs.parrot.org>.
+U<http://docs.parrot.org/>.
 
 =head3 Mailing Lists
 
 X<parrot-dev (Parrot mailing list)>
 X<mailing lists>
 
-The primary mailing list for Parrot is I<parrot-dev at lists.parrot.org>.
-If you're interested in getting involved in development, you may also
-want to follow the I<parrot-commits> and I<parrot-tickets> lists.
-Information on all the Parrot mailing lists and subscription forms for
-each is available at U<http://lists.parrot.org/mailman/listinfo>.
+The primary mailing list for Parrot is I<parrot-dev at lists.parrot.org>.  If
+you're interested in getting involved in development, you may also want to
+follow the I<parrot-commits> and I<parrot-tickets> lists.  Information on all
+the Parrot mailing lists and subscription forms for each is available at
+U<http://lists.parrot.org/mailman/listinfo>.
 
 The archives for I<parrot-dev> are also available on Google Groups at
 U<http://groups.google.com/group/parrot-dev> and via NNTP at
@@ -50,44 +50,40 @@
 X<IRC channel (#parrot)>
 
 Parrot developers and users congregate on IRC at C<#parrot> on the
-U<irc://irc.parrot.org> server. It's a good place to get real-time
-answers to questions or see how things are progressing.
+U<irc://irc.parrot.org> server. It's a good place to get real-time answers to
+questions or see how things are progressing.
 
 =head3 Issue Tracking & Wiki
 
 X<trac.parrot.org website>
 X<issue tracking (trac.parrot.org)>
 
-Parrot's issue tracking is handled by a Trac site at
-U<https://trac.parrot.org>. In addition to submitting new tickets and
-tracking the status of existing tickets, this site includes a wiki used
-in project development, a source code browser, and the project roadmap.
+Parrot developers track issues with a Trac site at U<https://trac.parrot.org/>.
+Users can submit new tickets and track the status of existing tickets.  The
+site also includes a wiki used in project development, a source code browser,
+and the project roadmap.
 
 =head2 Parrot Development
 
 X<development cycles>
 
-First released in September 2001, Parrot hit 1.0 in March 2009. The
-Parrot project makes releases on the third Tuesday of each month. Two
-releases a year are "supported" releases intended for production use,
-while the other ten releases are development releases. The supported
-releases happen in January and July.
-
-Development proceeds at a steady pace with bugs reported and fixed,
-patches submitted and applied, and features discussed and implemented.
-Activity tends to spike when a release is approaching to close tickets,
-fix bugs, clean up documentation, and prepare the supporting files for
-the release. Immediately after a release is generally a flurry of branch
-merges, feature additions, or removal of deprecated features, since the
-week after the release allows the maximum time for testing before the
-next release. Releases also encourage feedback as casual users and
-testers get their hands on the newest version.
+Parrot's first release occurred in September 2001.  It reached 1.0 in March
+2009. The Parrot project makes releases on the third Tuesday of each month. Two
+releases a year E<mdash> occuring every January and July E<mdash> are
+"supported" releases intended for production use.  The other ten releases are
+development releases for language implementers and testers.
+
+Development proceeds in cycles around releases. Activity just before a release
+focuses on closing tickets, fixing bugs, reviewing documentation, and preparing
+for the release. Immediately after the release, larger changes occur, such as
+merging branches, adding large features, or removing deprecated features. This
+allows developers to ensure that changes have sufficient testing time before
+the next release.  Releases also encourage feedback as casual users and testers
+explore the newest versions.
 
 =head2 The Parrot Team
 
-Parrot is developed by a group of volunteers, broken down into several
-distinct roles, which people assume according to their skills and
-interests.
+Parrot developers fulfill several rules according to their skills and interests.
 
 =over 4
 
@@ -95,46 +91,42 @@
 
 X<architect role>
 
-The architect has primary responsibility for setting the overall
-direction of the project, facilitating team communication, and
-explaining and evaluating architectural issues. The architect makes
-design decisions and documents them in Parrot Design Documents, and
-oversees design and documentation work delegated to other members of the
-team to provide a coherent vision across the project. The architect also
-works with the release managers to develop and maintain the release
-schedule. Allison Randal currently leads the Parrot project as chief
-architect.
+The architect has primary responsibility for setting the overall direction of
+the project, facilitating team communication, and explaining and evaluating
+architectural issues. The architect makes design decisions and documents them
+in Parrot Design Documents, and oversees design and documentation work
+delegated to other members of the team to provide a coherent vision across the
+project. The architect also works with the release managers to develop and
+maintain the release schedule. Allison Randal currently leads the Parrot
+project as architect.
 
 =item Release Managers
 
 X<release manager role>
 
-Release managers have responsibility for executing a product release
-according to the release schedule. Parrot has multiple release managers
-who rotate the responsibility for each monthly release. The release
-managers develop and maintain the release schedule jointly with the
-project architect.
+Release managers manage and produce monthly releases according to the release
+schedule. Parrot has multiple release managers who rotate the responsibility
+for each monthly release. The release managers develop and maintain the release
+schedule jointly with the project architect.
 
 =item Metacommitter
 
 X<metacommitter role>
 
 Metacommitters manage commit access to the Parrot repository. Once a
-contributor is selected for commit access, a metacommitter performs the
-necessary magic to give the new committer access to the SVN repository
-and the bugtracker. The architect is a metacommitter, but other team
-members also hold this role.
+contributor is selected for commit access, a metacommitter gives the new
+committer access to the SVN repository and the bugtracker. The architect is a
+metacommitter, but other team members also hold this role.
 
 =item Committer
 
 X<committer role>
 
-Contributors who submit numerous, high-quality patches may be considered
-to become a committer. Committers have commit access to the full Parrot
-repository, but often specialize on particular parts of the project.
-Committer categories are described below. Contributors may be considered
-for commit access either by being nominated by another committer, or by
-requesting it.
+Contributors who submit numerous, high-quality patches may be considered to
+become a committer. Committers have commit access to the full Parrot
+repository, though they often specialize on particular parts of the project.
+Contributors may be considered for commit access either by being nominated by
+another committer, or by requesting it.
 
 =item Core Developer
 
@@ -156,9 +148,8 @@
 
 Developers who work on any of the high-level languages that target
 ParrotE<mdash>such as Lua, Perl, PHP, Python, Ruby, or TclE<mdash>are
-high-level language developers. Some example languages are located in
-the Parrot repository, but most are hosted independently. A full list of
-languages is maintained at
+high-level language developers. The Parrot repository includes a few example
+languages. A full list of languages is available at
 U<https://trac.parrot.org/parrot/wiki/Languages>.
 
 =item Build Manager
@@ -172,41 +163,38 @@
 
 X<tester role>
 
-Developing, maintaining, and extending test suite coverage and testing
-tool are the key tasks for the testers. Testers are also
-responsible for testing goals, including complete coverage of core
-components on targeted platforms.
+Testers develop, maintain, and extend the core test suite coverage and testing
+tools. Testers are also responsible for testing goals, including complete
+coverage of core components on targeted platforms.
 
 =item Patch Monsters
 
 X<patch monster role>
 
-Hackers and developers submit patches to Parrot every day, and it takes
-a keen eye and a steady hand to review and apply them all. Patch
-monsters, as they are affectionately known, are in charge of checking
-patches for conformance with coding standards and desirability of
-features.
+Hackers and developers submit patches to Parrot every day, and it takes a keen
+eye and a steady hand to review and apply them all. Patch monsters check
+patches for conformance with coding standards and desirability of features,
+rework them as necessary, verify that the patches work as desired, and apply
+them.
 
 =item Cage Cleaners
 
 X<cage cleaner role>
 
-The cage cleaners ensure that coding standards are followed, that
-documentation is complete and accurate, that all tests are functioning
-properly, and that there are plenty of coding examples for new users to
-learn from. A class of tickets in the issue tracking system has been
-created especially for use by this group. This position encompasses
-tasks that run the gamut from entry-level to advanced, and is a good
-entry point for new users who want to get more familiar with Parrot
-internals.
+The cage cleaners ensure that development follows the project's coding
+standards, documentation is complete and accurate, all tests function properly,
+and new users have accurate and comprehensive coding examples. A special class
+of Trac tickets is available for these tasks.  Cage cleaning tasks run the
+gamut from entry-level to advanced; this is a good entry point for new users
+to work on Parrot.
 
 =item General Contributor
 
 X<contributor role>
 
-Contributors are volunteers who write code or documentation patches,
-take part in email or online conversations, or contribute to the project
-in other important ways. All volunteer contributions are appreciated.
+Contributors write code or documentation, report bugs, take part in email or
+online conversations, or contribute to the project in other ways. All volunteer
+contributions are appreciated.
 
 =back
 
@@ -214,10 +202,10 @@
 
 X<license>
 
-The intellectual property for Parrot is held by the Parrot Foundation, a
-non-profit organization formed to support the Parrot development
-community. It is licensed under the Artistic License 2.0, allowing free
-use in commercial and open source/free software contexts.
+The Parrot foundation supports the Parrot development community and holds
+trademarks and copyrights to Parrot.  The project is available under the
+Artistic License 2.0, allowing free use in commercial and open source/free
+software contexts.
 
 =cut
 

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

Modified: branches/pmc_pct/docs/book/ch03_pir.pod
==============================================================================
--- branches/pmc_pct/docs/book/ch03_pir.pod	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/docs/book/ch03_pir.pod	Fri May  8 00:05:13 2009	(r38558)
@@ -6,38 +6,39 @@
 
 X<Parrot Intermediate Representation;;(see PIR)>
 X<PIR (Parrot intermediate representation)>
-Parrot Intermediate Representation (PIR) is a low-level language native
-to the virtual machine. It is commonly used to write libraries for
-Parrot, for generated compilers, and as the target form when compiling
-high-level language syntax for Parrot. At a fundamendal level, PIR is an
-assembly language, but it has some higher-level features such as basic
-operator syntax, syntactic sugar for subroutine and method calls,
-automatic register allocation, and more friendly conditional
-syntax.N<Parrot also has a more pure native assembly language, see
-Chapter 9 for more details.> Even so, PIR is more rigid and "close to
-the machine" then some higher-level languages like C. X<.pir files>
-Files containing PIR code use the F<.pir> extension.
 
+Parrot Intermediate Representation (PIR) is Parrot's native low-level
+language.N<Parrot has a pure native assembly language called PASM, described in
+Chapter 9.> PIR is fundamentally an assembly language, but it has some
+higher-level features such as operator syntax, syntactic sugar for subroutine
+and method calls, automatic register allocation, and more friendly conditional
+syntax.  PIR is commonly used to write Parrot libraries -- including some of
+PCT's compilers -- and is the target form when compiling high-level languages
+to Parrot.
+
+Even so, PIR is more rigid and "close to the machine" then some higher-level
+languages like C. X<.pir files> Files containing PIR code use the F<.pir>
+extension.
 
 =head2 Basics
 
-PIR has a relatively simple syntax. Each line is either a comment, a
-label, a statement, or a directive. Each statement or directive stands
-on its own line, and no symbol is used to mark the end of the line.
-Empty whitespace lines are ignored.
+PIR has a relatively simple syntax. Every line is a comment, a label, a
+statement, or a directive. Each statement or directive stands on its own line.
+There is no end-of-line symbol (such as a semicolon in other languages).
 
 =head3 Comments
 
-A comment is marked with the C<#> symbol, and continues until the end of
-the line. Comments can stand alone on a line or follow a statement or
-directive.
+X<PIR comments>
+A comment begins with the C<#> symbol, and continues until the end of the line.
+Comments can stand alone on a line or follow a statement or directive.
 
     # This is a regular comment. The PIR
     # interpreter ignores this.
 
+X<PIR POD>
 PIR also treats inline documentation in Pod format as a comment. An
 equals sign as the first character of a line marks the start of a Pod
-block, and a C<=cut> marker signals the end of a Pod block.
+block.  A C<=cut> marker signals the end of a Pod block.
 
   =head2
 
@@ -50,19 +51,17 @@
 
 Z<CHP-3-SECT-4>
 
-X<PIR (Parrot intermediate representation);labels>
-X<labels (PIR)>
-A label names a line of code so other statements can refer to it.
-Labels consist of letters, numbers, and underscores. Simple labels are
-often all capital letters to make them stand out from the rest of the
-source code more clearly. A label can be in front of a line of code, or
-it can be on its own line. Keeping labels on separate lines generally
-improves readability.
+X<PIR (Parrot intermediate representation);labels> X<labels (PIR)> A label
+attaches to a line of code so other statements can refer to it.  Labels can
+contain letters, numbers, and underscores. By convention, labels use all
+capital letters to stand out from the rest of the source code. A label can be
+precede a line of code, though outdenting labels on separate lines improves
+readability:
 
-  LABEL:
-      print "'Allo, 'allo, 'allo.\n"
+  GREET:
+      say "'Allo, 'allo, 'allo."
 
-Labels are most often used for control flow.
+Labels are vital to control flow.
 
 =head3 Statements
 
@@ -70,30 +69,28 @@
 
 X<statements (PIR)>
 X<PIR (Parrot intermediate representation);statements>
-A statement is either an opcode or syntactic sugar for one or more
-opcode. An opcode is a direct call to a native instruction in
-the virtual machine, and consists of an instruction name followed
-by zero or more arguments.
+A statement is either an opcode or syntactic sugar for one or more opcodes. An
+opcode is a native instruction for the virtual machine; it consists of the name
+of the instruction followed by zero or more arguments.
 
-  print "Norwegian Blue\n"
+  say "Norwegian Blue"
 
-To aid in readability, PIR also provides some higher-level constructs,
-including symbol operators.
+PIR also provides higher-level constructs, including symbol operators:
 
   $I1 = 2 + 5
 
-Under the hood, these special statement forms are just syntactic sugar
-for regular opcodes. The C<+> symbol corresponds to the C<add> opcode,
-the C<-> symbol to the C<sub> opcode, and so on.
+Under the hood, these special statement forms are just syntactic sugar for
+regular opcodes. The C<+> symbol corresponds to the C<add> opcode, the C<->
+symbol to the C<sub> opcode, and so on.  The previous example is equivalent to:
 
   add $I1, 2, 5
 
 =head3 Directives
 
-Directives all start with a C<.> period, and are handled specially by
-the parser. Some directives specify actions that should be taken at
-compile-time. Some directives represent complex operations that require
-the generation of multiple instructions.
+Directives begin with a period (C<.>); Parrot's parser handles them specially.
+the parser. Some directives specify actions that occur at compile time. Other
+directives represent complex operations that require the generation of multiple
+instructions.  The C<.local> directive declares a typed register.
 
   .local string hello
 
@@ -101,84 +98,72 @@
 
 =head3 Literals
 
-Integers and floating point numbers are numeric literals, and can be
-positive or negative.
+Integers and floating point numbers are numeric literals. They can be positive
+or negative.
 
   $I0 = 42       # positive
   $I1 = -1       # negative
 
-Integer literals can also be binary, octal, or hexadecimal.
+Integer literals can also be binary, octal, or hexadecimal:
 
   $I3 = 0b01010  # binary
   $I3 = 0o78     # octal
   $I2 = 0xA5     # hexadecimal
 
-Floating point number literals have a decimal point, and can also use
-scientific notation.
+Floating point number literals have a decimal point, and can use scientific
+notation:
 
   $N0 = 3.14
   $N2 = -1.2e+4
 
 X<strings;in PIR>
-String literals are enclosed in single or double-quotes.N<See L<Strings>
-later in this chapter for more details on the difference between single
-and double quoted strings.>
+String literals are enclosed in single or double-quotes.N<L<Strings>
+explains the differences between the quoting types.>
 
   $S0 = "This is a valid literal string"
   $S1 = 'This is also a valid literal string'
 
 =head3 Variables
 
-PIR variables can store 4 different kinds of valuesE<mdash>integers,
-numbers (floating point), strings, and objects. The simplest way to work
-with these values is using register variables. The name of a register
-variable always starts with a dollar sign, followed by a single
-character that shows whether it is an integer (C<I>), number (C<N>),
-string (C<S>), or object (C<P>),N<Objects are marked with a C<P> for
-"I<P>olymorphic container".> and a unique number.
-
-  $S0 = "Who's a pretty boy, then?\n"
-  print $S0
-
-PIR also has named variables, which are declared with the C<.local>
-directive, passing it a type and a name. The valid types for
-named variables are the same 4 basic kinds of values: C<int>, C<num>,
-C<string>, and C<pmc>.N<Again, for "I<P>olyI<M>orphic I<C>ontainer".>
-Once a named variable is declared, it can be used just like a register
-variable.
+PIR variables can store four different kinds of valuesE<mdash>integers, numbers
+(floating point), strings, and objects. The simplest way to work with these
+values is through register variables. Register variables always start with a
+dollar sign (C<$>) and a single character which specifies the type of the
+register: integer (C<I>), number (C<N>), string (C<S>), or PMC (C<P>).
+Registers have numbers as well; the "first" string register is C<$S0>.
+N<Register numbers may or may not correspond to the register used internally;
+Parrot's compiler remaps registers as appropriate.>
+
+  $S0 = "Who's a pretty boy, then?"
+  say $S0
+
+PIR also has named variables, which are declared with the C<.local> directive.
+As with registers, there are four valid types for named variables: C<int>,
+C<num>, C<string>, and C<pmc>.N<Again, for "I<P>olyI<M>orphic I<C>ontainer".>
+After declaring a named variable, you can use the name anywhere you would use a
+register:
 
   .local string hello
-  set hello, "'Allo, 'allo, 'allo.\n"
-  print hello
-
-PIR code has a variety of ways to store values while you work with
-them. Actually, the only place to store values is in a Parrot register,
-but there are multiple ways to work with these registers. Register names
-in PIR always start with a dollar sign, followed by a single
-
-Integer (I) and Number (N) registers use platform-dependent sizes and
-limitations N<There are a few exceptions to this, we use platform-dependent
-behavior when the platforms behave sanely. Parrot will smooth out some of
-the bumps and inconsistencies so that behavior of PIR code will be the same
-on all platforms that Parrot supports>. Both I and N registers are treated
-as signed quantities internally for the purposes of arithmetic. Parrot's
-floating point values and operations are all IEEE 754 compliant.
-
-Strings (S) are buffers of data with a consistent formatting but a variable
-size. By far the most common use of S registers and variables is for storing
-text data. S registers may also be used in some circumstances as buffers
-for binary or other non-text data. However, this is an uncommon usage of
-them, and for most such data there will likely be a PMC type that is better
-suited to store and manipulate it. Parrot strings are designed to be very
-flexible and powerful, to account for all the complexity of human-readable
-(and computer-representable) text data.
-
-The final data type is the PMC, a complex and flexible data type. PMCs are,
-in the world of Parrot, similar to what classes and objects are in
-object-oriented languages. PMCs are the basis for complex data structures
-and object-oriented behavior in Parrot. We'll discuss them in more detail
-in this and in later chapters.
+  set hello, "'Allo, 'allo, 'allo."
+  say hello
 
+Integer (C<I>) and Number (C<N>) registers use platform-dependent sizes and
+limitationsN<There are a few exceptions to this; Parrot smooths out some of the
+bumps and inconsistencies so that PIR code behaves the same way on all
+supported platforms>. Internally, Parrot treats both I and N registers as
+signed quantities internally for the purposes of arithmetic. Parrot's floating
+point values and operations all comply with the IEEE 754 standard.
+
+Strings (S) are buffers of variable-sized data. The most common use of S
+registers and variables is to store textual data. S registers I<may> also be
+buffers for binary or other non-textual data, though this is rareN<In general,
+a custom PMC is mroe useful>.  Parrot strings are flexible and powerful, to
+account for all the complexity of human-readable (and computer-representable)
+textual data.
+
+The final data type is the PMC. PMC resemble classes and objects are in
+object-oriented languages. They are the basis for complex data structures and
+object-oriented behavior in Parrot.
 
 =head2 Strings
 
@@ -189,8 +174,7 @@
   $S0 = "This string is \n on two lines"
   $S0 = 'This is a \n one-line string with a slash in it'
 
-Here's a quick listing of the escape sequences supported by double-quoted
-strings:
+Parrot supports several escape sequences in double-quoted strings:
 
   \xhh        1..2 hex digits
   \ooo        1..3 oct digits
@@ -209,12 +193,11 @@
   \\          A backslash
   \"          A quote
 
-Or, if you need more flexibility, you can use a heredoc string literal.
-The string starts on the line after the C<E<lt>E<lt>> operator, and ends
-on the line before the terminator, which is defined by the text in
-quotes after the C<E<lt>E<lt>>. The terminator must appear on its own
-line, must appear at the beginning of the line, and may not have any
-trailing whitespace.
+If you need more flexibility in defining a string, use a X<heredoc string
+literal>.  The C<E<lt>E<lt>> operator starts a heredoc.  The string terminator
+immediately follows.  All text until the terminator is part of the heredoc.
+The terminator must appear on its own line, must appear at the beginning of the
+line, and may not have any trailing whitespace.
 
   $S2 = << "End_Token"
 
@@ -225,53 +208,45 @@
 
 =head3 Strings: Encodings and Charsets
 
-Strings are complicated. We showed three different ways to specify string
-literals in PIR code, but that wasn't the entire story. It used to be that
-all a computer system needed was to support the ASCII charset, a mapping of
-128 bit patterns to symbols and English-language characters. This was
-sufficient so long as all computer users could read and write English, and
-were satisfied with a small handful of punctuation symbols that were commonly
-used in English-speaking countries. However, this is a woefully insufficient
-system to use when we are talking about software portability between countries
-and continents and languages. Now we need to worry about several character
-encodings and charsets in order to make sense out of all the string data
-in the world.
-
-Parrot has a very flexible system for handling and manipulating strings.
-Every string is associated with an encoding and a character set (charset).
-The default for Parrot is 8-bit ASCII, which is simple to use and is almost
-universally supported. However, support is built in to have other formats as
-well.
-
-Double-quoted string constants, like the ones we've seen above, can have an
-optional prefix specifying the charset or both the encoding and charset of the
-string. Parrot will maintain these values internally, and will automatically
-convert strings when necessary to preserve the information. String prefixes
-are specified as C<encoding:charset:> at the front of the string. Here are some
-examples:
+X<charset>
+Strings are complicated; string declarations aren't the whole story.  In olden
+times, strings only needed to support the ASCII character set (or charset), a
+mapping of 128 bit patterns to symbols and English-language characters. This
+worked as long as everyone using a computer read and wrote English and used a
+small handful of punctuation symbols.
+
+In other words, it was woefully insufficient for international uses, polyglots, and more.
+
+A modern string system must manage several character encodings and charsets in
+order to make sense out of all the string data in the world.  Parrot does this.
+Every string has an associated encoding and an associated character set.  The
+default charset is 8-bit ASCII, which is simple to use and is almost
+universally supported.
+
+Double-quoted string constants can have an optional prefix specifying the the
+string's encoding and charsetN<As you might suspect, single-quoted strings do
+not support this.>. Parrot will maintain these values internally, and will
+automatically convert strings when necessary to preserve the information.
+String prefixes are specified as C<encoding:charset:> at the front of the
+string. Here are some examples:
 
   $S0 = utf8:unicode:"Hello UTF8 Unicode World!"
   $S1 = utf16:unicode:"Hello UTF16 Unicode World!"
   $S2 = ascii:"This is 8-bit ASCII"
-  $S3 = binary:"This is treated as raw unformatted binary"
+  $S3 = binary:"This is raw, unformatted binary data"
 
-The C<binary:> charset treats the string as a buffer of raw unformatted
-binary data. It isn't really a "string" per se because binary data isn't
-treated as if it contains any readable characters. These kinds of strings
-are useful for library routines that return large amounts of binary data
-that doesn't easily fit into any other primitive data type.
-
-Notice that only double-quoted strings can have encoding and charset prefixes
-like this. Single-quoted strings do not support them.
-
-When two types of strings are combined together in some way, such as through
-concatenation, they must both use the same character set an encoding.
-Parrot will automatically upgrade one or both of the strings to use the next
-highest compatible format, if they aren't equal. ASCII strings will
-automatically upgrade to UTF-8 strings if needed, and UTF-8 will upgrade
-to UTF-16. Handling and maintaining these data and conversions all happens
-automatically inside Parrot, and you the programmer don't need to worry
-about the details.
+The C<binary:> charset treats the string as a buffer of raw unformatted binary
+data. It isn't really a string per se, because binary data contains no readable
+characters.  As mentioned earlier, this exists to support libraries which
+manipulate binary data that doesn't easily fit into any other primitive data
+type.
+
+When Parrot combines two strings (such as through concatenation), they must
+both use the same character set and encoding.  Parrot will automatically
+upgrade one or both of the strings to use the next highest compatible format as
+necessary. ASCII strings will automatically upgrade to UTF-8 strings if needed,
+and UTF-8 will upgrade to UTF-16. All of these conversions happen inside
+Parrot; you the programmer don't need to worry about the details.
 
 =head2 Named Variables
 
@@ -279,6 +254,13 @@
 
 X<named variables (PIR)>
 X<PIR (Parrot intermediate representation);named variables>
+
+=for author
+
+The declaration section earlier alludes to this.
+
+=end for
+
 Calling a value "$S0" isn't very descriptive, and usually it's a lot
 nicer to be able to refer to values using a helpful name. For this
 reason Parrot allows registers to be given temporary variable names to
@@ -288,121 +270,38 @@
 which requires a variable type and a name:
 
   .local string hello
-  set hello, "Hello, Polly.\n"
-  print hello
+  set hello, "Hello, Polly."
+  say hello
 
-This snippet defines a string variable named C<hello>, assigns it the
-value "Hello, Polly.\n", and then prints the value. Under the hood these
-named variables are just normal registers of course, so any operation that
-a register can be used for a named variable can be used for as well.
+This snippet defines a string variable named C<hello>, assigns it the value
+"Hello, Polly.", and then prints the value. Under the hood these named
+variables are just normal registers of course, so any operation that a register
+can be used for a named variable can be used for as well.
 
 X<types;variable (PIR)>
 X<variables;types (PIR)>
-The valid types are C<int>, C<num>, C<string>, and C<pmc> 
+The valid types are C<int>, C<num>, C<string>, and C<pmc>
 It should come as no surprise that these are the same as Parrot's four
 built-in register types. Named variables are valid from the point of
 their definition to the end of the current subroutine.
 
-The name of a variable must be a valid PIR identifier. It can contain
-letters, digits and underscores but the first character has to be a
-letter or an underscore. There is no limit to the length of an identifier,
-especially since the automatic code generators in use with the various
-high-level languages on parrot tend to generate very long identifier
-names in some situations. Of course, huge identifier names could
-cause all sorts of memory allocation problems or inefficiencies during
-lexical analysis and parsing. You should push the limits at your own risk.
-
-=head2 Register Allocator
-
-PIR does not have this kind
-of direct correspondance to PBC. A number of PIR features, especially the
-various directives, typically translate into a number of individual
-operations. Register names, such as C<$P7> don't indicate the actual
-storage location of the register in PIR either. The register allocator
-will intelligently move and rearrange registers to conserve memory, so
-the numbers you use to specify registers in PIR will be mapped to
-different numbers when compiled into PBC.
-Now's a decent time to talk about Parrot's register allocator N<it's also
-sometimes humorously referred to as the "register alligator", due to an
-oft-repeated typo and the fact that the algorithm will bite you if you get
-too close to it>. When you use a register like C<$P5>, you aren't necessarily
-talking about the fifth register in memory. This is important since you can
-use a register named $P10000000 without forcing Parrot to allocate an array
-of ten million registers. Instead Parrot's compiler front-end uses an
-allocation algorithm which turns each individual register referenced in the
-PIR source code into a reference to an actual memory storage location. Here
-is a short example of how registers might be mapped:
-
-  $I20 = 5       # First register, I0
-  $I10000 = 6    # Second register, I1
-  $I13 = 7       # Third register, I2
-
-The allocator can also serve as a type of optimization. It performs a
-lifetime analysis on the registers to determine when they are being used and
-when they are not. When a register stops being used for one thing, it can
-be reused later for a different purpose. Register reuse helps to keep
-Parrot's memory requirements lower, because fewer unique registers need to
-be allocated. However, the downside of the register allocator is that it
-takes more time to execute during the compilation phase. Here's an example
-of where a register could be reused:
-
-=begin PIR
-
-  .sub main
-    $S0 = "hello "
-    print $S0
-    $S1 = "world!"
-    print $S1
-  .end
-
-=end PIR
-
-We'll talk about subroutines in more detail in the next chapter. For now,
-we can dissect this little bit of code to see what is happening. The C<.sub>
-and C<.end> directives demarcate the beginning and end of a subroutine
-called C<main>. This convention should be familiar to C and C++ programmers,
-although it's not required that the first subroutine N<or any subroutine
-for that matter> be named "main". In this code sequence, we assign the
-string C<"hello "> to the register C<$S0> and use the C<print> opcode to
-display it to the terminal. Then, we assign a second string C<"world!"> to
-a second register C<$S1>, and then C<print> that to the terminal as well.
-The resulting output of this small program is, of course, the well-worn
-salutation C<hello world!>.
-
-Parrot's compiler and register allocator are smart enough to realize that
-the two registers in the example above, C<$S0> and C<$S1> are used exclusively
-of one another. C<$S0> is assigned a value in line 2, and is read in line 3,
-but is never accessed after that. So, Parrot determines that its lifespan
-ends at line 3. The register C<$S1> is used first on line 4, and is accessed
-again on line 5. Since these two do not overlap, Parrot's compiler can
-determine that it can use only one register for both operations. This saves
-the second allocation. Notice that this code with only one register performs
-identically to the previous example:
-
-=begin PIR
-
-  .sub main
-    $S0 = "hello "
-    print $S0
-    $S0 = "world!"
-    print $S0
-  .end
-
-=end PIR
-
-In some situations it can be helpful to turn the allocator off and avoid
-expensive optimizations. Such situations are subroutines where there are a
-small fixed number of registers used, when variables are used throughout the
-subroutine and should never be reused, or when some kind of pointer reference
-needs to be made to the register N<this happens in some NCI calls that take
-pointers and return values>. To turn off the register allocator for certain
-variables, you can use the C<:unique_reg> modifier:
+The name of a variable must be a valid PIR identifier. It can contain letters,
+digits and underscores but the first character has to be a letter or an
+underscore. There is no limit to the length of an identifier, other than good
+taste.
+
+As mentioned earlier, Parrot's internal compiler may remap named registers and
+symbolic registers to actual registers as necessary.  This happens
+transparently, and for the most part you never need to know about it.  There's
+one exception: when you know something outside of Parrot must refer to a
+specific register exactlyN<For example, when an NCI call takes a pointer to a
+register and returns a value through the pointer.>.  Use the C<:unique_reg>
+modifier on a variable declaration to prevent potential register allocation
+changes:
 
   .local pmc MyUniquePMC :unique_reg
 
-Notice that C<:unique_reg> shouldn't affect the behavior of Parrot, but
-instead only changes the way registers are allocated. It's a trade off between
-using more memory in exchange for less time spent optimizing the subroutine.
+This attribute C<:unique_reg> will not affect the behavior of Parrot otherwise.
 
 =head2 PMC variables
 
@@ -413,31 +312,27 @@
 new PMC object into a type before you use it. The C<new> instruction creates
 a new PMC of the specified type:
 
-  $P0 = new 'PerlString'     # This is how the Perl people do it
-  $P0 = "Hello, Polly.\n"
-  print $P0
-
-This example creates a C<PerlString> object, stores it in the PMC
-register C<$P0>, assigns the value "Hello, Polly.\n" to it, and prints
-it.  With named variables the type passed to the C<.local> directive is
-either the generic C<pmc> or a type compatible with the type passed to
-C<new>:
-
-  .local PerlString hello    # or .local pmc hello
-  hello = new 'PerlString'
-  hello = "Hello, Polly.\n"
-  print hello
-
-PIR is a dynamic language, and that dynamicism is readily displayed in
-the way PMC values are handled. Primitive registers like strings,
-numbers, and integers perform a special action called I<autoboxing>
-when they are assigned to a PMC. Autoboxing is when a primitive scalar
-type is automatically converted to a PMC object type. There are PMC
-classes for String, Number, and Integer which can be quickly converted
-to and from primitive int, number, and string types. Notice that the
-primitive types are in lower-case, while the PMC classes are
-capitalized. If you want to box a value explicitly, you can use the C<box>
-opcode:
+  $P0 = new 'String'
+  $P0 = "Hello, Polly."
+  say $P0
+
+This example creates a C<String> object, stores it in the PMC register C<$P0>,
+assigns it the value "Hello, Polly.", and prints it.  The type provided to the
+C<.local> directive is either the generic C<pmc> or a type compatible with the
+type passed to C<new>:
+
+  .local String hello    # or .local pmc hello
+  hello = new 'String'
+  hello = "Hello, Polly."
+  say hello
+
+PIR is a dynamic language; that dynamicism is evident in how Parrot handles PMC
+values. Primitive registers like strings, numbers, and integers perform a
+special action called X<autoboxing> when assigned to a PMC. Autoboxing is the
+process of converting a primitive type to a PMC object.  PMC classes exist for
+String, Number, and Integer; notice that the primitive types are in lower-case,
+while the PMC classes are capitalized. If you want to box a value explicitly,
+use the C<box> opcode:
 
   $P0 = new 'Integer'       # The boxed form of int
   $P0 = box 42
@@ -446,16 +341,12 @@
   $P2 = new 'String'        # The boxed form of string
   $P2 = "This is a string!"
 
-The PMC classes C<Integer>, C<Number>, and C<String> are thin overlays on
-the primitive types they represent. However, these PMC types have the benefit
-of the X<PMC;VTABLE Interface> VTABLE interface. VTABLEs are a standard
-API that all PMCs conform to for performing standard operations. These PMC
-types also have special custom methods available for performing various
-operations, they may be passed as PMCs to subroutines that only expect
-PMC arguments, and they can be subclassed by a user-defined type. We'll
-discuss all these complicated topics later in this chapter and in the next
-chapter. We will discuss PMC and all the details of their implementation and
-interactions in Chapter 11.
+The PMC classes C<Integer>, C<Number>, and C<String> are thin overlays on the
+primitive types they represent. These PMC types have the benefit of the
+X<PMC;VTABLE Interface> VTABLE interface. VTABLEs are a standard API that all
+PMCs conform to for performing standard operations. These PMC types support
+custom methods to perform various operations, may be passed to subroutines that
+expect PMC arguments, and can be subclassed by a user-defined type.
 
 =head2 Named Constants
 
@@ -463,57 +354,59 @@
 
 X<PIR (Parrot intermediate representation);named constants>
 X<named constants (PIR)>
-The C<.const> directive declares a named constant. It's very similar
-to C<.local>, and requires a type and a name. The value of a constant
-must be assigned in the declaration statement. As with named
-variables, named constants are visible only within the compilation
-unit where they're declared. This example declares a named string
+
+The C<.const> directive declares a named constant. It resembles C<.local>; it
+requires a type and a name. It also requires the assignment of a constant
+value.  As with named variables, named constants are visibl only within the
+compilation unit where they're declared. This example declares a named string
 constant C<hello> and prints the value:
 
-  .const string hello = "Hello, Polly.\n"
-  print hello
+  .const string hello = "Hello, Polly."
+  say hello
 
 Named constants may be used in all the same places as literal constants,
 but have to be declared beforehand:
 
-  .const int the_answer = 42        # integer constant
-  .const string mouse = "Mouse"     # string constant
-  .const num pi = 3.14159           # floating point constant
+  .const int    the_answer = 42        # integer constant
+  .const string mouse      = "Mouse"   # string constant
+  .const num    pi         = 3.14159   # floating point constant
 
 In addition to normal local constants, you can also specify a global constant
 which is accessible from everywhere in the current code file:
 
   .globalconst int days = 365
 
-Currently there is no way to specify a PMC constant in PIR source code,
-although a way to do so may be added in later versions of Parrot.
+Currently there is no way to specify a PMC constant in PIR source code.
+
+=for author
+
+Why declare constants?
+
+=end for
 
 =head2 Symbol Operators
 
 Z<CHP-3-SECT-3>
 
 X<symbol operators in PIR>
-PIR has many other symbol operators: arithmetic, concatenation,
-comparison, bitwise, and logical. All PIR operators are translated
-into one or more Parrot opcodes internally, but the details of this
-translation stay safely hidden from the programmer. Consider this
-example snippet:
+
+=for author
+
+An earlier section described this already too.
+
+=end for
+
+PIR has many other symbolic operators: arithmetic, concatenation, comparison,
+bitwise, and logical. All PIR operators are translated into one or more Parrot
+opcodes internally, but the details of this translation stay safely hidden from
+the programmer. Consider this example snippet:
 
   .local int sum
   sum = $I42 + 5
-  print sum
-  print "\n"
+  say sum
 
-The statement C<sum = $I42 + 5> translates to the equivalent statement
-C<add sum, $I42, 5>. This in turn will be translated to an equivalent
-PASM instruction which will be similar to C<add I0, I1, 5>. Notice that
-in the PASM instruction the register names do not have the C<$> symbol in
-front of them, and they've already been optimized into smaller numbers by
-the register allocator. The exact translation from PIR statement to PASM
-instruction isn't too important N<Unless you're hacking on the Parrot
-compiler!>, so we don't have to worry about it for now. We will talk more
-about PASM, its syntax and its instruction set in X<CHP-5> Chapter 5.
-Here are examples of some PIR symbolic operations:
+The statement C<sum = $I42 + 5> translates to the equivalent statement C<add
+sum, $I42, 5>.  PIR symbolic operations are:
 
   $I0 = $I1 + 5      # Addition
   $N0 = $N1 - 7      # Subtraction
@@ -530,14 +423,12 @@
 
 =head2 C<=> and Type Conversion
 
-We've mostly glossed over the behavior of the C<=> operator, although it's
-a very powerful and important operator in PIR. In it's most simple form,
-C<=> stores a value into one of the Parrot registers. We've seen cases where
-it can be used to assign a string value to a C<string> register, or an integer
-value to an C<int> register, or a floating point value into a C<number>
-register, etc. However, the C<=> operator can be used to assign any type
-of value into any type of register, and Parrot will handle the conversion
-for you automatically:
+The C<=> operator is very powerful.  Its simplest form stores a value into one
+of the Parrot registers. It can assign a string value to a C<string> register,
+an integer value to an C<int> register, a floating point value into a C<number>
+register, etc. However, the C<=> operator can assign I<any> type of value into
+I<any> type of register; Parrot will handle the conversion for you
+automatically:
 
   $I0 = 5     # Integer. 5
   $S0 = $I0   # Stringify. "5"
@@ -550,19 +441,19 @@
   $S0 = "parrot"
   $I0 = $S0        # 0
 
-We've also seen an example earlier where a string literal was set into a
-PMC register that had a type C<String>. This works for all the primitive
-types and their autoboxed PMC equivalents:
+An earlier example showed a string literal assigned to a PMC register of type
+C<String>. This works for all the primitive types and their autoboxed PMC
+equivalents:
 
   $P0 = new 'Integer'
   $P0 = 5
   $S0 = $P0      # Stringify. "5"
   $N0 = $P0      # Numify. 5.0
-  $I0 = $P0      # De-box. $I0 = 5
+  $I0 = $P0      # Unbox. $I0 = 5
 
   $P1 = new 'String'
   $P1 = "5 birds"
-  $S1 = $P1      # De-box. $S1 = "5 birds"
+  $S1 = $P1      # Unbox. $S1 = "5 birds"
   $I1 = $P1      # Intify. 5
   $N1 = $P1      # Numify. 5.0
 
@@ -570,72 +461,65 @@
   $P2 = 3.14
   $S2 = $P2      # Stringify. "3.14"
   $I2 = $P2      # Intify. 3
-  $N2 = $P2      # De-box. $N2 = 3.14
-
+  $N2 = $P2      # Unbox. $N2 = 3.14
 
 =head2 Compilation Units
 
 Z<CHP-3-SECT-4.1>
 
-X<PIR (Parrot intermediate representation);subroutine>
-X<subroutine (PIR)>
-Subroutines in PIR are roughly equivalent to the subroutines or
-methods of a high-level language. Though they will be explained in
-more detail later, we introduce them here because all code in a PIR
-source file must be defined in a subroutine. We've already seen an
-example for the simplest syntax for a PIR subroutine. It starts with
-the C<.sub> directive and ends with the C<.end> directive:
+X<PIR (Parrot intermediate representation);subroutine> X<subroutine (PIR)>
+Subroutines in PIR are roughly equivalent to the subroutines or methods of a
+high-level language.  All code in a PIR source file must occur within a
+subroutine.  The simplest syntax for a PIR subroutine starts with the C<.sub>
+directive and ends with the C<.end> directiveN<The name C<main> is only a
+convention.>:
 
 =begin PIR
 
-  .sub main
-      print "Hello, Polly.\n"
+  .sub 'main'
+      say "Hello, Polly."
   .end
 
 =end PIR
 
-Again, we don't need to name the subroutine C<main>, it's just a common
-convention. This example defines a subroutine named C<main> that
-prints a string C<"Hello, Polly.">. The first subroutine in a file
-is normally executed first but you can flag any subroutine as the
-first one to execute with the C<:main> marker.
+This example defines a subroutine named C<main> that prints a string C<"Hello,
+Polly.">. Parrot will normally execute the first subroutine it encounters in
+the first file it runs, but you can flag any subroutine as the first one to
+execute with the C<:main> marker:
 
 =begin PIR
 
-  .sub first
-      print "Polly want a cracker?\n"
+  .sub 'first'
+      say "Polly want a cracker?"
   .end
 
-  .sub second :main
-      print "Hello, Polly.\n"
+  .sub 'second' :main
+      say "Hello, Polly."
   .end
 
 =end PIR
 
-This code prints out "Hello, Polly." but not "Polly want a cracker?".
-This is because the function C<second> has the C<:main> flag, so it is
-executed first. The function C<first>, which doesn't have this flag
-is never executed. However, if we change around this example a little:
+This code prints out "Hello, Polly." but not "Polly want a cracker?".  Though
+the C<first> function appears first in the source code, C<second> has the
+C<:main> flag and gets called.  C<first> is never called.  Revising that
+program produces different results:
 
 =begin PIR
 
-  .sub first :main
-      print "Polly want a cracker?\n"
+  .sub 'first' :main
+      say "Polly want a cracker?"
   .end
 
-  .sub second
-      print "Hello, Polly.\n"
+  .sub 'second'
+      say "Hello, Polly."
   .end
 
 =end PIR
 
-The output now is "Polly want a cracker?". Execution in PIR starts
-at the C<:main> function and continues until the end of that function
-only. If you want to do more stuff if your program, you will need to
-call other functions explicitly.
-
-Chapter 4 goes into much more detail about subroutines
-and their uses.
+The output now is "Polly want a cracker?". Execution in PIR starts at the
+C<:main> function and continues until that function ends.  To perform other
+operations, you must call other functions explicitly.  Chapter 4 describes
+subroutines and their uses.
 
 =head2 Flow Control
 
@@ -643,66 +527,60 @@
 
 X<PIR (Parrot intermediate representation);flow control>
 X<flow control;in PIR>
-Flow control in PIR is done entirely with conditional and unconditional
-branches to labels. This may seem simplistic and primitive, but
-remember that PIR is a thin overlay on the assembly language of a
-virtual processor, and is intended to be a simple target for the compilers
-of various. high-level languages. High level control structures are invariably linked
-to the language in which they are used, so any attempt by Parrot to
-provide these structures would work well for some languages but would
-require all sorts of messy translation in others. The only way to make
-sure all languages and their control structures can be equally
-accommodated is to simply give them the most simple and fundamental
-building blocks to work with. Language agnosticism is an important
-design goal in Parrot, and creates a very flexible and powerful
-development environment for our language developers.
-
-Notice that PIR
-does not, and will not, have high-level looping structures like C<while>
-or C<for> loops. PIR has some support for basic C<if> branching constructs,
-but will not support more complicated C<if>/C<then>/C<else> branch
-structures.
+
+Flow control in PIR occurs entirely with conditional and unconditional branches
+to labels. This may seem simplistic and primitive, but here PIR shows its roots
+as a thin overlay on the assembly language of a virtual processor.  PIR does
+not support high-level looping structures such as C<while> or C<for> loops. PIR
+has some support for basic C<if> branching constructs, but does not support
+more complicated C<if>/C<then>/C<else> branch structures.  
+
+The control structures of high-level languages hew tightly to the semantics of
+those languages; Parrot provides the minimal feature set necessary to implement
+any semantic of an HLL without dictating how that HLL may implement its
+features.  Language agnosticism is an important design goal in Parrot, and
+creates a very flexible and powerful development environment for language
+developers.
 
 X<goto instruction (PIR)>
-The most basic branching instruction is the unconditional branch:
-C<goto>.
+The most basic branching instruction is the unconditional branch, C<goto>:
 
 =begin PIR
 
-  .sub _main
+  .sub 'main'
       goto L1
-      print "never printed"
+      say "never printed"
+
   L1:
-      print "after branch\n"
+      say "after branch"
       end
   .end
 
 =end PIR
 
-The first C<print> statement never runs because the C<goto> always
-skips over it to the label C<L1>.
+The first C<say> statement never runs because the C<goto> always skips over it
+to the label C<L1>.
 
 The conditional branches combine C<if> or C<unless> with C<goto>.
 
 =begin PIR
 
-  .sub _main
+  .sub 'main'
       $I0 = 42
       if $I0 goto L1
-      print "never printed"
-  L1: print "after branch\n"
+      say "never printed"
+  L1:
+      say "after branch"
       end
   .end
 
 =end PIR
 
-X<if (conditional);instruction (PIR)>
-X<unless (conditional);instruction (PIR)>
-In this example, the C<goto> branches to the label C<L1> only if the
-value stored in C<$I0> is true. The C<unless> statement is quite
-similar, but branches when the tested value is false. An undefined
-value, 0, or an empty string are all false values. Any other values
-are considered to be true values.
+X<if (conditional);instruction (PIR)> X<unless (conditional);instruction (PIR)>
+In this example, the C<goto> branches to the label C<L1> only if the value
+stored in C<$I0> is true. The C<unless> statement is similar, but it branches
+when the tested value is false. An undefined value, 0, or an empty string are
+all false values. Any other values are true.
 
 The comparison operators (C<E<lt>>, C<E<lt>=>, C<==>, C<!=>, C<E<gt>>,
 C<E<gt>=>) can combine with C<if ...  goto>. These branch when the
@@ -710,24 +588,24 @@
 
 =begin PIR
 
-  .sub _main
+  .sub 'main'
       $I0 = 42
       $I1 = 43
       if $I0 < $I1 goto L1
-      print "never printed"
+      say "never printed"
   L1:
-      print "after branch\n"
+      say "after branch"
       end
   .end
 
 =end PIR
 
-This example compares C<$I0> to C<$I1> and branches to the label C<L1>
-if C<$I0> is less than C<$I1>. The C<if $I0 E<lt> $I1 goto L1>
-statement translates directly to the PASM C<lt> branch operation.
+This example compares C<$I0> to C<$I1> and branches to the label C<L1> if
+C<$I0> is less than C<$I1>. The C<if $I0 E<lt> $I1 goto L1> statement
+translates directly to the C<lt> branch operation.
 
-The rest of the comparison operators are summarized in
-"PIR Instructions" in Chapter 11.
+Chapter 11's "PIR Instructions" section summarizes the other comparison
+operators.
 
 X<loops;PIR>
 X<PIR (Parrot intermediate representation);loop constructs>
@@ -736,7 +614,7 @@
 
 =begin PIR
 
-  .sub _main
+  .sub 'main'
       $I0 = 1               # product
       $I1 = 5               # counter
 
@@ -745,8 +623,7 @@
       dec $I1
       if $I1 > 0 goto REDO  # end of loop
 
-      print $I0
-      print "\n"
+      say $I0
       end
   .end
 

Modified: branches/pmc_pct/docs/book/ch08_dynops.pod
==============================================================================
--- branches/pmc_pct/docs/book/ch08_dynops.pod	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/docs/book/ch08_dynops.pod	Fri May  8 00:05:13 2009	(r38558)
@@ -5,7 +5,7 @@
 Z<CHP-12>
 
 The smallest executable component is not the compilation unit or even the
-subroutine, but is actually the opcode. Opcodes in Parrot, like opcodes in
+subroutine, but is actually the I<opcode>. Opcodes in Parrot, like opcodes in
 other machines (both virtual and physical), are individual instructions that
 implement low-level operations in the machine. In the world of
 microprocessors, the word "opcode" typically refers to the numeric identifier
@@ -13,31 +13,40 @@
 language is called the "mnemonic". An assembler, among other tasks, is
 responsible for converting mnemonics into opcodes for execution. In Parrot,
 instead of referring to an instruction by different names depending on what
-form it's in, we just call them all "opcodes". Of course the list of things
-that qualify as "low-level" in Parrot can be pretty advanced compared to the
-functionality supplied by regular assembly language opcodes.
+form it's in, we just call them all "opcodes".
 
 =head2 Opcodes
 
 Opcodes are the smallest logical execution element in Parrot. An
 individual opcode corresponds, in an abstract kind of way, with a single
 machine code instruction for a particular hardware processor
-architecture. The difference is that Parrot's opcodes can perform some
-very complex and high-level tasks that each may take many execution cycles
-for the average hardware processor. Also, Parrot's opcodes can be
-dynamically loaded in from a special library file called a I<dynop
-library>. We'll talk about dynops a little bit later.
+architecture. Parrot is a pretty high-level virtual machine, and even though
+its opcodes represent the smallest bits of executable code in Parrot, they
+are hardly small or low-level by themselves. In fact, some Parrot opcodes
+implement some complex operations and algorithms. Other opcodes are more
+traditional, performing basic arithmetic and data manipulating operations.
+
+Parrot comes with about 1,200 opcodes total in a basic install. It also has a
+facility for dynamically loading additional opcode libraries, called
+C<dynops>, as needed.
 
 =head3 Opcode naming
 
 To the PIR and PASM programmers, opcodes appear to be polymorphic. That
-is, some opcodes appear to have multiple argument formats. This is just an
-illusion, however. Parrot opcodes are not polymorphic, although certain
-features enable it to appear that way. Different argument list formats
-are detected during parsing and translated into separate, and unique,
-opcode names.
-
-=head3 Opcode Multiple Dispatch
+is, some opcodes appear to have multiple allowable argument formats. This is
+just an illusion, however. Parrot opcodes are not polymorphic, although
+certain features enable them to appear that way to the PIR programmer.
+Different argument list formats are detected during parsing and mapped to
+separate, unique opcode names.
+
+During the Parrot build process, opcode definitions called "ops files" are
+translated into C code prior to compilation. This translation process renames
+all ops to use unique names depending on their argument lists. An op "foo"
+that takes two PMCs and returns an integer would be renamed to C<foo_i_p_p>.
+Another op named "foo" that takes one floating point number and returns a
+string would be renamed to C<foo_s_n>. So, when we call the opcode "foo" from
+our PIR program, the PIR compiler will look at the list of arguments and
+call the appropriate opcode to handle it.
 
 =head2 Writing Opcodes
 
@@ -45,10 +54,10 @@
 later compiled into C code by the X<opcode compiler> opcode compiler. The
 opcode script represents a thin overlay on top of ordinary C code: All
 valid C code is valid opcode script. There are a few neat additions that
-make writing opcodes easier. This script is very similar to that used to
-define PMCs. The C<INTERP> constant, for instance, is always available
-in the opcodes like they are in VTABLE and METHOD declarations. Unlike
-VTABLEs and METHODs, opcodes are defined with the C<op> keyword.
+make writing opcodes easier. The C<INTERP> keyword, for instance, contains
+a reference to the current interpreter structure. C<INTERP> is always
+available when writing opcodes, even though it isn't defined anywhere.
+Opcodes are all defined with the C<op> keyword.
 
 Opcodes are written in files with the C<.ops> extension. The core
 operation files are stored in the C<src/ops/> directory.
@@ -68,7 +77,7 @@
 This opcode could be called like this:
 
   $I0 = Foo $N0     # in PIR syntax
-  Foo $I0, $N0      # in PASM syntax
+  Foo I0, N0        # in PASM syntax
 
 When Parrot parses through the file and sees the C<Foo> operation, it
 converts it to the real name C<Foo_i_n>. The real name of an opcode
@@ -92,8 +101,8 @@
 heavily overloaded, or for which there is no exact fit but the parameters
 could be coerced into different types to complete the operation. For
 instance, attempting to add a STRING to a PMC might coerce the string into
-a numerical type first, and then dispatch to the C<add_p_p_n> opcode. This
-is just an example, and the exact mechanisms may change as more opcodes
+a numerical PMC type first, and then dispatch to the C<add_p_p_n> opcode.
+This is just an example, and the exact mechanisms may change as more opcodes
 are added or old ones are deleted.
 
 Parameters can be one of the following types:
@@ -102,18 +111,33 @@
 
 =item * INT
 
+A normal integer type, such as one of the I registers
+
 =item * NUM
 
+A floating point number, like is used in the N registers
+
 =item * STR
 
+A string, such as in a S register
+
 =item * PMC
 
+A PMC value, like a P register
+
 =item * KEY
 
+A key value. Something like C<[5 ; "Foo" ; 6 ; "Bar"]>. These are the same
+as indexes that we use in PMC aggregates.
+
 =item * INTKEY
 
+A basic key value that uses only integer values C<[1 ; 2 ; 3 ]>.
+
 =item * LABEL
 
+A label value, which represents a named statement in PIR or PASM code.
+
 =back
 
 In addition to these types, you need to specify the direction that data is
@@ -123,12 +147,22 @@
 
 =item * in
 
+The parameter is an input, and should be initialized before calling the op.
+
 =item * out
 
+The parameter is an output
+
 =item * inout
 
+The parameter is an input and an output. It should be initialized before
+calling the op, and it's value will change after the op executes.
+
 =item * invar
 
+The parameter is a reference type like a String or PMC, and it's internals
+might change in the call.
+
 =back
 
 =head3 Opcode Control Flow
@@ -148,20 +182,19 @@
 
 =item * NEXT()
 
-If C<NEXT> contains the address of the next opcode in memory. You don't
-need to call C<goto NEXT()>, however, because the default behavior for
-all opcodes is to automatically jump to the next opcode in the program
-N<You can do this if you really want to, but it really wouldn't help you
-any>. The C<NEXT> keyword is frequently used in places like the C<invoke>
-opcode to create a continuation to the next opcode to return to after
-the subroutine returns.
+The keyword C<NEXT> contains the address of the next opcode in memory. At the
+end of a normal op you don't need to call C<goto NEXT()> because moving to the
+next opcode in the program is the default behavior of Parrot N<You can do
+this if you really want to, but it really wouldn't help you any>. The C<NEXT>
+keyword is frequently used in places like the C<invoke> opcode to create a
+continuation to the next opcode to return to after the subroutine returns.
 
 =item * ADDRESS()
 
 Jumps execution to the given address.
 
   ADDRESS(x);
-  
+
 Here, C<x> should be an C<opcode_t *> value of the opcode to jump to.
 
 =item * OFFSET()

Deleted: branches/pmc_pct/docs/pdds/draft/pdd30_install.pod
==============================================================================
--- branches/pmc_pct/docs/pdds/draft/pdd30_install.pod	Fri May  8 00:05:13 2009	(r38557)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,325 +0,0 @@
-# Copyright (C) 2008-2009, Parrot Foundation.
-# $Id$
-
-=head1 [DRAFT] PDD 30: Installation
-
-=head2 Abstract
-
-This PDD outlines Parrot's installation system and support. Parrot's core
-installation system will provide support for binary packages, a working C<make
-install> target, compiled installables, and FHS compliant search paths for the
-installables. This document also aims to solve the current problem of
-accessing installed source-only files, and to allow the optimization of config
-bootstrapping if a frozen config_hash is already linked.
-
-=head2 Version
-
-$Revision$
-
-=head2 Synopsis
-
-Parrot installation process (from the parrot source directory):
-
-  perl Configure.pl --prefix=/usr/lib
-  make
-  make test
-  make install
-
-
-Language installation process (from the language source directory):
-
-  make
-  make test
-  make install
-
-=head2 Description
-
-Parrot uses Filesystem Hierarchy Standard (FHS) compliant install directories
-by default. Each install location is configurable with options passed to the
-configure script.
-
-=over
-
-=item F</usr/bin/parrot>
-
-The main Parrot executable.
-
-=item F</usr/lib/parrot/<version>/library/>
-
-Parrot runtime libraries, corresponds to F<runtime/parrot/library/> in the
-repository.
-
-=item F</usr/lib/parrot/<version>/include/>
-
-Parrot runtime include files (not C include files), corresponds to
-F<runtime/parrot/include/> in the repository.
-
-=item F</usr/lib/parrot/<version>/dynext/>
-
-Parrot dynamic extension files (for C<loadlib>), corresponds to
-F<runtime/parrot/dynext/> in the repository.
-
-=item F</usr/lib/parrot/<version>/languages/>
-
-Parrot language modules, corresponds to F<languages/> in the repository.
-
-Languages are loaded with C<load_language 'abc'>, which loads either
-F<languages/abc/abc.pbc> in the build environment of a language in trunk, or
-F</usr/lib/parrot/languages/abc/abc.pbc> in an installed Parrot.
-
-On the commandline, a language is executed as:
-
-  $ abc hello.bc
-
-Where F<abc> is a symlink to the F<parrot> executable. On platforms that don't
-have symlinks, F<abc> may be a copy of the F<parrot> executable. On general
-principles, languages should not install themselves with the same name as
-their "real" counterpart, but should provide a build option to do so (so, the
-default installed executable for Python on Parrot should be F<pynie> or
-F<parrot-python> but not F<python>).
-
-=item F</usr/lib/parrot/<version>/languages/*>
-
-The languages directories may have subdirectories, including F<library> for
-their own set of libraries, and F<dynpmc> for dynamic pmcs.
-
-It is recommended that languages follow a standard pattern in installing their
-libraries so a bytecode compiled version of a module in the C<mylang> HLL
-named C<['Foo';'Bar']> is stored in
-F<usr/lib/parrot/<version>/languages/<mylang>/library/Foo/Bar.pbc>
-
-=item F</usr/lib/parrot/<version>/tools/>
-
-Parrot tools that don't belong in the bin/ directory and don't belong in the
-runtime, corresponds to F<tools/dev/> and/or F<tools/build> in the repository.
-
-=item F</usr/share/doc/parrot/<version/>
-
-Parrot documentation files, generally raw Pod, but possibly also formatted
-HTML. May have subdirectories F<pod/>, F<html/>, etc.
-
-=back
-
-Bootstrapping the configuration hash should not read a config file when the
-hash is already contained in the pmc or executable. {{ See RT #57418 [TODO]
-optimize _config to omit .include "library/config.pir" on installables. }}
-The same problem is for every C<.include>, C<loadlib> and C<load_bytecode>
-statement in installed files where the target is not installed. If in doubt
-install the missing library by patching the installation code.
-
-Test executables are binary different to installable executables because of
-this embedded configuration hash. Test executables contain configuration
-hash with the prefix to the build directory, installables to the given
-prefix from Configure.pl.  The executables that are tested should always be
-the same as the ones that are installed. Otherwise, subtle bugs can leak
-into the installed executables which can never be caught by the tests.
-
-There are's also a long-standing conflict in building Parrot with an already
-installed shared libparrot.so. See RT #39742.
-For win32 this was solved to put the dll into build_dir, for
-compilers withour rpath support this is still a problem.
-
-=head2 Dependencies
-
-Building core Parrot depends on Perl (including perldoc, which may be a
-separate package), libgdm and libreadline.
-
-Building a language depends on a series of Parrot build tools, installed in
-F</usr/lib/parrot/<version/tools>. These tools will generally not be included
-in the default C<parrot> package on most systems, languages will require a
-C<parrot-dev> package to be installed before they can be built.
-
-=head2 Definitions
-
-The B<build_dir> is the full path where Parrot was built. It is defined
-in the configuration hash. When building from source the C<build_dir> is also
-the C<PARROT_RUNTIME> prefix.
-
-An B<installable> is a bytecode or executable file which must not access the
-build_dir paths. The build_dir path is not available in a binary
-package. This is solved by generating and linking a special
-F<install_config.fpmc>. Custom Python modules have a similar packaging
-problem, which they haven't solved yet.
-
-The B<destination directory> is the path of the installed Parrot tree after
-the prefix (F</usr>, F</usr/local>, or some other platform-specific or
-custom location). Creating a virtual installation path like this simplifies
-packaging by installing into a separate install tree and creating a tarball
-from that tree.
-
-The B<configuration hash> is the return value of the global function
-C<_config()>, generated in F<config_lib.pasm>, and either defined in
-F<library/config.pir>, or as frozen PMC embedded in the test executable
-(F<config.fpmc>), the installable executable (F<install_config.fpmc>) or empty
-for miniparrot (F<null_config.fpmc>).
-
-=head3 make install
-
-The Parrot build system is currently optimized for building and testing in
-the build directory, but not for building with an already installed
-Parrot. This is complicated by some simple build system bugs. It is also not
-optimized to build and test installables, which should not access libraries
-in the build directory, but in the destination directory.
-
-The short-term goal of this document is to make installation work for
-Parrot, its libraries and tools, and its languages so that packagers can
-provide binary packages for parrot and its languages.
-
-The longer-term goal is a framework so that external libraries and languages
-not within the current parrot source tree can also be properly built, tested
-and installed.
-
-We do not only support GNU make or Win32 nmake but also other platform make
-variants, so we generate the Makefile at first from a generic template.
-
-Currently for Parrot and its libraries the install actions are defined in the
-main Makefile. For the languages the install actions are defined in the
-language's Makefile. {{ See an implementation of this in
-#56554-make-install-lang.patch.}}
-
-One general comment: We need to be careful not to install bytecode
-files in the same directories as executables. The C includes and the PIR
-includes also need to be separate.
-
-C<make install> currently does not work with an already installed shared
-libparrot.so on some platforms. {{See a patch for this in RT #39742.}}
-
-=over 4
-
-=item * bin_dir: Copy installables to the destination directory's F<bin>
-directory as F<parrot-mylanguage>.
-
-=item * script_dir: Optionally copy the main language file F<mylanguage.pbc>
-to the destination directory's F<script> directory. (F</usr/lib/parrot/bin/>
-?)
-
-=item * dynext: Copy shared libraries (groups and ops) to the destination
-directory's F<lib> directory under F</parrot/dynext/>.
-
-The subdirs are currently needed for C<forth> and C<WMLScript>, the other
-language pbc's are F<php_*.pbc>, F<pipplib.pbc> and F<tcllib.pbc>.
-
-=item * lib_dir: Optionally copy include PASM and PIR files to the
-destination directory's F<lib> directory under F<parrot/include/> I<(not
-yet)>.
-
-=item * doc_dir: Copy documentation files to a
-F<$doc_dir/languages/mylanguage/> subdirectory tree.
-
-=item * man_dir: Generate man(1) pages and copy to destination directory's
-F<$man_dir/man1/> directory. {{ what about man(2) and man(3) pages? info_dir
-ditto }}
-
-=item * html_dir: Optionally generate HTML and copy to destination
-directory's F<html> directory, possibly under a language specific
-subdirectory. This should be selectable by a C<Configure> or C<make install>
-option.
-
-=back
-
-=head3 Configuration bootstrapping
-
-Bootstrapping the configuration hash should not read a config file when the
-hash is already contained in the PMC or executable.  C<.include
-"library/config.pir"> and C<load_bytecode "config.pbc"> should be omitted on
-installables if possible.
-
-{{NOTE: We need to step back and take a broader view here. Why is
-F<library/config.pir> currently included in the installables? It sounds like
-a hack to work around earlier limitations in the build system. This is an
-ideal opportunity to eliminate the hack. -allison}}
-
-=head3 Accessing not-installed files
-
-B<Makefile and MANIFEST cleanup>
-
-B<Problem:> Various PIR files load source-only PIR, PASM or compiler
-bytecode files, which are not installed in binary packages.  This shows up
-when trying to run an installable with the build directory removed or
-renamed.
-
- $ parrot-forth.exe xx
- "load_bytecode" couldn't find file 'languages/forth/tokenstream.pbc'
- current instr.: ' init' pc 942 (forth.pir:9)
- called from Sub 'main' pc 994 (forth.pir:40)
-
- $ parrot-pheme.exe
- "load_bytecode" couldn't find file 'compilers/tge/TGE/Rule.pbc'
- current instr.: 'parrot;TGE;__onload' pc 19 (TGE.pir:94)
- called from Sub 'parrot;Pheme::AST::Grammar;__onload' pc 7175
-    (languages/pheme/lib/ASTGrammar.pir:5)
- called from Sub 'parrot;Pheme::Compiler;main' pc -1 ((unknown file):-1)
-
- $ parrot-pipp
- Parrot VM: Can't stat
-    /usr/src/perl/parrot/parrot-0.7.0-1/
-         build/languages/pipp/src/common/pipplib.pbc, code 2.
- Unable to append PBC to the current directory
- current instr.: 'parrot;Pipp;__onload' pc 47 (src/common/pipp.pir:92)
- called from Sub 'parrot;Pipp;pipp' pc -1 ((unknown file):-1)
-
-B<Fix 1>: Install all deps and make sure that every HLL is installed at 
-F<lib_dir/parrot/version/languages>. See also L<pdd31_hll_interop.pod>
-
-{{NOTE: This may be a sign that we need to rethink our language build
-strategy. Trying to glom everything into a single C executable is less than
-ideal. Especially since it causes problems for language interoperability if
-every language is running off its own independent executable. -allison}}
-
-The simple Forth and Pipp problem could be solved by merging the missing
-bytecode files to a single file F<forth.pbc> and generate from this the
-installable.
-
-The simple Pheme problem could be solved by installing also all TGE and
-other compiler bytecode files at the F<parrot/library/compilers> path. Since
-TGE is not used elsewhere anymore, Pheme should be fixed to get rid of
-this. {{NOTE: commonly used libraries should be installed
-somewhere. -allison}}
-
-The same problem is for every C<.include>, C<loadlib> and C<load_bytecode>
-statement in installed files where the target is not installed.
-
-B<Fix 2>: Module system.
-
-Avoid already loaded pbc files.
-
-Source loading PIR statements like C<loadlib> and C<load_bytecode> should
-cache the file name and skip the file if it has already been loaded (as in
-perl5)
-
-B<Fix 3>: pbc_merge fixups
-
-pbc_merge could patch up the bytecode (if possible) to omit loading
-load_bytecode pbc-files which are being merged, but hacking bytecode during
-pbc_merge is not desirable.
-
-=head2 Implementation
-
-A new language is generated by F<tools/dev/mk_language_shell.pl>
-
-The makefiles are generated from a F<config/makefiles/root.in> template,
-which can make use of conditional platform and config logic, the forward
-slashes are automatically converted to backslashes for MSWin32 and C<\n> is
-converted to C<\r\n> for MSWin32 nmake. See L<Parrot::Configure::Compiler>.
-
-A new F<lib/Parrot/Install.pm> or F<Parrot/Install.pir> library should
-provide the same support as described above and simplify the Makefile and
-installation maintenance. The entry point could be a Makefile.pl or
-Makefile.pir then.
-
-=head2 Attachments
-
-None.
-
-=head2 Footnotes
-
-None.
-
-=head2 References
-
-=cut
-
-__END__
-Local Variables:
- fill-column:78
-End:

Copied: branches/pmc_pct/docs/pdds/pdd30_install.pod (from r38556, trunk/docs/pdds/pdd30_install.pod)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/pmc_pct/docs/pdds/pdd30_install.pod	Fri May  8 00:05:13 2009	(r38558, copy of r38556, trunk/docs/pdds/pdd30_install.pod)
@@ -0,0 +1,164 @@
+# Copyright (C) 2008-2009, Parrot Foundation.
+# $Id$
+
+=head1 PDD 30: Installation
+
+=head2 Abstract
+
+This PDD outlines Parrot's installation system and support. Parrot's core
+installation system will provide support for binary packages, a working C<make
+install> target, compiled installables, and FHS compliant search paths for the
+installables.
+
+=head2 Version
+
+$Revision$
+
+=head2 Synopsis
+
+Parrot installation process (from the parrot source directory):
+
+  perl Configure.pl --prefix=/usr
+  make
+  make test
+  make install
+
+
+Language installation process (from the language source directory):
+
+  perl Configure.pl --parrot-config=/path/to/parrot_config
+  make
+  make test
+  make install
+
+=head2 Description
+
+Parrot uses Filesystem Hierarchy Standard (FHS) compliant install directories
+by default. Each install location is configurable with options passed to the
+configure script.
+
+=over
+
+=item F</usr/bin/parrot>
+
+The main Parrot executable.
+
+=item F</usr/lib/parrot/E<lt>versionE<gt>/library/>
+
+Parrot runtime libraries, corresponds to F<runtime/parrot/library/> in the
+repository.
+
+=item F</usr/lib/parrot/E<lt>versionE<gt>/include/>
+
+Parrot runtime include files (not C include files), corresponds to
+F<runtime/parrot/include/> in the repository.
+
+=item F</usr/lib/parrot/E<lt>versionE<gt>/dynext/>
+
+Parrot dynamic extension files (for C<loadlib>), corresponds to
+F<runtime/parrot/dynext/> in the repository.
+
+=item F</usr/lib/parrot/E<lt>versionE<gt>/languages/>
+
+Parrot language modules. Languages are loaded with C<load_language
+'abc'>, which loads F</usr/lib/parrot/languages/abc/abc.pbc> in an
+installed Parrot.
+
+On the commandline, a language is executed as:
+
+  $ abc hello.bc
+
+Where F<abc> is a symlink to the F<parrot> executable. On platforms that don't
+have symlinks, F<abc> may be a copy of the F<parrot> executable. On general
+principles, languages should not install themselves with the same name as
+their "real" counterpart, but should provide a build option to do so (so, the
+default installed executable for Python on Parrot should be F<pynie> or
+F<parrot-python> but not F<python>).
+
+=item F</usr/lib/parrot/E<lt>versionE<gt>/languages/*>
+
+The languages directories may have subdirectories, including F<library> for
+their own set of libraries, and F<dynext> for dynamic pmcs and ops, and
+F<include> for PIR or PASM includes.
+
+It is recommended that languages follow a standard pattern in installing their
+libraries so a bytecode compiled version of a module in the C<mylang> HLL
+named C<['Foo';'Bar']> is stored in
+F<usr/lib/parrot/E<lt>versionE<gt>/languages/E<lt>mylangE<gt>/library/Foo/Bar.pbc>
+
+=item F</usr/lib/parrot/E<lt>versionE<gt>/tools/>
+
+Parrot tools that don't belong in the bin/ directory and don't belong in the
+runtime, corresponds to F<tools/dev/> and/or F<tools/build> in the
+repository. Perl modules used by the tools are installed in
+F</usr/lib/parrot/E<lt>versionE<gt>/tools/lib/>.
+
+=item F</usr/share/doc/parrot/E<lt>versionE<gt>/>
+
+Parrot documentation files, generally raw Pod, but possibly also
+formatted HTML. Has subdirectories for each format of documentation:
+F<pod/>, F<html/>, etc.
+
+=back
+
+=head2 Dependencies
+
+Building core Parrot depends on Perl (including perldoc, which may be a
+separate package), libgdm and libreadline.
+
+Building a language depends on a series of Parrot build tools, installed in
+F</usr/lib/parrot/E<lt>version/tools>. These tools will generally not be
+included in the default C<parrot> package on most systems, languages will
+require a C<parrot-dev> package to be installed before they can be built.
+
+=head2 Definitions
+
+The B<build_dir> is the full path where Parrot was built. It is defined
+in the configuration hash. When building from source the C<build_dir> is also
+the C<PARROT_RUNTIME> prefix.
+
+An B<installable> is a bytecode or executable file which must not access the
+build_dir paths. The build_dir path is not available in a binary
+package. This is solved by generating and linking a special
+F<install_config.fpmc>.
+
+The B<destination directory> is the path of the installed Parrot tree after
+the prefix (F</usr>, F</usr/local>, or some other platform-specific or
+custom location). Creating a virtual installation path like this simplifies
+packaging by installing into a separate install tree and creating a tarball
+from that tree.
+
+The B<configuration hash> is the return value of the global function
+C<_config()>, generated in F<config_lib.pasm>, and either defined in
+F<library/config.pir>, or as frozen PMC embedded in the test executable
+(F<config.fpmc>), the installable executable (F<install_config.fpmc>) or empty
+for miniparrot (F<null_config.fpmc>).
+
+=head2 Implementation
+
+A new language is generated by F<tools/dev/mk_language_shell.pl>
+
+The makefiles are generated from a makefile template, which can use
+conditional platform and config logic. The forward slashes are
+automatically converted to backslashes for MSWin32 and C<\n> is
+converted to C<\r\n> for MSWin32 nmake. See
+L<Parrot::Configure::Compiler>.
+
+=head2 Attachments
+
+None.
+
+=head2 Footnotes
+
+None.
+
+=head2 References
+
+None.
+
+=cut
+
+__END__
+Local Variables:
+ fill-column:78
+End:

Modified: branches/pmc_pct/docs/pmc.pod
==============================================================================
--- branches/pmc_pct/docs/pmc.pod	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/docs/pmc.pod	Fri May  8 00:05:13 2009	(r38558)
@@ -1,103 +1,130 @@
-=head1 TITLE
+=head1 Title
 
 docs/pmc.pod - PMC (PMC Makers Compendium)
 
 =head1 PMC Structure Items Access
 
-Don't use PMC structure items directly, always use the macros, which are
-defined in F<include/parrot/pobj.h>.
+Ideally, there should be minimal direct access to a PMC's internals.  In order
+to enforce encapsulation, most interaction with a PMC should be performed
+through VTABLE function calls, which allow code to remain robust as PMC
+internals are changed.  
+
+When it is not possible or practical to use VTABLE functions (for instance when
+implementing PMC internals), ATTRs should be used.  ATTRs are declared after
+the C<pmclass> line in a .pmc file.  For a given pmc ("Foo"), an ATTR ("bar")
+can be accessed either directly: C<< PARROT_FOO(pmc)->bar >> or via a
+SETATTR/GETATTR accessor macro: C<GETATTR_Foo_bar(INTERP, x)>.  Note that
+inside a PMC's source file, these can be shortened to C<GET_ATTR_bar(INTERP, x)>.
 
 =head1 PMC Storage
 
-The PMC structure contains two places of data storage: the B<union UnionVal>
-and the B<PMC_data> pointer.
+PMCs can store data in two places.  8 bits can be stored in the PMC's flags.
+These are accessed via PObj_private0_FLAG, PObj_private1_FLAG, etc, although
+these flags should be #define'd on a per-PMC basis to have more meaningful
+names.  If a PMC needs more than 8 bits of storage, it should declare ATTRs of
+the appropriate type.  Storage for ATTRs hangs off of C<PMC_data()>.  See
+src/pmc/exporter.pmc for example code that does this.
+
+The PMC UnionVal is an obsolete storage area which was previously used to
+provide a limited amount of storage.  The use of this storage encouraged poor
+encapsulation and hidden dependencies between PMCs.  Any new code should not
+use the UnionVal, which will eventually be removed from Parrot.
+
+=head2 PMC_EXT
+
+C<PMC_EXT> is a member of the PMC struct which contains two currently used
+pointers.  PMCs which need C<PMC_EXT> should have C<need_ext> in their
+C<pmclass> declaration.  A PMC should declare C<need_ext> for either of the
+reasons listed below.
 
-=head2 Storage memory washing
+Note that the C<_synchronize> member of the C<PMC_EXT> struct is obsolete and
+due to be removed.
 
-During PMC recycling the B<UnionVal> data members are B<not> cleared.
-B<PMC_data> or B<pmc_ext> is set to NULL. The flags are set to their default
-value, especially the private flags are 0.
-
-=head2 PMC_data()
-
-If your PMC contains other PMCs that possibly would allow the creation of
-self-referential or arbitrary deeply nested containers, you have to allocate
-the B<PMC_EXT> structure by specifying the B<need_ext> flag on the B<pmclass>
-definition line. The B<PMC_data()> pointer is currently located in the
-B<PMC_EXT> structure too. Using B<PMC_data()> therefore adds one more
-indirection to access these data.
+=over 4
+
+=item * The PMC needs metadata.
+
+The C<_metadata> member of C<PMC_EXT> is used to store attributes.  If your PMC
+will use attributes (not to be confused with ATTRs), your PMC should declare
+C<need_ext>.  Note that if code attempts to add an attribute to a PMC which
+doesn't have a C<PMC_EXT>, a C<PMC_EXT> with the appropriate C<_metadata> will
+be added dynamically.  In this case, C<need_ext> is a way of telling Parrot to
+take care of this when the PMC is initialized.
+
+=item * The PMC is an aggregate which holds GCable objects.
+
+If the PMC is an aggregate which can contain other GCable object, it needs to
+declare C<need_ext>.  GCable objects include other PMCs and Parrot STRINGs.
+Unlike attribute metadata, all PMCs which contain GCable objects need to
+declare C<need_ext>.
+
+=back
+
+=head2 ATTRs and C<PMC_data()>
+
+If your PMC needs to store more data than will fit into the 8 bits of the PMC
+flags, it should declare ATTRs of the appropriate type.  The pmc2c code will
+generate a struct containing all ATTRs, including those inherited via
+C<extends> declarations.  This struct will be named in the form
+C<Parrot_x_attributes>, where C<x> is the name of your PMC, e.g.
+C<Parrot_FixedIntegerArray_attributes>.  When creating a PMC that has one or
+more ATTRs, the C<Parrot_x_attributes> struct must be allocated and assigned to
+C<PMC_data> in the PMC's C<init()> and C<init_pmc()> VTABLE functions (if used)
+and it must be destroyed in the C<destroy()> VTABLE function.  PMCs with ATTRs
+also need to indicate that they need active destruction by calling
+C<PObj_active_destroy_SET()> or C<PObj_custom_mark_destroy_SETALL()>.
+
+If your PMC only needs to store a single pointer, it can use C<PMC_data> directly.
+Note that this may make maintaining your PMC difficult, should more data ever
+need to be stored.
 
 =head1 PMC flags
 
-Each PMC has 8 private flags B<PObj_private0_FLAG> -  B<PObj_private7_FLAG>,
-which can be used for storing 8 bits.
+Each PMC has 8 private flags named B<PObj_private0_FLAG> through
+B<PObj_private7_FLAG>.  These may be used for storing 8 bits of PMC-specific
+information.  See C<include/parrot/key.h> and C<src/pmc/key.pmc> for examples.
 
 =head1 PMCs and GC
 
-=head2 Overview
-
 The GC system doesn't make any assumptions about your PMC's layout. Whenever a
 PMC is found in the root set, B<pobject_lives()> is called with that PMC.  The
 PMC is responsible to mark all contained or referenced active Parrot objects
-(Buffers or other PMCs).
+(Buffers, STRINGs or other PMCs) when its C<mark()> VTABLE function is called.
 
-=head2 GC related flags
-
-=over 4
-
-=item PObj_is_buffer_ptr_FLAG
+=head2 PMCs and System Resources
 
-B<PMC_data> points to a B<PObj> object.  This PMC gets marked
-automatically.
+Whenever a PMC B<malloc()>s memory or opens a file or a database connection, it
+has to take care of freeing or closing these resources.  This is done by
+implementing the appropriate VTABLE functions (C<mark()> and C<destroy()>) and
+setting the appropriate PObj flags.  The commonly used flags are described
+below.
 
-=item PObj_is_buffer_of_PMCs_ptr_FLAG
+=head2 GC related flags
 
-B<PMC_data> points to a buffer holding an array of B<PObj*>s.
+=over 4
 
 =item PObj_custom_mark_FLAG
 
-If your PMC refers to any Parrot objects and above standard flags don't cover
-this usage, a custom B<mark> vtable has to be implemented, which has to call
-B<pobject_lives()> for all contained B<PObj>s.
-
-=back
-
-=head1 PMCs and System Resources
-
-Whenever a PMC B<malloc()>s system memory or opens a file or a database
-connection, it has to take care of freeing or closing these system resources.
-
-=head2 Flags for PMC destruction
-
-=over 4
+If your PMC contains any other B<PObj>s (STRINGs, PMCs, etc), your PMC must
+implement the B<mark()> VTABLE function and set this flag.  The B<mark()>
+VTABLE function must call B<pobject_lives()> on all B<PObj>s which your PMC
+contains.
 
 =item PObj_active_destroy_FLAG
 
-The PMC's B<destroy> vtable is called, when this PMC is found to be dead during
-GC.
+If your PMC allocates any memory or opens any resources during its lifetime, it
+must set B<PObj_active_destroy> and implement the B<destroy()> VTABLE function to
+free those resources.
 
 =item PObj_needs_early_gc_FLAG
 
-Set this flag too, if the PMC needs timely destruction, e.g. to close a file
-handle at the end of a block scope, if the PMC isn't alive any more.
+Set this flag if your PMC needs timely destruction, e.g. to close a file handle
+at the end of a block scope if the PMC isn't alive any more.
 
 =back
 
-=head1 SEE ALSO
+=head1 See also
 
 F<include/parrot/pobj.h>, F<src/gc/api.c>, F<docs/pdds/pdd02_vtables.pod>
 
-=head1 AUTHOR
-
-Leopold Toetsch C<lt at toetsch.at>
-
-=head1 VERSION
-
-=over 4
-
-=item 0.1
-
-2004.06.14 - Initial
-
-=back
 

Modified: branches/pmc_pct/docs/pmc/subs.pod
==============================================================================
--- branches/pmc_pct/docs/pmc/subs.pod	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/docs/pmc/subs.pod	Fri May  8 00:05:13 2009	(r38558)
@@ -68,9 +68,9 @@
 the C<:anon> pragma is included, they are stored in the constant table
 associated with the bytecode and can be fetched with the B<get_hll_global> and
 B<get_root_global> opcodes.  Within the PIR source, they can also be put in
-registers with a C<.const .Sub> declaration:
+registers with a C<.const 'Sub'> declaration:
 
-    .const .Sub rsub = 'random_sub'
+    .const 'Sub' rsub = 'random_sub'
 
 This uses C<find_sub_not_null> under the hood to look up the sub named
 "random_sub".

Modified: branches/pmc_pct/docs/project/release_manager_guide.pod
==============================================================================
--- branches/pmc_pct/docs/project/release_manager_guide.pod	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/docs/project/release_manager_guide.pod	Fri May  8 00:05:13 2009	(r38558)
@@ -164,6 +164,10 @@
  $ make world docs html 2>&1 | tee make_world_docs_html.log
  $ make fulltest        2>&1 | tee make_fulltest.log
 
+Verify that the version is correct and doesn't contain the suffix C<devel>:
+
+ $ ./parrot -V
+
 =item 7.
 
 Tag the release as "RELEASE_a_b_c", where a.b.c is the version number.
@@ -225,6 +229,8 @@
 
 =item a
 
+At this step, the "editor" privilege is needed, "poster" is not enough.
+
 Add a new page for the release announcement with "Create content" -> "Story".
 There's some additional stuff needed at the top of the page; use one of the
 old announcements as a guide.
@@ -252,6 +258,8 @@
 
 =item e
 
+At this step, the "admin" privilege is needed.
+
 Under "Administer" -> "Site building" -> "URL Redirects", change the URL for
 "release/current" to the FTP directory for the new release (for example,
 F<ftp://ftp.parrot.org/pub/parrot/releases/devel/0.8.1>). Also update
@@ -316,7 +324,9 @@
 =item 13.
 
 Add the version to Trac so new bug reports can be filed against your
-buggy code. L<https://trac.parrot.org/parrot/admin/ticket/versions>
+buggy code. L<https://trac.parrot.org/parrot/admin/ticket/versions>.
+
+Make the latest released version the default version for new reports.
 
 Remove any sufficiently old versions listed there.
 

Modified: branches/pmc_pct/editor/skeleton.pir
==============================================================================
--- branches/pmc_pct/editor/skeleton.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/editor/skeleton.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 
 .sub main :main

Modified: branches/pmc_pct/examples/benchmarks/float4.pir
==============================================================================
--- branches/pmc_pct/examples/benchmarks/float4.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/benchmarks/float4.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2008-2009, Parrot Foundation.
 # $Id$
 
 =head1 TITLE

Modified: branches/pmc_pct/examples/benchmarks/oo1.pasm
==============================================================================
--- branches/pmc_pct/examples/benchmarks/oo1.pasm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/benchmarks/oo1.pasm	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 # all timings Athlon 800, gcc 2.95.2

Modified: branches/pmc_pct/examples/benchmarks/oo2.pasm
==============================================================================
--- branches/pmc_pct/examples/benchmarks/oo2.pasm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/benchmarks/oo2.pasm	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 # all timings Athlon 800, gcc 2.95.2

Modified: branches/pmc_pct/examples/benchmarks/oo3.pasm
==============================================================================
--- branches/pmc_pct/examples/benchmarks/oo3.pasm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/benchmarks/oo3.pasm	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 .namespace [ "Foo" ]

Modified: branches/pmc_pct/examples/benchmarks/oo4.pasm
==============================================================================
--- branches/pmc_pct/examples/benchmarks/oo4.pasm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/benchmarks/oo4.pasm	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 .namespace [ "Foo" ]

Modified: branches/pmc_pct/examples/benchmarks/oo5.pir
==============================================================================
--- branches/pmc_pct/examples/benchmarks/oo5.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/benchmarks/oo5.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 .sub bench :main

Modified: branches/pmc_pct/examples/benchmarks/oo6.pir
==============================================================================
--- branches/pmc_pct/examples/benchmarks/oo6.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/benchmarks/oo6.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 .sub bench :main

Modified: branches/pmc_pct/examples/benchmarks/oofib.pir
==============================================================================
--- branches/pmc_pct/examples/benchmarks/oofib.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/benchmarks/oofib.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 .sub bench :main

Modified: branches/pmc_pct/examples/benchmarks/overload.pir
==============================================================================
--- branches/pmc_pct/examples/benchmarks/overload.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/benchmarks/overload.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 .sub bench :main

Modified: branches/pmc_pct/examples/benchmarks/vpm.pir
==============================================================================
--- branches/pmc_pct/examples/benchmarks/vpm.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/benchmarks/vpm.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 # beginn

Modified: branches/pmc_pct/examples/japh/japh1.pasm
==============================================================================
--- branches/pmc_pct/examples/japh/japh1.pasm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/japh/japh1.pasm	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 	newclass P0, "Japh"

Modified: branches/pmc_pct/examples/japh/japh3.pasm
==============================================================================
--- branches/pmc_pct/examples/japh/japh3.pasm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/japh/japh3.pasm	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 # the substr JaPH

Modified: branches/pmc_pct/examples/japh/japh4.pasm
==============================================================================
--- branches/pmc_pct/examples/japh/japh4.pasm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/japh/japh4.pasm	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 newclass P1, "Japh"

Modified: branches/pmc_pct/examples/japh/japh5.pasm
==============================================================================
--- branches/pmc_pct/examples/japh/japh5.pasm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/japh/japh5.pasm	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 # JaPH utilizing an object

Modified: branches/pmc_pct/examples/languages/abc/abc.pir
==============================================================================
--- branches/pmc_pct/examples/languages/abc/abc.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/languages/abc/abc.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 
 =head1 TITLE

Modified: branches/pmc_pct/examples/languages/abc/src/builtins/all.pir
==============================================================================
--- branches/pmc_pct/examples/languages/abc/src/builtins/all.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/languages/abc/src/builtins/all.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 
 =head1

Modified: branches/pmc_pct/examples/library/md5sum.pir
==============================================================================
--- branches/pmc_pct/examples/library/md5sum.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/library/md5sum.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 
 =head1 NAME

Modified: branches/pmc_pct/examples/namespace/namespace_dump.pir
==============================================================================
--- branches/pmc_pct/examples/namespace/namespace_dump.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/namespace/namespace_dump.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 
 #

Modified: branches/pmc_pct/examples/nci/sdl_blue_rectangle.pir
==============================================================================
--- branches/pmc_pct/examples/nci/sdl_blue_rectangle.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/nci/sdl_blue_rectangle.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 .sub _main :main

Modified: branches/pmc_pct/examples/nci/xlibtest.p6
==============================================================================
--- branches/pmc_pct/examples/nci/xlibtest.p6	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/nci/xlibtest.p6	Fri May  8 00:05:13 2009	(r38558)
@@ -24,6 +24,15 @@
 
 use Xlib;
 
+# Event types
+constant KeyPress      =  2;
+constant ButtonPress   =  4;
+constant ButtonRelease =  5;
+constant MotionNotify  =  6;
+constant Expose        = 12;
+constant DestroyNotify = 17;
+constant ClientMessage = 33;
+
 say 'Hello';
 
 say 'Display: ', Xlib::DisplayName();
@@ -55,65 +64,69 @@
 my @listline;
 my @line;
 
-while ($type != 17) {
+while $type != DestroyNotify {
     $display.NextEvent($event);
     $type = $event.type();
-    if ($type == 4) {
-        my $x = $event.x();
-        my $y = $event.y();
-        $window.DrawPoint($x, $y);
-        $lastx = $x;
-        $lasty = $y;
-        $pressed = 1;
-    }
-    if ($type == 5) {
-        my @newline = @line;
-        @listline.push(\@newline);
-        @line = ();
-        $pressed = 0;
-    }
-    if ($type == 6 && $pressed) {
-        my $x = $event.x();
-        my $y = $event.y();
-        if (($x != $lastx) || ($y != $lasty)) {
-            $window.DrawLine($lastx, $lasty, $x, $y);
+    given $type {
+        when ButtonPress {
+            my $x = $event.x();
+            my $y = $event.y();
+            $window.DrawPoint($x, $y);
             $lastx = $x;
             $lasty = $y;
-            @line.push($x, $y);
+            $pressed = 1;
         }
-    }
-    if ($type == 12) {
-        #say 'Exposed. Lines: ', + at listline;
-        for @listline -> $l {
-            #say 'Points ', $l.elems;
-            if ($l.elems  > 0) {
-                my $lx = $l[0];
-                my $ly = $l[1]; 
-                #say $lx, ' ', $ly;
-                $window.DrawPoint($lx, $ly);
-
-                loop (my $i = 2; $i < $l.elems ; $i += 2) {
-                    my $x = $l[$i];
-                    my $y = $l[$i+1]; 
-                    $window.DrawLine($lx, $ly, $x, $y);
-                    $lx = $x;
-                    $ly = $y;
+        when ButtonRelease {
+            my @newline = @line;
+            @listline.push(\@newline);
+            @line = ();
+            $pressed = 0;
+        }
+        when MotionNotify {
+            if $pressed {
+                my $x = $event.x();
+                my $y = $event.y();
+                if $x != $lastx || $y != $lasty {
+                    $window.DrawLine($lastx, $lasty, $x, $y);
+                    $lastx = $x;
+                    $lasty = $y;
+                    @line.push($x, $y);
+                }
+            }
+        }
+        when Expose {
+            #say 'Exposed. Lines: ', + at listline;
+            for @listline -> $l {
+                #say 'Points ', $l.elems;
+                if $l.elems  > 0 {
+                    my $lx = $l[0];
+                    my $ly = $l[1]; 
                     #say $lx, ' ', $ly;
+                    $window.DrawPoint($lx, $ly);
+
+                    loop (my $i = 2; $i < $l.elems ; $i += 2) {
+                        my $x = $l[$i];
+                        my $y = $l[$i+1];
+                        $window.DrawLine($lx, $ly, $x, $y);
+                        $lx = $x;
+                        $ly = $y;
+                        #say $lx, ' ', $ly;
+                    }
                 }
             }
         }
-    }
-    if ($type == 2) {
-        my $code = $event.keycode();
-        if ($code == $code_escape) {
+        when KeyPress {
+            my $code = $event.keycode();
+            if ($code == $code_escape) {
+                $window.Unmap();
+                $window.Destroy();
+            }
+        }
+        when ClientMessage {
             $window.Unmap();
             $window.Destroy();
         }
     }
-    if ($type == 33) {
-        $window.Unmap();
-        $window.Destroy();
-    }
 }
 
 $display.Close();

Modified: branches/pmc_pct/examples/opengl/shapes.pir
==============================================================================
--- branches/pmc_pct/examples/opengl/shapes.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/opengl/shapes.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2008-2009, Parrot Foundation.
 # $Id$
 
 =head1 TITLE

Modified: branches/pmc_pct/examples/opengl/static-triangle.pir
==============================================================================
--- branches/pmc_pct/examples/opengl/static-triangle.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/opengl/static-triangle.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2006-2008, Parrot Foundation.
 # $Id$
 
 =head1 TITLE

Modified: branches/pmc_pct/examples/opengl/triangle.pir
==============================================================================
--- branches/pmc_pct/examples/opengl/triangle.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/opengl/triangle.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2008-2009, Parrot Foundation.
 # $Id$
 
 =head1 TITLE

Modified: branches/pmc_pct/examples/pasm/hello.pasm
==============================================================================
--- branches/pmc_pct/examples/pasm/hello.pasm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/pasm/hello.pasm	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 
 =head1 NAME

Modified: branches/pmc_pct/examples/past/four_plus_one.pir
==============================================================================
--- branches/pmc_pct/examples/past/four_plus_one.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/past/four_plus_one.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 # Set up a PAST data structure that represents a sub and run it.

Modified: branches/pmc_pct/examples/pir/befunge/befunge.pir
==============================================================================
--- branches/pmc_pct/examples/pir/befunge/befunge.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/pir/befunge/befunge.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2002-2009, Parrot Foundation.
 # $Id$
 
 .include "debug.pir"

Modified: branches/pmc_pct/examples/pir/befunge/debug.pir
==============================================================================
--- branches/pmc_pct/examples/pir/befunge/debug.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/pir/befunge/debug.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2002-2009, Parrot Foundation.
 # $Id$
 
 #

Modified: branches/pmc_pct/examples/pir/befunge/flow.pir
==============================================================================
--- branches/pmc_pct/examples/pir/befunge/flow.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/pir/befunge/flow.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2002-2009, Parrot Foundation.
 # $Id$
 
 # ** direction changing

Modified: branches/pmc_pct/examples/pir/befunge/io.pir
==============================================================================
--- branches/pmc_pct/examples/pir/befunge/io.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/pir/befunge/io.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2002-2009, Parrot Foundation.
 # $Id$
 
 # ** string mode

Modified: branches/pmc_pct/examples/pir/befunge/load.pir
==============================================================================
--- branches/pmc_pct/examples/pir/befunge/load.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/pir/befunge/load.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2002-2009, Parrot Foundation.
 # $Id$
 
 #

Modified: branches/pmc_pct/examples/pir/befunge/maths.pir
==============================================================================
--- branches/pmc_pct/examples/pir/befunge/maths.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/pir/befunge/maths.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2002-2009, Parrot Foundation.
 # $Id$
 
 #

Modified: branches/pmc_pct/examples/pir/befunge/stack.pir
==============================================================================
--- branches/pmc_pct/examples/pir/befunge/stack.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/pir/befunge/stack.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2002-2009, Parrot Foundation.
 # $Id$
 
 #

Modified: branches/pmc_pct/examples/pir/levenshtein.pir
==============================================================================
--- branches/pmc_pct/examples/pir/levenshtein.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/pir/levenshtein.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,10 +1,11 @@
+# Copyright (C) 2006-2009, Parrot Foundation.
+# $Id$
 #
 # Levenshtein distance
 #
 # implementation based on http://www.merriampark.com/ld.htm
 # First implementation by Alberto Simoes (ambs <at> cpan.org)
 #
-# $Id$
 
 # .sub main :main
 #         $S1 = "purl"

Modified: branches/pmc_pct/examples/pir/queens_r.pir
==============================================================================
--- branches/pmc_pct/examples/pir/queens_r.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/pir/queens_r.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 
 # recursive queens placement

Modified: branches/pmc_pct/examples/pir/quine_ord.pir
==============================================================================
--- branches/pmc_pct/examples/pir/quine_ord.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/pir/quine_ord.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2006-2008, Parrot Foundation.
 # ATT no autoexpanding svn markers please
 
 .sub quine :main
@@ -813,6 +814,66 @@
 push code_as_data, 34
 push code_as_data, 35
 push code_as_data, 32
+push code_as_data, 67
+push code_as_data, 111
+push code_as_data, 112
+push code_as_data, 121
+push code_as_data, 114
+push code_as_data, 105
+push code_as_data, 103
+push code_as_data, 104
+push code_as_data, 116
+push code_as_data, 32
+push code_as_data, 40
+push code_as_data, 67
+push code_as_data, 41
+push code_as_data, 32
+push code_as_data, 50
+push code_as_data, 48
+push code_as_data, 48
+push code_as_data, 54
+push code_as_data, 45
+push code_as_data, 50
+push code_as_data, 48
+push code_as_data, 48
+push code_as_data, 56
+push code_as_data, 44
+push code_as_data, 32
+push code_as_data, 80
+push code_as_data, 97
+push code_as_data, 114
+push code_as_data, 114
+push code_as_data, 111
+push code_as_data, 116
+push code_as_data, 32
+push code_as_data, 70
+push code_as_data, 111
+push code_as_data, 117
+push code_as_data, 110
+push code_as_data, 100
+push code_as_data, 97
+push code_as_data, 116
+push code_as_data, 105
+push code_as_data, 111
+push code_as_data, 110
+push code_as_data, 46
+push code_as_data, 92
+push code_as_data, 110
+push code_as_data, 34
+push code_as_data, 10
+push code_as_data, 32
+push code_as_data, 32
+push code_as_data, 32
+push code_as_data, 32
+push code_as_data, 112
+push code_as_data, 114
+push code_as_data, 105
+push code_as_data, 110
+push code_as_data, 116
+push code_as_data, 32
+push code_as_data, 34
+push code_as_data, 35
+push code_as_data, 32
 push code_as_data, 65
 push code_as_data, 84
 push code_as_data, 84
@@ -3508,6 +3569,7 @@
 
 DO_QUINE:
     # First print the stuff data section
+    print "# Copyright (C) 2006-2008, Parrot Foundation.\n"
     print "# ATT no autoexpanding svn markers please\n"
     print "\n"
     print ".sub quine :main\n"

Modified: branches/pmc_pct/examples/pir/sudoku.pir
==============================================================================
--- branches/pmc_pct/examples/pir/sudoku.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/pir/sudoku.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 
 =pod

Modified: branches/pmc_pct/examples/shootout/ack.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/ack.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/ack.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #!./parrot
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 # OUTPUT="Ack(3, 9) = 4093\n"
 #

Modified: branches/pmc_pct/examples/shootout/binarytrees.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/binarytrees.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/binarytrees.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #!./parrot -R cgp
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 #
 # binarytrees.pir N         (N = 16 for shootout)

Modified: branches/pmc_pct/examples/shootout/fannkuch.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/fannkuch.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/fannkuch.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #!./parrot
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 #
 # ./parrot -R jit fannkuch.pir N         (N = 9 for shootout)

Modified: branches/pmc_pct/examples/shootout/fasta.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/fasta.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/fasta.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #!./parrot -R cgp
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 #
 # fasta.pir N         (N = 2500000 for shootout)

Modified: branches/pmc_pct/examples/shootout/harmonic.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/harmonic.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/harmonic.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 
 =head1 NAME

Modified: branches/pmc_pct/examples/shootout/knucleotide.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/knucleotide.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/knucleotide.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 
 .sub main :main

Modified: branches/pmc_pct/examples/shootout/mandelbrot.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/mandelbrot.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/mandelbrot.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #!./parrot
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 
 =head1 NAME

Modified: branches/pmc_pct/examples/shootout/nbody.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/nbody.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/nbody.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #!./parrot
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 # The Computer Language Shootout
 # http://shootout.alioth.debian.org/

Modified: branches/pmc_pct/examples/shootout/nsieve-bits-2.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/nsieve-bits-2.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/nsieve-bits-2.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #!./parrot
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 #
 # ./parrot -R jit nsieve-bits-2.pir N  (N = 9 for shootout)

Modified: branches/pmc_pct/examples/shootout/nsieve-bits.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/nsieve-bits.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/nsieve-bits.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #!./parrot
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 #
 # ./parrot -R jit nsieve-bits.pir N  (N = 9 for shootout)

Modified: branches/pmc_pct/examples/shootout/nsieve.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/nsieve.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/nsieve.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #!./parrot
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 #
 # ./parrot -R jit nsieve.pir N  (N = 9 for shootout)

Modified: branches/pmc_pct/examples/shootout/partialsums-2.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/partialsums-2.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/partialsums-2.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #!./parrot
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 #
 # ./parrot -R jit partialsums-2.pir N  (N = 2500000 for shootout)

Modified: branches/pmc_pct/examples/shootout/partialsums.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/partialsums.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/partialsums.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #!./parrot -R cgp
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 #
 # partialsums N  (N = 2500000 for shootout)

Modified: branches/pmc_pct/examples/shootout/pidigits.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/pidigits.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/pidigits.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #!./parrot -R cgp
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 #
 # pidigits N  (N = 1000 for shootout)

Modified: branches/pmc_pct/examples/shootout/random.pasm
==============================================================================
--- branches/pmc_pct/examples/shootout/random.pasm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/random.pasm	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #!./parrot -R jit
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 #
 # random.pasm N         (N = 900000 for shootout)

Modified: branches/pmc_pct/examples/shootout/random.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/random.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/random.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #!./parrot -R cgp
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 #
 # random.pir N         (N = 900000 for shootout)

Modified: branches/pmc_pct/examples/shootout/recursive-2.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/recursive-2.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/recursive-2.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #!./parrot
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 #
 # Ack by Leopold Toetsch

Modified: branches/pmc_pct/examples/shootout/recursive.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/recursive.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/recursive.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #!./parrot
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 #
 # Ack by Leopold Toetsch

Modified: branches/pmc_pct/examples/shootout/regexdna.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/regexdna.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/regexdna.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 
 .sub main :main

Modified: branches/pmc_pct/examples/shootout/revcomp.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/revcomp.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/revcomp.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #!parrot
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 # Reads from stdin a file in the format made by fasta.pir
 # ./parrot -R jit

Modified: branches/pmc_pct/examples/shootout/spectralnorm.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/spectralnorm.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/spectralnorm.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #!./parrot
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 #
 # ./parrot -R jit spectralnorm.pir N         (N = 100 for shootout)

Modified: branches/pmc_pct/examples/shootout/sumcol.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/sumcol.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/sumcol.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #!./parrot
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 #
 # ./parrot -R jit sumcol.pir < sum8M

Modified: branches/pmc_pct/examples/shootout/takfp.pir
==============================================================================
--- branches/pmc_pct/examples/shootout/takfp.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/shootout/takfp.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #!./parrot -R cgp
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 #
 # ./parrot -R cgp takfp.pir N         (N = 10 for shootout)

Modified: branches/pmc_pct/examples/streams/Filter.pir
==============================================================================
--- branches/pmc_pct/examples/streams/Filter.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/streams/Filter.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -23,8 +23,8 @@
     .local pmc stream
     .local pmc filter
 
-    load_bytecode "library/Stream/Sub.pir"
-    load_bytecode "library/Stream/Filter.pir"
+    load_bytecode "Stream/Sub.pir"
+    load_bytecode "Stream/Filter.pir"
 
     # create the counter stream
     stream = new "Stream::Sub"

Modified: branches/pmc_pct/examples/streams/Include.pir
==============================================================================
--- branches/pmc_pct/examples/streams/Include.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/streams/Include.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -17,7 +17,7 @@
 .sub _main
     .local pmc stream
 
-    load_bytecode "library/Stream/Sub.pir"
+    load_bytecode "Stream/Sub.pir"
 
     stream = new "Stream::Sub"
 

Modified: branches/pmc_pct/examples/streams/Lines.pir
==============================================================================
--- branches/pmc_pct/examples/streams/Lines.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/streams/Lines.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -18,8 +18,8 @@
     .local pmc stream
     .local pmc lines
 
-    load_bytecode "library/Stream/Sub.pir"
-    load_bytecode "library/Stream/Lines.pir"
+    load_bytecode "Stream/Sub.pir"
+    load_bytecode "Stream/Lines.pir"
 
     # create a text stream
     stream = new "Stream::Sub"

Modified: branches/pmc_pct/examples/streams/Replay.pir
==============================================================================
--- branches/pmc_pct/examples/streams/Replay.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/streams/Replay.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 .sub _main :main

Modified: branches/pmc_pct/examples/streams/SubHello.pir
==============================================================================
--- branches/pmc_pct/examples/streams/SubHello.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/streams/SubHello.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -17,7 +17,7 @@
 .sub _main :main
     .local pmc stream
 
-    load_bytecode "library/Stream/Sub.pir"
+    load_bytecode "Stream/Sub.pir"
 
     stream = new "Stream::Sub"
 

Modified: branches/pmc_pct/examples/tcl/tcltkdemo.pir
==============================================================================
--- branches/pmc_pct/examples/tcl/tcltkdemo.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tcl/tcltkdemo.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2009, Parrot Foundation.
 # $Id$
 # demonstrate Tcl/Tk GUI using NCI
 

Modified: branches/pmc_pct/examples/tge/branch/lib/Branch.pir
==============================================================================
--- branches/pmc_pct/examples/tge/branch/lib/Branch.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tge/branch/lib/Branch.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 
 =head1 NAME

Modified: branches/pmc_pct/examples/tge/branch/lib/Leaf.pir
==============================================================================
--- branches/pmc_pct/examples/tge/branch/lib/Leaf.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tge/branch/lib/Leaf.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 
 =head1 NAME

Modified: branches/pmc_pct/examples/tge/branch/transform.pir
==============================================================================
--- branches/pmc_pct/examples/tge/branch/transform.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tge/branch/transform.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 
 =head1 NAME

Modified: branches/pmc_pct/examples/tutorial/01_temp_var.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/01_temp_var.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/01_temp_var.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 Simple Variables

Modified: branches/pmc_pct/examples/tutorial/02_local_var.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/02_local_var.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/02_local_var.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 Named Variables

Modified: branches/pmc_pct/examples/tutorial/03_temp_var_basic_pmcs.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/03_temp_var_basic_pmcs.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/03_temp_var_basic_pmcs.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 Basic PMC Types

Modified: branches/pmc_pct/examples/tutorial/04_pod_comments.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/04_pod_comments.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/04_pod_comments.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 Pod Documentation

Modified: branches/pmc_pct/examples/tutorial/10_math_ops.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/10_math_ops.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/10_math_ops.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 Math Operations

Modified: branches/pmc_pct/examples/tutorial/11_math_ops_self_mod.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/11_math_ops_self_mod.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/11_math_ops_self_mod.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 Math Operations (continued)

Modified: branches/pmc_pct/examples/tutorial/12_math_ops_pasm.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/12_math_ops_pasm.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/12_math_ops_pasm.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 Math Operations (continued)

Modified: branches/pmc_pct/examples/tutorial/13_logical_ops.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/13_logical_ops.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/13_logical_ops.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 Logical Operations

Modified: branches/pmc_pct/examples/tutorial/20_string_ops.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/20_string_ops.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/20_string_ops.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 String Operations

Modified: branches/pmc_pct/examples/tutorial/21_string_ops_repeat.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/21_string_ops_repeat.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/21_string_ops_repeat.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 String Operations (continued)

Modified: branches/pmc_pct/examples/tutorial/22_string_ops_length.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/22_string_ops_length.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/22_string_ops_length.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 String Operations (continued)

Modified: branches/pmc_pct/examples/tutorial/23_string_ops_substr.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/23_string_ops_substr.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/23_string_ops_substr.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 String Operations (continued)

Modified: branches/pmc_pct/examples/tutorial/24_string_ops_clone.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/24_string_ops_clone.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/24_string_ops_clone.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1

Modified: branches/pmc_pct/examples/tutorial/30_arrays_basic.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/30_arrays_basic.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/30_arrays_basic.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1

Modified: branches/pmc_pct/examples/tutorial/31_array_ops_split.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/31_array_ops_split.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/31_array_ops_split.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1

Modified: branches/pmc_pct/examples/tutorial/32_array_ops_sprintf.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/32_array_ops_sprintf.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/32_array_ops_sprintf.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1

Modified: branches/pmc_pct/examples/tutorial/33_hashes.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/33_hashes.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/33_hashes.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 Hashes

Modified: branches/pmc_pct/examples/tutorial/34_multikey.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/34_multikey.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/34_multikey.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 Multi-Level Keys

Modified: branches/pmc_pct/examples/tutorial/40_file_ops.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/40_file_ops.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/40_file_ops.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 File Operations

Modified: branches/pmc_pct/examples/tutorial/50_goto.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/50_goto.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/50_goto.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1

Modified: branches/pmc_pct/examples/tutorial/51_if_unless.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/51_if_unless.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/51_if_unless.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 if and unless

Modified: branches/pmc_pct/examples/tutorial/52_if_compare.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/52_if_compare.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/52_if_compare.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 Comparison Branching

Modified: branches/pmc_pct/examples/tutorial/53_loop.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/53_loop.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/53_loop.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 Loops

Modified: branches/pmc_pct/examples/tutorial/55_iterator.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/55_iterator.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/55_iterator.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 iterators

Modified: branches/pmc_pct/examples/tutorial/56_defined.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/56_defined.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/56_defined.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 defined

Modified: branches/pmc_pct/examples/tutorial/57_exists.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/57_exists.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/57_exists.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 exists

Modified: branches/pmc_pct/examples/tutorial/60_subroutines.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/60_subroutines.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/60_subroutines.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 Subroutines

Modified: branches/pmc_pct/examples/tutorial/61_namespaces.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/61_namespaces.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/61_namespaces.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 Namespaces

Modified: branches/pmc_pct/examples/tutorial/62_namespaces.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/62_namespaces.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/62_namespaces.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 Subroutines in a Namespace

Modified: branches/pmc_pct/examples/tutorial/70_class_object.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/70_class_object.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/70_class_object.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 Classes

Modified: branches/pmc_pct/examples/tutorial/81_continuation.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/81_continuation.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/81_continuation.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 Continuations

Modified: branches/pmc_pct/examples/tutorial/82_coroutine.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/82_coroutine.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/82_coroutine.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 Coroutines

Modified: branches/pmc_pct/examples/tutorial/83_external_libraries.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/83_external_libraries.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/83_external_libraries.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 External C Function Call

Modified: branches/pmc_pct/examples/tutorial/90_writing_tests.pir
==============================================================================
--- branches/pmc_pct/examples/tutorial/90_writing_tests.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/examples/tutorial/90_writing_tests.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 Writing Tests

Modified: branches/pmc_pct/ext/Parrot-Embed/t/greet.pir
==============================================================================
--- branches/pmc_pct/ext/Parrot-Embed/t/greet.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/ext/Parrot-Embed/t/greet.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 
 .sub greet

Modified: branches/pmc_pct/ext/SQLite3/SQLite3.pir
==============================================================================
--- branches/pmc_pct/ext/SQLite3/SQLite3.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/ext/SQLite3/SQLite3.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2008-2009, Parrot Foundation.
 # $Id$
 
 .namespace ['SQLite']

Modified: branches/pmc_pct/ext/SQLite3/test.pir
==============================================================================
--- branches/pmc_pct/ext/SQLite3/test.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/ext/SQLite3/test.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #../../parrot -t5 test.pir
+# Copyright (C) 2008-2009, Parrot Foundation.
 # $Id$
 
 .sub 'main'

Modified: branches/pmc_pct/include/parrot/call.h
==============================================================================
--- branches/pmc_pct/include/parrot/call.h	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/include/parrot/call.h	Fri May  8 00:05:13 2009	(r38558)
@@ -403,7 +403,8 @@
 
 PARROT_EXPORT
 PARROT_IGNORABLE_RESULT
-FLOATVAL Parrot_run_meth_fromc_arglist_retf(PARROT_INTERP,
+FLOATVAL /*@alt void@*/
+Parrot_run_meth_fromc_arglist_retf(PARROT_INTERP,
     ARGIN(PMC *sub),
     ARGIN_NULLOK(PMC *obj),
     ARGIN(STRING *meth),
@@ -417,7 +418,8 @@
 PARROT_EXPORT
 PARROT_IGNORABLE_RESULT
 PARROT_CAN_RETURN_NULL
-INTVAL Parrot_run_meth_fromc_arglist_reti(PARROT_INTERP,
+INTVAL /*@alt void@*/
+Parrot_run_meth_fromc_arglist_reti(PARROT_INTERP,
     ARGIN(PMC *sub),
     ARGIN_NULLOK(PMC *obj),
     ARGIN(STRING *meth),
@@ -444,7 +446,8 @@
 
 PARROT_EXPORT
 PARROT_IGNORABLE_RESULT
-FLOATVAL Parrot_run_meth_fromc_args_retf(PARROT_INTERP,
+FLOATVAL /*@alt void@*/
+Parrot_run_meth_fromc_args_retf(PARROT_INTERP,
     ARGIN(PMC *sub),
     ARGIN_NULLOK(PMC *obj),
     ARGIN(STRING *meth),
@@ -457,7 +460,8 @@
 
 PARROT_EXPORT
 PARROT_IGNORABLE_RESULT
-INTVAL Parrot_run_meth_fromc_args_reti(PARROT_INTERP,
+INTVAL /*@alt void@*/
+Parrot_run_meth_fromc_args_reti(PARROT_INTERP,
     ARGIN(PMC *sub),
     ARGIN_NULLOK(PMC *obj),
     ARGIN(STRING *meth),
@@ -488,7 +492,8 @@
 
 PARROT_EXPORT
 PARROT_IGNORABLE_RESULT
-FLOATVAL Parrot_runops_fromc_arglist_retf(PARROT_INTERP,
+FLOATVAL /*@alt void@*/
+Parrot_runops_fromc_arglist_retf(PARROT_INTERP,
     ARGIN(PMC *sub),
     ARGIN(const char *sig),
     va_list args)
@@ -498,7 +503,8 @@
 
 PARROT_EXPORT
 PARROT_IGNORABLE_RESULT
-INTVAL Parrot_runops_fromc_arglist_reti(PARROT_INTERP,
+INTVAL /*@alt void@*/
+Parrot_runops_fromc_arglist_reti(PARROT_INTERP,
     ARGIN(PMC *sub),
     ARGIN(const char *sig),
     va_list args)
@@ -530,7 +536,8 @@
 
 PARROT_EXPORT
 PARROT_IGNORABLE_RESULT
-FLOATVAL Parrot_runops_fromc_args_retf(PARROT_INTERP,
+FLOATVAL /*@alt void@*/
+Parrot_runops_fromc_args_retf(PARROT_INTERP,
     ARGIN(PMC *sub),
     ARGIN(const char *sig),
     ...)
@@ -540,7 +547,8 @@
 
 PARROT_EXPORT
 PARROT_IGNORABLE_RESULT
-INTVAL Parrot_runops_fromc_args_reti(PARROT_INTERP,
+INTVAL /*@alt void@*/
+Parrot_runops_fromc_args_reti(PARROT_INTERP,
     ARGIN(PMC *sub),
     ARGIN(const char *sig),
     ...)

Modified: branches/pmc_pct/include/parrot/debugger.h
==============================================================================
--- branches/pmc_pct/include/parrot/debugger.h	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/include/parrot/debugger.h	Fri May  8 00:05:13 2009	(r38558)
@@ -333,7 +333,9 @@
         __attribute__nonnull__(1);
 
 PARROT_IGNORABLE_RESULT
-int PDB_run_command(PARROT_INTERP, ARGIN(const char *command))
+int /*@alt void@*/
+PDB_run_command(PARROT_INTERP,
+    ARGIN(const char *command))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 

Modified: branches/pmc_pct/include/parrot/gc_pools.h
==============================================================================
--- branches/pmc_pct/include/parrot/gc_pools.h	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/include/parrot/gc_pools.h	Fri May  8 00:05:13 2009	(r38558)
@@ -109,7 +109,8 @@
         __attribute__nonnull__(1);
 
 PARROT_IGNORABLE_RESULT
-int Parrot_forall_header_pools(PARROT_INTERP,
+int /*@alt void@*/
+Parrot_forall_header_pools(PARROT_INTERP,
     int flag,
     ARGIN_NULLOK(void *arg),
     NOTNULL(pool_iter_fn func))

Modified: branches/pmc_pct/include/parrot/io.h
==============================================================================
--- branches/pmc_pct/include/parrot/io.h	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/include/parrot/io.h	Fri May  8 00:05:13 2009	(r38558)
@@ -160,7 +160,11 @@
 
 PARROT_EXPORT
 PARROT_IGNORABLE_RESULT
-INTVAL Parrot_io_eprintf(NULLOK(PARROT_INTERP), ARGIN(const char *s), ...)
+INTVAL /*@alt void@*/
+Parrot_io_eprintf(
+    NULLOK(PARROT_INTERP),
+    ARGIN(const char *s),
+    ...)
         __attribute__nonnull__(2);
 
 PARROT_EXPORT

Modified: branches/pmc_pct/include/parrot/multidispatch.h
==============================================================================
--- branches/pmc_pct/include/parrot/multidispatch.h	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/include/parrot/multidispatch.h	Fri May  8 00:05:13 2009	(r38558)
@@ -45,9 +45,12 @@
 } MMD_table;
 
 typedef struct _multi_func_list {
-        const char *multi_name;
-        const char *short_sig;
-        const char *full_sig;
+/* TT #646
+ * This STRING ideally must be const but actually can't.
+ */
+        STRING *multi_name;
+        STRING *short_sig;
+        STRING *full_sig;
         funcptr_t func_ptr;
 } multi_func_list;
 

Modified: branches/pmc_pct/include/parrot/parrot.h
==============================================================================
--- branches/pmc_pct/include/parrot/parrot.h	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/include/parrot/parrot.h	Fri May  8 00:05:13 2009	(r38558)
@@ -154,20 +154,6 @@
 #define PTR2INTVAL(p)    INTVAL2PTR(INTVAL, (p))
 #define PTR2UINTVAL(p)    UINTVAL2PTR(UINTVAL, (p))
 
-/* Use similar macros for casting between pointers and opcode_t.
-   (We can't assume that sizeof (opcode_t) == sizeof (intval).
-*/
-#if (OPCODE_T_SIZE == PTR_SIZE)
-#  define OPCODE_T2PTR(any, d)    (any)(d)
-#else
-#  if PTR_SIZE == LONG_SIZE
-#    define OPCODE_T2PTR(any, d)    (any)(unsigned long)(d)
-#  else
-#    define OPCODE_T2PTR(any, d)    (any)(unsigned int)(d)
-#  endif /* PTR_SIZE == LONG_SIZE */
-#endif /* OPCODE_T_SIZE == PTR_SIZE */
-#define PTR2OPCODE_T(p)    OPCODE_T2PTR(opcode_t, (p))
-
 /*
  * some compilers don't like lvalue casts, so macroize them
  *

Modified: branches/pmc_pct/include/parrot/runcore_api.h
==============================================================================
--- branches/pmc_pct/include/parrot/runcore_api.h	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/include/parrot/runcore_api.h	Fri May  8 00:05:13 2009	(r38558)
@@ -14,7 +14,7 @@
 
 #  define DO_OP(PC, INTERP) ((PC) = (((INTERP)->op_func_table)[*(PC)])((PC), (INTERP)))
 
-/* HEADERIZER BEGIN: src/runops_cores.c */
+/* HEADERIZER BEGIN: src/runcore/cores.c */
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 
 PARROT_WARN_UNUSED_RESULT
@@ -71,9 +71,8 @@
 #define ASSERT_ARGS_runops_slow_core __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(pc)
-
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
-/* HEADERIZER END: src/runops_cores.c */
+/* HEADERIZER END: src/runcore/cores.c */
 
 opcode_t *runops_fast_core(PARROT_INTERP, opcode_t *);
 

Modified: branches/pmc_pct/include/parrot/stacks.h
==============================================================================
--- branches/pmc_pct/include/parrot/stacks.h	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/include/parrot/stacks.h	Fri May  8 00:05:13 2009	(r38558)
@@ -94,9 +94,6 @@
         __attribute__nonnull__(1);
 
 PARROT_EXPORT
-void stack_destroy(SHIM(Stack_Chunk_t *top));
-
-PARROT_EXPORT
 PARROT_CAN_RETURN_NULL
 PARROT_WARN_UNUSED_RESULT
 Stack_Entry_t * stack_entry(SHIM_INTERP,
@@ -189,7 +186,6 @@
        PARROT_ASSERT_ARG(interp)
 #define ASSERT_ARGS_pop_dest __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_stack_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = 0
 #define ASSERT_ARGS_stack_entry __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(stack)
 #define ASSERT_ARGS_stack_height __attribute__unused__ int _ASSERT_ARGS_CHECK = \

Modified: branches/pmc_pct/include/parrot/string_funcs.h
==============================================================================
--- branches/pmc_pct/include/parrot/string_funcs.h	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/include/parrot/string_funcs.h	Fri May  8 00:05:13 2009	(r38558)
@@ -262,7 +262,8 @@
 
 PARROT_EXPORT
 PARROT_IGNORABLE_RESULT
-INTVAL Parrot_str_length(PARROT_INTERP, ARGMOD(STRING *s))
+INTVAL /*@alt void@*/
+Parrot_str_length(PARROT_INTERP, ARGMOD(STRING *s))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*s);

Modified: branches/pmc_pct/include/parrot/warnings.h
==============================================================================
--- branches/pmc_pct/include/parrot/warnings.h	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/include/parrot/warnings.h	Fri May  8 00:05:13 2009	(r38558)
@@ -57,7 +57,9 @@
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 
 PARROT_EXPORT
-INTVAL Parrot_warn(PARROT_INTERP,
+PARROT_IGNORABLE_RESULT
+INTVAL /*@alt void@*/
+Parrot_warn(PARROT_INTERP,
     INTVAL warnclass,
     ARGIN(const char *message),
     ...)

Modified: branches/pmc_pct/lib/Parrot/Configure/Options/Conf.pm
==============================================================================
--- branches/pmc_pct/lib/Parrot/Configure/Options/Conf.pm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/lib/Parrot/Configure/Options/Conf.pm	Fri May  8 00:05:13 2009	(r38558)
@@ -80,6 +80,8 @@
    --make=(make tool)   Use the given make utility
    --yacc=(parser)      Use the given parser generator
 
+   --no-line-directives Disable creation of C #line directives
+
    --define=inet_aton   Quick hack to use inet_aton instead of inet_pton
 
 Parrot Options:

Modified: branches/pmc_pct/lib/Parrot/Configure/Options/Conf/Shared.pm
==============================================================================
--- branches/pmc_pct/lib/Parrot/Configure/Options/Conf/Shared.pm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/lib/Parrot/Configure/Options/Conf/Shared.pm	Fri May  8 00:05:13 2009	(r38558)
@@ -52,6 +52,7 @@
     maintainer
     mandir
     nomanicheck
+    no-line-directives
     oldincludedir
     opcode
     ops

Modified: branches/pmc_pct/lib/Parrot/Harness/Smoke.pm
==============================================================================
--- branches/pmc_pct/lib/Parrot/Harness/Smoke.pm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/lib/Parrot/Harness/Smoke.pm	Fri May  8 00:05:13 2009	(r38558)
@@ -131,6 +131,7 @@
             password     => $SMOLDER_CONFIG{password},
             tags         => $tags,
             report_file  => $report_file,
+            revision     => $PConfig{revision},
         ]
     );
 
@@ -191,7 +192,6 @@
         'Optimize'     => ($PConfig{optimize} || 'none'),
         'Perl Version' => (sprintf('%vd', $^V) . " $PConfig{archname}"),
         'Platform'     => $PConfig{osname},
-        'SVN Revision' => $PConfig{revision},
         'Version'      => $PConfig{VERSION},
         'Submitter'    => $ENV{"SMOLDER_SUBMITTER"} || "$me\@$domain"
     );

Modified: branches/pmc_pct/lib/Parrot/Manifest.pm
==============================================================================
--- branches/pmc_pct/lib/Parrot/Manifest.pm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/lib/Parrot/Manifest.pm	Fri May  8 00:05:13 2009	(r38558)
@@ -181,6 +181,7 @@
         VERSION                                         [devel]
         tools/build/ops2c.pl                            [devel]
         tools/build/pmc2c.pl                            [devel]
+        tools/dev/mk_language_shell.pl                  [devel]
         tools/dev/pbc_to_exe.pir                        [devel]
         tools/dev/gen_makefile.pl                       [devel]
         tools/dev/reconfigure.pl                        [devel]

Modified: branches/pmc_pct/lib/Parrot/Ops2c/Utils.pm
==============================================================================
--- branches/pmc_pct/lib/Parrot/Ops2c/Utils.pm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/lib/Parrot/Ops2c/Utils.pm	Fri May  8 00:05:13 2009	(r38558)
@@ -133,7 +133,7 @@
     my $sym_export =
         $flagref->{dynamic}
         ? 'PARROT_DYNEXT_EXPORT'
-        : 'PARROT_EXPORT';
+        : '';
 
     my $ops;
     if ( $flagref->{core} ) {

Modified: branches/pmc_pct/lib/Parrot/Pmc2c/Attribute.pm
==============================================================================
--- branches/pmc_pct/lib/Parrot/Pmc2c/Attribute.pm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/lib/Parrot/Pmc2c/Attribute.pm	Fri May  8 00:05:13 2009	(r38558)
@@ -99,6 +99,13 @@
     my $pmcname        = $pmc->{name};
     my $attrtype       = $self->{type};
     my $attrname       = $self->{name};
+    my $isfuncptr      = 0;
+    my $origtype       = $attrtype;
+    if($attrname =~ m/\(\*(\w*)\)\((.*?)\)/) {
+        $isfuncptr = 1;
+        $origtype = $attrtype . " (*)(" . $2 . ")";
+        $attrname = $1;
+    }
 
     # Store regexes used to check some types to avoid repetitions
     my $isptrtostring = qr/STRING\s*\*$/;
@@ -113,7 +120,14 @@
         if (PObj_is_object_TEST(pmc)) { \\
 EOA
 
-    if ($attrtype eq "INTVAL") {
+    if ($isfuncptr == 1) {
+        $decl .= <<"EOA";
+            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \\
+                "Attributes of type '$origtype' cannot be " \\
+                "subclassed from a high-level PMC."); \\
+EOA
+    }
+    elsif ($attrtype eq "INTVAL") {
         $decl .= <<"EOA";
             PMC *attr_value = VTABLE_get_attr_str(interp, \\
                               pmc, Parrot_str_new_constant(interp, "$attrname")); \\
@@ -161,7 +175,14 @@
         if (PObj_is_object_TEST(pmc)) { \\
 EOA
 
-    if ($attrtype eq "INTVAL") {
+    if ($isfuncptr == 1) {
+        $decl .= <<"EOA";
+            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, \\
+                "Attributes of type '$origtype' cannot be " \\
+                "subclassed from a high-level PMC."); \\
+EOA
+    }
+    elsif ($attrtype eq "INTVAL") {
         $decl .= <<"EOA";
             PMC *attr_value = pmc_new(interp, enum_class_Integer); \\
             VTABLE_set_integer_native(interp, attr_value, value); \\

Modified: branches/pmc_pct/lib/Parrot/Pmc2c/Emitter.pm
==============================================================================
--- branches/pmc_pct/lib/Parrot/Pmc2c/Emitter.pm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/lib/Parrot/Pmc2c/Emitter.pm	Fri May  8 00:05:13 2009	(r38558)
@@ -4,6 +4,7 @@
 use strict;
 use warnings;
 use Parrot::Pmc2c::UtilFunctions qw(count_newlines spew escape_filename);
+use Parrot::Pmc2c::Pmc2cMain ();
 use overload '""'   => \&stringify;
 use overload 'bool' => \&boolify;
 
@@ -129,7 +130,9 @@
         else {
             $line = $self->{current_line} if $line == -1;
             my $filename_escaped = escape_filename($filename);
-            $data .= "#line $line \"$filename_escaped\"\n";
+            if (!$Parrot::Pmc2c::Pmc2cMain::OPTIONS->{nolines}) {
+                $data .= "#line $line \"$filename_escaped\"\n";
+            }
             $data .= $it->{data};
         }
         $self->{output} .= $data;

Modified: branches/pmc_pct/lib/Parrot/Pmc2c/MethodEmitter.pm
==============================================================================
--- branches/pmc_pct/lib/Parrot/Pmc2c/MethodEmitter.pm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/lib/Parrot/Pmc2c/MethodEmitter.pm	Fri May  8 00:05:13 2009	(r38558)
@@ -47,7 +47,7 @@
         $self->rewrite_nci_method($pmc);
     }
 
-    $emit->( $pmc->export . ' ' . $self->decl( $pmc, 'CFILE' ) );
+    $emit->( $self->decl( $pmc, 'CFILE' ) );
     $emit->("{\n");
     $emit->($body);
     $emit->("}\n");
@@ -98,14 +98,12 @@
     $args = ", $args" if $args =~ /\S/;
     $args =~ s/(\w+)\s*(\*)\s*/$1 $2/g;
 
-    my ( $export, $extern, $newl, $semi );
+    my ( $extern, $newl, $semi );
     if ( $for_header eq 'HEADER' ) {
-        $export = $pmc->export;
         $newl   = ' ';
         $semi   = ';';
     }
     else {
-        $export = '';
         $newl   = "\n";
         $semi   = '';
     }
@@ -113,7 +111,7 @@
     $pmcarg    = "SHIM($pmcarg)" if $self->pmc_unused;
 
     return <<"EOC";
-$decs$export $ret${newl}Parrot_${pmcname}_$meth(PARROT_INTERP, $pmcarg$args)$semi
+static $decs $ret${newl}Parrot_${pmcname}_$meth(PARROT_INTERP, $pmcarg$args)$semi
 EOC
 }
 
@@ -250,7 +248,7 @@
             \bDYNSUPER\b      # Macro: DYNSUPER
             \(\s*(.*?)\)      # capture argument list
           }x,
-            sub { "interp->vtables[$supertype].$name(" . full_arguments($1) . ')' }
+            sub { "interp->vtables[$supertype]->$name(" . full_arguments($1) . ')' }
         );
 
         # Rewrite OtherClass.SUPER(args...)
@@ -260,7 +258,7 @@
             \.SUPER\b         # Macro: SUPER
             \(\s*(.*?)\)      # capture argument list
           }x,
-            sub { "Parrot_${1}_$name(" . full_arguments($2) . ')' }
+            sub { "interp->vtables[enum_class_${1}]->$name(" . full_arguments($2) . ')' }
         );
 
         # Rewrite SUPER(args...)
@@ -269,7 +267,7 @@
             \bSUPER\b         # Macro: SUPER
             \(\s*(.*?)\)      # capture argument list
           }x,
-            sub { "$supermethod(" . full_arguments($1) . ')' }
+            sub { "interp->vtables[$supertype]->$name(" . full_arguments($1) . ')' }
         );
     }
 

Modified: branches/pmc_pct/lib/Parrot/Pmc2c/PMC/RO.pm
==============================================================================
--- branches/pmc_pct/lib/Parrot/Pmc2c/PMC/RO.pm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/lib/Parrot/Pmc2c/PMC/RO.pm	Fri May  8 00:05:13 2009	(r38558)
@@ -82,7 +82,8 @@
             else {
                 $find_method_parent = $parent->{super}{$vt_method_name};
             }
-            my $real_findmethod = 'Parrot_' . $find_method_parent . '_find_method';
+            # We can't use enum_class_Foo there. $parent can be non-core PMC.
+            my $real_findmethod = 'interp->vtables[pmc_type(interp, Parrot_str_new_constant(interp, "' . $find_method_parent . '"))]->find_method';
             my $body            = <<"EOC";
     PMC *const method = $real_findmethod(interp, pmc, method_name);
     if (!PMC_IS_NULL(VTABLE_getprop(interp, method, CONST_STRING_GEN(interp, "write"))))

Modified: branches/pmc_pct/lib/Parrot/Pmc2c/PMC/default.pm
==============================================================================
--- branches/pmc_pct/lib/Parrot/Pmc2c/PMC/default.pm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/lib/Parrot/Pmc2c/PMC/default.pm	Fri May  8 00:05:13 2009	(r38558)
@@ -49,6 +49,34 @@
     return 1;
 }
 
+sub update_vtable_func {
+    "";
+}
+
+# Really build default vtable.
+sub get_vtable_func {
+    my ($self) = @_;
+
+    my $cout = "";
+
+    my $vtable_decl = $self->vtable_decl("temp_vtable", 'enum_class_default');
+
+    $cout .= <<"EOC";
+
+PARROT_EXPORT VTABLE* Parrot_default_get_vtable(PARROT_INTERP) {
+
+    static const char attr_defs [] = "";
+
+$vtable_decl
+
+    return Parrot_clone_vtable(interp, &temp_vtable);
+}
+
+EOC
+
+    $cout;
+}
+
 1;
 
 # Local Variables:

Modified: branches/pmc_pct/lib/Parrot/Pmc2c/PMCEmitter.pm
==============================================================================
--- branches/pmc_pct/lib/Parrot/Pmc2c/PMCEmitter.pm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/lib/Parrot/Pmc2c/PMCEmitter.pm	Fri May  8 00:05:13 2009	(r38558)
@@ -80,6 +80,8 @@
 
     $c->emit( $self->preamble );
 
+    $c->emit( $self->hdecls );
+    $c->emit( $self->{ro}->hdecls ) if ( $self->{ro} );
     $self->gen_methods;
 
     my $ro = $self->ro;
@@ -90,6 +92,8 @@
 
     $c->emit("#include \"pmc_default.h\"\n");
 
+    $c->emit( $self->update_vtable_func );
+    $c->emit( $self->get_vtable_func );
     $c->emit( $self->init_func );
     $c->emit( $self->postamble );
 
@@ -103,25 +107,40 @@
 =cut
 
 sub generate_h_file {
-    my ($self) = @_;
-    my $h      = $self->{emitter};
-    my $name   = uc $self->name;
+    my ($self)  = @_;
+    my $h       = $self->{emitter};
+    my $uc_name = uc $self->name;
+    my $name    = $self->name;
 
     $h->emit( dont_edit( $self->filename ) );
     $h->emit(<<"EOH");
 
-#ifndef PARROT_PMC_${name}_H_GUARD
-#define PARROT_PMC_${name}_H_GUARD
+#ifndef PARROT_PMC_${uc_name}_H_GUARD
+#define PARROT_PMC_${uc_name}_H_GUARD
 
 EOH
 
     $h->emit("#define PARROT_IN_EXTENSION\n") if ( $self->is_dynamic );
-    $h->emit( $self->hdecls );
-    $h->emit( $self->{ro}->hdecls ) if ( $self->{ro} );
+
+    # Emit available functions for work with vtables.
+    my $export = 'PARROT_EXPORT ';
+    if ($self->is_dynamic) {
+        $export = 'PARROT_DYNEXT_EXPORT ';
+        $h->emit("${export}void    Parrot_${name}_class_init(PARROT_INTERP, int, int);\n");
+    }
+
+    if ($name ne 'default') {
+        $h->emit("${export}VTABLE* Parrot_${name}_update_vtable(VTABLE*);\n");
+        $h->emit("${export}VTABLE* Parrot_${name}_ro_update_vtable(VTABLE*);\n");
+    }
+    $h->emit("${export}VTABLE* Parrot_${name}_get_vtable(PARROT_INTERP);\n");
+    $h->emit("${export}VTABLE* Parrot_${name}_ro_get_vtable(PARROT_INTERP);\n");
+
+
     $self->gen_attributes;
     $h->emit(<<"EOH");
 
-#endif /* PARROT_PMC_${name}_H_GUARD */
+#endif /* PARROT_PMC_${uc_name}_H_GUARD */
 
 EOH
     $h->emit( c_code_coda() );
@@ -139,7 +158,8 @@
     my ($self) = @_;
 
     my $hout;
-    my $name = $self->name;
+    my $name    = $self->name;
+    my $lc_name = $self->name;
 
     # generate decls for all vtable methods in this PMC
     foreach my $vt_method_name ( @{ $self->vtable->names } ) {
@@ -155,9 +175,18 @@
         $hout .= $method->generate_headers($self);
     }
 
+    my $export = $self->is_dynamic ? 'PARROT_DYNEXT_EXPORT ' : '';
+
     # class init decl
-    $hout .= 'PARROT_DYNEXT_EXPORT ' if ( $self->is_dynamic );
-    $hout .= "void Parrot_${name}_class_init(PARROT_INTERP, int, int);\n";
+    $hout .= "${export}void    Parrot_${name}_class_init(PARROT_INTERP, int, int);\n";
+
+    $export = $self->is_dynamic ? 'PARROT_DYNEXT_EXPORT ' : 'PARROT_EXPORT ';
+
+    $hout .= "${export}VTABLE* Parrot_${lc_name}_update_vtable(VTABLE*);\n"
+        unless $name eq 'default';
+
+    $hout .= "${export}VTABLE* Parrot_${lc_name}_get_vtable(PARROT_INTERP);\n";
+
     $self->{hdecls} .= $hout;
 
     return $self->{hdecls};
@@ -401,17 +430,15 @@
     return "Parrot_${implementor}_$vt_method_name";
 }
 
-=item C<vtable_decl($name)>
+=item C<vtable_flags()>
 
-Returns the C code for the declaration of a vtable temporary named
-C<$name> with the functions for this class.
+Returns C code to produce a PMC's flags.
 
 =cut
 
-sub vtable_decl {
-    my ( $self, $temp_struct_name, $enum_name ) = @_;
+sub vtable_flags {
+    my ($self) = @_;
 
-    # gen vtable flags
     my $vtbl_flag = 0;
     $vtbl_flag .= '|VTABLE_PMC_NEEDS_EXT'     if $self->flag('need_ext');
     $vtbl_flag .= '|VTABLE_PMC_IS_SINGLETON'  if $self->flag('singleton');
@@ -419,6 +446,22 @@
     $vtbl_flag .= '|VTABLE_IS_READONLY_FLAG'  if $self->flag('is_ro');
     $vtbl_flag .= '|VTABLE_HAS_READONLY_FLAG' if $self->flag('has_ro');
 
+    return $vtbl_flag;
+}
+
+=item C<vtable_decl($name)>
+
+Returns the C code for the declaration of a vtable temporary named
+C<$name> with the functions for this class.
+
+=cut
+
+sub vtable_decl {
+    my ( $self, $temp_struct_name, $enum_name ) = @_;
+
+    # gen vtable flags
+    my $vtbl_flag = $self->vtable_flags;
+
     my @vt_methods;
     foreach my $vt_method ( @{ $self->vtable->methods } ) {
         next if $vt_method->is_mmd;
@@ -438,7 +481,7 @@
         NULL,       /* isa_hash */
         NULL,       /* class */
         NULL,       /* mro */
-        attr_defs,  /* attribute_defs */
+        NULL,       /* attribute_defs */
         NULL,       /* ro_variant_vtable */
         $methlist
     };
@@ -446,6 +489,15 @@
     return $cout;
 }
 
+sub gen_multi_name
+{
+    my ($name, $cache) = @_;
+
+    return $cache->{$name} if exists $cache->{$name};
+    my $count              = keys %$cache;
+    return $cache->{$name} = "mfl_$count";
+}
+
 =item C<init_func()>
 
 Returns the C code for the PMC's initialization method, or an empty
@@ -455,20 +507,40 @@
 
 sub init_func {
     my ($self) = @_;
-    return "" if $self->no_init;
-
-    my $cout      = "";
-    my $classname = $self->name;
+    return '' if $self->no_init;
 
+    my $cout        = '';
+    my $classname   = $self->name;
     my $enum_name   = $self->is_dynamic ? -1 : "enum_class_$classname";
-    my $vtable_decl = $self->vtable_decl( 'temp_base_vtable', $enum_name );
-
     my $multi_funcs = $self->find_multi_functions();
-    my $multi_list = join( ",\n        ",
-        map { '{ "'. $_->[0] .  '", ' . "\n          " .
-                '"'. $_->[1] .  '", ' . "\n          " .
-                '"'. $_->[2] .  '", ' . "\n          " .
-                '(funcptr_t) ' . $_->[3] . ' }' } @$multi_funcs );
+
+    my @multi_list;
+    my %strings_seen;
+    my $multi_strings = '';
+    my $cache         = {};
+
+    for my $multi (@$multi_funcs) {
+        my ($name, $ssig, $fsig, $func) = @$multi;
+        my ($name_str, $ssig_str, $fsig_str)     =
+            map { gen_multi_name($_, $cache) } ($name, $ssig, $fsig);
+
+        for my $s ([$name, $name_str], [$ssig, $ssig_str], [$fsig,$fsig_str]) {
+            my ($raw_string, $name) = @$s;
+            next if $strings_seen{$name}++;
+            $multi_strings .=  "        STRING *$name = "
+                           . qq|CONST_STRING_GEN(interp, "$raw_string");\n|;
+        }
+
+        push @multi_list, <<END_MULTI_LIST;
+        { $name_str,
+          $ssig_str,
+          $fsig_str,
+          (funcptr_t) $func }
+END_MULTI_LIST
+
+    }
+
+    my $multi_list = join( ",\n", @multi_list);
 
     my @isa = grep { $_ ne 'default' } @{ $self->parents };
 
@@ -498,8 +570,12 @@
     my $attributes = $self->attributes;
     foreach my $attribute ( @$attributes ) {
         my $attrtype       = $attribute->{type};
+        my $attrname       = $attribute->{name};
         my $typeid = ':'; # Unhandled
-        if ($attrtype eq "INTVAL") {
+        if($attrname =~ m/\(*(\w+)\)\(.*?\)/) {
+            $attrname = $1;
+        }
+        elsif ($attrtype eq "INTVAL") {
             $typeid = 'I';
         }
         elsif ($attrtype eq "FLOATVAL") {
@@ -513,22 +589,15 @@
         }
 
         $cout .= $typeid;
-        $cout .= $attribute->name;
+        $cout .= $attrname;
         $cout .= ' ';
     }
 
     $cout .= "\";\n";
-    $cout .= <<"EOC";
-$vtable_decl
-EOC
-
-    for my $k ( keys %extra_vt ) {
-        $cout .= $extra_vt{$k}->vtable_decl( "temp_${k}_vtable", $enum_name );
-    }
 
     my $const = ( $self->{flags}{dynpmc} ) ? " " : " const ";
     if ( @$multi_funcs ) {
-        $cout .= <<"EOC";
+        $cout .= $multi_strings . <<"EOC";
 
    $const multi_func_list _temp_multi_func_list[] = {
         $multi_list
@@ -539,63 +608,74 @@
     $cout .= <<"EOC";
     if (pass == 0) {
 EOC
+    for my $k ( keys %extra_vt ) {
+        $cout .= "        VTABLE *vt_$k;\n";
+    }
+
+    my $flags = $self->vtable_flags;
     $cout .= <<"EOC";
-        Hash          *isa_hash;
-        /* create vtable - clone it - we have to set a few items */
-        VTABLE * const vt_clone        = Parrot_clone_vtable(interp,
-                                             &temp_base_vtable);
+        Hash   * isa_hash;
+        VTABLE * vt        = Parrot_${classname}_get_vtable(interp);
+        vt->base_type      = $enum_name;
+        vt->flags          = $flags;
+        vt->attribute_defs = attr_defs;
+
 EOC
     for my $k ( keys %extra_vt ) {
+        my $k_flags = $self->$k->vtable_flags;
         $cout .= <<"EOC";
-        VTABLE * const vt_${k}_clone     = Parrot_clone_vtable(interp,
-                                             &temp_${k}_vtable);
+        vt_${k}                 = Parrot_${classname}_${k}_get_vtable(interp);
+        vt_${k}->base_type      = $enum_name;
+        vt_${k}->flags          = $k_flags;
+        vt_${k}->attribute_defs = attr_defs;
+
 EOC
     }
 
     # init vtable slot
     if ( $self->is_dynamic ) {
         $cout .= <<"EOC";
-        vt_clone->base_type    = entry;
-        vt_clone->whoami       = string_make(interp, "$classname", @{[length($classname)]}, "ascii",
-            PObj_constant_FLAG|PObj_external_FLAG);
-        vt_clone->provides_str = Parrot_str_append(interp, vt_clone->provides_str,
+        vt->base_type    = entry;
+        vt->whoami       = string_make(interp, "$classname", @{[length($classname)]},
+                                       "ascii", PObj_constant_FLAG|PObj_external_FLAG);
+        vt->provides_str = Parrot_str_append(interp, vt->provides_str,
             string_make(interp, " $provides", @{[length($provides) + 1]}, "ascii",
             PObj_constant_FLAG|PObj_external_FLAG));
 
         /* set up isa hash */
         isa_hash = parrot_new_hash(interp);
-        vt_clone->isa_hash     = isa_hash;
+        vt->isa_hash     = isa_hash;
 EOC
     }
     else {
         $cout .= <<"EOC";
-        vt_clone->whoami       = CONST_STRING_GEN(interp, "$classname");
-        vt_clone->provides_str = CONST_STRING_GEN(interp, "$provides");
+        vt->whoami       = CONST_STRING_GEN(interp, "$classname");
+        vt->provides_str = CONST_STRING_GEN(interp, "$provides");
 
         /* set up isa hash */
-        isa_hash = parrot_new_hash(interp);
-        vt_clone->isa_hash     = isa_hash;
+        isa_hash         = parrot_new_hash(interp);
+        vt->isa_hash     = isa_hash;
 EOC
     }
 
     for my $k ( keys %extra_vt ) {
         $cout .= <<"EOC";
-        vt_${k}_clone->base_type    = entry;
-        vt_${k}_clone->whoami       = vt_clone->whoami;
-        vt_${k}_clone->provides_str = vt_clone->provides_str;
+        vt_${k}->base_type    = entry;
+        vt_${k}->whoami       = vt->whoami;
+        vt_${k}->provides_str = vt->provides_str;
 EOC
     }
 
-    if ( $extra_vt{ro} ) {
+    for my $k ( keys %extra_vt ) {
         $cout .= <<"EOC";
-        vt_clone->ro_variant_vtable    = vt_ro_clone;
-        vt_ro_clone->ro_variant_vtable = vt_clone;
-        vt_ro_clone->isa_hash          = isa_hash;
+        vt->${k}_variant_vtable    = vt_${k};
+        vt_${k}->${k}_variant_vtable = vt;
+        vt_${k}->isa_hash          = isa_hash;
 EOC
     }
 
     $cout .= <<"EOC";
-        interp->vtables[entry]         = vt_clone;
+        interp->vtables[entry] = vt;
 EOC
 
     for my $isa ($classname, @isa) {
@@ -634,13 +714,13 @@
 
         $cout .= <<"EOC";
         {
-            PMC           *mro      = pmc_new(interp, enum_class_ResizableStringArray);
-            VTABLE * const vt_clone = interp->vtables[entry];
+            PMC    *       mro = pmc_new(interp, enum_class_ResizableStringArray);
+            VTABLE * const vt  = interp->vtables[entry];
 
-            vt_clone->mro = mro;
+            vt->mro = mro;
 
-            if (vt_clone->ro_variant_vtable)
-                vt_clone->ro_variant_vtable->mro = mro;
+            if (vt->ro_variant_vtable)
+                vt->ro_variant_vtable->mro = mro;
 
 EOC
 
@@ -653,7 +733,7 @@
     $cout .= <<"EOC";
         }
 
-        /* setup MRO and _namespace */
+        /* set up MRO and _namespace */
         Parrot_create_mro(interp, entry);
 EOC
 
@@ -711,6 +791,7 @@
     } /* pass */
 } /* Parrot_${classname}_class_init */
 EOC
+
     if ( $self->is_dynamic ) {
         $cout .= dynext_load_code( $classname, $classname => {} );
     }
@@ -718,6 +799,121 @@
     $cout;
 }
 
+=item C<update_vtable_func()>
+
+Returns the C code for the PMC's update_vtable method.
+
+=cut
+
+sub update_vtable_func {
+    my ($self) = @_;
+
+    my $cout      = "";
+    my $classname = $self->name;
+
+    my $vtable_updates = '';
+    for my $name ( @{ $self->vtable->names } ) {
+        if (exists $self->{has_method}{$name}) {
+            $vtable_updates .= "    vt->$name = Parrot_${classname}_${name};\n";
+        }
+    }
+
+    $cout .= <<"EOC";
+
+PARROT_EXPORT VTABLE *Parrot_${classname}_update_vtable(VTABLE *vt) {
+$vtable_updates
+    return vt;
+}
+
+EOC
+
+    my %extra_vt;
+    $extra_vt{ro} = $self->{ro} if $self->{ro};
+
+    for my $k (keys %extra_vt) {
+
+        my $vtable_updates = '';
+        foreach my $vt_method ( @{ $self->$k->vtable->names} ) {
+
+            next unless ($self->$k->implements_vtable($vt_method));
+
+            $vtable_updates .= "    vt->$vt_method = Parrot_${classname}_${k}_${vt_method};\n";
+        }
+
+        $cout .= <<"EOC";
+
+PARROT_EXPORT VTABLE *Parrot_${classname}_${k}_update_vtable(VTABLE *vt) {
+$vtable_updates
+    return vt;
+}
+
+EOC
+    }
+
+    $cout;
+}
+
+=item C<get_vtable_func()>
+
+Returns the C code for the PMC's update_vtable method.
+
+=cut
+
+sub get_vtable_func {
+    my ($self) = @_;
+
+    my $cout      = "";
+    my $classname = $self->name;
+
+    my $get_vtable = '';
+    foreach my $parent_name ( reverse ($self->name, @{ $self->parents }) ) {
+        if ($parent_name eq 'default') {
+            $get_vtable .= "    vt = Parrot_default_get_vtable(interp);\n";
+        }
+        else {
+            $get_vtable .= "    Parrot_${parent_name}_update_vtable(vt);\n";
+        }
+    }
+
+    $cout .= <<"EOC";
+PARROT_EXPORT
+VTABLE* Parrot_${classname}_get_vtable(PARROT_INTERP) {
+    VTABLE *vt;
+$get_vtable
+    return vt;
+}
+
+EOC
+
+    my %extra_vt;
+    $extra_vt{ro} = $self->{ro} if $self->{ro};
+
+    for my $k (keys %extra_vt) {
+        my $get_extra_vtable = '';
+        foreach my $parent_name ( reverse ($self->name, @{ $self->parents }) ) {
+            if ($parent_name eq 'default') {
+                $get_extra_vtable .= "    vt = Parrot_default_get_vtable(interp);\n";
+            }
+            else {
+                $get_extra_vtable .= "    Parrot_${parent_name}_update_vtable(vt);\n";
+                $get_extra_vtable .= "    Parrot_${parent_name}_${k}_update_vtable(vt);\n";
+            }
+        }
+
+        $cout .= <<"EOC";
+PARROT_EXPORT
+VTABLE* Parrot_${classname}_${k}_get_vtable(PARROT_INTERP) {
+    VTABLE *vt;
+$get_extra_vtable
+    return vt;
+}
+
+EOC
+    }
+
+    $cout;
+}
+
 sub is_vtable_method {
     my ( $self, $vt_method_name ) = @_;
     return 1 if $self->vtable->has_method($vt_method_name);

Modified: branches/pmc_pct/lib/Parrot/Pmc2c/Parser.pm
==============================================================================
--- branches/pmc_pct/lib/Parrot/Pmc2c/Parser.pm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/lib/Parrot/Pmc2c/Parser.pm	Fri May  8 00:05:13 2009	(r38558)
@@ -135,7 +135,10 @@
 
         # name
         \s*
-        (\w+)
+        (
+            \w+
+          | \(\*\w*\)\(.*?\)
+        )
 
         # modifiers
         \s*

Modified: branches/pmc_pct/lib/Parrot/Pmc2c/Pmc2cMain.pm
==============================================================================
--- branches/pmc_pct/lib/Parrot/Pmc2c/Pmc2cMain.pm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/lib/Parrot/Pmc2c/Pmc2cMain.pm	Fri May  8 00:05:13 2009	(r38558)
@@ -20,6 +20,10 @@
 use Parrot::Pmc2c::PMC::Null ();
 use Parrot::Pmc2c::PMC::Object ();
 
+# put the options in a package var so it can be accessed from
+# Parrot::Pmc2c::Emitter.
+our $OPTIONS;
+
 $SIG{'__WARN__'} = sub { use Carp; warn $_[0]; Carp::confess; };
 
 =head1 NAME
@@ -95,6 +99,8 @@
         }
     }
 
+    $OPTIONS = $allargsref->{opt};
+
     return bless( $allargsref, $class );
 }
 

Modified: branches/pmc_pct/ports/macports/Portfile
==============================================================================
--- branches/pmc_pct/ports/macports/Portfile	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/ports/macports/Portfile	Fri May  8 00:05:13 2009	(r38558)
@@ -3,8 +3,7 @@
 PortSystem              1.0
 
 name			parrot
-version			1.0.0
-revision		1
+version			1.1.0
 categories		lang devel
 maintainers		bfulgham coleda.com:will
 description		Open source virtual machine (for Perl6 et al.)
@@ -18,11 +17,13 @@
 
 platforms		darwin
 homepage		http://www.parrot.org/
-master_sites		ftp://ftp.parrot.org/pub/parrot/releases/stable/${version}/
+set release_type	devel ;# parrot nomenclature, not macport
+master_sites		ftp://ftp.parrot.org/pub/parrot/releases/${release_type}/${version}/
+
+checksums           md5     bf31fd2313b105ba356921318efd3993 \
+                    sha1    5f18ddf92f588135a741e52618fbc456ba56cf34 \
+                    rmd160  a329c698442ec73412ac886da59f188c0ff1e080
 
-checksums		md5 649ce1fb7c0edaf89dc1cd52ff267b1a \
-			sha1 9e028f5fff38a332c13ad4389652a016d7a824f7 \
-			rmd160 46f60accd33f16cc910f4ea03840badc358d22c7
 
 depends_build		bin:perl:perl5
 depends_lib		port:gmp port:icu
@@ -45,6 +46,13 @@
 	set bindir	${destroot}${prefix}/bin
 	set docdir      ${destroot}${prefix}/share/doc/${name}
 
+        # It would be nice if the install linked properly, but for
+        # now, update the link information manually post install to
+        # use the install dir instead of the build dir.
+ 
+        set old_path "${workpath}/parrot-${version}/blib/lib/libparrot.dylib"
+        set new_path "${prefix}/lib/parrot/lib/libparrot.${version}.dylib"
+
         set executables {
             parrot parrot_config parrot_debugger
             pbc_disassemble pbc_info pbc_merge pbc_to_exe pbc_dump
@@ -52,13 +60,22 @@
 
         foreach exe $executables { 
             # fixup the library path
-            set old_path "${workpath}/parrot-${version}/blib/lib/libparrot.dylib"
-            set new_path "${prefix}/lib/parrot/lib/libparrot.${version}.dylib"
 	    system "cd ${prefix}/lib/parrot/bin && \
                 install_name_tool -change \"$old_path\" \"$new_path\" ${exe}"
 
             # install into the common area.
             system "cd ${bindir} && ln -sf ${prefix}/lib/parrot/bin/${exe}"
         }
+
+        set dynamic_extensions {
+           digest_group libglutcb rational dynlexpad libnci_test subproxy
+        } 
+
+        foreach lib $dynamic_extensions {
+            # fixup the library path
+	    system "cd ${prefix}/lib/parrot/lib/${version}/dynext && \
+                install_name_tool -change \"$old_path\" \"$new_path\" ${lib}.bundle"
+        }
+
 	xinstall -m 755 -d ${docdir}
 }

Modified: branches/pmc_pct/runtime/parrot/include/hllmacros.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/include/hllmacros.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/include/hllmacros.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 
 =head1 High Level Language Macros

Modified: branches/pmc_pct/runtime/parrot/include/sockets.pasm
==============================================================================
--- branches/pmc_pct/runtime/parrot/include/sockets.pasm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/include/sockets.pasm	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 
 # families

Modified: branches/pmc_pct/runtime/parrot/library/Config/JSON.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/Config/JSON.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/Config/JSON.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 Config::JSON

Modified: branches/pmc_pct/runtime/parrot/library/Crow.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/Crow.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/Crow.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 .namespace ['Crow']

Modified: branches/pmc_pct/runtime/parrot/library/Data/Dumper.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/Data/Dumper.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/Data/Dumper.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 .sub __library_data_dumper_onload :load

Modified: branches/pmc_pct/runtime/parrot/library/Digest/MD5.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/Digest/MD5.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/Digest/MD5.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 #
 # Parrot MD5 library; Nick Glencross <nickg at glencros.demon.co.uk>

Modified: branches/pmc_pct/runtime/parrot/library/JSON.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/JSON.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/JSON.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 
 =head1 TITLE

Modified: branches/pmc_pct/runtime/parrot/library/NCI/call_toolkit_init.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/NCI/call_toolkit_init.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/NCI/call_toolkit_init.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2008-2009, Parrot Foundation.
 # $Id$
 
 =head1 TITLE

Modified: branches/pmc_pct/runtime/parrot/library/OpenGL.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/OpenGL.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/OpenGL.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2008-2009, Parrot Foundation.
 # $Id$
 
 =head1 NAME
@@ -29,7 +30,7 @@
     .local pmc call_toolkit_init
     call_toolkit_init = get_global ['NCI'], 'call_toolkit_init'
 
-    .const .Sub glutInit = 'glutInit'
+    .const 'Sub' glutInit = 'glutInit'
     argv = call_toolkit_init(glutInit, argv)
 
     # Set display mode, create GLUT window, save window handle
@@ -43,9 +44,9 @@
     set_global 'glut_window', window
 
     # Set up GLUT callbacks
-    .const .Sub draw     = 'draw'
-    .const .Sub idle     = 'idle'
-    .const .Sub keyboard = 'keyboard'
+    .const 'Sub' draw     = 'draw'
+    .const 'Sub' idle     = 'idle'
+    .const 'Sub' keyboard = 'keyboard'
     glutDisplayFunc (draw)
     glutIdleFunc    (idle)
     glutKeyboardFunc(keyboard)

Modified: branches/pmc_pct/runtime/parrot/library/P6object.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/P6object.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/P6object.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -154,7 +154,7 @@
 
 =cut
 
-.sub 'isa' :method
+.sub 'isa' :method :multi(_,_, _)
     .param pmc obj
     .param pmc x
 
@@ -182,19 +182,34 @@
 
 =item add_parent(parentclass [, 'to'=>parrotclass])
 
+Deprecated; use add_parent(class, parentclass)
+
 =cut
 
-.sub 'add_parent' :method
+.sub 'add_parent' :method :multi(_,_)
     .param pmc parentclass
     .param pmc options         :slurpy :named
 
-    parentclass = self.'get_parrotclass'(parentclass)
     $P0 = options['to']
     unless null $P0 goto have_to
     $P0 = self
   have_to:
+    .tailcall self.'add_parent'($P0, parentclass)
+.end
+
+
+=item add_parent(class, parentclass)
+
+=cut
+
+.sub 'add_parent' :method :multi(_,_,_)
+    .param pmc obj
+    .param pmc parentclass
+
+    parentclass = self.'get_parrotclass'(parentclass)
+
     .local pmc parrotclass
-    parrotclass = self.'get_parrotclass'($P0)
+    parrotclass = self.'get_parrotclass'(obj)
     if null parrotclass goto end
 
     ##  if parrotclass isa parentclass, we're done
@@ -221,11 +236,18 @@
   method_loop:
     unless methoditer goto mro_loop
     $S0 = shift methoditer
-    push_eh method_next
+    $P0 = parrotclassns[$S0]
+    if null $P0 goto add_method
+    $I0 = isa $P0, 'MultiSub'
+    unless $I0 goto method_loop
+  add_method:
     $P0 = methods[$S0]
+    $I0 = isa $P0, 'NCI'
+    if $I0 goto method_loop
+    push_eh err
     parrotclassns.'add_sub'($S0, $P0)
-  method_next:
     pop_eh
+  err:
     goto method_loop
   mro_end:
 
@@ -237,9 +259,11 @@
 
 Add C<method> with C<name> to C<parrotclass>.
 
+DEPRECATED. Use add_method(class, name, method)
+
 =cut
 
-.sub 'add_method' :method
+.sub 'add_method' :method :multi(_,_,_)
     .param string name
     .param pmc method
     .param pmc options         :slurpy :named
@@ -248,16 +272,50 @@
     unless null $P0 goto have_to
     $P0 = self
   have_to:
+    .tailcall self.'add_method'($P0, name, method)
+.end
+
+
+=item add_method(class, name, method)
+
+Add C<method> with C<name> to C<class>.
+
+=cut
+
+
+.sub 'add_method' :method :multi(_,_,_,_)
+    .param pmc obj
+    .param string name
+    .param pmc method
+
     .local pmc parrotclass
-    parrotclass = self.'get_parrotclass'($P0)
+    parrotclass = self.'get_parrotclass'(obj)
     parrotclass.'add_method'(name, method)
 .end
 
 
+=item add_attribute(class, name)
+
+Add C<method> with C<name> to C<class>.
+
+=cut
+
+.sub 'add_attribute' :method
+    .param pmc obj
+    .param string name
+    .param pmc options         :slurpy :named
+    .local pmc parrotclass
+    parrotclass = self.'get_parrotclass'(obj)
+    parrotclass.'add_attribute'(name)
+.end
+
+
 =item add_role(role, [, 'to'=>parrotclass])
 
 Add C<role> to C<parrotclass>.
 
+DEPRECATED. Use compose_role(class, role)
+
 =cut
 
 .sub 'add_role' :method
@@ -268,8 +326,22 @@
     unless null $P0 goto have_to
     $P0 = self
   have_to:
+    .tailcall self.'compose_role'($P0, role)
+.end
+
+
+=item compose_role(class, role)
+
+Add C<role> to C<class>.
+
+=cut
+
+.sub 'compose_role' :method
+    .param pmc obj
+    .param pmc role
+
     .local pmc parrotclass
-    parrotclass = self.'get_parrotclass'($P0)
+    parrotclass = self.'get_parrotclass'(obj)
     parrotclass.'add_role'(role)
 .end
 
@@ -591,6 +663,8 @@
     x = get_hll_namespace $P0
   x_ns:
     if null x goto done
+    $I0 = isa x, 'P6protoobject'
+    if $I0 goto x_p6object
     parrotclass = get_class x
   done:
     .return (parrotclass)
@@ -604,7 +678,7 @@
 
 =item get_string()  (vtable method)
 
-Returns the "shortname" of the protoobject's class.
+Returns the "shortname" of the protoobject's class and parens.
 
 =cut
 
@@ -612,8 +686,10 @@
 
 .sub 'VTABLE_get_string' :method :vtable('get_string')
     $P0 = self.'HOW'()
-    $P1 = getattribute $P0, 'shortname'
-    .return ($P1)
+    $P1 = getattribute $P0, 'longname'
+    $S0 = $P1
+    $S0 = concat $S0, '()'
+    .return ($S0)
 .end
 
 =item defined()  (vtable method)

Modified: branches/pmc_pct/runtime/parrot/library/PGE/Dumper.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/PGE/Dumper.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/PGE/Dumper.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 
 =head1 TITLE

Modified: branches/pmc_pct/runtime/parrot/library/PGE/Glob.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/PGE/Glob.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/PGE/Glob.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 
 =head1 TITLE

Modified: branches/pmc_pct/runtime/parrot/library/PGE/Hs.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/PGE/Hs.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/PGE/Hs.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 
 =head1 Title

Modified: branches/pmc_pct/runtime/parrot/library/PGE/Perl6Grammar.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/PGE/Perl6Grammar.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/PGE/Perl6Grammar.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 
 =head1 TITLE

Modified: branches/pmc_pct/runtime/parrot/library/PGE/Text.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/PGE/Text.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/PGE/Text.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 
 =head1 TITLE

Modified: branches/pmc_pct/runtime/parrot/library/PGE/Util.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/PGE/Util.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/PGE/Util.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 
 =head1 TITLE

Modified: branches/pmc_pct/runtime/parrot/library/Protoobject.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/Protoobject.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/Protoobject.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 TITLE

Modified: branches/pmc_pct/runtime/parrot/library/Range.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/Range.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/Range.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2007-2009, Parrot Foundation.
 # $Id$
 
 =head1 Range

Modified: branches/pmc_pct/runtime/parrot/library/Tcl/Glob.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/Tcl/Glob.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/Tcl/Glob.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 
 =head1 TITLE

Modified: branches/pmc_pct/runtime/parrot/library/YAML/Dumper.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/YAML/Dumper.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/YAML/Dumper.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2008-2009, Parrot Foundation.
 # $Id$
 
 .sub __library_data_dumper_onload :load

Modified: branches/pmc_pct/runtime/parrot/library/ncurses.pasm
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/ncurses.pasm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/ncurses.pasm	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 .pcc_sub :load __ncurses_init:

Modified: branches/pmc_pct/runtime/parrot/library/ncurses.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/ncurses.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/ncurses.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 .sub __ncurses_init :load

Modified: branches/pmc_pct/runtime/parrot/library/pcore.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/pcore.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/pcore.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 # create/export some useful but rarely used methods
 

Modified: branches/pmc_pct/runtime/parrot/library/postgres.pasm
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/postgres.pasm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/postgres.pasm	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 .pcc_sub __postgres_init :load

Modified: branches/pmc_pct/runtime/parrot/library/postgres.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/postgres.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/postgres.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 .namespace ['Pg']

Modified: branches/pmc_pct/runtime/parrot/library/random_lib.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/random_lib.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/random_lib.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2005-2009, Parrot Foundation.
 # $Id$
 # used by examples/shootout/random.pir and others
 # by Joshua Isom

Modified: branches/pmc_pct/runtime/parrot/library/tcpstream.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/tcpstream.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/tcpstream.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 
 =head1 NAME

Modified: branches/pmc_pct/runtime/parrot/library/yaml_dumper.pir
==============================================================================
--- branches/pmc_pct/runtime/parrot/library/yaml_dumper.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/runtime/parrot/library/yaml_dumper.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,4 @@
-# Copyright 2008-2009, Parrot Foundation.
+# Copyright (C) 2008-2009, Parrot Foundation.
 # $Id$
 
 =head1 TITLE

Modified: branches/pmc_pct/src/call/ops.c
==============================================================================
--- branches/pmc_pct/src/call/ops.c	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/call/ops.c	Fri May  8 00:05:13 2009	(r38558)
@@ -201,9 +201,10 @@
     const char *sig_p;
     Parrot_Context * const old_ctx = CONTEXT(interp);
 
-    interp->current_cont  = new_ret_continuation_pmc(interp, NULL);
+    interp->current_cont   = new_ret_continuation_pmc(interp, NULL);
     interp->current_object = obj;
-    dest = VTABLE_invoke(interp, sub, NULL);
+    dest                   = VTABLE_invoke(interp, sub, NULL);
+
     if (!dest)
         Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_PARROT_USAGE_ERROR,
             "Subroutine returned a NULL address");

Modified: branches/pmc_pct/src/debug.c
==============================================================================
--- branches/pmc_pct/src/debug.c	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/debug.c	Fri May  8 00:05:13 2009	(r38558)
@@ -587,9 +587,7 @@
 get_cmd(ARGIN_NULLOK(const char **cmd))
 {
     ASSERT_ARGS(get_cmd)
-    if (cmd == NULL || *cmd == NULL)
-        return NULL;
-    else {
+    if (cmd && *cmd) {
         const char * const start = skip_whitespace(*cmd);
         const char *next = start;
         char c;
@@ -626,9 +624,8 @@
             *cmd = skip_whitespace(next);
             return DebCmdList[found].cmd;
         }
-        else
-            return NULL;
     }
+    return NULL;
 }
 
 /*
@@ -1331,7 +1328,6 @@
 PDB_run_command(PARROT_INTERP, ARGIN(const char *command))
 {
     ASSERT_ARGS(PDB_run_command)
-    unsigned long c;
     PDB_t        * const pdb = interp->pdb;
     const DebuggerCmd *cmd;
 
@@ -2760,7 +2756,7 @@
         static const char regs[] = "ISPN";
 
         for (j = 0; j < n_values; j++) {
-            unsigned int idx = 0;
+            size_t idx = 0;
             const int sig_value = VTABLE_get_integer_keyed_int(interp, sig, j);
 
             /* Print the register name, e.g. P37. */

Modified: branches/pmc_pct/src/dynext.c
==============================================================================
--- branches/pmc_pct/src/dynext.c	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/dynext.c	Fri May  8 00:05:13 2009	(r38558)
@@ -41,6 +41,12 @@
 
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
+static void * dlopen_string(PARROT_INTERP, ARGIN(STRING *path))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
 static STRING * get_path(PARROT_INTERP,
     ARGMOD_NULLOK(STRING *lib),
     ARGOUT(void **handle),
@@ -97,6 +103,9 @@
        PARROT_ASSERT_ARG(d) \
     || PARROT_ASSERT_ARG(s) \
     || PARROT_ASSERT_ARG(value)
+#define ASSERT_ARGS_dlopen_string __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+       PARROT_ASSERT_ARG(interp) \
+    || PARROT_ASSERT_ARG(path)
 #define ASSERT_ARGS_get_path __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(handle) \
@@ -172,7 +181,7 @@
             IGLOBALS_DYN_LIBS);
 
     /* remember path/file in props */
-    set_cstring_prop(interp, lib_pmc, "_filename", path);  /* XXX */
+    set_cstring_prop(interp, lib_pmc, "_filename", path);
     set_cstring_prop(interp, lib_pmc, "_type", type);
 
     if (lib_name)
@@ -208,6 +217,29 @@
 
 /*
 
+=item C<static void * dlopen_string(PARROT_INTERP, STRING *path)>
+
+Call Parrot_dlopen with the Parrot String argument converted to C string.
+
+=cut
+
+*/
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
+static void *
+dlopen_string(PARROT_INTERP, ARGIN(STRING *path))
+{
+    ASSERT_ARGS(dlopen_string)
+
+    char *pathstr = Parrot_str_to_cstring(interp, path);
+    void *handle = Parrot_dlopen(pathstr);
+    Parrot_str_free_cstring(pathstr);
+    return handle;
+}
+
+/*
+
 =item C<static STRING * get_path(PARROT_INTERP, STRING *lib, void **handle,
 STRING *wo_ext, STRING *ext)>
 
@@ -259,7 +291,7 @@
             path = Parrot_locate_runtime_file_str(interp, full_name,
                     PARROT_RUNTIME_FT_DYNEXT);
             if (path) {
-                *handle = Parrot_dlopen(path->strstart);
+                *handle = dlopen_string(interp, path);
                 if (*handle) {
                     return path;
                 }
@@ -274,7 +306,7 @@
              * File with extension and prefix was not found,
              * so try file.extension w/o prefix
              */
-            *handle = Parrot_dlopen(full_name->strstart);
+            *handle = dlopen_string(interp, full_name);
             if (*handle) {
                 return full_name;
             }
@@ -289,7 +321,7 @@
     full_name = Parrot_locate_runtime_file_str(interp, lib,
             PARROT_RUNTIME_FT_DYNEXT);
     if (full_name) {
-        *handle = Parrot_dlopen((char *)full_name->strstart);
+        *handle = dlopen_string(interp, full_name);
         if (*handle) {
             return full_name;
         }
@@ -300,7 +332,7 @@
      */
 #ifdef WIN32
     if (!STRING_IS_EMPTY(lib) && memcmp(lib->strstart, "lib", 3) == 0) {
-        *handle = Parrot_dlopen((char*)lib->strstart + 3);
+        *handle = Parrot_dlopen((char *)lib->strstart + 3);
         if (*handle) {
             path = Parrot_str_substr(interp, lib, 3, lib->strlen - 3, NULL, 0);
             return path;
@@ -314,7 +346,7 @@
         path = Parrot_str_append(interp, CONST_STRING(interp, "cyg"),
             Parrot_str_substr(interp, lib, 3, lib->strlen - 3, NULL, 0));
 
-        *handle           = Parrot_dlopen(path->strstart);
+        *handle = dlopen_string(interp, path);
 
         if (*handle)
             return path;
@@ -423,9 +455,6 @@
     if (!load_func)
         type = CONST_STRING(interp, "NCI");
     else {
-        /* we could set a private flag in the PMC header too
-         * but currently only ops files have struct_val set */
-
         if (((Parrot_ParrotLibrary_attributes *)PMC_data(lib_pmc))->oplib_init)
             type = CONST_STRING(interp, "Ops");
         else

Modified: branches/pmc_pct/src/dynpmc/ext.pir
==============================================================================
--- branches/pmc_pct/src/dynpmc/ext.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/dynpmc/ext.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2003-2009, Parrot Foundation.
 # $Id$
 
 .sub _ext_main

Modified: branches/pmc_pct/src/dynpmc/main.pasm
==============================================================================
--- branches/pmc_pct/src/dynpmc/main.pasm	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/dynpmc/main.pasm	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2003-2009, Parrot Foundation.
 # $Id$
 
 # experimental subproxy class test

Modified: branches/pmc_pct/src/embed.c
==============================================================================
--- branches/pmc_pct/src/embed.c	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/embed.c	Fri May  8 00:05:13 2009	(r38558)
@@ -106,9 +106,6 @@
     return make_interpreter(parent, PARROT_NO_FLAGS);
 }
 
-extern void Parrot_initialize_core_pmcs(PARROT_INTERP);
-
-
 /*
 
 =item C<void Parrot_init_stacktop(PARROT_INTERP, void *stack_top)>

Modified: branches/pmc_pct/src/exceptions.c
==============================================================================
--- branches/pmc_pct/src/exceptions.c	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/exceptions.c	Fri May  8 00:05:13 2009	(r38558)
@@ -331,12 +331,14 @@
 Parrot_ex_throw_from_c(PARROT_INTERP, ARGIN(PMC *exception))
 {
     ASSERT_ARGS(Parrot_ex_throw_from_c)
-    PMC * const handler = Parrot_cx_find_handler_local(interp, exception);
-    RunProfile * const profile      = interp->profile;
+
     Parrot_runloop    *return_point = interp->current_runloop;
-    if (PMC_IS_NULL(handler)) {
+    RunProfile * const profile      = interp->profile;
+    PMC        * const handler      =
+                             Parrot_cx_find_handler_local(interp, exception);
+
+    if (PMC_IS_NULL(handler))
         die_from_exception(interp, exception);
-    }
 
     /* If profiling, remember end time of lastop and generate entry for
      * exception. */
@@ -350,8 +352,10 @@
     }
 
     if (Interp_debug_TEST(interp, PARROT_BACKTRACE_DEBUG_FLAG)) {
-        STRING * const msg = VTABLE_get_string(interp, exception);
-        int exitcode       = VTABLE_get_integer_keyed_str(interp, exception, CONST_STRING(interp, "exit_code"));
+        STRING * const exit_code = CONST_STRING(interp, "exit_code");
+        STRING * const msg       = VTABLE_get_string(interp, exception);
+        int            exitcode  = VTABLE_get_integer_keyed_str(interp,
+                                        exception, exit_code);
 
         Parrot_io_eprintf(interp,
             "Parrot_ex_throw_from_c (severity:%d error:%d): %Ss\n",
@@ -370,7 +374,7 @@
     Parrot_runops_fromc_args(interp, handler, "vP", exception);
 
     /* After handling a C exception, you don't want to resume at the point
-     * where the C exception was thrown, you want to resume the next outer
+     * where the C exception was thrown.  You want to resume the next outer
      * runloop.  */
     longjmp(return_point->resume, 1);
 }
@@ -460,8 +464,6 @@
 Parrot_ex_rethrow_from_op(PARROT_INTERP, ARGIN(PMC *exception))
 {
     ASSERT_ARGS(Parrot_ex_rethrow_from_op)
-    if (exception->vtable->base_type != enum_class_Exception)
-        PANIC(interp, "Illegal rethrow");
 
     Parrot_ex_mark_unhandled(interp, exception);
 

Modified: branches/pmc_pct/src/global.c
==============================================================================
--- branches/pmc_pct/src/global.c	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/global.c	Fri May  8 00:05:13 2009	(r38558)
@@ -130,7 +130,7 @@
     PMC *ns = base_ns;
     INTVAL i, n;
 
-    if (pmc_key->vtable->base_type == enum_class_String) {
+    if (VTABLE_isa(interp, pmc_key, CONST_STRING(interp, "String"))) {
         STRING *str_key = VTABLE_get_string(interp, pmc_key);
         return internal_ns_keyed_str(interp, base_ns, str_key, flags);
     }

Modified: branches/pmc_pct/src/hash.c
==============================================================================
--- branches/pmc_pct/src/hash.c	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/hash.c	Fri May  8 00:05:13 2009	(r38558)
@@ -30,6 +30,9 @@
 #include "parrot/parrot.h"
 #include "pmc/pmc_key.h"
 
+/* the number of entries above which it's faster to hash the hashval instead of
+ * looping over the used HashBuckets directly */
+#define SMALL_HASH_SIZE  4
 #define INITIAL_BUCKETS 16
 
 /* HEADERIZER HFILE: include/parrot/hash.h */
@@ -1188,13 +1191,35 @@
 parrot_hash_get_bucket(PARROT_INTERP, ARGIN(const Hash *hash), ARGIN(const void *key))
 {
     ASSERT_ARGS(parrot_hash_get_bucket)
-    if (hash->entries > 0) {
+
+    if (hash->entries <= 0)
+        return NULL;
+
+    /* a very fast search for very small hashes */
+    if (hash->entries <= SMALL_HASH_SIZE) {
+        const UINTVAL  entries = hash->entries;
+        UINTVAL        i;
+
+        for (i = 0; i < entries; i++) {
+            HashBucket *bucket = hash->bs + i;
+
+            /* the hash->compare cost is too high for this fast path */
+            if (bucket->key && bucket->key == key)
+                return bucket;
+        }
+    }
+
+    /* if the fast search didn't work, try the normal hashing search */
+    {
         const UINTVAL hashval = (hash->hash_val)(interp, key, hash->seed);
         HashBucket   *bucket  = hash->bi[hashval & hash->mask];
 
         while (bucket) {
-            /* store hash_val or not */
-            if ((hash->compare)(interp, key, bucket->key) == 0)
+            /* key equality is always a match, so it's worth checking */
+            if (bucket->key == key
+
+            /* ... but the slower comparison is more accurate */
+            || ((hash->compare)(interp, key, bucket->key) == 0))
                 return bucket;
             bucket = bucket->next;
         }

Modified: branches/pmc_pct/src/interp/inter_create.c
==============================================================================
--- branches/pmc_pct/src/interp/inter_create.c	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/interp/inter_create.c	Fri May  8 00:05:13 2009	(r38558)
@@ -424,8 +424,6 @@
     /* deinit op_lib */
     (void) PARROT_CORE_OPLIB_INIT(0);
 
-    stack_destroy(interp->dynamic_env);
-
     destroy_context(interp);
     destroy_runloop_jump_points(interp);
 

Modified: branches/pmc_pct/src/jit.c
==============================================================================
--- branches/pmc_pct/src/jit.c	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/jit.c	Fri May  8 00:05:13 2009	(r38558)
@@ -1785,38 +1785,47 @@
 PMC *
 Parrot_jit_clone_buffer(PARROT_INTERP, PMC *pmc, void *priv)
 {
-    struct jit_buffer_private_data *jit = (struct jit_buffer_private_data*)priv;
     PMC *rv = pmc_new(interp, pmc->vtable->base_type);
-    void *tmp, *freepriv, *clonepriv;
 
     VTABLE_init(interp, rv);
     /* copy the attributes */
-    GETATTR_ManagedStruct_custom_free_func(interp, pmc, tmp);
-    SETATTR_ManagedStruct_custom_free_func(interp, rv , tmp);
-    GETATTR_ManagedStruct_custom_clone_func(interp, pmc, tmp);
-    SETATTR_ManagedStruct_custom_clone_func(interp, rv , tmp);
-    GETATTR_ManagedStruct_custom_free_priv(interp , pmc, freepriv);
-    GETATTR_ManagedStruct_custom_clone_priv(interp, pmc, clonepriv);
-    if (freepriv) {
-        tmp = mem_sys_allocate(sizeof (struct jit_buffer_private_data));
-        memcpy(tmp, freepriv, sizeof (struct jit_buffer_private_data));
-        SETATTR_ManagedStruct_custom_free_priv(interp, rv , tmp);
-        if (clonepriv == freepriv) {
-            /* clonepriv is a copy of freepriv, make it a copy in the clone too. */
+    {
+        void (*tmpfreefunc)(PARROT_INTERP, void*, void*);
+        GETATTR_ManagedStruct_custom_free_func(interp, pmc, tmpfreefunc);
+        SETATTR_ManagedStruct_custom_free_func(interp, rv , tmpfreefunc);
+    }
+    {
+        PMC* (*tmpclonefunc)(PARROT_INTERP, PMC*, void*);
+        GETATTR_ManagedStruct_custom_clone_func(interp, pmc, tmpclonefunc);
+        SETATTR_ManagedStruct_custom_clone_func(interp, rv , tmpclonefunc);
+    }
+
+    {
+        void *freepriv, *clonepriv;
+        GETATTR_ManagedStruct_custom_free_priv(interp , pmc, freepriv);
+        GETATTR_ManagedStruct_custom_clone_priv(interp, pmc, clonepriv);
+        if (freepriv) {
+            void *tmp = mem_sys_allocate(sizeof (struct jit_buffer_private_data));
+            memcpy(tmp, freepriv, sizeof (struct jit_buffer_private_data));
+            SETATTR_ManagedStruct_custom_free_priv(interp, rv , tmp);
+            if (clonepriv == freepriv) {
+                /* clonepriv is a copy of freepriv, make it a copy in the clone too. */
+                SETATTR_ManagedStruct_custom_clone_priv(interp, rv , tmp);
+                clonepriv = NULL; /* disable the clonepriv copying below */
+            }
+        }
+        if (clonepriv) {
+            void *tmp = mem_sys_allocate(sizeof (struct jit_buffer_private_data));
+            memcpy(tmp, clonepriv, sizeof (struct jit_buffer_private_data));
             SETATTR_ManagedStruct_custom_clone_priv(interp, rv , tmp);
-            clonepriv = NULL; /* disable the clonepriv copying below */
         }
     }
-    if (clonepriv) {
-        tmp = mem_sys_allocate(sizeof (struct jit_buffer_private_data));
-        memcpy(tmp, clonepriv, sizeof (struct jit_buffer_private_data));
-        SETATTR_ManagedStruct_custom_clone_priv(interp, rv , tmp);
-    }
 
     /* copy the execmem buffer */
     if (PARROT_MANAGEDSTRUCT(pmc)->ptr) {
-        void *newptr, *ptr = PARROT_MANAGEDSTRUCT(pmc)->ptr;
-        newptr = mem_alloc_executable(jit->size);
+        struct jit_buffer_private_data *jit = (struct jit_buffer_private_data*)priv;
+        void *ptr = PARROT_MANAGEDSTRUCT(pmc)->ptr;
+        void *newptr = mem_alloc_executable(jit->size);
         memcpy(newptr, ptr, jit->size);
         PARROT_MANAGEDSTRUCT(rv)->ptr = newptr;
     }

Modified: branches/pmc_pct/src/jit/i386/jit_emit.h
==============================================================================
--- branches/pmc_pct/src/jit/i386/jit_emit.h	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/jit/i386/jit_emit.h	Fri May  8 00:05:13 2009	(r38558)
@@ -1584,8 +1584,8 @@
 
 #  include "parrot/oplib/ops.h"
 
-EXTERN INTVAL Parrot_FixedIntegerArray_get_integer_keyed_int(Interp*, PMC*, INTVAL);
-EXTERN void Parrot_FixedIntegerArray_set_integer_keyed_int(Interp*, PMC*, INTVAL, INTVAL);
+INTVAL Parrot_FixedIntegerArray_get_integer_keyed_int(Interp*, PMC*, INTVAL);
+void Parrot_FixedIntegerArray_set_integer_keyed_int(Interp*, PMC*, INTVAL, INTVAL);
 
 char * jit_set_i_p_ki(Parrot_jit_info_t *jit_info, PARROT_INTERP,
     size_t offset);

Modified: branches/pmc_pct/src/multidispatch.c
==============================================================================
--- branches/pmc_pct/src/multidispatch.c	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/multidispatch.c	Fri May  8 00:05:13 2009	(r38558)
@@ -1332,14 +1332,31 @@
     ASSERT_ARGS(Parrot_mmd_add_multi_list_from_c_args)
     INTVAL i;
     for (i = 0; i < elements; ++i) {
+        funcptr_t func_ptr  = mmd_info[i].func_ptr;
+
+        STRING   *sub_name  = mmd_info[i].multi_name;
+        STRING   *long_sig  = mmd_info[i].full_sig;
+        STRING   *short_sig = mmd_info[i].short_sig;
+        PMC      *type_list = Parrot_str_split(interp, CONST_STRING(interp, ","), long_sig);
+        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    *multi_sig     = mmd_build_type_tuple_from_long_sig(interp,
+                                long_sig);
+
 #ifdef PARROT_HAS_ALIGNED_FUNCPTR
-        PARROT_ASSERT((PTR2UINTVAL(mmd_info[i].func_ptr) & 3) == 0);
+        PARROT_ASSERT((PTR2UINTVAL(func_ptr) & 3) == 0);
 #endif
-        Parrot_mmd_add_multi_from_c_args(interp,
-                mmd_info[i].multi_name,
-                mmd_info[i].short_sig,
-                mmd_info[i].full_sig,
-                mmd_info[i].func_ptr);
+
+        VTABLE_set_pointer_keyed_str(interp, sub_obj, short_sig,
+                                     F2DPTR(func_ptr));
+
+        /* Attach a type tuple array to the NCI sub for multi dispatch */
+        SETATTR_NCI_multi_sig(interp, sub_obj, multi_sig);
+
+        mmd_add_multi_to_namespace(interp, ns_name, sub_name, sub_obj);
+        mmd_add_multi_global(interp, sub_name, sub_obj);
     }
 }
 

Modified: branches/pmc_pct/src/oo.c
==============================================================================
--- branches/pmc_pct/src/oo.c	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/oo.c	Fri May  8 00:05:13 2009	(r38558)
@@ -1003,7 +1003,7 @@
 {
     ASSERT_ARGS(C3_merge)
     PMC      *accepted   = PMCNULL;
-    PMC      *result     = pmc_new(interp, enum_class_ResizablePMCArray);
+    PMC      *result     = PMCNULL;
     const int list_count = VTABLE_elements(interp, merge_list);
     int       cand_count = 0;
     int       i;
@@ -1100,14 +1100,14 @@
 Parrot_ComputeMRO_C3(PARROT_INTERP, ARGIN(PMC *_class))
 {
     ASSERT_ARGS(Parrot_ComputeMRO_C3)
+
+    PMC *merge_list        = PMCNULL;
+    PMC *immediate_parents = VTABLE_inspect_str(interp, _class, CONST_STRING(interp, "parents"));
     PMC *result;
-    PMC * const merge_list = pmc_new(interp, enum_class_ResizablePMCArray);
-    PMC *immediate_parents;
-    int i, parent_count;
+
+    int  i, parent_count;
 
     /* Now get immediate parents list. */
-    Parrot_PCCINVOKE(interp, _class, CONST_STRING(interp, "parents"),
-        "->P", &immediate_parents);
 
     if (!immediate_parents)
         Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_METHOD_NOT_FOUND,
@@ -1131,6 +1131,10 @@
         if (PMC_IS_NULL(lin))
             return PMCNULL;
 
+        /* instantiated lazily */
+        if (PMC_IS_NULL(merge_list))
+            merge_list = pmc_new(interp, enum_class_ResizablePMCArray);
+
         VTABLE_push_pmc(interp, merge_list, lin);
     }
 

Modified: branches/pmc_pct/src/ops/core.ops
==============================================================================
--- branches/pmc_pct/src/ops/core.ops	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/ops/core.ops	Fri May  8 00:05:13 2009	(r38558)
@@ -733,7 +733,7 @@
 =cut
 
 inline op set_addr(out INT, inconst LABEL) {
-    $1 = PTR2OPCODE_T(CUR_OPCODE + $2);
+    $1 = PTR2INTVAL(CUR_OPCODE + $2);
 }
 
 inline op set_addr(invar PMC, inconst LABEL) {
@@ -866,27 +866,41 @@
 }
 
 inline op throw(invar PMC) :flow {
+    PMC * except = $1;
     opcode_t *dest;
     opcode_t *const ret    = expr NEXT();
     PMC            *resume = new_ret_continuation_pmc(interp, ret);
+    if (PMC_IS_NULL(except) || except->vtable->base_type != enum_class_Exception)
+        except = Parrot_ex_build_exception(interp, EXCEPT_fatal, 1, NULL);
     /*
      * We might return here after handling the exception, so mark the
      * current context appropriately.
      */
     Parrot_context_ref(interp, CONTEXT(interp));
-    VTABLE_set_attr_str(interp, $1, Parrot_str_new_constant(interp, "resume"), resume);
-    dest = Parrot_ex_throw_from_op(interp, $1, ret);
+    VTABLE_set_attr_str(interp, except, Parrot_str_new_constant(interp, "resume"), resume);
+    dest = Parrot_ex_throw_from_op(interp, except, ret);
     goto ADDRESS(dest);
 }
 
 inline op throw(invar PMC, invar PMC) :flow {
-    opcode_t * const dest = Parrot_ex_throw_from_op(interp, $1,
+    opcode_t * dest;
+    PMC * except = $1;
+    if (PMC_IS_NULL(except) || except->vtable->base_type != enum_class_Exception)
+        except = Parrot_ex_build_exception(interp, EXCEPT_fatal, 1, NULL);
+    dest = Parrot_ex_throw_from_op(interp, $1,
                                 VTABLE_get_pointer(interp, $2));
     goto ADDRESS(dest);
 }
 
 inline op rethrow(invar PMC) :flow {
-    opcode_t * const dest = Parrot_ex_rethrow_from_op(interp, $1);
+    opcode_t * dest;
+    if (PMC_IS_NULL($1) || $1->vtable->base_type != enum_class_Exception) {
+        opcode_t * const ret = expr NEXT();
+        PMC * except = Parrot_ex_build_exception(interp, EXCEPT_fatal, 1, NULL);
+        dest = Parrot_ex_throw_from_op(interp, except, ret);
+        goto ADDRESS(dest);
+    }
+    dest = Parrot_ex_rethrow_from_op(interp, $1);
     goto ADDRESS(dest);
 }
 

Modified: branches/pmc_pct/src/packfile.c
==============================================================================
--- branches/pmc_pct/src/packfile.c	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/packfile.c	Fri May  8 00:05:13 2009	(r38558)
@@ -4818,7 +4818,6 @@
 Parrot_load_bytecode(PARROT_INTERP, ARGIN_NULLOK(STRING *file_str))
 {
     ASSERT_ARGS(Parrot_load_bytecode)
-    char           *filename;
     STRING         *wo_ext, *ext, *pbc, *path;
     PMC            *is_loaded_hash;
     enum_runtime_ft file_type;

Modified: branches/pmc_pct/src/pmc/capture.pmc
==============================================================================
--- branches/pmc_pct/src/pmc/capture.pmc	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/pmc/capture.pmc	Fri May  8 00:05:13 2009	(r38558)
@@ -546,9 +546,12 @@
         /* XXX:  This workaround is for when we get here as
                  part of a subclass of Capture */
         if (PObj_is_object_TEST(SELF)) {
-            STRING *classname = CONST_STRING(INTERP, "Capture");
-            PMC    *classobj  = Parrot_oo_get_class_str(INTERP, classname);
             STRING *attribute = CONST_STRING(interp, "proxy");
+            PMC    *classobj;
+            PMC *ns = INTERP->root_namespace;
+            ns = Parrot_get_namespace_keyed_str(INTERP, ns, CONST_STRING(INTERP, "parrot"));
+            ns = Parrot_get_namespace_keyed_str(INTERP, ns, CONST_STRING(INTERP, "Capture"));
+            classobj  = Parrot_oo_get_class(INTERP, ns);
             capt              = VTABLE_get_attr_keyed(interp, SELF, classobj, attribute);
         }
 

Modified: branches/pmc_pct/src/pmc/class.pmc
==============================================================================
--- branches/pmc_pct/src/pmc/class.pmc	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/pmc/class.pmc	Fri May  8 00:05:13 2009	(r38558)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2001-2008, Parrot Foundation.
+Copyright (C) 2001-2009, Parrot Foundation.
 $Id$
 
 =head1 NAME
@@ -404,6 +404,30 @@
     return _class->name;
 }
 
+/* calculates the C3 method resolution order for this class --
+ * working hard *not* to recalculate MRO when unnecessary */
+static PMC *
+calculate_mro(PARROT_INTERP, PMC *SELF, INTVAL num_parents)
+{
+    Parrot_Class_attributes  * const _class = PARROT_CLASS(SELF);
+
+    /* SELF is already on the all_parents */
+    if (num_parents == 0)
+        return _class->all_parents;
+
+    if (num_parents == 1) {
+            STRING *ap         = CONST_STRING(interp, "all_parents");
+            PMC    *parent     = VTABLE_get_pmc_keyed_int(interp,
+                                    _class->parents, 0);
+            PMC    *parent_mro = VTABLE_inspect_str(interp, parent, ap);
+            PMC    *mro        = VTABLE_clone(interp, parent_mro);
+            VTABLE_unshift_pmc(interp, mro, SELF);
+            return mro;
+    }
+
+    return Parrot_ComputeMRO_C3(interp, SELF);
+}
+
 /*
 
 =back
@@ -682,14 +706,19 @@
 */
     VTABLE void add_method(STRING *name, PMC *sub) {
         Parrot_Class_attributes * const _class = PARROT_CLASS(SELF);
+        PMC                     * const method =
+                 VTABLE_get_pmc_keyed_str(interp, _class->methods, name);
 
         /* If we have already added a method with this name... */
-        if (VTABLE_exists_keyed_str(interp, _class->methods, name))
-            /* RT #46095 Need to handle multi methods here. */
+        if (!PMC_IS_NULL(method)) {
+            if (method == sub)
+                return;
+
             Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
                 "A method named '%S' already exists in class '%S'. "
                 "It may have been supplied by a role.",
                 name, VTABLE_get_string(interp, SELF));
+        }
 
         /* Enter it into the table. */
         VTABLE_set_pmc_keyed_str(interp, _class->methods, name, sub);
@@ -725,17 +754,25 @@
 */
     VTABLE void add_vtable_override(STRING *name, PMC *sub) {
         Parrot_Class_attributes * const _class = PARROT_CLASS(SELF);
+        PMC                     * const vtable =
+            VTABLE_get_pmc_keyed_str(interp, _class->vtable_overrides, name);
 
         /* If we have already added a vtable override with this name... */
-        if (VTABLE_exists_keyed_str(interp, _class->vtable_overrides, name))
-            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
+        if (!PMC_IS_NULL(vtable)) {
+            if (vtable == sub)
+                return;
+
+            Parrot_ex_throw_from_c_args(interp, NULL,
+                EXCEPTION_INVALID_OPERATION,
                 "A vtable override named '%S' already exists in class '%S'. "
                 "It may have been supplied by a role.",
                 name, VTABLE_get_string(interp, SELF));
+        }
 
         /* Check that the name is actually valid as a vtable override */
         if (Parrot_get_vtable_index(interp, name) == -1)
-            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_METHOD_NOT_FOUND,
+            Parrot_ex_throw_from_c_args(interp, NULL,
+                EXCEPTION_METHOD_NOT_FOUND,
                 "'%S' is not a valid vtable function name.", name);
 
         /* Add it to vtable methods list. */
@@ -812,7 +849,7 @@
 
         /* Add to the lists of our immediate parents and all parents. */
         VTABLE_push_pmc(interp, _class->parents, parent);
-        _class->all_parents = Parrot_ComputeMRO_C3(interp, SELF);
+        _class->all_parents = calculate_mro(interp, SELF, parent_count + 1);
 
         /* Anonymous classes have no entry in the vtable array */
         if (!CLASS_is_anon_TEST(SELF))
@@ -871,9 +908,9 @@
             VTABLE_set_pmc_keyed_int(interp, _class->parents,
                 index, current_parent);
         }
-        VTABLE_pop_pmc(interp, _class->parents);
 
-        _class->all_parents = Parrot_ComputeMRO_C3(interp, SELF);
+        VTABLE_pop_pmc(interp, _class->parents);
+        _class->all_parents = calculate_mro(interp, SELF, parent_count - 1);
 
         /* Anonymous classes have no entry in the vtable array */
         if (!CLASS_is_anon_TEST(SELF))
@@ -988,19 +1025,23 @@
                 "Unknown introspection value '%S'", what);
 
         /* return found value */
-        if (PMC_IS_NULL(found)) { return PMCNULL; }
+        if (PMC_IS_NULL(found))
+            return PMCNULL;
+
         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 iter = VTABLE_get_iter(interp, found);
+            PMC * const hash  = 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);
-                PMC * value  = VTABLE_get_pmc_keyed_str(interp, found, key);
+                STRING *key   = VTABLE_shift_string(interp, iter);
+                PMC    *value = VTABLE_get_pmc_keyed_str(interp, found, key);
                 VTABLE_set_pmc_keyed_str(interp, hash, key, value);
             }
+
             return hash;
         }
+
         return VTABLE_clone(interp, found);
     }
 
@@ -1125,7 +1166,7 @@
 */
 
     VTABLE PMC *instantiate(PMC *init) {
-        Parrot_Class_attributes  * const _class    = PARROT_CLASS(SELF);
+        Parrot_Class_attributes  * const _class = PARROT_CLASS(SELF);
 
         Parrot_Object_attributes *obj_guts;
         PMC                      *object;
@@ -1133,10 +1174,12 @@
         /* If we've not been instantiated before... */
         if (!_class->instantiated) {
             /* Check that we have all methods listed in resolve list. */
-            const int resolve_count = VTABLE_elements(interp, _class->resolve_method);
-            const INTVAL cur_hll    = CONTEXT(interp)->current_HLL;
-            INTVAL    mro_length;
-            int       i;
+            const int resolve_count  = VTABLE_elements(interp,
+                                                       _class->resolve_method);
+            const INTVAL cur_hll     = CONTEXT(interp)->current_HLL;
+            const INTVAL num_parents = VTABLE_elements(interp, _class->parents);
+            INTVAL       mro_length;
+            int          i;
 
             /* don't use HLL mappings for internal-only data */
             CONTEXT(interp)->current_HLL = 0;
@@ -1152,7 +1195,7 @@
 
             /* Build full parents list.
              * RT #46101 Need pluggable MRO, for now always do C3. */
-            _class->all_parents = Parrot_ComputeMRO_C3(interp, SELF);
+             _class->all_parents = calculate_mro(interp, SELF, num_parents);
 
             if (!CLASS_is_anon_TEST(SELF))
                 interp->vtables[VTABLE_type(interp, SELF)]->mro = _class->all_parents;

Modified: branches/pmc_pct/src/pmc/codestring.pmc
==============================================================================
--- branches/pmc_pct/src/pmc/codestring.pmc	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/pmc/codestring.pmc	Fri May  8 00:05:13 2009	(r38558)
@@ -37,6 +37,16 @@
 #endif
 
 pmclass CodeString extends String provides string {
+    ATTR INTVAL last_line_number; /* most recent line number seen   */
+    ATTR INTVAL last_pos;         /* most recent byte position seen */
+
+    VTABLE void init() {
+        Parrot_CodeString_attributes *attrs =
+            mem_allocate_zeroed_typed(Parrot_CodeString_attributes);
+        attrs->str_val = Parrot_str_new_noinit(INTERP, enum_stringrep_one, 0);
+        PMC_data(SELF) = attrs;
+        PObj_custom_mark_destroy_SETALL(SELF);
+    }
 
 /*
 
@@ -131,26 +141,52 @@
 
 =item lineof(INTVAL pos)
 
-Return the line number of the line at offset C<pos>.  This code
-assumes that the first line is line number zero.
+Return the line number of the line at offset C<pos>.  This code assumes that
+the first line is line number zero.
 
 */
 
   METHOD lineof(INTVAL pos) {
-    STRING *str  = SELF.get_string();
-    INTVAL line  = 0;
-    INTVAL ipos  = 0;
+    STRING *str            = SELF.get_string();
+    INTVAL line            = 0;
+    INTVAL ipos            = 0;
+    INTVAL seen_first_line = 0;
     INTVAL jpos;
+    INTVAL last_pos;
+
+    GET_ATTR_last_pos(INTERP, SELF, last_pos);
+
+    /* the previous line number for this position is the same */
+    if (last_pos == pos) {
+        GET_ATTR_last_line_number(INTERP, SELF, line);
+        RETURN(INTVAL line);
+    }
+
+    /* start from the previous max line number and position */
+    if (last_pos < pos) {
+        GET_ATTR_last_line_number(INTERP, SELF, line);
+        ipos = last_pos;
+    }
 
     jpos = Parrot_str_find_cclass(INTERP, enum_cclass_newline, str, ipos, pos);
+
     while (jpos < pos) {
         line++;
+
         ipos = jpos + 1;
+
         /* treat \r\n as a single line separator */
-        ipos += (string_ord(INTERP, str, jpos) == 13
-                 && string_ord(INTERP, str, jpos+1) == 10);
+        ipos += (string_ord(INTERP, str, jpos)     == 13
+             &&  string_ord(INTERP, str, jpos + 1) == 10);
         jpos = Parrot_str_find_cclass(INTERP, enum_cclass_newline, str, ipos, pos);
     }
+
+    /* cache this position and line number for next time */
+    if (pos > last_pos) {
+        SET_ATTR_last_pos(INTERP, SELF, jpos);
+        SET_ATTR_last_line_number(INTERP, SELF, line);
+    }
+
     RETURN(INTVAL line);
 }
 

Modified: branches/pmc_pct/src/pmc/default.pmc
==============================================================================
--- branches/pmc_pct/src/pmc/default.pmc	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/pmc/default.pmc	Fri May  8 00:05:13 2009	(r38558)
@@ -97,13 +97,13 @@
     if (!ro)
         ro = string_make(interp, "_ro", 3, "ascii",
             PObj_constant_FLAG|PObj_external_FLAG);
-    if (!Parrot_str_compare(interp, key, ro)) {
+    if (Parrot_str_equal(interp, key, ro)) {
 #else
 
     /*
-     * s2 in Parrot_str_compare is freed here
+     * s2 in Parrot_str_equal is freed here
      */
-    if (!Parrot_str_compare(interp, key, CONST_STRING(interp, "_ro"))) {
+    if (Parrot_str_equal(interp, key, CONST_STRING(interp, "_ro"))) {
 #endif
         /* pmc should set/clear readonly */
         const INTVAL on = VTABLE_get_bool(interp, value);
@@ -182,7 +182,7 @@
 static PMC*
 check_get_std_props(PARROT_INTERP, PMC *self, STRING *key) {
     if ((self->vtable->flags & (VTABLE_IS_CONST_FLAG | VTABLE_IS_READONLY_FLAG))
-        &&!Parrot_str_compare(interp, key, CONST_STRING(interp, "_ro"))) {
+       && Parrot_str_equal(interp, key, CONST_STRING(interp, "_ro"))) {
         PMC * const ret_val  = pmc_new(interp, enum_class_Integer);
         VTABLE_set_integer_native(interp, ret_val, 1);
         return ret_val;
@@ -264,7 +264,7 @@
     } while (1);
 }
 
-pmclass default abstract no_init {
+pmclass default abstract {
 
 /*
 

Modified: branches/pmc_pct/src/pmc/exception.pmc
==============================================================================
--- branches/pmc_pct/src/pmc/exception.pmc	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/pmc/exception.pmc	Fri May  8 00:05:13 2009	(r38558)
@@ -770,9 +770,7 @@
                 VTABLE_set_pmc_keyed_str(interp, frame, CONST_STRING(interp, "sub"), sub_pmc);
 
                 /* Look up any annotations and put them in the hash. */
-                if (!PMC_IS_NULL(sub_pmc)
-                &&  sub_pmc->vtable->base_type == enum_class_Sub) {
-
+                if (!PMC_IS_NULL(sub_pmc)) {
                     PMC_get_sub(interp, sub_pmc, sub);
 
                     if (sub->seg->annotations) {

Modified: branches/pmc_pct/src/pmc/fixedintegerarray.pmc
==============================================================================
--- branches/pmc_pct/src/pmc/fixedintegerarray.pmc	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/pmc/fixedintegerarray.pmc	Fri May  8 00:05:13 2009	(r38558)
@@ -184,9 +184,13 @@
                 : pmc_new(INTERP, SELF->vtable->base_type);
 
         GET_ATTR_int_array(INTERP, SELF, int_array);
+
         if (int_array) {
             INTVAL      *dest_int_array;
-            const INTVAL size = SELF.elements();
+            INTVAL       size;
+
+            GET_ATTR_size(INTERP, SELF, size);
+
             dest_int_array = mem_allocate_n_typed(size, INTVAL);
             SET_ATTR_size(INTERP, dest, size);
             SET_ATTR_int_array(INTERP, dest, dest_int_array);
@@ -209,7 +213,8 @@
 
 */
     VTABLE INTVAL get_bool() {
-        const INTVAL size = SELF.get_integer();
+        INTVAL size;
+        GET_ATTR_size(INTERP, SELF, size);
         return (INTVAL)(size != 0);
     }
 
@@ -222,7 +227,10 @@
 */
 
     VTABLE INTVAL elements() {
-        return SELF.get_integer();
+        INTVAL size;
+        GET_ATTR_size(INTERP, SELF, size);
+
+        return size;
     }
 
 /*
@@ -236,7 +244,9 @@
 */
 
     VTABLE INTVAL get_integer() {
-        return PARROT_FIXEDINTEGERARRAY(SELF)->size;
+        INTVAL size;
+        GET_ATTR_size(INTERP, SELF, size);
+        return size;
     }
 
 
@@ -252,8 +262,11 @@
 
     VTABLE INTVAL get_integer_keyed_int(INTVAL key) {
         INTVAL *int_array;
+        INTVAL  size;
 
-        if (key < 0 || key >= SELF.elements())
+        GET_ATTR_size(INTERP, SELF, size);
+
+        if (key < 0 || key >= size)
             Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_OUT_OF_BOUNDS,
                 "FixedIntegerArray: index out of bounds!");
 
@@ -335,9 +348,11 @@
 
     VTABLE STRING *get_repr() {
         STRING *res    = CONST_STRING(INTERP, "[ ");
-        const INTVAL n = SELF.get_integer();
+        INTVAL  n;
         INTVAL  j;
 
+        GET_ATTR_size(INTERP, SELF, n);
+
         for (j = 0; j < n; ++j) {
             PMC * const val = SELF.get_pmc_keyed_int(j);
             res = Parrot_str_append(INTERP, res, VTABLE_get_repr(INTERP, val));
@@ -411,7 +426,11 @@
 
     VTABLE void set_integer_native(INTVAL size) {
         INTVAL *int_array;
-        if (SELF.elements() || size < 1)
+        INTVAL  cur_size;
+
+        GET_ATTR_size(INTERP, SELF, cur_size);
+
+        if (cur_size || size < 1)
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
                 "FixedIntegerArray: Can't resize!");
 
@@ -434,8 +453,11 @@
 
     VTABLE void set_integer_keyed_int(INTVAL key, INTVAL value) {
         INTVAL *int_array;
+        INTVAL  size;
 
-        if (key < 0 || key >= SELF.elements())
+        GET_ATTR_size(INTERP, SELF, size);
+
+        if (key < 0 || key >= size)
             Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_OUT_OF_BOUNDS,
                 "FixedIntegerArray: index out of bounds!");
 
@@ -553,7 +575,12 @@
 
     METHOD sort(PMC *cmp_func) {
         INTVAL *int_array;
-        UINTVAL n = (UINTVAL)SELF.elements();
+        UINTVAL n;
+        INTVAL  size;
+
+        GET_ATTR_size(INTERP, SELF, size);
+
+        n = (UINTVAL)size;
 
         if (n > 1) {
             GET_ATTR_int_array(INTERP, SELF, int_array);
@@ -572,17 +599,20 @@
 */
 
     VTABLE PMC *get_iter() {
-        STRING     *name     = CONST_STRING(interp, "set_key");
-        PMC * const iter     = pmc_new_init(INTERP, enum_class_Iterator, SELF);
-        PMC * const key      = pmc_new(INTERP, enum_class_Key);
+        STRING     *name = CONST_STRING(interp, "set_key");
+        PMC * const iter = pmc_new_init(INTERP, enum_class_Iterator, SELF);
+        PMC * const key  = pmc_new(INTERP, enum_class_Key);
+        INTVAL      size;
 
         Parrot_PCCINVOKE(interp, iter, name, "P->", key);
         PObj_get_FLAGS(key) |= KEY_integer_FLAG;
 
-        if (SELF.get_integer() == 0)
-            VTABLE_set_integer_native(INTERP, key, -1);
-        else
+        GET_ATTR_size(INTERP, SELF, size);
+
+        if (size)
             VTABLE_set_integer_native(INTERP, key, 0);
+        else
+            VTABLE_set_integer_native(INTERP, key, -1);
 
         return iter;
     }
@@ -618,7 +648,7 @@
 
         SUPER(info);
 
-        n  = SELF.get_integer();
+        GET_ATTR_size(INTERP, SELF, n);
         VTABLE_push_integer(INTERP, io, n);
         GET_ATTR_int_array(INTERP, SELF, int_array);
 

Modified: branches/pmc_pct/src/pmc/hash.pmc
==============================================================================
--- branches/pmc_pct/src/pmc/hash.pmc	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/pmc/hash.pmc	Fri May  8 00:05:13 2009	(r38558)
@@ -71,31 +71,68 @@
 
 /*
 
-=item C<static STRING *make_hash_key(PARROT_INTERP, PMC *key)>
+=item C<static STRING *make_ro_hash_key(PARROT_INTERP, PMC *key)>
+
+Returns a Parrot STRING for C<*key>.
 
-Returns a Parrot string for C<*key>.
+You I<must not> modify this STRING, nor pass it to anything which may store it.
+It's only safe to use for looking up elements of a hash or deleting them --
+I<never> storing them.  (If you have to ask why, don't use this function.  It's
+for optimization purposes only.)
 
 =cut
 
 */
 
+static STRING
+*make_ro_hash_key(PARROT_INTERP, NOTNULL(PMC *key))
+{
+    STRING *s;
+
+    switch (PObj_get_FLAGS(key) & KEY_type_FLAGS) {
+        case KEY_string_FLAG:
+            GETATTR_Key_str_key(interp, key, s);
+            break;
+        case KEY_string_FLAG | KEY_register_FLAG:
+        {
+            INTVAL  int_key;
+            GETATTR_Key_int_key(interp, key, int_key);
+            s = REG_STR(interp, int_key);
+            break;
+        }
+        default:
+            s = key_string(interp, key);
+    }
+
+    if (STRING_IS_NULL(s))
+        Parrot_ex_throw_from_c_args(interp, NULL,
+            EXCEPTION_UNEXPECTED_NULL, "Hash: Cannot use NULL STRING key");
+
+    return s;
+}
+
+
+/*
+
+=item C<static STRING *make_hash_key(PARROT_INTERP, PMC *key)>
+
+Returns a Parrot STRING for C<*key>.  This STRING is safe to modify or store.
+
+=cut
+
+*/
 
 PARROT_CANNOT_RETURN_NULL
 static STRING
 *make_hash_key(PARROT_INTERP, NOTNULL(PMC *key))
 {
-    if (!key)
-        Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNEXPECTED_NULL,
-            "Hash: Cannot use NULL key");
-    else {
-        STRING * const keystr = key_string(interp, key);
-        if (STRING_IS_NULL(keystr))
-            Parrot_ex_throw_from_c_args(interp, NULL,
-                EXCEPTION_UNEXPECTED_NULL, "Hash: Cannot use NULL STRING key");
-        else
-            return keystr;
-    }
+    STRING * const keystr = key_string(interp, key);
+
+    if (STRING_IS_NULL(keystr))
+        Parrot_ex_throw_from_c_args(interp, NULL,
+            EXCEPTION_UNEXPECTED_NULL, "Hash: Cannot use NULL STRING key");
 
+    return keystr;
 }
 
 /* Needs ext struct for the next_for_GC pointer
@@ -281,7 +318,7 @@
             }
         }
 
-        keystr  = make_hash_key(INTERP, key);
+        keystr  = make_ro_hash_key(INTERP, key);
         b       = parrot_hash_get_bucket(INTERP, hash, keystr);
 
         if (!b)
@@ -349,7 +386,7 @@
     VTABLE FLOATVAL get_number_keyed(PMC *key) {
         PMC               *nextkey;
         PMC               *valpmc;
-        STRING     * const keystr = make_hash_key(INTERP, key);
+        STRING     * const keystr = make_ro_hash_key(INTERP, key);
         HashBucket * const b      = parrot_hash_get_bucket(INTERP,
                                            (Hash *)SELF.get_pointer(), keystr);
 
@@ -479,7 +516,7 @@
             return (STRING *)parrot_hash_get_idx(INTERP, hash, key);
         }
 
-        keystr = make_hash_key(INTERP, key);
+        keystr = make_ro_hash_key(INTERP, key);
         b      = parrot_hash_get_bucket(INTERP, hash, keystr);
 
         if (!b)
@@ -606,7 +643,7 @@
             return result;
         }
 
-        keystr = make_hash_key(INTERP, key);
+        keystr = make_ro_hash_key(INTERP, key);
         b      = parrot_hash_get_bucket(INTERP, hash, keystr);
 
         if (!b)
@@ -920,16 +957,15 @@
 
     VTABLE INTVAL exists_keyed(PMC *key) {
         Hash   * const h  = (Hash *)SELF.get_pointer();
-        STRING * const sx = key_string(INTERP, key);
-        HashBucket    *b;
-
-        key = key_next(INTERP, key);
-        b   = parrot_hash_get_bucket(INTERP, h, sx);
+        STRING * const sx = make_ro_hash_key(INTERP, key);
+        HashBucket    *b  = parrot_hash_get_bucket(INTERP, h, sx);
 
         /* no such key */
         if (!b)
             return 0;
 
+        key = key_next(INTERP, key);
+
         /* lookup stops here */
         if (!key)
             return 1;
@@ -968,20 +1004,19 @@
 
     VTABLE INTVAL defined_keyed(PMC *key) {
         Hash   * const h  = (Hash *)SELF.get_pointer();
-        STRING * const sx = key_string(INTERP, key);
-        HashBucket    *b;
-
-        key = key_next(INTERP, key);
-        b   = parrot_hash_get_bucket(INTERP, h, sx);
+        STRING * const sx = make_ro_hash_key(INTERP, key);
+        HashBucket    *b  = parrot_hash_get_bucket(INTERP, h, sx);
 
         /* no such key */
         if (!b)
             return 0;
 
+        key = key_next(INTERP, key);
+
         if (!key)
-            return VTABLE_defined(INTERP, (PMC*)b->value);
+            return VTABLE_defined(INTERP, (PMC *)b->value);
         else
-            return VTABLE_defined_keyed(INTERP, (PMC*)b->value, key);
+            return VTABLE_defined_keyed(INTERP, (PMC *)b->value, key);
     }
 
 /*
@@ -1008,20 +1043,19 @@
 
     VTABLE void delete_keyed(PMC *key) {
         Hash   * const h  = (Hash *)SELF.get_pointer();
-        STRING * const sx = key_string(INTERP, key);
-        HashBucket    *b;
-
-        key = key_next(INTERP, key);
-        b   = parrot_hash_get_bucket(INTERP, h, sx);
+        STRING * const sx = make_ro_hash_key(INTERP, key);
+        HashBucket    *b  = parrot_hash_get_bucket(INTERP, h, sx);
 
         /* no such key */
         if (!b)
             return;
 
+        key = key_next(INTERP, key);
+
         if (!key)
             parrot_hash_delete(INTERP, h, sx);
         else
-            VTABLE_delete_keyed(INTERP, (PMC*)b->value, key);
+            VTABLE_delete_keyed(INTERP, (PMC *)b->value, key);
     }
 
 /*

Modified: branches/pmc_pct/src/pmc/integer.pmc
==============================================================================
--- branches/pmc_pct/src/pmc/integer.pmc	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/pmc/integer.pmc	Fri May  8 00:05:13 2009	(r38558)
@@ -728,7 +728,7 @@
 
 
     MULTI void i_multiply(BigInt value) {
-        Parrot_BigInt_multiply_int(INTERP, value, SELF.get_integer(), SELF);
+        interp->vtables[enum_class_BigInt]->multiply_int(INTERP, value, SELF.get_integer(), SELF);
     }
 
 
@@ -1157,13 +1157,16 @@
 */
 
     VTABLE INTVAL is_equal(PMC *value) {
+        INTVAL retval;
         PMC *temp;
 
         switch (value->vtable->base_type) {
             case enum_class_BigInt:
                 temp = pmc_new(INTERP, enum_class_BigInt);
                 VTABLE_set_integer_native(INTERP, temp, SELF.get_integer());
-                return Parrot_BigInt_multi_is_equal_BigInt(INTERP, temp, value);
+                Parrot_mmd_multi_dispatch_from_c_args(interp,
+                    "is_equal", "PP->I", temp, value, &retval);
+                return retval;
                 break;
             default:
                 return (VTABLE_get_integer(INTERP, SELF)

Modified: branches/pmc_pct/src/pmc/managedstruct.pmc
==============================================================================
--- branches/pmc_pct/src/pmc/managedstruct.pmc	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/pmc/managedstruct.pmc	Fri May  8 00:05:13 2009	(r38558)
@@ -29,12 +29,12 @@
      * custom_free_func is called before the normal destroy() function does any
      * work.
      */
-    ATTR void *custom_free_func;
+    ATTR void (*custom_free_func)(PARROT_INTERP, void *, void *);
     ATTR void *custom_free_priv;
     /* if custom_clone_func is set, it will be called *instead* of the normal
      * clone() function logic.
      */
-    ATTR void *custom_clone_func;
+    ATTR PMC * (*custom_clone_func)(PARROT_INTERP, PMC *ptr, void *priv);
     ATTR void *custom_clone_priv;
 
 /*
@@ -86,8 +86,7 @@
     VTABLE void destroy() {
         void *ptr = PARROT_MANAGEDSTRUCT(SELF)->ptr;
         if (ptr) {
-            custom_free_func_t free_func =
-                (custom_free_func_t)PARROT_MANAGEDSTRUCT(SELF)->custom_free_func;
+            custom_free_func_t free_func = PARROT_MANAGEDSTRUCT(SELF)->custom_free_func;
             if (free_func) {
                 void *free_data = PARROT_MANAGEDSTRUCT(SELF)->custom_free_priv;
                 free_func(interp, ptr, free_data);
@@ -144,8 +143,7 @@
 */
 
     VTABLE PMC *clone() {
-        custom_clone_func_t clone_func =
-            (custom_clone_func_t)PARROT_MANAGEDSTRUCT(SELF)->custom_clone_func;
+        custom_clone_func_t clone_func = PARROT_MANAGEDSTRUCT(SELF)->custom_clone_func;
         PMC *dest;
         if (clone_func) {
             void *clone_data = PARROT_MANAGEDSTRUCT(SELF)->custom_clone_priv;

Modified: branches/pmc_pct/src/pmc/namespace.pmc
==============================================================================
--- branches/pmc_pct/src/pmc/namespace.pmc	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/pmc/namespace.pmc	Fri May  8 00:05:13 2009	(r38558)
@@ -68,8 +68,8 @@
     if (sub->vtable_index != -1) {
         /* Insert it in class, if there is a class */
         if (!PMC_IS_NULL(classobj) && PObj_is_class_TEST(classobj)) {
-            const char *vtable_key_c;
-            vtable_key_c = Parrot_get_vtable_name(interp, sub->vtable_index);
+            const char *vtable_key_c =
+                Parrot_get_vtable_name(interp, sub->vtable_index);
             PARROT_ASSERT(vtable_key_c);
             vtable_key = Parrot_str_new(interp, vtable_key_c,
                 strlen(vtable_key_c));
@@ -583,8 +583,6 @@
 
 /*
 
-/*
-
 =item C<METHOD add_sub(STRING *name, PMC *sub)>
 
 Stores the given sub under this namespace, with the given name.  Throws an
@@ -595,12 +593,15 @@
 */
 
     METHOD add_sub(STRING *name, PMC *sub) {
-        STRING * const s_sub = CONST_STRING(INTERP, "Sub");
+        STRING * const s_sub      = CONST_STRING(INTERP, "Sub");
         STRING * const s_multisub = CONST_STRING(INTERP, "MultiSub");
+        Parrot_sub    *real_sub;
+        INTVAL         vtable_idx = 0;
 
-        if (!VTABLE_isa(INTERP, sub, s_sub) &&
-                !VTABLE_isa(INTERP, sub, s_multisub))
-            Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
+        if (!VTABLE_isa(INTERP, sub, s_sub)
+        &&  !VTABLE_isa(INTERP, sub, s_multisub))
+            Parrot_ex_throw_from_c_args(INTERP, NULL,
+                EXCEPTION_INVALID_OPERATION,
                 "Invalid type %d in add_sub()", sub->vtable->base_type);
 
         VTABLE_set_pmc_keyed_str(INTERP, SELF, name, sub);
@@ -608,8 +609,6 @@
 
 /*
 
-/*
-
 =item C<METHOD add_var(STRING *name, PMC *var)>
 
 Stores the given variable under this namespace, with the given name.

Modified: branches/pmc_pct/src/pmc/object.pmc
==============================================================================
--- branches/pmc_pct/src/pmc/object.pmc	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/pmc/object.pmc	Fri May  8 00:05:13 2009	(r38558)
@@ -411,7 +411,7 @@
                 }
             }
         }
-        return (INTVAL)Parrot_default_get_integer(interp, pmc);
+        return interp->vtables[enum_class_default]->get_integer(interp, pmc);
     }
 
 /*
@@ -614,7 +614,7 @@
             }
         }
 
-        return (opcode_t *)Parrot_default_invoke(interp, pmc, next);
+        return (opcode_t *)interp->vtables[enum_class_default]->invoke(interp, pmc, next);
     }
 
 /*

Modified: branches/pmc_pct/src/pmc/orderedhash.pmc
==============================================================================
--- branches/pmc_pct/src/pmc/orderedhash.pmc	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/pmc/orderedhash.pmc	Fri May  8 00:05:13 2009	(r38558)
@@ -629,9 +629,10 @@
                 {
                     Hash     * const hash = (Hash *)SELF.get_pointer();
                     IMAGE_IO * const io   = info->image_io;
+                    const UINTVAL entries = hash->entries;
                     UINTVAL i;
 
-                    for (i = 0; i <= hash->entries; i++) {
+                    for (i = 0; i < entries; i++) {
                         HashBucket * const b   = hash->bs + i;
 
                         if (b) {

Modified: branches/pmc_pct/src/pmc/pmcproxy.pmc
==============================================================================
--- branches/pmc_pct/src/pmc/pmcproxy.pmc	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/pmc/pmcproxy.pmc	Fri May  8 00:05:13 2009	(r38558)
@@ -136,9 +136,10 @@
         mro_length = VTABLE_elements(interp, interp->vtables[type_num]->mro);
         for (i = 1; i < mro_length; i++) {
             PMC    *pclass = VTABLE_get_pmc_keyed_int(interp, interp->vtables[type_num]->mro, i);
+            PMC    *cns    = pclass->vtable->_namespace;
             STRING *cname  = pclass->vtable->whoami;
             if (Parrot_str_not_equal(interp, cname, CONST_STRING(interp, "scalar"))) {
-                PMC *pproxy = Parrot_oo_get_class_str(interp, cname);
+                PMC *pproxy = Parrot_oo_get_class(interp, cns);
                 VTABLE_push_pmc(interp, proxy_info->all_parents, pproxy);
             }
         }

Modified: branches/pmc_pct/src/pmc/scalar.pmc
==============================================================================
--- branches/pmc_pct/src/pmc/scalar.pmc	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/pmc/scalar.pmc	Fri May  8 00:05:13 2009	(r38558)
@@ -78,7 +78,7 @@
             dest = pmc_new(interp, enum_class_BigInt);
 
         VTABLE_set_integer_native(interp, dest, base);
-        Parrot_BigInt_bitwise_shl_int(interp, dest, shift_amount, dest);
+        interp->vtables[enum_class_BigInt]->bitwise_shl_int(interp, dest, shift_amount, dest);
     }
 
     return dest;

Modified: branches/pmc_pct/src/pmc_freeze.c
==============================================================================
--- branches/pmc_pct/src/pmc_freeze.c	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/pmc_freeze.c	Fri May  8 00:05:13 2009	(r38558)
@@ -34,15 +34,6 @@
 #include "parrot/parrot.h"
 #include "pmc_freeze.str"
 
-/* default.pmc thawing of properties */
-PARROT_EXPORT void
-Parrot_default_thaw(PARROT_INTERP, PMC *pmc, visit_info *info);
-
-/* XXX This should be in a header file. */
-PARROT_EXPORT void
-Parrot_default_thawfinish(PARROT_INTERP, PMC *pmc, visit_info *info);
-
-
 /* HEADERIZER HFILE: include/parrot/pmc_freeze.h */
 /* HEADERIZER BEGIN: static */
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
@@ -1364,7 +1355,7 @@
     }
     if (pos) {
         if (info->extra_flags == EXTRA_IS_PROP_HASH) {
-            Parrot_default_thaw(interp, pmc, info);
+            interp->vtables[enum_class_default]->thaw(interp, pmc, info);
             return;
         }
         /* else maybe VTABLE_thaw ... but there is no other extra stuff */
@@ -1750,7 +1741,7 @@
         if (thawing) {
             if (current == info->thaw_result)
                 finished_first = 1;
-            if (current->vtable->thawfinish != Parrot_default_thawfinish)
+            if (current->vtable->thawfinish != interp->vtables[enum_class_default]->thawfinish)
                 list_unshift(interp, finish_list, current, enum_type_PMC);
         }
     }

Modified: branches/pmc_pct/src/runcore/trace.c
==============================================================================
--- branches/pmc_pct/src/runcore/trace.c	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/runcore/trace.c	Fri May  8 00:05:13 2009	(r38558)
@@ -27,7 +27,7 @@
 #include "parrot/oplib/ops.h"
 #include "../pmc/pmc_sub.h"
 
-/* HEADERIZER HFILE: src/trace.h */
+/* HEADERIZER HFILE: include/parrot/runcore_trace.h */
 
 /* HEADERIZER BEGIN: static */
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */

Modified: branches/pmc_pct/src/spf_render.c
==============================================================================
--- branches/pmc_pct/src/spf_render.c	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/spf_render.c	Fri May  8 00:05:13 2009	(r38558)
@@ -303,7 +303,7 @@
     }
 
     out[i++] = (char)thingy;
-    out[i]   = 0;
+    out[i]   = '\0';
 }
 
 

Modified: branches/pmc_pct/src/stacks.c
==============================================================================
--- branches/pmc_pct/src/stacks.c	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/stacks.c	Fri May  8 00:05:13 2009	(r38558)
@@ -147,24 +147,6 @@
 
 /*
 
-=item C<void stack_destroy(Stack_Chunk_t *top)>
-
-stack_destroy() doesn't need to do anything, since GC does it all.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-void
-stack_destroy(SHIM(Stack_Chunk_t *top))
-{
-    ASSERT_ARGS(stack_destroy)
-    /* GC does it all */
-}
-
-/*
-
 =item C<size_t stack_height(PARROT_INTERP, const Stack_Chunk_t *chunk)>
 
 Returns the height of the stack. The maximum "depth" is height - 1.

Modified: branches/pmc_pct/src/warnings.c
==============================================================================
--- branches/pmc_pct/src/warnings.c	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/src/warnings.c	Fri May  8 00:05:13 2009	(r38558)
@@ -104,6 +104,7 @@
 */
 
 PARROT_EXPORT
+PARROT_IGNORABLE_RESULT
 INTVAL
 Parrot_warn(PARROT_INTERP, INTVAL warnclass,
             ARGIN(const char *message), ...)

Modified: branches/pmc_pct/t/codingstd/copyright.t
==============================================================================
--- branches/pmc_pct/t/codingstd/copyright.t	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/t/codingstd/copyright.t	Fri May  8 00:05:13 2009	(r38558)
@@ -36,12 +36,12 @@
 
 my $DIST = Parrot::Distribution->new;
 
-my @c_files    = $DIST->get_c_language_files();
-my @perl_files = $DIST->get_perl_language_files();
-my @make_files = $DIST->get_make_language_files();
-my @all_files  = ( @c_files, @perl_files, @make_files );
-
-my @files = @ARGV ? <@ARGV> : @all_files;
+my @files = @ARGV ? <@ARGV> : (
+    $DIST->get_c_language_files(),
+    $DIST->get_perl_language_files(),
+    $DIST->get_make_language_files(),
+    $DIST->get_pir_language_files(),
+);
 my (
     @no_copyright_files,
     @bad_format_copyright_files,
@@ -145,6 +145,10 @@
         file    => 'tools/build/vtable_extend.pl',
         reason  => 'heredoc text for generated file',
     },
+    {
+        file    => 'examples/pir/quine_ord.pir',
+        reason  => 'quine',
+    },
 );
 my $cwd = cwd();
 my %permitted_duplicate_copyright_files =

Modified: branches/pmc_pct/t/codingstd/pdd_format.t
==============================================================================
--- branches/pmc_pct/t/codingstd/pdd_format.t	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/t/codingstd/pdd_format.t	Fri May  8 00:05:13 2009	(r38558)
@@ -65,7 +65,7 @@
         if (
             ( length( $lines[$i] ) > 78 )
             and
-            ( $lines[$i] !~ m/(^(?:L?<)?http|\$Id:\s+)/ )
+            ( $lines[$i] !~ m/^(?:F|L)<|<http|\$Id:\s+/ )
         ) {
             push @toolong, ($i + 1);
         }

Modified: branches/pmc_pct/t/compilers/pge/perl6regex/rx_metachars
==============================================================================
--- branches/pmc_pct/t/compilers/pge/perl6regex/rx_metachars	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/t/compilers/pge/perl6regex/rx_metachars	Fri May  8 00:05:13 2009	(r38558)
@@ -190,6 +190,8 @@
 c \x[0021] d		abc!def		y	hex (\x[])
 c \x[0021]+ d		abc!!def	y	hex (\x[])
 c \x[21,21] d		abc!!def	y	hex (\x[])
+c \x[21, 21] d		abc!!def	y	hex (\x[])
+c \x[ 21 , 21 ] d	abc!!def	y	hex (\x[])
 a \x[0021]+ f		abcdef		n	hex (\x[])
 b \x[0021] c		abc!def		n	hex (\x[])
 \X0021			a		y	not hex (\X)
@@ -211,6 +213,8 @@
 c \c[33] d		abc!def		y	hex (\x[])
 c \c[33]+ d		abc!!def	y	hex (\x[])
 c \c[33,33] d		abc!!def	y	hex (\x[])
+c \c[ 33, 33] d		abc!!def	y	hex (\x[])
+c \c[ 33 , 33 ] d	abc!!def	y	hex (\x[])
 a \c[33]+ f		abcdef		n	hex (\x[])
 b \c[33] c		abc!def		n	hex (\x[])
 \C33			a		y	not hex (\X)

Modified: branches/pmc_pct/t/compilers/pge/perl6regex/rx_subrules
==============================================================================
--- branches/pmc_pct/t/compilers/pge/perl6regex/rx_subrules	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/t/compilers/pge/perl6regex/rx_subrules	Fri May  8 00:05:13 2009	(r38558)
@@ -26,9 +26,9 @@
 <lower>		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob<lower>: <a @ 55>/		<lower>
 <+lower>	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <a @ 55>/			<+lower>
 <+lower>+	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <abcdefghij @ 55>/	<+lower>+
-<alpha>		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob<alpha>: <A @ 45>/		<alpha>
-<+alpha>	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <A @ 45>/			<+alpha>
-<+alpha>+	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <ABCDEFGHIJabcdefghij @ 45>/	<+alpha>+
+<alpha>		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob<alpha>: <_ @ 31>/		<alpha>
+<+alpha>	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <_ @ 31>/			<+alpha>
+<+alpha>+	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <_ @ 31>/	<+alpha>+
 <digit>		\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob<digit>: <0 @ 35>/		<digit>
 <+digit>	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <0 @ 35>/			<+digit>
 <+digit>+	\t\n\r !"#$%&'()*+,-./:;<=>?@[\]^`_{|}0123456789ABCDEFGHIJabcdefghij	/mob: <0123456789 @ 35>/	<+digit>+

Modified: branches/pmc_pct/t/library/p6object.t
==============================================================================
--- branches/pmc_pct/t/library/p6object.t	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/t/library/p6object.t	Fri May  8 00:05:13 2009	(r38558)
@@ -36,7 +36,7 @@
     goto load_success
 
   load_fail:
-    ok(0, "load_bytecode 'P6object.pir' failed -- skipping tests")
+    ok(0, "load_bytecode 'P6object.pbc' failed -- skipping tests")
     .return ()
 
   load_success:
@@ -151,7 +151,7 @@
     is_same($P0, jklproto, 'return from .new_class =:= Foo::JKL')
     $P0 = get_hll_global 'Foo::JKL'
     isa_nok($P0, 'P6protoobject', '["Foo::JKL"]')
-    jklobj = p6obj_tests(jklproto, 'Foo::JKL', 'shortname'=>'JKL', 'isa'=>'P6object', 'can'=>'foo')
+    jklobj = p6obj_tests(jklproto, 'Foo::JKL', 'isa'=>'P6object', 'can'=>'foo')
 
     ##  add a method to a class
     $P0 = get_hll_global ['ABC'], 'foo'
@@ -201,6 +201,8 @@
     shortname = hash_default(options, 'shortname', classname)
     typename =  hash_default(options, 'typename',  classname)
 
+    shortname = concat shortname, '()'
+
     .local string msg
 
     isa_ok(proto, 'P6protoobject', classname)

Modified: branches/pmc_pct/t/pmc/key.t
==============================================================================
--- branches/pmc_pct/t/pmc/key.t	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/t/pmc/key.t	Fri May  8 00:05:13 2009	(r38558)
@@ -1,5 +1,5 @@
 #! parrot
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2009, Parrot Foundation.
 # $Id$
 
 =head1 NAME
@@ -19,14 +19,13 @@
 .sub main :main
     .include 'test_more.pir'
 
-    plan(10)
+    plan(9)
 
     traverse_key_chain()
     extract_int_from_string_keys()
     extract_string_from_int_keys()
     use_number_keys()
     do_not_collect_string_keys_early_rt_60128()
-    todo(0, 'register and non-register string keys should be COW (RT #60128)' )
 .end
 
 .sub traverse_key_chain

Modified: branches/pmc_pct/t/pmc/pmc.t
==============================================================================
--- branches/pmc_pct/t/pmc/pmc.t	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/t/pmc/pmc.t	Fri May  8 00:05:13 2009	(r38558)
@@ -49,7 +49,7 @@
 my $checkTypes;
 my %types_we_cant_test
     = map { $_ => 1; } (    # These require initializers.
-    qw(Null Iterator Enumerate ParrotObject ParrotThread BigInt LexInfo LexPad Object),
+    qw(default Null Iterator Enumerate ParrotObject ParrotThread BigInt LexInfo LexPad Object),
 
     # Instances of these appear to have other types.
     qw(PMCProxy Class) );

Modified: branches/pmc_pct/t/steps/auto_sizes-01.t
==============================================================================
--- branches/pmc_pct/t/steps/auto_sizes-01.t	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/t/steps/auto_sizes-01.t	Fri May  8 00:05:13 2009	(r38558)
@@ -5,7 +5,7 @@
 
 use strict;
 use warnings;
-use Test::More qw(no_plan); # tests => 42;
+use Test::More tests => 58;
 use Carp;
 use lib qw( lib t/configure/testlib );
 use_ok('config::init::defaults');
@@ -282,6 +282,87 @@
 is( $conf->data->get( 'hugefloatvalsize' ), $conf->data->get('doublesize'),
     "Got expected size for hugefloatvalsize");
 
+########## _set_intvalmaxmin() ##########
+
+my @trueintvals = (
+    $conf->data->get( 'iv' ),
+    $conf->data->get( 'intvalmin' ),
+    $conf->data->get( 'intvalmax' ),
+);
+$conf->data->set( iv => 'int' );
+auto::sizes::_set_intvalmaxmin( $conf );
+is( $conf->data->get( 'intvalmin' ), 'INT_MIN',
+    "Got expected value for 'intvalmin' when 'iv' is 'int'" );
+is( $conf->data->get( 'intvalmax' ), 'INT_MAX',
+    "Got expected value for 'intvalmax' when 'iv' is 'int'" );
+
+$conf->data->set( iv => 'long' );
+auto::sizes::_set_intvalmaxmin( $conf );
+is( $conf->data->get( 'intvalmin' ), 'LONG_MIN',
+    "Got expected value for 'intvalmin' when 'iv' is 'long'" );
+is( $conf->data->get( 'intvalmax' ), 'LONG_MAX',
+    "Got expected value for 'intvalmax' when 'iv' is 'long'" );
+
+$conf->data->set( iv => 'long int' );
+auto::sizes::_set_intvalmaxmin( $conf );
+is( $conf->data->get( 'intvalmin' ), 'LONG_MIN',
+    "Got expected value for 'intvalmin' when 'iv' is 'long int'" );
+is( $conf->data->get( 'intvalmax' ), 'LONG_MAX',
+    "Got expected value for 'intvalmax' when 'iv' is 'long int'" );
+
+$conf->data->set( iv => 'long long' );
+auto::sizes::_set_intvalmaxmin( $conf );
+is( $conf->data->get( 'intvalmin' ), 'LLONG_MIN',
+    "Got expected value for 'intvalmin' when 'iv' is 'long long'" );
+is( $conf->data->get( 'intvalmax' ), 'LLONG_MAX',
+    "Got expected value for 'intvalmax' when 'iv' is 'long long'" );
+
+$conf->data->set( iv => 'long long int' );
+auto::sizes::_set_intvalmaxmin( $conf );
+is( $conf->data->get( 'intvalmin' ), 'LLONG_MIN',
+    "Got expected value for 'intvalmin' when 'iv' is 'long long int'" );
+is( $conf->data->get( 'intvalmax' ), 'LLONG_MAX',
+    "Got expected value for 'intvalmax' when 'iv' is 'long long int'" );
+
+my $badtype = 'foobar';
+$conf->data->set( iv => $badtype );
+eval { auto::sizes::_set_intvalmaxmin( $conf ); };
+like($@, qr/Configure.pl:  Cannot find limits for type '$badtype'/,
+    "Got expected 'die' message for unrecognized 'iv'");
+
+# Reset true values prior to subsequent tests.
+$conf->data->set( 'iv' => $trueintvals[0] );
+$conf->data->set( 'intvalmin' => $trueintvals[1] );
+$conf->data->set( 'intvalmax' => $trueintvals[2] );
+
+########## _set_floatvalmaxmin() ##########
+
+my @truefloatvals = (
+    $conf->data->get( 'nv' ),
+    $conf->data->get( 'floatvalmin' ),
+    $conf->data->get( 'floatvalmax' ),
+);
+
+$conf->data->set( nv => 'double' );
+auto::sizes::_set_floatvalmaxmin( $conf );
+is( $conf->data->get( 'floatvalmin' ), 'DBL_MIN',
+    "Got expected value for 'floatvalmin' when 'nv' is 'double'" );
+is( $conf->data->get( 'floatvalmax' ), 'DBL_MAX',
+    "Got expected value for 'floatvalmax' when 'nv' is 'double'" );
+
+$conf->data->set( nv => 'long double' );
+auto::sizes::_set_floatvalmaxmin( $conf );
+is( $conf->data->get( 'floatvalmin' ), 'LDBL_MIN',
+    "Got expected value for 'floatvalmin' when 'nv' is 'long double'" );
+is( $conf->data->get( 'floatvalmax' ), 'LDBL_MAX',
+    "Got expected value for 'floatvalmax' when 'nv' is 'long double'" );
+
+$badtype = 'foobar';
+$conf->data->set( nv => $badtype );
+eval { auto::sizes::_set_floatvalmaxmin( $conf ); };
+like($@, qr/Configure.pl:  Cannot find limits for type '$badtype'/,
+    "Got expected 'die' message for unrecognized 'nv'");
+
 pass("Completed all tests in $0");
 
 ################### DOCUMENTATION ###################

Modified: branches/pmc_pct/t/tools/pmc2c.t
==============================================================================
--- branches/pmc_pct/t/tools/pmc2c.t	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/t/tools/pmc2c.t	Fri May  8 00:05:13 2009	(r38558)
@@ -87,6 +87,8 @@
 #include "a.str"
 END_C
 
+TODO: {
+    local $TODO = "needs fixing after vtinit merge";
 pmc2c_output_like( <<'END_PMC', <<'END_C', 'class initialization' );
 pmclass a { }
 END_PMC
@@ -97,6 +99,7 @@
         "";
     const VTABLE temp_base_vtable = {
 END_C
+}
 
 pmc2c_output_like( <<'END_PMC', <<'END_C', 'comment passthrough' );
 pmclass a { }
@@ -121,6 +124,9 @@
 =cut
 END_C
 
+TODO: {
+    local $TODO = 'needs fixing after vtinit merge';
+
 pmc2c_output_like( <<'END_PMC', <<'END_C', 'provides' );
 pmclass a provides nothing { }
 END_PMC
@@ -137,6 +143,9 @@
         0|VTABLE_PMC_NEEDS_EXT|VTABLE_IS_READONLY_FLAG, /* flags */
 END_C
 
+}
+
+
 pmc2c_output_like( <<'END_PMC', <<'END_C', 'maps' );
 pmclass a hll dale maps Integer { }
 END_PMC

Modified: branches/pmc_pct/tools/build/c2str.pl
==============================================================================
--- branches/pmc_pct/tools/build/c2str.pl	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/tools/build/c2str.pl	Fri May  8 00:05:13 2009	(r38558)
@@ -15,7 +15,6 @@
 
 use Fcntl qw( :DEFAULT :flock );
 use Text::Balanced qw(extract_delimited);
-use Math::BigInt ();
 use Getopt::Long ();
 use IO::File ();
 
@@ -68,26 +67,14 @@
     return length $s;
 }
 
-sub hash_val {
-    my $h = Math::BigInt->new('+0');
-    my $s = shift;
-    for ( my $i = 0 ; $i < length($s) ; ++$i ) {
-        $h += $h << 5;
-        $h &= 0xffffffff;
-        $h += ord substr( $s, $i, 1 );
-        $h &= 0xffffffff;
-    }
-    return sprintf( "0x%x", $h );
-}
-
 sub read_all {
     $ALL->seek(0, 0);
     while (<$ALL>) {
 
         # len hashval "string"
-        if (/(\d+)\s+(0x[\da-hA-H]+)\s+"(.*)"/) {
-            push @all_strings, [ $1, $2, $3 ];
-            $known_strings{$3} = @all_strings;
+        if (/(\d+)\s+"(.*)"/) {
+            push @all_strings, [ $1, $2 ];
+            $known_strings{$2} = @all_strings;
         }
     }
     return;
@@ -180,14 +167,13 @@
         }
 
         my $len               = get_length($str);
-        my $hashval           = hash_val($str);
-        push @all_strings, [ $len, $hashval, $str ];
+        push @all_strings, [ $len, $str ];
 
         $n                    = @all_strings;
         $known_strings{$str}  = $n;
         $this_file_seen{"$const_string:$str"} = $line;
         print "#define _${const_string}_$line $n\n";
-        print $ALL qq!$len\t$hashval\t"$str"\n!;
+        print $ALL qq!$len\t"$str"\n!;
     }
     close($IN);
     return;
@@ -215,14 +201,13 @@
 
 static const struct _cstrings {
     UINTVAL len;
-    Parrot_UInt4 hash_val;
     const char *string;
 } parrot_cstrings[] = {
-    { 0, 0, "" },
+    { 0, "" },
 HEADER
     my @all;
     for my $s (@all_strings) {
-        push @all, qq!    {$s->[0], $s->[1], "$s->[2]"}!;
+        push @all, qq!    {$s->[0], "$s->[1]"}!;
     }
     print $OUT join( ",\n", @all );
     print $OUT <<HEADER;

Modified: branches/pmc_pct/tools/build/headerizer.pl
==============================================================================
--- branches/pmc_pct/tools/build/headerizer.pl	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/tools/build/headerizer.pl	Fri May  8 00:05:13 2009	(r38558)
@@ -183,6 +183,13 @@
     return @func_declarations;
 }
 
+=head2 function_components_from_declaration( $file, $proto )
+
+Takes a declaration of a function and returns an ad-hoc hashref of
+properties for use elsewhere.
+
+=cut
+
 sub function_components_from_declaration {
     my $file  = shift;
     my $proto = shift;
@@ -226,6 +233,7 @@
             or die "Bad args in $proto";
     }
 
+    my $is_ignorable = 0;
     my $is_static = 0;
     $is_static = $2 if $return_type =~ s/^((static)\s+)?//i;
 
@@ -237,6 +245,9 @@
         if ( not $valid_macros{$macro} ) {
             squawk( $file, $name, "Invalid macro $macro" );
         }
+        if ( $macro eq 'PARROT_IGNORABLE_RESULT' ) {
+            $is_ignorable = 1;
+        }
     }
     if ( $return_type =~ /\*/ ) {
         if ( !$macros{PARROT_CAN_RETURN_NULL} && !$macros{PARROT_CANNOT_RETURN_NULL} ) {
@@ -250,14 +261,15 @@
     }
 
     return {
-        file        => $file,
-        name        => $name,
-        args        => \@args,
-        macros      => \@macros,
-        is_static   => $is_static,
-        is_inline   => $parrot_inline,
-        is_api      => $parrot_api,
-        return_type => $return_type,
+        file         => $file,
+        name         => $name,
+        args         => \@args,
+        macros       => \@macros,
+        is_static    => $is_static,
+        is_inline    => $parrot_inline,
+        is_api       => $parrot_api,
+        is_ignorable => $is_ignorable,
+        return_type  => $return_type,
     };
 }
 
@@ -332,7 +344,13 @@
     foreach my $func (@funcs) {
         my $multiline = 0;
 
-        my $decl = sprintf( "%s %s(", $func->{return_type}, $func->{name} );
+        my $return = $func->{return_type};
+        my $alt_void = ' ';
+        if ( $func->{is_ignorable} && ($return ne 'void') && ($return !~ /\*/) ) {
+            $alt_void = " /*\@alt void@*/\n";
+        }
+
+        my $decl = sprintf( "%s%s%s(", $return, $alt_void, $func->{name} );
         $decl = "static $decl" if $func->{is_static};
 
         my @args    = @{ $func->{args} };

Modified: branches/pmc_pct/tools/dev/bench_op.pir
==============================================================================
--- branches/pmc_pct/tools/dev/bench_op.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/tools/dev/bench_op.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,3 +1,4 @@
+# Copyright (C) 2004-2009, Parrot Foundation.
 # $Id$
 
 =head1 TITLE

Modified: branches/pmc_pct/tools/dev/create_language.pl
==============================================================================
--- branches/pmc_pct/tools/dev/create_language.pl	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/tools/dev/create_language.pl	Fri May  8 00:05:13 2009	(r38558)
@@ -227,7 +227,11 @@
     $config{'win32_libparrot_copy'} = $^O eq 'MSWin32' ? 'copy $(BUILD_DIR)\libparrot.dll .' : '';
     $maketext =~ s/@(\w+)@/$config{$1}/g;
     if ($^O eq 'MSWin32') {
+        # use backslashes.
         $maketext =~ s{/}{\\}g;
+        # wildcards (for clean rules) need an additional backslash, see Rakudo RT #65006
+        $maketext =~ s{\\\*}{\\\\*}g;
+        # use forward slashes again for HTTP URLs
         $maketext =~ s{http:\S+}{ do {my $t = $&; $t =~ s'\\'/'g; $t} }eg;
     }
 
@@ -873,7 +877,7 @@
 
 if (eval { require TAP::Harness; 1 }) {
     my %harness_options = (
-        exec      => ['./perl6'],
+        exec      => ['./@lclang@'],
         verbosity => 0+$Test::Harness::verbose,
         jobs      => $jobs || 1,
     );

Modified: branches/pmc_pct/tools/dev/fetch_languages.pl
==============================================================================
--- branches/pmc_pct/tools/dev/fetch_languages.pl	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/tools/dev/fetch_languages.pl	Fri May  8 00:05:13 2009	(r38558)
@@ -288,6 +288,12 @@
         scm        => 'GIT',
         repository => 'git://github.com/fperrad/wmlscript.git'
     },
+
+    {
+        name       => 'xml',
+        scm        => 'GIT',
+        repository => 'git://github.com/fperrad/xml.git'
+    },
 );
 
 foreach (@hlls) {

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

Modified: branches/pmc_pct/tools/dev/mk_language_shell.pl
==============================================================================
--- branches/pmc_pct/tools/dev/mk_language_shell.pl	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/tools/dev/mk_language_shell.pl	Fri May  8 00:05:13 2009	(r38558)
@@ -22,12 +22,12 @@
 new language translator in Parrot.  The first argument is the
 name of the language to be built.  The C<path> argument
 says where to populate the directory, if no C<path> is specified
-then it is taken to be a subdirectory in F<languages/> (with the
-name of the directory converted to lowercase).
+then it is taken to be a subdirectory of the current directory
+with the same name as the language (converted to lowercase).
 
 For a language 'Xyz', this script will create the following
 files and directories (relative to C<path>, which defaults
-to F<languages/xyz> if an explicit C<path> isn't given):
+to F<xyz> if an explicit C<path> isn't given):
 
     README
     Configure.pl
@@ -69,10 +69,12 @@
 
 use strict;
 use warnings;
-use lib 'lib';
 use File::Path;
 use File::Spec;
 use Getopt::Long;
+use FindBin qw($Bin);
+use lib "$Bin/../lib";    # install location
+use lib "$Bin/../../lib"; # build location
 use Parrot::Config qw/ %PConfig /;
 
 my ($with_doc, $with_ops, $with_pmc);
@@ -101,9 +103,9 @@
 my $no_pmc = $with_pmc ? '' : '#';
 
 ##  get the path from the command line, or if not supplied then
-##  use languages/$lclang.
+##  use $lclang.
 my $path = $ARGV[1] ||
-           "$PConfig{build_dir}$PConfig{slash}languages$PConfig{slash}$lclang";
+           "$lclang";
 
 ##  now loop through the file information (see below), substituting
 ##  any instances of @lang@, @lclang@, @UCLANG@, and @Id@ with
@@ -131,7 +133,7 @@
 ##  build the initial makefile if no path was specified on command line
 unless ($ARGV[1]) {
   my $reconfigure = "$PConfig{perl} Configure.pl";
-  system("cd languages && cd $lclang && $reconfigure");
+  system("cd $lclang && $reconfigure");
 }
 
 ##  we're done

Modified: branches/pmc_pct/tools/dev/pbc_to_exe.pir
==============================================================================
--- branches/pmc_pct/tools/dev/pbc_to_exe.pir	Thu May  7 23:48:58 2009	(r38557)
+++ branches/pmc_pct/tools/dev/pbc_to_exe.pir	Fri May  8 00:05:13 2009	(r38558)
@@ -1,4 +1,5 @@
 #! parrot
+# Copyright (C) 2009, Parrot Foundation.
 # $Id$
 
 =head1 NAME


More information about the parrot-commits mailing list