develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35610 - in branches/strings: . compilers/pirc/src compilers/pirc/t config/auto config/gen config/gen/makefiles docs/book docs/dev docs/pdds docs/project docs/stm include/parrot include/parrot/stm languages languages/WMLScript languages/WMLSc

From:
simon
Date:
January 15, 2009 16:46
Subject:
[svn:parrot] r35610 - in branches/strings: . compilers/pirc/src compilers/pirc/t config/auto config/gen config/gen/makefiles docs/book docs/dev docs/pdds docs/project docs/stm include/parrot include/parrot/stm languages languages/WMLScript languages/WMLSc
Message ID:
20090116003607.3C4CACB9AE@x12.develooper.com
Author: simon
Date: Thu Jan 15 16:36:00 2009
New Revision: 35610

Added:
   branches/strings/languages/WMLScript/Configure.pl
   branches/strings/languages/lua/Configure.pl
   branches/strings/languages/markdown/Configure.pl
   branches/strings/t/oo/vtableoverride.t
   branches/strings/t/pmc/packfilefixupentry.t
   branches/strings/t/pmc/packfilefixuptable.t
   branches/strings/tools/dev/mk_gitignore.pl
   branches/strings/tools/dev/pmcrenumber.pl
Removed:
   branches/strings/docs/stm/
   branches/strings/include/parrot/stm/
   branches/strings/languages/LANGUAGES_STATUS.pod
   branches/strings/languages/eclectus/
   branches/strings/lib/Parrot/Pmc2c/PMC/STMRef.pm
   branches/strings/runtime/parrot/library/STM.pir
   branches/strings/src/ops/stm.ops
   branches/strings/src/pmc/stmlog.pmc
   branches/strings/src/pmc/stmref.pmc
   branches/strings/src/pmc/stmvar.pmc
   branches/strings/src/pmc/vtablecache.pmc
   branches/strings/src/stm/
   branches/strings/t/pmc/stmlog.t
   branches/strings/t/pmc/stmref.t
   branches/strings/t/pmc/stmvar.t
   branches/strings/t/pmc/vtablecache.t
   branches/strings/t/stm/
Modified:
   branches/strings/   (props changed)
   branches/strings/MANIFEST
   branches/strings/MANIFEST.SKIP
   branches/strings/MANIFEST.generated
   branches/strings/NEWS
   branches/strings/PBC_COMPAT
   branches/strings/compilers/pirc/src/bcgen.c
   branches/strings/compilers/pirc/src/bcgen.h
   branches/strings/compilers/pirc/src/pir.y
   branches/strings/compilers/pirc/src/pircompunit.c
   branches/strings/compilers/pirc/src/pircompunit.h
   branches/strings/compilers/pirc/src/piremit.c
   branches/strings/compilers/pirc/src/pirparser.c
   branches/strings/compilers/pirc/src/pirsymbol.h
   branches/strings/compilers/pirc/t/basic.t
   branches/strings/config/auto/pmc.pm
   branches/strings/config/auto/warnings.pm
   branches/strings/config/gen/languages.pm
   branches/strings/config/gen/makefiles/languages.in
   branches/strings/config/gen/makefiles/root.in
   branches/strings/config/gen/opengl.pm
   branches/strings/docs/book/ch03_pir_basics.pod
   branches/strings/docs/book/ch04_pir_subroutines.pod
   branches/strings/docs/book/ch06_library.pod
   branches/strings/docs/book/ch07_testing_and_debugging.pod   (props changed)
   branches/strings/docs/book/ch08_architecture.pod   (props changed)
   branches/strings/docs/book/ch09_pct.pod   (props changed)
   branches/strings/docs/book/ch10_hlls.pod   (props changed)
   branches/strings/docs/book/ch11_pmcs.pod   (props changed)
   branches/strings/docs/book/ch12_opcodes.pod   (props changed)
   branches/strings/docs/book/ch13_reference.pod   (props changed)
   branches/strings/docs/dev/c_functions.pod   (props changed)
   branches/strings/docs/pdds/pdd09_gc.pod
   branches/strings/docs/project/release_manager_guide.pod
   branches/strings/include/parrot/gc_api.h   (props changed)
   branches/strings/include/parrot/gc_mark_sweep.h   (contents, props changed)
   branches/strings/include/parrot/gc_pools.h   (props changed)
   branches/strings/include/parrot/inter_call.h
   branches/strings/include/parrot/oo.h
   branches/strings/include/parrot/parrot.h
   branches/strings/include/parrot/pobj.h
   branches/strings/include/parrot/thread.h
   branches/strings/languages/   (props changed)
   branches/strings/languages/README
   branches/strings/languages/WMLScript/config/makefiles/root.in
   branches/strings/languages/befunge/Configure.pl   (props changed)
   branches/strings/languages/ecmascript/js.pir
   branches/strings/languages/ecmascript/t/sanity_pt/03-boolean.t   (props changed)
   branches/strings/languages/lua/config/makefiles/root.in
   branches/strings/languages/lua/t/test/bisect-output-win32.txt   (props changed)
   branches/strings/languages/markdown/config/makefiles/root.in
   branches/strings/languages/perl6/config/makefiles/root.in
   branches/strings/languages/perl6/docs/spectest-progress.csv
   branches/strings/languages/perl6/perl6.pir
   branches/strings/languages/perl6/src/builtins/enums.pir
   branches/strings/languages/perl6/src/builtins/guts.pir
   branches/strings/languages/perl6/src/builtins/op.pir
   branches/strings/languages/perl6/src/classes/Code.pir
   branches/strings/languages/perl6/src/classes/List.pir
   branches/strings/languages/perl6/src/classes/Mapping.pir
   branches/strings/languages/perl6/src/classes/Match.pir
   branches/strings/languages/perl6/src/classes/Role.pir
   branches/strings/languages/perl6/src/classes/Signature.pir
   branches/strings/languages/perl6/src/parser/actions.pm
   branches/strings/languages/perl6/src/parser/grammar.pg
   branches/strings/languages/perl6/src/parser/methods.pir
   branches/strings/languages/perl6/src/pmc/perl6multisub.pmc
   branches/strings/languages/perl6/t/pmc/perl6multisub-type.t
   branches/strings/languages/perl6/t/spectest.data
   branches/strings/languages/pipp/Configure.pl
   branches/strings/languages/pipp/docs/internals.pod   (contents, props changed)
   branches/strings/languages/pipp/docs/pipp.pod
   branches/strings/languages/pipp/pipp.pir   (props changed)
   branches/strings/languages/pipp/src/classes/Object.pir   (props changed)
   branches/strings/languages/pipp/src/pct/actions.pm
   branches/strings/languages/pipp/src/pct/grammar.pg
   branches/strings/languages/pipp/src/pmc/pipp_hash.c   (props changed)
   branches/strings/languages/pipp/src/pmc/pipp_hash.h   (props changed)
   branches/strings/languages/pipp/t/embed/eval.t   (props changed)
   branches/strings/languages/t/harness
   branches/strings/lib/Parrot/Docs/Section/Languages.pm
   branches/strings/lib/Parrot/Docs/Section/Tests.pm
   branches/strings/lib/Parrot/Harness/Smoke.pm
   branches/strings/lib/Parrot/Manifest.pm
   branches/strings/lib/Parrot/Pmc2c/Pmc2cMain.pm
   branches/strings/lib/Parrot/Test/Harness.pm
   branches/strings/src/gc/api.c   (props changed)
   branches/strings/src/gc/generational_ms.c   (contents, props changed)
   branches/strings/src/gc/incremental_ms.c   (props changed)
   branches/strings/src/gc/mark_sweep.c   (contents, props changed)
   branches/strings/src/gc/pools.c   (props changed)
   branches/strings/src/inter_call.c
   branches/strings/src/inter_create.c
   branches/strings/src/oo.c
   branches/strings/src/ops/ops.num
   branches/strings/src/pmc/callsignature.pmc
   branches/strings/src/pmc/capture.pmc
   branches/strings/src/pmc/class.pmc
   branches/strings/src/pmc/deleg_pmc.pmc
   branches/strings/src/pmc/fixedintegerarray.pmc
   branches/strings/src/pmc/fixedpmcarray.pmc
   branches/strings/src/pmc/object.pmc
   branches/strings/src/pmc/packfilefixupentry.pmc
   branches/strings/src/pmc/packfilefixuptable.pmc
   branches/strings/src/pmc/parrotrunningthread.pmc
   branches/strings/src/pmc/pmc.num
   branches/strings/src/pmc/undef.pmc
   branches/strings/src/pmc/unmanagedstruct.pmc
   branches/strings/t/codingstd/c_arg_assert.t
   branches/strings/t/codingstd/linelength.t
   branches/strings/t/codingstd/perlcritic.t
   branches/strings/t/compilers/tge/NoneGrammar.tg   (props changed)
   branches/strings/t/harness
   branches/strings/t/pmc/packfileconstanttable.t
   branches/strings/t/pmc/pmc.t
   branches/strings/t/steps/auto_pmc-01.t
   branches/strings/tools/dev/mk_language_shell.pl
   branches/strings/tools/dev/mk_manifest_and_skip.pl
   branches/strings/tools/util/perlcritic-cage.conf   (props changed)

Log:
Merge from trunk

Modified: branches/strings/MANIFEST
==============================================================================
--- branches/strings/MANIFEST	(original)
+++ branches/strings/MANIFEST	Thu Jan 15 16:36:00 2009
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Mon Jan 12 21:15:11 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Thu Jan 15 12:32:42 2009 UT
 #
 # See tools/dev/install_files.pl for documentation on the
 # format of this file.
@@ -527,11 +527,6 @@
 docs/resources/up.gif                                       [main]doc
 docs/running.pod                                            [main]doc
 docs/stability.pod                                          [main]doc
-docs/stm/atomic.pod                                         [main]doc
-docs/stm/howto.pod                                          [main]doc
-docs/stm/internals.pod                                      [main]doc
-docs/stm/stm_frontend.pod                                   [main]doc
-docs/stm/thread-issues.pod                                  [main]doc
 docs/submissions.pod                                        [main]doc
 docs/tests.pod                                              [main]doc
 docs/user/pir/pp001-intro.pod                               [main]doc
@@ -953,7 +948,6 @@
 include/parrot/slice.h                                      [main]include
 include/parrot/stacks.h                                     [main]include
 include/parrot/stat.h                                       [main]include
-include/parrot/stm/backend.h                                [main]include
 include/parrot/string.h                                     [main]include
 include/parrot/string_funcs.h                               [main]include
 include/parrot/string_primitives.h                          [main]include
@@ -1014,7 +1008,6 @@
 languages/BASIC/compiler/samples/wumpus2.bas                [BASIC]
 languages/BASIC/compiler/testrun.pl                         [BASIC]
 languages/BASIC/compiler/testsuite.pl                       [BASIC]
-languages/LANGUAGES_STATUS.pod                              []
 languages/PIR/MAINTAINER                                    [PIR]
 languages/PIR/README                                        [PIR]
 languages/PIR/config/makefiles/root.in                      [PIR]
@@ -1068,6 +1061,7 @@
 languages/PIR/t/whitespace.t                                [PIR]
 languages/README                                            []
 languages/WMLScript/CREDITS                                 [WMLScript]
+languages/WMLScript/Configure.pl                            [WMLScript]
 languages/WMLScript/MAINTAINER                              [WMLScript]
 languages/WMLScript/build/SRM/Register.pm                   [WMLScript]
 languages/WMLScript/build/SRM/Stack.pm                      [WMLScript]
@@ -1470,76 +1464,6 @@
 languages/dotnet/tools/analysis_latex.pl                    [dotnet]
 languages/dotnet/tools/benchmark.pl                         [dotnet]
 languages/dotnet/tools/fail_analysis.pl                     [dotnet]
-languages/eclectus/MAINTAINER                               [eclectus]
-languages/eclectus/README                                   [eclectus]
-languages/eclectus/chicken/prelude.scm                      [eclectus]
-languages/eclectus/compiler.scm                             [eclectus]
-languages/eclectus/config/makefiles/root.in                 [eclectus]
-languages/eclectus/docs/eclectus.pod                        [eclectus]
-languages/eclectus/driver_nqp.pir                           [eclectus]
-languages/eclectus/gauche/prelude.scm                       [eclectus]
-languages/eclectus/riaxpander/LICENCE                       [eclectus]
-languages/eclectus/riaxpander/chicken-sexp.scm              [eclectus]
-languages/eclectus/riaxpander/chicken.scm                   [eclectus]
-languages/eclectus/riaxpander/classify.scm                  [eclectus]
-languages/eclectus/riaxpander/closure.scm                   [eclectus]
-languages/eclectus/riaxpander/denotation.scm                [eclectus]
-languages/eclectus/riaxpander/environment.scm               [eclectus]
-languages/eclectus/riaxpander/gauche.scm                    [eclectus]
-languages/eclectus/riaxpander/history.scm                   [eclectus]
-languages/eclectus/riaxpander/mit-compile.scm               [eclectus]
-languages/eclectus/riaxpander/mit-load.scm                  [eclectus]
-languages/eclectus/riaxpander/s48-interfaces.scm            [eclectus]
-languages/eclectus/riaxpander/s48-packages.scm              [eclectus]
-languages/eclectus/riaxpander/sexp.scm                      [eclectus]
-languages/eclectus/riaxpander/standard.scm                  [eclectus]
-languages/eclectus/riaxpander/synrules.scm                  [eclectus]
-languages/eclectus/riaxpander/taxonomy.scm                  [eclectus]
-languages/eclectus/riaxpander/transform.scm                 [eclectus]
-languages/eclectus/src/builtins/all.pir                     [eclectus]
-languages/eclectus/src/pmc/eclectusboolean.pmc              [eclectus]
-languages/eclectus/src/pmc/eclectuscharacter.pmc            [eclectus]
-languages/eclectus/src/pmc/eclectusemptylist.pmc            [eclectus]
-languages/eclectus/src/pmc/eclectusfixnum.pmc               [eclectus]
-languages/eclectus/src/pmc/eclectuspair.pmc                 [eclectus]
-languages/eclectus/src/pmc/eclectusstring.pmc               [eclectus]
-languages/eclectus/src/pmc/eclectusvector.pmc               [eclectus]
-languages/eclectus/t/begin.pl                               [eclectus]
-languages/eclectus/t/begin.t                                [eclectus]
-languages/eclectus/t/binary_primitives.pl                   [eclectus]
-languages/eclectus/t/binary_primitives.t                    [eclectus]
-languages/eclectus/t/booleans.pl                            [eclectus]
-languages/eclectus/t/booleans.t                             [eclectus]
-languages/eclectus/t/characters.pl                          [eclectus]
-languages/eclectus/t/characters.t                           [eclectus]
-languages/eclectus/t/conditionals.pl                        [eclectus]
-languages/eclectus/t/conditionals.t                         [eclectus]
-languages/eclectus/t/empty_list.pl                          [eclectus]
-languages/eclectus/t/empty_list.t                           [eclectus]
-languages/eclectus/t/equality.pl                            [eclectus]
-languages/eclectus/t/equality.t                             [eclectus]
-languages/eclectus/t/harness                                [eclectus]
-languages/eclectus/t/integers.pl                            [eclectus]
-languages/eclectus/t/integers.t                             [eclectus]
-languages/eclectus/t/io.pl                                  [eclectus]
-languages/eclectus/t/io.t                                   [eclectus]
-languages/eclectus/t/learning_scheme.pl                     [eclectus]
-languages/eclectus/t/learning_scheme.t                      [eclectus]
-languages/eclectus/t/local_variables.pl                     [eclectus]
-languages/eclectus/t/local_variables.t                      [eclectus]
-languages/eclectus/t/pair.pl                                [eclectus]
-languages/eclectus/t/pair.t                                 [eclectus]
-languages/eclectus/t/procedures.pl                          [eclectus]
-languages/eclectus/t/procedures.t                           [eclectus]
-languages/eclectus/t/strings.pl                             [eclectus]
-languages/eclectus/t/strings.t                              [eclectus]
-languages/eclectus/t/unary_primitives.pl                    [eclectus]
-languages/eclectus/t/unary_primitives.t                     [eclectus]
-languages/eclectus/t/vectors.pl                             [eclectus]
-languages/eclectus/t/vectors.t                              [eclectus]
-languages/eclectus/tap_helpers.scm                          [eclectus]
-languages/eclectus/test-wrapper.pl                          [eclectus]
-languages/eclectus/tests-driver.scm                         [eclectus]
 languages/ecmascript/MAINTAINER                             [ecmascript]
 languages/ecmascript/config/makefiles/root.in               [ecmascript]
 languages/ecmascript/js.pir                                 [ecmascript]
@@ -1757,6 +1681,7 @@
 languages/lolcode/t/99-four-fours.t                         [lolcode]
 languages/lolcode/t/harness                                 [lolcode]
 languages/lua/CREDITS                                       [lua]
+languages/lua/Configure.pl                                  [lua]
 languages/lua/MAINTAINER                                    [lua]
 languages/lua/config/makefiles/root.in                      [lua]
 languages/lua/demo/triangle.lua                             [lua]
@@ -2039,6 +1964,7 @@
 languages/m4/tools/README                                   [m4]
 languages/m4/tools/frozen2yaml.pl                           [m4]
 languages/markdown/CREDITS                                  [markdown]
+languages/markdown/Configure.pl                             [markdown]
 languages/markdown/MAINTAINER                               [markdown]
 languages/markdown/README                                   [markdown]
 languages/markdown/config/makefiles/root.in                 [markdown]
@@ -2749,7 +2675,6 @@
 lib/Parrot/Pmc2c/PMC/PrintTree.pm                           [devel]
 lib/Parrot/Pmc2c/PMC/RO.pm                                  [devel]
 lib/Parrot/Pmc2c/PMC/Ref.pm                                 [devel]
-lib/Parrot/Pmc2c/PMC/STMRef.pm                              [devel]
 lib/Parrot/Pmc2c/PMC/SharedRef.pm                           [devel]
 lib/Parrot/Pmc2c/PMC/default.pm                             [devel]
 lib/Parrot/Pmc2c/PMC/deleg_pmc.pm                           [devel]
@@ -2865,7 +2790,6 @@
 runtime/parrot/library/SDL/Sprite.pir                       [library]
 runtime/parrot/library/SDL/StopWatch.pir                    [library]
 runtime/parrot/library/SDL/Surface.pir                      [library]
-runtime/parrot/library/STM.pir                              [library]
 runtime/parrot/library/Stream/Base.pir                      [library]
 runtime/parrot/library/Stream/Combiner.pir                  [library]
 runtime/parrot/library/Stream/Coroutine.pir                 [library]
@@ -3056,7 +2980,6 @@
 src/ops/pic.ops                                             []
 src/ops/pmc.ops                                             []
 src/ops/set.ops                                             []
-src/ops/stm.ops                                             []
 src/ops/string.ops                                          []
 src/ops/sys.ops                                             []
 src/ops/var.ops                                             []
@@ -3154,9 +3077,6 @@
 src/pmc/schedulermessage.pmc                                []
 src/pmc/sharedref.pmc                                       []
 src/pmc/slice.pmc                                           []
-src/pmc/stmlog.pmc                                          []
-src/pmc/stmref.pmc                                          []
-src/pmc/stmvar.pmc                                          []
 src/pmc/string.pmc                                          []
 src/pmc/stringhandle.pmc                                    []
 src/pmc/sub.pmc                                             []
@@ -3165,7 +3085,6 @@
 src/pmc/tqueue.pmc                                          []
 src/pmc/undef.pmc                                           []
 src/pmc/unmanagedstruct.pmc                                 []
-src/pmc/vtablecache.pmc                                     []
 src/pmc_freeze.c                                            []
 src/runops_cores.c                                          []
 src/runops_cores.h                                          []
@@ -3173,10 +3092,6 @@
 src/spf_render.c                                            []
 src/spf_vtable.c                                            []
 src/stacks.c                                                []
-src/stm/backend.c                                           []
-src/stm/stm_internal.h                                      []
-src/stm/stm_waitlist.h                                      []
-src/stm/waitlist.c                                          []
 src/string.c                                                []
 src/string_primitives.c                                     []
 src/sub.c                                                   []
@@ -3441,6 +3356,7 @@
 t/oo/ops.t                                                  []
 t/oo/proxy.t                                                []
 t/oo/subclass.t                                             []
+t/oo/vtableoverride.t                                       []
 t/op/00ff-dos.t                                             []
 t/op/00ff-unix.t                                            []
 t/op/01-parse_ops.t                                         []
@@ -3560,6 +3476,8 @@
 t/pmc/packfile.t                                            []
 t/pmc/packfileconstanttable.t                               []
 t/pmc/packfiledirectory.t                                   []
+t/pmc/packfilefixupentry.t                                  []
+t/pmc/packfilefixuptable.t                                  []
 t/pmc/packfilerawsegment.t                                  []
 t/pmc/packfilesegment.t                                     []
 t/pmc/pair.t                                                []
@@ -3592,9 +3510,6 @@
 t/pmc/sharedref.t                                           []
 t/pmc/signal.t                                              []
 t/pmc/slice.t                                               []
-t/pmc/stmlog.t                                              []
-t/pmc/stmref.t                                              []
-t/pmc/stmvar.t                                              []
 t/pmc/string.t                                              []
 t/pmc/stringhandle.t                                        []
 t/pmc/sub.t                                                 []
@@ -3605,7 +3520,6 @@
 t/pmc/tqueue.t                                              []
 t/pmc/undef.t                                               []
 t/pmc/unmanagedstruct.t                                     []
-t/pmc/vtablecache.t                                         []
 t/postconfigure/01-options.t                                []
 t/postconfigure/02-data_get_PConfig.t                       []
 t/postconfigure/05-trace.t                                  []
@@ -3695,11 +3609,6 @@
 t/steps/inter_types-01.t                                    []
 t/steps/inter_yacc-01.t                                     []
 t/steps/inter_yacc-02.t                                     []
-t/stm/basic.t                                               []
-t/stm/basic_mt.t                                            []
-t/stm/llqueue.t                                             []
-t/stm/queue.t                                               []
-t/stm/runtime.t                                             []
 t/stress/gc.t                                               []
 t/tools/dev/pmctree.t                                       []
 t/tools/dev/searchops.t                                     []
@@ -3770,6 +3679,7 @@
 tools/dev/lib_deps.pl                                       [devel]
 tools/dev/list_unjitted.pl                                  [devel]
 tools/dev/manicheck.pl                                      [devel]
+tools/dev/mk_gitignore.pl                                   [devel]
 tools/dev/mk_inno.pl                                        [devel]
 tools/dev/mk_language_shell.pl                              [devel]
 tools/dev/mk_manifest_and_skip.pl                           [devel]
@@ -3787,6 +3697,7 @@
 tools/dev/parrotbench.pl                                    [devel]
 tools/dev/pbc_header.pl                                     [devel]
 tools/dev/pbc_to_exe_gen.pl                                 [devel]
+tools/dev/pmcrenumber.pl                                    [devel]
 tools/dev/pmctree.pl                                        [devel]
 tools/dev/reconfigure.pl                                    [devel]
 tools/dev/search-ops.pl                                     [devel]

Modified: branches/strings/MANIFEST.SKIP
==============================================================================
--- branches/strings/MANIFEST.SKIP	(original)
+++ branches/strings/MANIFEST.SKIP	Thu Jan 15 16:36:00 2009
@@ -1,6 +1,6 @@
 # ex: set ro:
 # $Id$
-# generated by tools/dev/mk_manifest_and_skip.pl Mon Jan 12 21:16:57 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Thu Jan 15 13:05:53 2009 UT
 #
 # This file should contain a transcript of the svn:ignore properties
 # of the directories in the Parrot subversion repository. (Needed for
@@ -31,6 +31,8 @@
 ^.*\.manifest/
 ^.*\.ncb$
 ^.*\.ncb/
+^.*\.o$
+^.*\.o/
 ^.*\.obj$
 ^.*\.obj/
 ^.*\.patch$
@@ -127,8 +129,6 @@
 ^test\.ilk/
 ^test\.ldo$
 ^test\.ldo/
-^test\.o$
-^test\.o/
 ^test\.out$
 ^test\.out/
 ^test\.pdb$
@@ -397,8 +397,6 @@
 ^languages/.*\.tmp/
 ^languages/Makefile$
 ^languages/Makefile/
-^languages/hq9plus$
-^languages/hq9plus/
 ^languages/languages_smoke\.html$
 ^languages/languages_smoke\.html/
 ^languages/test_regex\.pbc$
@@ -704,48 +702,6 @@
 ^languages/dotnet/src/builtins\.pir/
 ^languages/dotnet/src/it\.pir$
 ^languages/dotnet/src/it\.pir/
-# generated from svn:ignore of 'languages/eclectus/'
-^languages/eclectus/Makefile$
-^languages/eclectus/Makefile/
-^languages/eclectus/driver_nqp\.pbc$
-^languages/eclectus/driver_nqp\.pbc/
-^languages/eclectus/stst\.out$
-^languages/eclectus/stst\.out/
-# generated from svn:ignore of 'languages/eclectus/src/builtins/'
-^languages/eclectus/src/builtins/.*\.pbc$
-^languages/eclectus/src/builtins/.*\.pbc/
-# generated from svn:ignore of 'languages/eclectus/src/pmc/'
-^languages/eclectus/src/pmc/.*\.bundle$
-^languages/eclectus/src/pmc/.*\.bundle/
-^languages/eclectus/src/pmc/.*\.c$
-^languages/eclectus/src/pmc/.*\.c/
-^languages/eclectus/src/pmc/.*\.dll$
-^languages/eclectus/src/pmc/.*\.dll/
-^languages/eclectus/src/pmc/.*\.dump$
-^languages/eclectus/src/pmc/.*\.dump/
-^languages/eclectus/src/pmc/.*\.exp$
-^languages/eclectus/src/pmc/.*\.exp/
-^languages/eclectus/src/pmc/.*\.h$
-^languages/eclectus/src/pmc/.*\.h/
-^languages/eclectus/src/pmc/.*\.ilk$
-^languages/eclectus/src/pmc/.*\.ilk/
-^languages/eclectus/src/pmc/.*\.lib$
-^languages/eclectus/src/pmc/.*\.lib/
-^languages/eclectus/src/pmc/.*\.manifest$
-^languages/eclectus/src/pmc/.*\.manifest/
-^languages/eclectus/src/pmc/.*\.o$
-^languages/eclectus/src/pmc/.*\.o/
-^languages/eclectus/src/pmc/.*\.obj$
-^languages/eclectus/src/pmc/.*\.obj/
-^languages/eclectus/src/pmc/.*\.pdb$
-^languages/eclectus/src/pmc/.*\.pdb/
-^languages/eclectus/src/pmc/.*\.so$
-^languages/eclectus/src/pmc/.*\.so/
-# generated from svn:ignore of 'languages/eclectus/t/'
-^languages/eclectus/t/.*\.nqp$
-^languages/eclectus/t/.*\.nqp/
-^languages/eclectus/t/.*\.pir$
-^languages/eclectus/t/.*\.pir/
 # generated from svn:ignore of 'languages/ecmascript/'
 ^languages/ecmascript/Makefile$
 ^languages/ecmascript/Makefile/
@@ -1635,11 +1591,6 @@
 ^src/pmc/.*\.tmp/
 ^src/pmc/Makefile$
 ^src/pmc/Makefile/
-# generated from svn:ignore of 'src/stm/'
-^src/stm/.*\.o$
-^src/stm/.*\.o/
-^src/stm/.*\.obj$
-^src/stm/.*\.obj/
 # generated from svn:ignore of 't/benchmark/'
 ^t/benchmark/.*\.pasm$
 ^t/benchmark/.*\.pasm/
@@ -1785,17 +1736,6 @@
 # generated from svn:ignore of 't/src/'
 ^t/src/.*_.*$
 ^t/src/.*_.*/
-# generated from svn:ignore of 't/stm/'
-^t/stm/.*\.out$
-^t/stm/.*\.out/
-^t/stm/.*\.pasm$
-^t/stm/.*\.pasm/
-^t/stm/.*\.pbc$
-^t/stm/.*\.pbc/
-^t/stm/.*\.pir$
-^t/stm/.*\.pir/
-^t/stm/.*_pbcexe.*$
-^t/stm/.*_pbcexe.*/
 # generated from svn:ignore of 't/stress/'
 ^t/stress/.*\.out$
 ^t/stress/.*\.out/

Modified: branches/strings/MANIFEST.generated
==============================================================================
--- branches/strings/MANIFEST.generated	(original)
+++ branches/strings/MANIFEST.generated	Thu Jan 15 16:36:00 2009
@@ -124,10 +124,6 @@
 runtime/parrot/dynext/dynlexpad.dll               [library]
 runtime/parrot/dynext/dynlexpad.dylib             [library]
 runtime/parrot/dynext/dynlexpad.so                [library]
-runtime/parrot/dynext/eclectus_group.bundle       [library]
-runtime/parrot/dynext/eclectus_group.dll          [library]
-runtime/parrot/dynext/eclectus_group.dylib        [library]
-runtime/parrot/dynext/eclectus_group.so           [library]
 runtime/parrot/dynext/gdbmhash.bundle             [library]
 runtime/parrot/dynext/gdbmhash.dll                [library]
 runtime/parrot/dynext/gdbmhash.dylib              [library]
@@ -275,7 +271,6 @@
 languages/cardinal/cardinal.pbc                   [main]
 languages/ecmascript/js.pbc                       [main]
 languages/forth/forth.pbc                         [main]
-languages/HQ9PLus/HQ9PLus.pbc                     [main]
 languages/lisp/lisp.pbc                           [main]
 languages/lolcode/lolcode.pbc                     [main]
 languages/lua/alarm.pbc                           [main]

Modified: branches/strings/NEWS
==============================================================================
--- branches/strings/NEWS	(original)
+++ branches/strings/NEWS	Thu Jan 15 16:36:00 2009
@@ -15,8 +15,14 @@
     - back to working state
     - ported to pir
   + Pipp
+    - added incomplete support for closures
+    - removed support for the alternative parsing strategies
     - added support for 'elsif'
     - added support for 'do-while'
+  + HQ9+
+    - left the nest and is now at https://github.com/bschmalhofer/hq9plus/
+  + Eclectus
+    - left the nest and is now at http://github.com/bschmalhofer/eclectus/
 - Miscellaneous
   + Infrastructure
     - 'make smoke' now generates Smolder reports sent to

Modified: branches/strings/PBC_COMPAT
==============================================================================
--- branches/strings/PBC_COMPAT	(original)
+++ branches/strings/PBC_COMPAT	Thu Jan 15 16:36:00 2009
@@ -27,6 +27,7 @@
 
 # please insert tab separated entries at the top of the list
 
+3.31    2009.01.12      whiteknight     remove stm.ops and all opcodes therein
 3.30	2009.01.10	coke	removed find_global_p_s_s and store_global_s_s_p 
 3.29	2009.01.07	coke	removed store_global_p_s_p
 3.28	2009.01.07	jonathan	changes for bytecode annoations (packfile and ops)
@@ -40,7 +41,6 @@
 3.20	2008.10.23	pmichaud	make opsrenumber fix
 3.19	2008.08.04	coke	remove getclass opcodes
 3.18	2008.07.16	bernhard	remove opcode getfd
-3.18	2008.07.16	bernhard	remove opcode getfd
 3.17    2008.06.26	jonathan	sub PMC freeze format changed
 3.16    2008.04.23	pmichaud	remove other user stack opcodes
 3.15    2008.04.22	pmichaud	remove saveall/restoreall opcodes

Modified: branches/strings/compilers/pirc/src/bcgen.c
==============================================================================
--- branches/strings/compilers/pirc/src/bcgen.c	(original)
+++ branches/strings/compilers/pirc/src/bcgen.c	Thu Jan 15 16:36:00 2009
@@ -4,7 +4,7 @@
  */
 #include <stdio.h>
 #include <assert.h>
-
+#include "pirsymbol.h"
 
 #include "parrot/parrot.h"
 
@@ -181,21 +181,26 @@
     while (index < count) {
         constant = bc->interp->code->const_table->constants[index];
         if (constant->type == PFC_STRING) {
-            if (string_compare(bc->interp, constant->u.string, parrotstr) == 0)
+            if (string_equal(bc->interp, constant->u.string, parrotstr) == 0) {
+                fprintf(stderr, "found string %s at index %d\n", str, index);
                 return index;
+            }
         }
-        index++;
+        ++index;
     }
 
+    /* fprintf(stderr, "string '%s' not found, storing...\n", str);
+    */
     /* it wasn't stored yet, store it now, and return the index */
     index    = new_pbc_const(bc);
     constant = bc->interp->code->const_table->constants[index];
 
     constant->type     = PFC_STRING;
     constant->u.string = parrotstr;
-    /*
-    fprintf(stderr, "add_string_const (%s) at index: %d\n", str, index);
+
+    /*fprintf(stderr, "add_string_const (%s) at index: %d\n", str, index);
     */
+
     return index;
 
 }
@@ -224,7 +229,6 @@
 }
 
 
-
 /*
 
 =item C<int
@@ -238,10 +242,31 @@
 */
 int
 add_key_const(bytecode * const bc, PMC *key) {
-    int index                   = new_pbc_const(bc);
-    PackFile_Constant *constant = bc->interp->code->const_table->constants[index];
-    constant->type              = PFC_KEY;
-    constant->u.key             = key;
+    PackFile_Constant *constant;
+    int count  = bc->interp->code->const_table->const_count;
+    int index  = 0;
+    STRING *s1 = key_set_to_string(bc->interp, key);
+
+    /* iterate over all constants; if a constant is a key, compare the string representations */
+    while (index < count) {
+        constant = bc->interp->code->const_table->constants[index];
+
+        if (constant->type == PFC_KEY) {
+            STRING *s2 = key_set_to_string(bc->interp, constant->u.key);
+            if (string_equal(bc->interp, s1, s2) == 0) {
+                fprintf(stderr, "found equal key (%d)\n", index);
+                return index;
+            }
+        }
+        ++index;
+    }
+
+    /* key wasn't found, so add it now */
+    index            = new_pbc_const(bc);
+    constant         = bc->interp->code->const_table->constants[index];
+    constant->type   = PFC_KEY;
+    constant->u.key  = key;
+    fprintf(stderr, "new key const (%d)\n", index);
     return index;
 }
 
@@ -480,9 +505,8 @@
 opcode_t
 emit_opcode(bytecode * const bc, opcode_t op) {
     *bc->opcursor = op;
-/*
+
     fprintf(stderr, "\n[%d]", op);
-*/
     return (bc->opcursor++ - bc->interp->code->base.data);
 
 }
@@ -502,9 +526,10 @@
 opcode_t
 emit_int_arg(bytecode * const bc, int intval) {
     *bc->opcursor = intval;
-/*
+
     fprintf(stderr, "{%d}", intval);
-*/
+
+
     return (bc->opcursor++ - bc->interp->code->base.data);
 }
 
@@ -640,7 +665,7 @@
 /*
 
 =item C<static PMC *
-create_lexinfo(bytecode * const bc, PMC * sub, lexical * const lexicals, int lexflag)>
+create_lexinfo(bytecode * const bc, PMC * sub, lexical * const lexicals, int needlex)>
 
 Create a lexinfo PMC for the sub C<sub>. If there are no lexicals,
 but the C<:lex> flag was specified, or the sub has an C<:outer> flag,
@@ -650,13 +675,11 @@
 
 */
 static PMC *
-create_lexinfo(bytecode * const bc, PMC * sub, lexical * const lexicals, int lexflag) {
+create_lexinfo(bytecode * const bc, PMC * sub, lexical * const lexicals, int needlex) {
     lexical      * lexiter     = lexicals;
     INTVAL   const lex_info_id = Parrot_get_ctx_HLL_type(bc->interp, enum_class_LexInfo);
     STRING * const method      = string_from_literal(bc->interp, "declare_lex_preg");
 
-    int      outer = 0; /* change type of this */
-
     /* create a lexinfo PMC */
     PMC * lex_info             = pmc_new_noinit(bc->interp, lex_info_id);
     VTABLE_init_pmc(bc->interp, lex_info, sub);
@@ -666,12 +689,12 @@
         STRING *lexname = string_from_cstring(bc->interp, lexiter->name, strlen(lexiter->name));
 
         /* declare the .lex as such */
-        /*
+
         fprintf(stderr, "Create lexinfo: color of .lex '%s' is: %d\n", lexiter->name,
-                lexiter->info->color);
-        */
+                *lexiter->color);
 
-        Parrot_PCCINVOKE(bc->interp, lex_info, method, "SI->", lexname, lexiter->color);
+
+        Parrot_PCCINVOKE(bc->interp, lex_info, method, "SI->", lexname, *lexiter->color);
 
         lexiter = lexiter->next;
     }
@@ -680,7 +703,7 @@
      * and doesn't need a lex_info. If, however, the sub has an :outer or a
      * :lex flag, then create the lex_info anyway.
      */
-    if (lex_info == NULL && (outer || lexflag)) {
+    if (lex_info == NULL && needlex) {
         lex_info = pmc_new_noinit(bc->interp, lex_info_id);
         VTABLE_init_pmc(bc->interp, lex_info, sub);
     }
@@ -695,26 +718,47 @@
 
 Find the outer sub that has name C<outername>. If not found, NULL is returned.
 
+XXX this function needs access to C<lexer>, which adds a dependency.
+XXX This should be fixed, to make bcgen.c a complete independent module.
+
 =cut
 
 */
 static PMC *
-find_outer_sub(bytecode * const bc, char const * const outername) {
-    PMC    *current;
-    STRING *cur_name;
-    size_t  len;
+find_outer_sub(bytecode * const bc, char const * const outername, struct lexer_state * const lexer)
+{
+    PMC          *current;
+    STRING       *cur_name;
+    size_t        len;
+    global_label *outersub;
+
 
     /* if sub has no :outer, leave */
     if (outername == NULL)
         return NULL;
 
-
+    /* if outername is an empty string, leave */
     len = strlen(outername);
     if (len == 0)
         return NULL;
 
+    /* find the outer sub */
+    outersub = find_global_label(lexer, outername);
 
-    /* XXX go here through the global labels, and check whether it can be found */
+    if (outersub) {
+        int const num_constants = bc->interp->code->const_table->const_count;
+
+        /* sanity check for const_table_index */
+        if (outersub->const_table_index >= 0 && outersub->const_table_index < num_constants)
+        {
+            PackFile_Constant *subconst
+                       = bc->interp->code->const_table->constants[outersub->const_table_index];
+            /* set a flag on that outer sub that it's an outer sub */
+            PObj_get_FLAGS(subconst->u.key) |= SUB_FLAG_IS_OUTER;
+            return subconst->u.key;
+        }
+
+    }
 
     /* could be eval too; check if :outer is the current sub */
     current = CONTEXT(bc->interp)->current_sub;
@@ -726,6 +770,7 @@
 
     cur_name = PMC_sub(current)->name;
 
+    /* XXX can't this be a call to string_compare() ? */
     if (cur_name->strlen == len && (memcmp((char *)cur_name->strstart, outername, len) == 0))
         return current;
 
@@ -833,7 +878,9 @@
 
 */
 int
-add_sub_pmc(bytecode * const bc, sub_info * const info, int needlex, int subpragmas) {
+add_sub_pmc(bytecode * const bc, sub_info * const info, int needlex, int subpragmas,
+            struct lexer_state * const lexer)
+{
     PMC                   *sub_pmc;        /* the "Sub" pmc, or a variant, such as "Coroutine" */
     Parrot_sub            *sub;
     int                    subconst_index; /* index in const table for the sub pmc */
@@ -853,8 +900,11 @@
     sub->end_offs         = info->endoffset;
     sub->namespace_name   = get_namespace_pmc(bc, info->name_space);
     sub->HLL_id           = CONTEXT(bc->interp)->current_HLL;
-    sub->lex_info         = create_lexinfo(bc, sub_pmc, info->lexicals, needlex);
-    sub->outer_sub        = find_outer_sub(bc, info->outersub);
+    /* create a lexinfo object, if needlex is true, or this sub has an :outer */
+    sub->lex_info         = create_lexinfo(bc, sub_pmc, info->lexicals,
+                                           needlex | (info->outersub != NULL));
+
+    sub->outer_sub        = find_outer_sub(bc, info->outersub, lexer);
 
     /* Set the vtable index; if this .sub was declared as :vtable, its vtable
      * index was found during the parse; otherwise it's -1.

Modified: branches/strings/compilers/pirc/src/bcgen.h
==============================================================================
--- branches/strings/compilers/pirc/src/bcgen.h	(original)
+++ branches/strings/compilers/pirc/src/bcgen.h	Thu Jan 15 16:36:00 2009
@@ -126,7 +126,9 @@
 */
 
 
-int add_sub_pmc(bytecode * const bc, sub_info * const info, int needlex, int subpragmas);
+
+int add_sub_pmc(bytecode * const bc, sub_info * const info, int needlex, int subpragmas,
+                struct lexer_state * const lexer);
 
 
 #endif /* PARROT_BCGEN_H_GUARD */

Modified: branches/strings/compilers/pirc/src/pir.y
==============================================================================
--- branches/strings/compilers/pirc/src/pir.y	(original)
+++ branches/strings/compilers/pirc/src/pir.y	Thu Jan 15 16:36:00 2009
@@ -1471,11 +1471,17 @@
                         {
                           set_instrf(lexer, $1 ? "unless_null" : "if_null", "%T%I",
                                      new_reg(lexer, PMC_TYPE, $3), $5);
+                          /* set a flag indicating that the 2nd operand is a label */
+                          set_op_labelflag(lexer, BIT(1));
                         }
                   | if_unless TK_IDENT then identifier
                         { create_if_instr(lexer, $1, 0, $2, $4); }
                   | if_unless reg then identifier
-                        { set_instrf(lexer, $1 ? "unless" : "if", "%T%I", $2, $4); }
+                        {
+                          set_instrf(lexer, $1 ? "unless" : "if", "%T%I", $2, $4);
+                          /* set a flag indicating that the 2nd operand is a label */
+                          set_op_labelflag(lexer, BIT(1));
+                        }
                   | if_unless "int" then identifier
                         { create_if_instr(lexer, $1, 0, "int", $4); }
                   | if_unless "num" then identifier
@@ -1503,7 +1509,7 @@
                                  invert_instr(lexer);
 
                              push_operand(lexer, expr_from_ident(lexer, $4));
-
+                             /* set a flag indicating that the 3rd operand is a label */
                              set_op_labelflag(lexer, BIT(2));
                           }
                           else { /* evaluation during compile time */
@@ -2918,8 +2924,10 @@
     else
         set_instrf(lexer, invert ? "unless" : "if", "%T%I", target_from_symbol(lexer, sym), label);
 
-    /* set a flag on this instruction */
-    set_op_labelflag(lexer, BIT(2));
+    /* set a flag on this instruction that the second operand is a label. */
+    /*set_op_labelflag(lexer, BIT(2));
+    */
+    set_op_labelflag(lexer, BIT(1));
 }
 
 /*

Modified: branches/strings/compilers/pirc/src/pircompunit.c
==============================================================================
--- branches/strings/compilers/pirc/src/pircompunit.c	(original)
+++ branches/strings/compilers/pirc/src/pircompunit.c	Thu Jan 15 16:36:00 2009
@@ -1082,10 +1082,10 @@
 /*
 
 =item C<void
-set_instr_flag(lexer_state * const lexer, instr_flag flag)>
+set_op_labelflag(lexer_state * const lexer, int flag)>
 
-Set the flag C<flag> on the current instruction. Note that C<flag> may
-encode different flags.
+Set a flag on the current instruction that it contains labels as operands.
+The bit indicates which operand, count starting from bit 1.
 
 =cut
 
@@ -2381,6 +2381,7 @@
 
         }
 
+
     }
     while (iter != lexer->subs->statements); /* iterate over all instructions */
 }
@@ -2498,7 +2499,7 @@
     /* store the subroutine in the bytecode constant table. */
     sub_const_table_index = add_sub_pmc(lexer->bc, &CURRENT_SUB(lexer)->info,
                                     TEST_FLAG(CURRENT_SUB(lexer)->flags, PIRC_SUB_FLAG_LEX),
-                                    CURRENT_SUB(lexer)->flags);
+                                    CURRENT_SUB(lexer)->flags, lexer);
 
 
 

Modified: branches/strings/compilers/pirc/src/pircompunit.h
==============================================================================
--- branches/strings/compilers/pirc/src/pircompunit.h	(original)
+++ branches/strings/compilers/pirc/src/pircompunit.h	Thu Jan 15 16:36:00 2009
@@ -154,6 +154,7 @@
     int       ival;
     char     *pval;
     ucstring *ustr;
+    STRING   *pstr; /* pstr stands for Parrot STRING */
 
 } value;
 

Modified: branches/strings/compilers/pirc/src/piremit.c
==============================================================================
--- branches/strings/compilers/pirc/src/piremit.c	(original)
+++ branches/strings/compilers/pirc/src/piremit.c	Thu Jan 15 16:36:00 2009
@@ -691,6 +691,11 @@
         case EXPR_KEY:
             emit_pbc_key(lexer, operand->expr.k);
             break;
+        /*
+        case EXPR_IDENT:
+            fprintf(stderr, "expr ident\n");
+            break;
+        */
         default:
             break;
     }

Modified: branches/strings/compilers/pirc/src/pirparser.c
==============================================================================
--- branches/strings/compilers/pirc/src/pirparser.c	(original)
+++ branches/strings/compilers/pirc/src/pirparser.c	Thu Jan 15 16:36:00 2009
@@ -1081,30 +1081,30 @@
     1260,  1278,  1285,  1290,  1301,  1312,  1323,  1334,  1339,  1344,
     1349,  1359,  1378,  1412,  1414,  1416,  1418,  1420,  1422,  1424,
     1426,  1431,  1440,  1442,  1444,  1446,  1448,  1450,  1452,  1454,
-    1456,  1458,  1470,  1475,  1477,  1479,  1481,  1483,  1485,  1487,
-    1489,  1491,  1493,  1495,  1497,  1499,  1530,  1556,  1564,  1573,
-    1582,  1584,  1586,  1588,  1590,  1594,  1599,  1601,  1606,  1607,
-    1610,  1611,  1614,  1615,  1618,  1626,  1630,  1632,  1636,  1640,
-    1641,  1644,  1659,  1663,  1664,  1667,  1679,  1680,  1684,  1686,
-    1690,  1694,  1696,  1698,  1704,  1705,  1710,  1711,  1715,  1717,
-    1726,  1728,  1732,  1736,  1738,  1740,  1744,  1745,  1748,  1768,
-    1775,  1777,  1787,  1804,  1806,  1808,  1812,  1821,  1826,  1833,
-    1834,  1838,  1840,  1844,  1846,  1851,  1852,  1856,  1858,  1860,
-    1862,  1872,  1876,  1877,  1878,  1879,  1882,  1887,  1898,  1905,
-    1910,  1911,  1915,  1917,  1921,  1922,  1925,  1929,  1933,  1937,
-    1946,  1956,  1957,  1962,  1964,  1969,  1974,  1975,  1979,  1981,
-    1985,  1991,  1992,  1996,  1998,  2006,  2007,  2011,  2015,  2018,
-    2022,  2023,  2026,  2030,  2031,  2034,  2038,  2040,  2042,  2044,
-    2048,  2052,  2053,  2066,  2067,  2071,  2072,  2073,  2076,  2077,
-    2080,  2081,  2082,  2083,  2084,  2085,  2088,  2089,  2090,  2091,
-    2099,  2102,  2103,  2116,  2117,  2118,  2119,  2123,  2124,  2127,
-    2128,  2129,  2130,  2131,  2132,  2133,  2134,  2137,  2138,  2139,
-    2142,  2143,  2144,  2145,  2146,  2147,  2148,  2149,  2150,  2151,
-    2152,  2153,  2154,  2155,  2156,  2157,  2158,  2159,  2160,  2161,
-    2162,  2163,  2164,  2170,  2171,  2172,  2173,  2174,  2175,  2176,
-    2177,  2178,  2179,  2180,  2181,  2193,  2201,  2205,  2206,  2209,
-    2210,  2211,  2212,  2213,  2214,  2217,  2219,  2220,  2223,  2224,
-    2227,  2231,  2236
+    1456,  1458,  1470,  1477,  1479,  1485,  1487,  1489,  1491,  1493,
+    1495,  1497,  1499,  1501,  1503,  1505,  1536,  1562,  1570,  1579,
+    1588,  1590,  1592,  1594,  1596,  1600,  1605,  1607,  1612,  1613,
+    1616,  1617,  1620,  1621,  1624,  1632,  1636,  1638,  1642,  1646,
+    1647,  1650,  1665,  1669,  1670,  1673,  1685,  1686,  1690,  1692,
+    1696,  1700,  1702,  1704,  1710,  1711,  1716,  1717,  1721,  1723,
+    1732,  1734,  1738,  1742,  1744,  1746,  1750,  1751,  1754,  1774,
+    1781,  1783,  1793,  1810,  1812,  1814,  1818,  1827,  1832,  1839,
+    1840,  1844,  1846,  1850,  1852,  1857,  1858,  1862,  1864,  1866,
+    1868,  1878,  1882,  1883,  1884,  1885,  1888,  1893,  1904,  1911,
+    1916,  1917,  1921,  1923,  1927,  1928,  1931,  1935,  1939,  1943,
+    1952,  1962,  1963,  1968,  1970,  1975,  1980,  1981,  1985,  1987,
+    1991,  1997,  1998,  2002,  2004,  2012,  2013,  2017,  2021,  2024,
+    2028,  2029,  2032,  2036,  2037,  2040,  2044,  2046,  2048,  2050,
+    2054,  2058,  2059,  2072,  2073,  2077,  2078,  2079,  2082,  2083,
+    2086,  2087,  2088,  2089,  2090,  2091,  2094,  2095,  2096,  2097,
+    2105,  2108,  2109,  2122,  2123,  2124,  2125,  2129,  2130,  2133,
+    2134,  2135,  2136,  2137,  2138,  2139,  2140,  2143,  2144,  2145,
+    2148,  2149,  2150,  2151,  2152,  2153,  2154,  2155,  2156,  2157,
+    2158,  2159,  2160,  2161,  2162,  2163,  2164,  2165,  2166,  2167,
+    2168,  2169,  2170,  2176,  2177,  2178,  2179,  2180,  2181,  2182,
+    2183,  2184,  2185,  2186,  2187,  2199,  2207,  2211,  2212,  2215,
+    2216,  2217,  2218,  2219,  2220,  2223,  2225,  2226,  2229,  2230,
+    2233,  2237,  2242
 };
 #endif
 
@@ -3622,78 +3622,84 @@
     {
                           set_instrf(lexer, (yyvsp[(1) - (5)].ival) ? "unless_null" : "if_null", "%T%I",
                                      new_reg(lexer, PMC_TYPE, (yyvsp[(3) - (5)].ival)), (yyvsp[(5) - (5)].sval));
+                          /* set a flag indicating that the 2nd operand is a label */
+                          set_op_labelflag(lexer, BIT(1));
                         ;}
     break;
 
   case 203:
-#line 1476 "pir.y"
+#line 1478 "pir.y"
     { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, (yyvsp[(2) - (4)].sval), (yyvsp[(4) - (4)].sval)); ;}
     break;
 
   case 204:
-#line 1478 "pir.y"
-    { set_instrf(lexer, (yyvsp[(1) - (4)].ival) ? "unless" : "if", "%T%I", (yyvsp[(2) - (4)].targ), (yyvsp[(4) - (4)].sval)); ;}
+#line 1480 "pir.y"
+    {
+                          set_instrf(lexer, (yyvsp[(1) - (4)].ival) ? "unless" : "if", "%T%I", (yyvsp[(2) - (4)].targ), (yyvsp[(4) - (4)].sval));
+                          /* set a flag indicating that the 2nd operand is a label */
+                          set_op_labelflag(lexer, BIT(1));
+                        ;}
     break;
 
   case 205:
-#line 1480 "pir.y"
+#line 1486 "pir.y"
     { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, "int", (yyvsp[(4) - (4)].sval)); ;}
     break;
 
   case 206:
-#line 1482 "pir.y"
+#line 1488 "pir.y"
     { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, "num", (yyvsp[(4) - (4)].sval)); ;}
     break;
 
   case 207:
-#line 1484 "pir.y"
+#line 1490 "pir.y"
     { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, "pmc", (yyvsp[(4) - (4)].sval)); ;}
     break;
 
   case 208:
-#line 1486 "pir.y"
+#line 1492 "pir.y"
     { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, "string", (yyvsp[(4) - (4)].sval)); ;}
     break;
 
   case 209:
-#line 1488 "pir.y"
+#line 1494 "pir.y"
     { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, "if", (yyvsp[(4) - (4)].sval)); ;}
     break;
 
   case 210:
-#line 1490 "pir.y"
+#line 1496 "pir.y"
     { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, "unless", (yyvsp[(4) - (4)].sval)); ;}
     break;
 
   case 211:
-#line 1492 "pir.y"
+#line 1498 "pir.y"
     { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, "goto", (yyvsp[(4) - (4)].sval)); ;}
     break;
 
   case 212:
-#line 1494 "pir.y"
+#line 1500 "pir.y"
     { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, "goto", (yyvsp[(4) - (4)].sval)); ;}
     break;
 
   case 213:
-#line 1496 "pir.y"
+#line 1502 "pir.y"
     { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, "null", (yyvsp[(4) - (4)].sval)); ;}
     break;
 
   case 214:
-#line 1498 "pir.y"
+#line 1504 "pir.y"
     { create_if_instr(lexer, (yyvsp[(1) - (4)].ival), 0, "null", (yyvsp[(4) - (4)].sval)); ;}
     break;
 
   case 215:
-#line 1500 "pir.y"
+#line 1506 "pir.y"
     {
                           if ((yyvsp[(2) - (4)].ival) == COMPUTE_DURING_RUNTIME) {
                              if ((yyvsp[(1) - (4)].ival) == NEED_INVERT_OPNAME) /* "unless" */
                                  invert_instr(lexer);
 
                              push_operand(lexer, expr_from_ident(lexer, (yyvsp[(4) - (4)].sval)));
-
+                             /* set a flag indicating that the 3rd operand is a label */
                              set_op_labelflag(lexer, BIT(2));
                           }
                           else { /* evaluation during compile time */
@@ -3714,7 +3720,7 @@
     break;
 
   case 216:
-#line 1531 "pir.y"
+#line 1537 "pir.y"
     {
                           /* the instructions "gt" and "ge" are converted to "lt" and "le".
                            * if so, then the arguments must be reversed as well. "lt" and
@@ -3743,7 +3749,7 @@
     break;
 
   case 217:
-#line 1557 "pir.y"
+#line 1563 "pir.y"
     {
                           if (((yyvsp[(0) - (3)].ival) != NEED_INVERT_OPNAME) && ((yyvsp[(2) - (3)].ival) == OP_GE || (yyvsp[(2) - (3)].ival) == OP_GT))
                               set_instrf(lexer, opnames[(yyvsp[(2) - (3)].ival) + 1], "%T%i", (yyvsp[(3) - (3)].targ), (yyvsp[(1) - (3)].ival));
@@ -3754,7 +3760,7 @@
     break;
 
   case 218:
-#line 1565 "pir.y"
+#line 1571 "pir.y"
     {
                           if (((yyvsp[(0) - (3)].ival) != NEED_INVERT_OPNAME) && ((yyvsp[(2) - (3)].ival) == OP_GE || (yyvsp[(2) - (3)].ival) == OP_GT))
                               set_instrf(lexer, opnames[(yyvsp[(2) - (3)].ival) + 1], "%T%n", (yyvsp[(3) - (3)].targ), (yyvsp[(1) - (3)].dval));
@@ -3766,7 +3772,7 @@
     break;
 
   case 219:
-#line 1574 "pir.y"
+#line 1580 "pir.y"
     {
                           if (((yyvsp[(0) - (3)].ival) != NEED_INVERT_OPNAME) && ((yyvsp[(2) - (3)].ival) == OP_GE || (yyvsp[(2) - (3)].ival) == OP_GT))
                               set_instrf(lexer, opnames[(yyvsp[(2) - (3)].ival)], "%T%s", (yyvsp[(3) - (3)].targ), (yyvsp[(1) - (3)].sval));
@@ -3778,32 +3784,32 @@
     break;
 
   case 220:
-#line 1583 "pir.y"
+#line 1589 "pir.y"
     { (yyval.ival) = evaluate_i_i((yyvsp[(1) - (3)].ival), (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].ival)); ;}
     break;
 
   case 221:
-#line 1585 "pir.y"
+#line 1591 "pir.y"
     { (yyval.ival) = evaluate_i_n((yyvsp[(1) - (3)].ival), (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].dval)); ;}
     break;
 
   case 222:
-#line 1587 "pir.y"
+#line 1593 "pir.y"
     { (yyval.ival) = evaluate_n_i((yyvsp[(1) - (3)].dval), (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].ival)); ;}
     break;
 
   case 223:
-#line 1589 "pir.y"
+#line 1595 "pir.y"
     { (yyval.ival) = evaluate_n_n((yyvsp[(1) - (3)].dval), (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].dval)); ;}
     break;
 
   case 224:
-#line 1591 "pir.y"
+#line 1597 "pir.y"
     { (yyval.ival) = evaluate_s_s((yyvsp[(1) - (3)].sval), (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].sval)); ;}
     break;
 
   case 225:
-#line 1595 "pir.y"
+#line 1601 "pir.y"
     {
                           yypirerror(yyscanner, lexer, "cannot compare string to %s",
                                      (yyvsp[(3) - (3)].ival) == INT_TYPE ? "integer" : "number");
@@ -3811,37 +3817,37 @@
     break;
 
   case 226:
-#line 1600 "pir.y"
+#line 1606 "pir.y"
     { yypirerror(yyscanner, lexer, "cannot compare integer to string"); ;}
     break;
 
   case 227:
-#line 1602 "pir.y"
+#line 1608 "pir.y"
     { yypirerror(yyscanner, lexer, "cannot compare number to string"); ;}
     break;
 
   case 228:
-#line 1606 "pir.y"
+#line 1612 "pir.y"
     { (yyval.ival) = INT_TYPE; ;}
     break;
 
   case 229:
-#line 1607 "pir.y"
+#line 1613 "pir.y"
     { (yyval.ival) = NUM_TYPE; ;}
     break;
 
   case 230:
-#line 1610 "pir.y"
+#line 1616 "pir.y"
     { (yyval.ival) = DONT_INVERT_OPNAME; /* no need to invert */ ;}
     break;
 
   case 231:
-#line 1611 "pir.y"
+#line 1617 "pir.y"
     { (yyval.ival) = NEED_INVERT_OPNAME; /* yes, invert opname */ ;}
     break;
 
   case 234:
-#line 1619 "pir.y"
+#line 1625 "pir.y"
     {
                           set_instrf(lexer, "branch", "%I", (yyvsp[(2) - (3)].sval));
                           set_op_labelflag(lexer, BIT(0)); /* bit 0 means: "1 << 0" */
@@ -3850,37 +3856,37 @@
     break;
 
   case 235:
-#line 1627 "pir.y"
+#line 1633 "pir.y"
     { declare_local(lexer, (yyvsp[(2) - (4)].ival), (yyvsp[(3) - (4)].symb)); ;}
     break;
 
   case 236:
-#line 1631 "pir.y"
+#line 1637 "pir.y"
     { (yyval.symb) = (yyvsp[(1) - (1)].symb); ;}
     break;
 
   case 237:
-#line 1633 "pir.y"
+#line 1639 "pir.y"
     { (yyval.symb) = add_local((yyvsp[(1) - (3)].symb), (yyvsp[(3) - (3)].symb)); ;}
     break;
 
   case 238:
-#line 1637 "pir.y"
+#line 1643 "pir.y"
     { (yyval.symb) = new_local(lexer, (yyvsp[(1) - (2)].sval), (yyvsp[(2) - (2)].ival)); ;}
     break;
 
   case 239:
-#line 1640 "pir.y"
+#line 1646 "pir.y"
     { (yyval.ival) = 0; ;}
     break;
 
   case 240:
-#line 1641 "pir.y"
+#line 1647 "pir.y"
     { (yyval.ival) = 1; ;}
     break;
 
   case 241:
-#line 1645 "pir.y"
+#line 1651 "pir.y"
     { /* if $4 is not a register, it must be a declared symbol */
                           if (!TEST_FLAG((yyvsp[(4) - (5)].targ)->flags, TARGET_FLAG_IS_REG)) {
 
@@ -3893,12 +3899,12 @@
     break;
 
   case 242:
-#line 1660 "pir.y"
+#line 1666 "pir.y"
     { convert_inv_to_instr(lexer, (yyvsp[(1) - (1)].invo)); ;}
     break;
 
   case 245:
-#line 1672 "pir.y"
+#line 1678 "pir.y"
     { /* $4 contains an invocation object */
                               set_invocation_args(lexer, (yyvsp[(4) - (8)].invo), (yyvsp[(3) - (8)].argm));
                               (yyval.invo) = set_invocation_results(lexer, (yyvsp[(4) - (8)].invo), (yyvsp[(6) - (8)].targ));
@@ -3906,72 +3912,72 @@
     break;
 
   case 246:
-#line 1679 "pir.y"
+#line 1685 "pir.y"
     { (yyval.argm) = NULL; ;}
     break;
 
   case 247:
-#line 1681 "pir.y"
+#line 1687 "pir.y"
     { (yyval.argm) = (yyvsp[(1) - (1)].argm); ;}
     break;
 
   case 248:
-#line 1685 "pir.y"
+#line 1691 "pir.y"
     { (yyval.argm) = (yyvsp[(1) - (1)].argm); ;}
     break;
 
   case 249:
-#line 1687 "pir.y"
+#line 1693 "pir.y"
     { (yyval.argm) = add_arg((yyvsp[(1) - (2)].argm), (yyvsp[(2) - (2)].argm)); ;}
     break;
 
   case 250:
-#line 1691 "pir.y"
+#line 1697 "pir.y"
     { (yyval.argm) = (yyvsp[(2) - (3)].argm); ;}
     break;
 
   case 251:
-#line 1695 "pir.y"
+#line 1701 "pir.y"
     { (yyval.invo) = invoke(lexer, CALL_PCC, (yyvsp[(2) - (3)].targ), (yyvsp[(3) - (3)].targ)); ;}
     break;
 
   case 252:
-#line 1697 "pir.y"
+#line 1703 "pir.y"
     { (yyval.invo) = invoke(lexer, CALL_NCI, (yyvsp[(2) - (2)].targ)); ;}
     break;
 
   case 253:
-#line 1700 "pir.y"
+#line 1706 "pir.y"
     { (yyval.invo) = invoke(lexer, CALL_METHOD, (yyvsp[(2) - (5)].targ), (yyvsp[(5) - (5)].expr)); ;}
     break;
 
   case 254:
-#line 1704 "pir.y"
+#line 1710 "pir.y"
     { (yyval.targ) = NULL; ;}
     break;
 
   case 255:
-#line 1706 "pir.y"
+#line 1712 "pir.y"
     { (yyval.targ) = (yyvsp[(2) - (2)].targ); ;}
     break;
 
   case 256:
-#line 1710 "pir.y"
+#line 1716 "pir.y"
     { (yyval.targ) = NULL; ;}
     break;
 
   case 257:
-#line 1712 "pir.y"
+#line 1718 "pir.y"
     { (yyval.targ) = (yyvsp[(1) - (1)].targ); ;}
     break;
 
   case 258:
-#line 1716 "pir.y"
+#line 1722 "pir.y"
     { (yyval.targ) = (yyvsp[(1) - (1)].targ); ;}
     break;
 
   case 259:
-#line 1718 "pir.y"
+#line 1724 "pir.y"
     {
                              if ((yyvsp[(2) - (2)].targ))
                                  (yyval.targ) = add_target(lexer, (yyvsp[(1) - (2)].targ), (yyvsp[(2) - (2)].targ));
@@ -3981,32 +3987,32 @@
     break;
 
   case 260:
-#line 1727 "pir.y"
+#line 1733 "pir.y"
     { (yyval.targ) = (yyvsp[(2) - (3)].targ); ;}
     break;
 
   case 261:
-#line 1729 "pir.y"
+#line 1735 "pir.y"
     { (yyval.targ) = NULL; ;}
     break;
 
   case 263:
-#line 1737 "pir.y"
+#line 1743 "pir.y"
     { (yyval.invo) = set_invocation_results(lexer, (yyvsp[(3) - (3)].invo), (yyvsp[(1) - (3)].targ)); ;}
     break;
 
   case 264:
-#line 1739 "pir.y"
+#line 1745 "pir.y"
     { (yyval.invo) = set_invocation_results(lexer, (yyvsp[(3) - (3)].invo), (yyvsp[(1) - (3)].targ)); ;}
     break;
 
   case 265:
-#line 1741 "pir.y"
+#line 1747 "pir.y"
     {  (yyval.invo) = set_invocation_results(lexer, (yyvsp[(1) - (1)].invo), NULL); ;}
     break;
 
   case 268:
-#line 1749 "pir.y"
+#line 1755 "pir.y"
     {
                              /* if $1 is not a register, check whether the symbol was declared */
                              if (!TEST_FLAG((yyvsp[(1) - (4)].targ)->flags, TARGET_FLAG_IS_REG)) {
@@ -4027,7 +4033,7 @@
     break;
 
   case 269:
-#line 1769 "pir.y"
+#line 1775 "pir.y"
     {
                              (yyval.invo) = invoke(lexer, CALL_PCC, (yyvsp[(1) - (2)].targ), NULL);
                              set_invocation_args(lexer, (yyval.invo), (yyvsp[(2) - (2)].argm));
@@ -4035,12 +4041,12 @@
     break;
 
   case 270:
-#line 1776 "pir.y"
+#line 1782 "pir.y"
     { (yyval.targ) = (yyvsp[(1) - (1)].targ); ;}
     break;
 
   case 271:
-#line 1778 "pir.y"
+#line 1784 "pir.y"
     {
                              symbol *sym = find_symbol(lexer, (yyvsp[(1) - (1)].sval));
                              if (sym == NULL)
@@ -4051,7 +4057,7 @@
     break;
 
   case 272:
-#line 1788 "pir.y"
+#line 1794 "pir.y"
     { /* check that this identifier was declared */
                              symbol *sym = find_symbol(lexer, (yyvsp[(1) - (1)].sval));
 
@@ -4071,22 +4077,22 @@
     break;
 
   case 273:
-#line 1805 "pir.y"
+#line 1811 "pir.y"
     { (yyval.expr) = expr_from_target(lexer, new_reg(lexer, PMC_TYPE, (yyvsp[(1) - (1)].ival))); ;}
     break;
 
   case 274:
-#line 1807 "pir.y"
+#line 1813 "pir.y"
     { (yyval.expr) = expr_from_target(lexer, new_reg(lexer, STRING_TYPE, (yyvsp[(1) - (1)].ival))); ;}
     break;
 
   case 275:
-#line 1809 "pir.y"
+#line 1815 "pir.y"
     { (yyval.expr) = expr_from_const(lexer, new_const(lexer, STRING_VAL, (yyvsp[(1) - (1)].sval))); ;}
     break;
 
   case 276:
-#line 1813 "pir.y"
+#line 1819 "pir.y"
     {
                              symbol *sym = find_symbol(lexer, (yyvsp[(1) - (1)].sval));
                              if (sym == NULL)
@@ -4098,74 +4104,74 @@
     break;
 
   case 277:
-#line 1822 "pir.y"
+#line 1828 "pir.y"
     { (yyval.targ) = new_reg(lexer, PMC_TYPE, (yyvsp[(1) - (1)].ival)); ;}
     break;
 
   case 278:
-#line 1827 "pir.y"
+#line 1833 "pir.y"
     {
                              (yyval.targ) = (yyvsp[(2) - (3)].targ);
                            ;}
     break;
 
   case 279:
-#line 1833 "pir.y"
+#line 1839 "pir.y"
     { (yyval.targ) = NULL; ;}
     break;
 
   case 280:
-#line 1835 "pir.y"
+#line 1841 "pir.y"
     { (yyval.targ) = (yyvsp[(1) - (1)].targ); ;}
     break;
 
   case 281:
-#line 1839 "pir.y"
+#line 1845 "pir.y"
     { (yyval.targ) = (yyvsp[(1) - (1)].targ); ;}
     break;
 
   case 282:
-#line 1841 "pir.y"
+#line 1847 "pir.y"
     { (yyval.targ) = add_target(lexer, (yyvsp[(1) - (3)].targ), (yyvsp[(3) - (3)].targ)); ;}
     break;
 
   case 283:
-#line 1845 "pir.y"
+#line 1851 "pir.y"
     { (yyval.targ) = set_param_flag(lexer, (yyvsp[(1) - (2)].targ), (yyvsp[(2) - (2)].ival)); ;}
     break;
 
   case 284:
-#line 1847 "pir.y"
+#line 1853 "pir.y"
     { (yyval.targ) = set_param_alias(lexer, (yyvsp[(1) - (3)].sval)); ;}
     break;
 
   case 285:
-#line 1851 "pir.y"
+#line 1857 "pir.y"
     { (yyval.ival) = 0; ;}
     break;
 
   case 286:
-#line 1853 "pir.y"
+#line 1859 "pir.y"
     { SET_FLAG((yyval.ival), (yyvsp[(2) - (2)].ival)); ;}
     break;
 
   case 287:
-#line 1857 "pir.y"
+#line 1863 "pir.y"
     { (yyval.ival) = TARGET_FLAG_OPTIONAL; ;}
     break;
 
   case 288:
-#line 1859 "pir.y"
+#line 1865 "pir.y"
     { (yyval.ival) = TARGET_FLAG_OPT_FLAG; ;}
     break;
 
   case 289:
-#line 1861 "pir.y"
+#line 1867 "pir.y"
     { (yyval.ival) = TARGET_FLAG_SLURPY; ;}
     break;
 
   case 290:
-#line 1863 "pir.y"
+#line 1869 "pir.y"
     {
                              (yyval.ival) = TARGET_FLAG_NAMED;
                              set_param_alias(lexer, (yyvsp[(2) - (2)].sval));
@@ -4173,12 +4179,12 @@
     break;
 
   case 291:
-#line 1873 "pir.y"
+#line 1879 "pir.y"
     { convert_inv_to_instr(lexer, (yyvsp[(1) - (1)].invo)); ;}
     break;
 
   case 296:
-#line 1883 "pir.y"
+#line 1889 "pir.y"
     {
                               (yyval.invo) = invoke(lexer, CALL_RETURN);
                               set_invocation_args(lexer, (yyval.invo), (yyvsp[(2) - (3)].argm));
@@ -4186,7 +4192,7 @@
     break;
 
   case 297:
-#line 1888 "pir.y"
+#line 1894 "pir.y"
     { /* was the invocation a method call? then it becomes a method tail
                                * call, otherwise it's just a normal (sub) tail call.
                                */
@@ -4198,7 +4204,7 @@
     break;
 
   case 298:
-#line 1899 "pir.y"
+#line 1905 "pir.y"
     {
                               (yyval.invo) = invoke(lexer, CALL_YIELD);
                               set_invocation_args(lexer, (yyval.invo), (yyvsp[(2) - (3)].argm));
@@ -4206,47 +4212,47 @@
     break;
 
   case 299:
-#line 1906 "pir.y"
+#line 1912 "pir.y"
     { (yyval.argm) = (yyvsp[(2) - (3)].argm); ;}
     break;
 
   case 300:
-#line 1910 "pir.y"
+#line 1916 "pir.y"
     { (yyval.argm) = NULL; ;}
     break;
 
   case 301:
-#line 1912 "pir.y"
+#line 1918 "pir.y"
     { (yyval.argm) = (yyvsp[(1) - (1)].argm); ;}
     break;
 
   case 302:
-#line 1916 "pir.y"
+#line 1922 "pir.y"
     { (yyval.argm) = (yyvsp[(1) - (1)].argm); ;}
     break;
 
   case 303:
-#line 1918 "pir.y"
+#line 1924 "pir.y"
     { (yyval.argm) = add_arg((yyvsp[(1) - (3)].argm), (yyvsp[(3) - (3)].argm)); ;}
     break;
 
   case 306:
-#line 1926 "pir.y"
+#line 1932 "pir.y"
     { (yyval.argm) = set_arg_alias(lexer, (yyvsp[(1) - (3)].sval)); ;}
     break;
 
   case 307:
-#line 1930 "pir.y"
+#line 1936 "pir.y"
     { (yyval.argm) = set_arg_flag((yyval.argm), (yyvsp[(2) - (2)].ival)); ;}
     break;
 
   case 308:
-#line 1934 "pir.y"
+#line 1940 "pir.y"
     { (yyval.argm) = set_curarg(lexer, new_argument(lexer, (yyvsp[(1) - (1)].expr)));  ;}
     break;
 
   case 309:
-#line 1940 "pir.y"
+#line 1946 "pir.y"
     {
                               (yyval.invo) = invoke(lexer, CALL_RETURN);
                               set_invocation_args(lexer, (yyval.invo), (yyvsp[(3) - (5)].argm));
@@ -4254,7 +4260,7 @@
     break;
 
   case 310:
-#line 1949 "pir.y"
+#line 1955 "pir.y"
     {
                               (yyval.invo) = invoke(lexer, CALL_YIELD);
                               set_invocation_args(lexer, (yyval.invo), (yyvsp[(3) - (5)].argm));
@@ -4262,72 +4268,72 @@
     break;
 
   case 311:
-#line 1956 "pir.y"
+#line 1962 "pir.y"
     { (yyval.argm) = NULL; ;}
     break;
 
   case 312:
-#line 1958 "pir.y"
+#line 1964 "pir.y"
     { (yyval.argm) = (yyvsp[(1) - (1)].argm); ;}
     break;
 
   case 313:
-#line 1963 "pir.y"
+#line 1969 "pir.y"
     { (yyval.argm) = (yyvsp[(1) - (1)].argm); ;}
     break;
 
   case 314:
-#line 1965 "pir.y"
+#line 1971 "pir.y"
     { (yyval.argm) = add_arg((yyvsp[(1) - (2)].argm), (yyvsp[(2) - (2)].argm)); ;}
     break;
 
   case 315:
-#line 1970 "pir.y"
+#line 1976 "pir.y"
     { (yyval.argm) = (yyvsp[(2) - (3)].argm); ;}
     break;
 
   case 316:
-#line 1974 "pir.y"
+#line 1980 "pir.y"
     { (yyval.argm) = NULL; ;}
     break;
 
   case 317:
-#line 1976 "pir.y"
+#line 1982 "pir.y"
     { (yyval.argm) = (yyvsp[(1) - (1)].argm); ;}
     break;
 
   case 318:
-#line 1980 "pir.y"
+#line 1986 "pir.y"
     { (yyval.argm) = (yyvsp[(1) - (1)].argm); ;}
     break;
 
   case 319:
-#line 1982 "pir.y"
+#line 1988 "pir.y"
     { (yyval.argm) = add_arg((yyvsp[(1) - (2)].argm), (yyvsp[(2) - (2)].argm)); ;}
     break;
 
   case 320:
-#line 1986 "pir.y"
+#line 1992 "pir.y"
     { (yyval.argm) = (yyvsp[(2) - (3)].argm); ;}
     break;
 
   case 321:
-#line 1991 "pir.y"
+#line 1997 "pir.y"
     { (yyval.ival) = 0; ;}
     break;
 
   case 322:
-#line 1993 "pir.y"
+#line 1999 "pir.y"
     { SET_FLAG((yyval.ival), (yyvsp[(2) - (2)].ival)); ;}
     break;
 
   case 323:
-#line 1997 "pir.y"
+#line 2003 "pir.y"
     { (yyval.ival) = ARG_FLAG_FLAT; ;}
     break;
 
   case 324:
-#line 1999 "pir.y"
+#line 2005 "pir.y"
     {
                                (yyval.ival) = ARG_FLAG_NAMED;
                                set_arg_alias(lexer, (yyvsp[(2) - (2)].sval));
@@ -4335,62 +4341,62 @@
     break;
 
   case 325:
-#line 2006 "pir.y"
+#line 2012 "pir.y"
     { (yyval.sval) = NULL; ;}
     break;
 
   case 326:
-#line 2008 "pir.y"
+#line 2014 "pir.y"
     { (yyval.sval) = (yyvsp[(1) - (1)].sval); ;}
     break;
 
   case 327:
-#line 2012 "pir.y"
+#line 2018 "pir.y"
     { (yyval.sval) = (yyvsp[(2) - (3)].sval); ;}
     break;
 
   case 329:
-#line 2019 "pir.y"
+#line 2025 "pir.y"
     { store_global_constant(lexer, (yyvsp[(2) - (2)].cdec)); ;}
     break;
 
   case 332:
-#line 2027 "pir.y"
+#line 2033 "pir.y"
     { (yyval.cdec) = (yyvsp[(2) - (2)].cdec); ;}
     break;
 
   case 335:
-#line 2035 "pir.y"
+#line 2041 "pir.y"
     { store_global_constant(lexer, (yyvsp[(2) - (2)].cdec)); ;}
     break;
 
   case 336:
-#line 2039 "pir.y"
+#line 2045 "pir.y"
     { (yyval.cdec) = new_named_const(lexer, INT_VAL, (yyvsp[(2) - (4)].sval), (yyvsp[(4) - (4)].ival)); ;}
     break;
 
   case 337:
-#line 2041 "pir.y"
+#line 2047 "pir.y"
     { (yyval.cdec) = new_named_const(lexer, NUM_VAL, (yyvsp[(2) - (4)].sval), (yyvsp[(4) - (4)].dval)); ;}
     break;
 
   case 338:
-#line 2043 "pir.y"
+#line 2049 "pir.y"
     { (yyval.cdec) = new_named_const(lexer, STRING_VAL, (yyvsp[(2) - (4)].sval), (yyvsp[(4) - (4)].sval)); ;}
     break;
 
   case 339:
-#line 2045 "pir.y"
+#line 2051 "pir.y"
     { (yyval.cdec) = new_named_const(lexer, USTRING_VAL, (yyvsp[(2) - (4)].sval), (yyvsp[(4) - (4)].ustr)); ;}
     break;
 
   case 340:
-#line 2049 "pir.y"
+#line 2055 "pir.y"
     { (yyval.cdec) = new_pmc_const(lexer, (yyvsp[(1) - (4)].sval), (yyvsp[(2) - (4)].sval), (yyvsp[(4) - (4)].cval)); ;}
     break;
 
   case 342:
-#line 2054 "pir.y"
+#line 2060 "pir.y"
     { /* this alternative is necessary, otherwise the parser
                                * just stops when assigning an identifier to a pmc
                                * const, without an error message. That may be
@@ -4401,97 +4407,97 @@
     break;
 
   case 343:
-#line 2066 "pir.y"
+#line 2072 "pir.y"
     { (yyval.expr) = expr_from_target(lexer, (yyvsp[(1) - (1)].targ)); ;}
     break;
 
   case 344:
-#line 2067 "pir.y"
+#line 2073 "pir.y"
     { (yyval.expr) = expr_from_const(lexer, (yyvsp[(1) - (1)].cval)); ;}
     break;
 
   case 345:
-#line 2071 "pir.y"
+#line 2077 "pir.y"
     { (yyval.cval) = new_const(lexer, INT_VAL, (yyvsp[(1) - (1)].ival)); ;}
     break;
 
   case 346:
-#line 2072 "pir.y"
+#line 2078 "pir.y"
     { (yyval.cval) = new_const(lexer, NUM_VAL, (yyvsp[(1) - (1)].dval)); ;}
     break;
 
   case 347:
-#line 2073 "pir.y"
+#line 2079 "pir.y"
     { (yyval.cval) = (yyvsp[(1) - (1)].cval); ;}
     break;
 
   case 348:
-#line 2076 "pir.y"
+#line 2082 "pir.y"
     { (yyval.cval) = new_const(lexer, STRING_VAL, (yyvsp[(1) - (1)].sval)); ;}
     break;
 
   case 349:
-#line 2077 "pir.y"
+#line 2083 "pir.y"
     { (yyval.cval) = new_const(lexer, USTRING_VAL, (yyvsp[(1) - (1)].ustr)); ;}
     break;
 
   case 350:
-#line 2080 "pir.y"
+#line 2086 "pir.y"
     { (yyval.ival) = OP_NE; ;}
     break;
 
   case 351:
-#line 2081 "pir.y"
+#line 2087 "pir.y"
     { (yyval.ival) = OP_EQ; ;}
     break;
 
   case 352:
-#line 2082 "pir.y"
+#line 2088 "pir.y"
     { (yyval.ival) = OP_LT; ;}
     break;
 
   case 353:
-#line 2083 "pir.y"
+#line 2089 "pir.y"
     { (yyval.ival) = OP_LE; ;}
     break;
 
   case 354:
-#line 2084 "pir.y"
+#line 2090 "pir.y"
     { (yyval.ival) = OP_GE; ;}
     break;
 
   case 355:
-#line 2085 "pir.y"
+#line 2091 "pir.y"
     { (yyval.ival) = OP_GT; ;}
     break;
 
   case 356:
-#line 2088 "pir.y"
+#line 2094 "pir.y"
     { (yyval.ival) = INT_TYPE; ;}
     break;
 
   case 357:
-#line 2089 "pir.y"
+#line 2095 "pir.y"
     { (yyval.ival) = NUM_TYPE; ;}
     break;
 
   case 358:
-#line 2090 "pir.y"
+#line 2096 "pir.y"
     { (yyval.ival) = PMC_TYPE; ;}
     break;
 
   case 359:
-#line 2091 "pir.y"
+#line 2097 "pir.y"
     { (yyval.ival) = STRING_TYPE; ;}
     break;
 
   case 360:
-#line 2099 "pir.y"
+#line 2105 "pir.y"
     { set_curtarget(lexer, (yyvsp[(1) - (1)].targ));  ;}
     break;
 
   case 362:
-#line 2103 "pir.y"
+#line 2109 "pir.y"
     { /* a symbol must have been declared; check that at this point. */
                            symbol * sym = find_symbol(lexer, (yyvsp[(1) - (1)].sval));
                            if (sym == NULL) {
@@ -4506,277 +4512,277 @@
     break;
 
   case 363:
-#line 2116 "pir.y"
+#line 2122 "pir.y"
     { (yyval.targ) = new_reg(lexer, PMC_TYPE, (yyvsp[(1) - (1)].ival));    ;}
     break;
 
   case 364:
-#line 2117 "pir.y"
+#line 2123 "pir.y"
     { (yyval.targ) = new_reg(lexer, NUM_TYPE, (yyvsp[(1) - (1)].ival));    ;}
     break;
 
   case 365:
-#line 2118 "pir.y"
+#line 2124 "pir.y"
     { (yyval.targ) = new_reg(lexer, INT_TYPE, (yyvsp[(1) - (1)].ival));    ;}
     break;
 
   case 366:
-#line 2119 "pir.y"
+#line 2125 "pir.y"
     { (yyval.targ) = new_reg(lexer, STRING_TYPE, (yyvsp[(1) - (1)].ival)); ;}
     break;
 
   case 369:
-#line 2127 "pir.y"
+#line 2133 "pir.y"
     { (yyval.sval) = "if"; ;}
     break;
 
   case 370:
-#line 2128 "pir.y"
+#line 2134 "pir.y"
     { (yyval.sval) = "unless"; ;}
     break;
 
   case 371:
-#line 2129 "pir.y"
+#line 2135 "pir.y"
     { (yyval.sval) = "goto"; ;}
     break;
 
   case 372:
-#line 2130 "pir.y"
+#line 2136 "pir.y"
     { (yyval.sval) = "int"; ;}
     break;
 
   case 373:
-#line 2131 "pir.y"
+#line 2137 "pir.y"
     { (yyval.sval) = "num"; ;}
     break;
 
   case 374:
-#line 2132 "pir.y"
+#line 2138 "pir.y"
     { (yyval.sval) = "string"; ;}
     break;
 
   case 375:
-#line 2133 "pir.y"
+#line 2139 "pir.y"
     { (yyval.sval) = "pmc"; ;}
     break;
 
   case 376:
-#line 2134 "pir.y"
+#line 2140 "pir.y"
     { (yyval.sval) = "null"; ;}
     break;
 
   case 377:
-#line 2137 "pir.y"
+#line 2143 "pir.y"
     { (yyval.sval) = "neg"; ;}
     break;
 
   case 378:
-#line 2138 "pir.y"
+#line 2144 "pir.y"
     { (yyval.sval) = "not"; ;}
     break;
 
   case 379:
-#line 2139 "pir.y"
+#line 2145 "pir.y"
     { (yyval.sval) = "bnot"; ;}
     break;
 
   case 380:
-#line 2142 "pir.y"
+#line 2148 "pir.y"
     { (yyval.ival) = OP_ADD; ;}
     break;
 
   case 381:
-#line 2143 "pir.y"
+#line 2149 "pir.y"
     { (yyval.ival) = OP_SUB; ;}
     break;
 
   case 382:
-#line 2144 "pir.y"
+#line 2150 "pir.y"
     { (yyval.ival) = OP_DIV; ;}
     break;
 
   case 383:
-#line 2145 "pir.y"
+#line 2151 "pir.y"
     { (yyval.ival) = OP_MUL; ;}
     break;
 
   case 384:
-#line 2146 "pir.y"
+#line 2152 "pir.y"
     { (yyval.ival) = OP_MOD; ;}
     break;
 
   case 385:
-#line 2147 "pir.y"
+#line 2153 "pir.y"
     { (yyval.ival) = OP_BOR; ;}
     break;
 
   case 386:
-#line 2148 "pir.y"
+#line 2154 "pir.y"
     { (yyval.ival) = OP_BAND; ;}
     break;
 
   case 387:
-#line 2149 "pir.y"
+#line 2155 "pir.y"
     { (yyval.ival) = OP_BXOR; ;}
     break;
 
   case 388:
-#line 2150 "pir.y"
+#line 2156 "pir.y"
     { (yyval.ival) = OP_POW; ;}
     break;
 
   case 389:
-#line 2151 "pir.y"
+#line 2157 "pir.y"
     { (yyval.ival) = OP_CONCAT; ;}
     break;
 
   case 390:
-#line 2152 "pir.y"
+#line 2158 "pir.y"
     { (yyval.ival) = OP_LSR; ;}
     break;
 
   case 391:
-#line 2153 "pir.y"
+#line 2159 "pir.y"
     { (yyval.ival) = OP_SHR; ;}
     break;
 
   case 392:
-#line 2154 "pir.y"
+#line 2160 "pir.y"
     { (yyval.ival) = OP_SHL; ;}
     break;
 
   case 393:
-#line 2155 "pir.y"
+#line 2161 "pir.y"
     { (yyval.ival) = OP_OR; ;}
     break;
 
   case 394:
-#line 2156 "pir.y"
+#line 2162 "pir.y"
     { (yyval.ival) = OP_AND; ;}
     break;
 
   case 395:
-#line 2157 "pir.y"
+#line 2163 "pir.y"
     { (yyval.ival) = OP_FDIV; ;}
     break;
 
   case 396:
-#line 2158 "pir.y"
+#line 2164 "pir.y"
     { (yyval.ival) = OP_XOR; ;}
     break;
 
   case 397:
-#line 2159 "pir.y"
+#line 2165 "pir.y"
     { (yyval.ival) = OP_ISEQ; ;}
     break;
 
   case 398:
-#line 2160 "pir.y"
+#line 2166 "pir.y"
     { (yyval.ival) = OP_ISLE; ;}
     break;
 
   case 399:
-#line 2161 "pir.y"
+#line 2167 "pir.y"
     { (yyval.ival) = OP_ISLT; ;}
     break;
 
   case 400:
-#line 2162 "pir.y"
+#line 2168 "pir.y"
     { (yyval.ival) = OP_ISGE; ;}
     break;
 
   case 401:
-#line 2163 "pir.y"
+#line 2169 "pir.y"
     { (yyval.ival) = OP_ISGT; ;}
     break;
 
   case 402:
-#line 2164 "pir.y"
+#line 2170 "pir.y"
     { (yyval.ival) = OP_ISNE; ;}
     break;
 
   case 403:
-#line 2170 "pir.y"
+#line 2176 "pir.y"
     { (yyval.ival) = OP_MUL; ;}
     break;
 
   case 404:
-#line 2171 "pir.y"
+#line 2177 "pir.y"
     { (yyval.ival) = OP_MOD; ;}
     break;
 
   case 405:
-#line 2172 "pir.y"
+#line 2178 "pir.y"
     { (yyval.ival) = OP_POW; ;}
     break;
 
   case 406:
-#line 2173 "pir.y"
+#line 2179 "pir.y"
     { (yyval.ival) = OP_DIV; ;}
     break;
 
   case 407:
-#line 2174 "pir.y"
+#line 2180 "pir.y"
     { (yyval.ival) = OP_FDIV; ;}
     break;
 
   case 408:
-#line 2175 "pir.y"
+#line 2181 "pir.y"
     { (yyval.ival) = OP_BOR; ;}
     break;
 
   case 409:
-#line 2176 "pir.y"
+#line 2182 "pir.y"
     { (yyval.ival) = OP_BAND; ;}
     break;
 
   case 410:
-#line 2177 "pir.y"
+#line 2183 "pir.y"
     { (yyval.ival) = OP_BXOR; ;}
     break;
 
   case 411:
-#line 2178 "pir.y"
+#line 2184 "pir.y"
     { (yyval.ival) = OP_CONCAT; ;}
     break;
 
   case 412:
-#line 2179 "pir.y"
+#line 2185 "pir.y"
     { (yyval.ival) = OP_SHR; ;}
     break;
 
   case 413:
-#line 2180 "pir.y"
+#line 2186 "pir.y"
     { (yyval.ival) = OP_SHL; ;}
     break;
 
   case 414:
-#line 2181 "pir.y"
+#line 2187 "pir.y"
     { (yyval.ival) = OP_LSR; ;}
     break;
 
   case 416:
-#line 2202 "pir.y"
+#line 2208 "pir.y"
     { new_subr(lexer, "@start"); ;}
     break;
 
   case 425:
-#line 2218 "pir.y"
+#line 2224 "pir.y"
     { set_label(lexer, (yyvsp[(1) - (2)].sval)); ;}
     break;
 
   case 430:
-#line 2228 "pir.y"
+#line 2234 "pir.y"
     { set_sub_name(lexer, (yyvsp[(3) - (3)].sval)); ;}
     break;
 
   case 431:
-#line 2232 "pir.y"
+#line 2238 "pir.y"
     { new_subr(lexer, NULL); ;}
     break;
 
   case 432:
-#line 2237 "pir.y"
+#line 2243 "pir.y"
     {
 
                                   if (is_parrot_op(lexer, (yyvsp[(1) - (3)].sval))) {
@@ -4791,7 +4797,7 @@
 
 
 /* Line 1267 of yacc.c.  */
-#line 4795 "pirparser.c"
+#line 4801 "pirparser.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -5005,7 +5011,7 @@
 }
 
 
-#line 2251 "pir.y"
+#line 2257 "pir.y"
 
 
 
@@ -5676,8 +5682,10 @@
     else
         set_instrf(lexer, invert ? "unless" : "if", "%T%I", target_from_symbol(lexer, sym), label);
 
-    /* set a flag on this instruction */
-    set_op_labelflag(lexer, BIT(2));
+    /* set a flag on this instruction that the second operand is a label. */
+    /*set_op_labelflag(lexer, BIT(2));
+    */
+    set_op_labelflag(lexer, BIT(1));
 }
 
 /*

Modified: branches/strings/compilers/pirc/src/pirsymbol.h
==============================================================================
--- branches/strings/compilers/pirc/src/pirsymbol.h	(original)
+++ branches/strings/compilers/pirc/src/pirsymbol.h	Thu Jan 15 16:36:00 2009
@@ -59,7 +59,7 @@
 
 /* structure to represent a global label */
 typedef struct global_label {
-    char const * name;              /* name of the global label a.k.a. sub */
+    char const  *name;              /* name of the global label a.k.a. sub */
     int          const_table_index; /* index in PBC const table where this sub PMC is stored */
 
 } global_label;

Modified: branches/strings/compilers/pirc/t/basic.t
==============================================================================
--- branches/strings/compilers/pirc/t/basic.t	(original)
+++ branches/strings/compilers/pirc/t/basic.t	Thu Jan 15 16:36:00 2009
@@ -3,16 +3,106 @@
 # $Id$
 
 use lib "../../lib";
-use Parrot::Test tests => 1;
+use Parrot::Test tests => 5;
 
-pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a single const declaration");
+pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a local, a reg and an if-stat");
 .sub main
+    .local int i
+    i = 1
+    $I0 = 1
+    if i == $I0 goto ok
+    say "nok"
+    .return()
+  ok:
     say "ok"
 .end
 CODE
 ok
 OUTPUT
 
+pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "tale of a local, a reg and an unless-stat");
+.sub main
+    .local int i
+    i = 1
+    $I0 = 2
+    unless i == $I0 goto ok
+    say "nok"
+    .return()
+  ok:
+    say "ok"
+.end
+CODE
+ok
+OUTPUT
+
+
+pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "comparison, if, unless");
+.sub main
+    .local int i,j
+    i = 1
+    j = 2
+    if i == j goto L1
+    say "ok"
+    goto L2
+  L1:
+    say "nok"
+  L2:
+    if i != j goto L3
+    say "nok"
+    goto L4
+  L3:
+    say "ok"
+  L4:
+    unless i == j goto L5
+    say "nok"
+    goto L6
+  L5:
+    say "ok"
+  L6:
+.end
+CODE
+ok
+ok
+ok
+OUTPUT
+
+
+pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "indexing an array");
+.sub main
+    .local pmc p
+    p = new "ResizableIntegerArray"
+    p[0] = 42
+    p[1] = 43
+    $I0 = p[0]
+    say $I0
+    $I1 = p[1]
+    say $I1
+.end
+CODE
+42
+43
+OUTPUT
+
+
+pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "indexing a hash");
+.sub main
+    .local pmc p
+    p = new "Hash"
+    p["hello"] = 42
+    $I0 = p["hello"]
+    say $I0
+    p["bye"] = 3.3
+    $N1 = p["bye"]
+    say $N1
+.end
+CODE
+42
+3.3
+OUTPUT
+
+
+
+
 # Local Variables:
 #   mode: cperl
 #   cperl-indent-level: 4

Modified: branches/strings/config/auto/pmc.pm
==============================================================================
--- branches/strings/config/auto/pmc.pm	(original)
+++ branches/strings/config/auto/pmc.pm	Thu Jan 15 16:36:00 2009
@@ -173,7 +173,6 @@
     lib/Parrot/Pmc2c/PMC/Null.pm \\
     lib/Parrot/Pmc2c/PMC/Ref.pm \\
     lib/Parrot/Pmc2c/PMC/SharedRef.pm \\
-    lib/Parrot/Pmc2c/PMC/STMRef.pm \\
     lib/Parrot/Pmc2c/PMC/RO.pm
 END
 

Modified: branches/strings/config/auto/warnings.pm
==============================================================================
--- branches/strings/config/auto/warnings.pm	(original)
+++ branches/strings/config/auto/warnings.pm	Thu Jan 15 16:36:00 2009
@@ -118,7 +118,6 @@
         -Wunreachable-code
         -Wunused-function
         -Wunused-label
-        -Wunused-parameter
         -Wunused-value
         -Wunused-variable
     );
@@ -137,6 +136,7 @@
         -Wmissing-noreturn
         -Wshadow
         -Wunused-macros
+        -Wunused-parameter
     );
 
     $data{potential_warnings}        = \@potential_warnings;

Modified: branches/strings/config/gen/languages.pm
==============================================================================
--- branches/strings/config/gen/languages.pm	(original)
+++ branches/strings/config/gen/languages.pm	Thu Jan 15 16:36:00 2009
@@ -39,7 +39,7 @@
         APL abc
         befunge bf
         cardinal chitchat cola c99
-        eclectus ecmascript
+        ecmascript
         forth
         jako json
         lazy-k lisp lolcode lua

Modified: branches/strings/config/gen/makefiles/languages.in
==============================================================================
--- branches/strings/config/gen/makefiles/languages.in	(original)
+++ branches/strings/config/gen/makefiles/languages.in	Thu Jan 15 16:36:00 2009
@@ -15,9 +15,8 @@
     BASIC befunge bf \
     c99 cardinal chitchat cola \
     dotnet \
-    eclectus ecmascript \
+    ecmascript \
     forth \
-    hq9plus \
     jako json \
     lazy-k lisp lolcode lua \
     m4 markdown \
@@ -76,9 +75,8 @@
     befunge.test bf.test \
     c99.test cardinal.test chitchat.test cola.test \
     dotnet.test \
-    eclectus.test ecmascript.test \
+    ecmascript.test \
     forth.test \
-    hq9plus.test \
     jako.test json.test \
     lazy-k.test lisp.test lolcode.test lua.test \
     m4.test \
@@ -97,7 +95,6 @@
     dotnet.clean \
     ecmascript.clean \
     forth.clean \
-    hq9plus.clean \
     jako.clean json.clean \
     lisp.clean \
     lolcode.clean lua.clean \
@@ -115,9 +112,8 @@
     befunge.realclean bf.realclean \
     c99.realclean cardinal.realclean chitchat.realclean cola.realclean \
     dotnet.realclean \
-    eclectus.realclean ecmascript.realclean \
+    ecmascript.realclean \
     forth.realclean \
-    hq9plus.realclean \
     jako.realclean json.realclean \
     lazy-k.realclean lisp.realclean lolcode.realclean lua.realclean \
     m4.realclean markdown.realclean \
@@ -235,16 +231,6 @@
 dotnet.realclean:
 	- $(MAKE) dotnet realclean
 
-eclectus: eclectus.dummy
-eclectus.dummy:
-	- $(MAKE) eclectus
-eclectus.test :
-	- $(MAKE) eclectus test
-eclectus.clean :
-	- $(MAKE) eclectus clean
-eclectus.realclean :
-	- $(MAKE) eclectus realclean
-
 ecmascript : ecmascript.dummy
 ecmascript.dummy:
 	- $(MAKE) ecmascript
@@ -265,16 +251,6 @@
 forth.realclean:
 	- $(MAKE) forth realclean
 
-hq9plus: hq9plus.dummy
-hq9plus.dummy:
-	- $(MAKE) hq9plus
-hq9plus.test:
-	- $(MAKE) hq9plus test
-hq9plus.clean:
-	- $(MAKE) hq9plus clean
-hq9plus.realclean:
-	- $(MAKE) hq9plus realclean
-
 jako: jako.dummy
 jako.dummy:
 	- $(MAKE) jako

Modified: branches/strings/config/gen/makefiles/root.in
==============================================================================
--- branches/strings/config/gen/makefiles/root.in	(original)
+++ branches/strings/config/gen/makefiles/root.in	Thu Jan 15 16:36:00 2009
@@ -421,8 +421,6 @@
     $(SRC_DIR)/spf_render$(O) \
     $(SRC_DIR)/spf_vtable$(O) \
     $(SRC_DIR)/stacks$(O) \
-    $(SRC_DIR)/stm/backend$(O) \
-    $(SRC_DIR)/stm/waitlist$(O) \
     $(SRC_DIR)/string_primitives$(O) \
     $(SRC_DIR)/sub$(O) \
     $(SRC_DIR)/thread$(O) \
@@ -742,7 +740,7 @@
 	@echo ""
 	@echo "Release:"
 	@echo "  release:           Create a tarball."
-	@echo "  rpm:               Create RPMs."
+	@echo "  rpms:              Create RPMs."
 	@echo "  win32-inno-installer:  Create MSWin32 setup."
 	@echo ""
 	@echo "Examples:"
@@ -1777,6 +1775,9 @@
 opsrenumber :
 	$(PERL) tools/dev/opsrenumber.pl $(OPS_FILES)
 
+pmcrenumber :
+	$(PERL) tools/dev/pmcrenumber.pl $(SRC_DIR)/pmc/pmc.num
+
 ###############################################################################
 #
 # SVN Targets:
@@ -2053,7 +2054,6 @@
     $(SRC_DIR)/ops \
     $(SRC_DIR)/packfile \
     $(SRC_DIR)/pmc \
-    $(SRC_DIR)/stm \
     $(IO_DIR) \
     $(IMCC_DIR)
 

Modified: branches/strings/config/gen/opengl.pm
==============================================================================
--- branches/strings/config/gen/opengl.pm	(original)
+++ branches/strings/config/gen/opengl.pm	Thu Jan 15 16:36:00 2009
@@ -125,6 +125,7 @@
     COLORREF                => 'void',
 
     wchar_t                 => 'void',
+    GLCchar                 => 'void',
 
     GLMfunctions            => 'void*',
     GLXContext              => 'void*',
@@ -170,6 +171,7 @@
     int32_t                 => 'int',
 
     GLenum                  => 'unsigned int',
+    GLCenum                 => 'unsigned int',
     CGLPixelFormatAttribute => 'unsigned int',
     CGLRendererProperty     => 'unsigned int',
     CGLContextEnable        => 'unsigned int',
@@ -270,8 +272,10 @@
     # Don't handle this odd create/callback register function yet
     'glutCreateMenu',
 
-    # Don't handle Mesa, GLU, or MUI callbacks yet
+    # Don't handle Mesa, GLC, GLU, or MUI callbacks yet
     'glProgramCallbackMESA',
+    'glcCallbackFunc',
+    'glcGetCallbackFunc',
     'gluNurbsCallback',
     'gluQuadricCallback',
     'gluTessCallback',

Modified: branches/strings/docs/book/ch03_pir_basics.pod
==============================================================================
--- branches/strings/docs/book/ch03_pir_basics.pod	(original)
+++ branches/strings/docs/book/ch03_pir_basics.pod	Thu Jan 15 16:36:00 2009
@@ -141,6 +141,17 @@
 
   $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:
+
+  \xhh        1..2 hex digits
+  \ooo        1..3 oct digits
+  \cX         control char X
+  \x{h..h}    1..8 hex digits
+  \uhhhh      4 hex digits
+  \Uhhhhhhhh  8 hex digits
+  \a, \b, \t, \n, \v, \f, \r, \e, \\, \"
 
 Or, if you need more flexibility, you can use a heredoc:
 
@@ -149,7 +160,9 @@
   This is a multi-line string literal. Notice that
   it doesn't use quotation marks. The string continues
   until the ending token (the thing in quotes next to
-  the << above) is found.
+  the << above) is found. The terminator must appear on
+  it's own line, must appear at the beginning of the
+  line, and may not have any trailing whitespace.
 
   End_Token
 
@@ -157,7 +170,7 @@
 
 Strings are complicated. It used to be that all that was needed was to
 support the ASCII charset, which only contained a handful of common
-symbols and English characters. Now we need to worry about character
+symbols and English characters. 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.
 
@@ -167,11 +180,11 @@
 universally supported. However, support is built in to have other formats as
 well.
 
-String constants, like the ones we've seen above, can have an optional
-prefix specifying the encoding and the charset to be used by 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
+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:
 
   $S0 = utf8:unicode:"Hello UTF8 Unicode World!"
@@ -179,12 +192,15 @@
   $S2 = ascii:"This is 8-bit ASCII"
   $S3 = binary:"This is treated as raw unformatted binary"
 
-The C<binary:> encoding treats the string as a buffer of raw unformatted
+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
@@ -232,6 +248,37 @@
 cause all sorts of memory allocation problems or inefficiencies in
 parsing. Push the limits at your own risk.
 
+=head2 Register Allocator
+
+Now's a decent time to talk about Parrot's register allocator. 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 $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 register in
+the PIR source code into a reference to an actual memory storage location.
+
+The allocator is 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.
+
+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:
+
+  .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.
+
 =head2 PMC variables
 
 Z<CHP-3-SECT-2.4>
@@ -290,6 +337,11 @@
   .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
+
 =head1 Symbol Operators
 
 Z<CHP-3-SECT-3>

Modified: branches/strings/docs/book/ch04_pir_subroutines.pod
==============================================================================
--- branches/strings/docs/book/ch04_pir_subroutines.pod	(original)
+++ branches/strings/docs/book/ch04_pir_subroutines.pod	Thu Jan 15 16:36:00 2009
@@ -105,12 +105,10 @@
 The C<.return> directive allows the subroutine to return control flow
 to the calling subroutine, and optionally returns result output values.
 
-
-Here's a complete code example that reimplements the factorial code
-from the previous section as an independent subroutine. The subroutine
-C<_fact> is a separate compilation unit, assembled and processed after
-the C<_main> function.  Parrot resolves global symbols like the
-C<_fact> label between different units.
+Here's a complete code example that implements the factorial algorithm.
+The subroutine C<fact> is a separate compilation unit, assembled and
+processed after the C<main> function.  Parrot resolves global symbols
+like the C<fact> label between different units.
 
   # factorial.pir
   .sub main
@@ -423,14 +421,49 @@
 subroutines, the C<.lex> command defines a local variable that follows these
 scoping rules.
 
-=head3 Lexpad PMCs
+=head3 LexPad and LexInfo PMCs
+
+Information about lexical variables in a subroutine is stored in two different
+types of PMCs: The LexPad and LexInfo PMCs. Neither of these PMC types are
+really usable from PIR code, but are instead used by Parrot internally to
+store information about lexical variables.
+
+C<LexInfo> PMCs are used to store information about lexical variables at
+compile time. This is read-only information that is generated during
+compilation to represent what is known about lexical variables. Not all
+subroutines get a LexInfo PMC by default, you need to indicate to Parrot
+somehow that you require a LexInfo PMC to be created. One way to do this is
+with the C<.lex> directive that we looked at above. Of course, the C<.lex>
+directive only works for languages where the names of lexical variables are
+all known at compile time. For languages where this information isn't known,
+the subroutine can be flagged with C<:lex> instead.
+
+C<LexPad> PMCs are used to store run-time information about lexical variables.
+This includes their current values and their type information. LexPad PMCs are
+created at runtime for subs that have a C<LexInfo> PMC already. These are
+created each time the subroutine is invoked, which allows for recursive
+subroutine calls without overwriting variable names.
+
+There is no easy way to get a reference to the current LexPad or LexInfo PMCs
+in a given subroutine, but that doesn't matter because they aren't useful by
+themselves anyway. Remember that subroutines themselves can be lexical and
+that therefore the lexical environment of a given variable can extend to
+multiple subroutines and therefore multiple LexPads. The opcodes C<find_lex>
+and C<store_lex> automatically search through nested LexPads recursively to
+find the proper environment information about variables.
 
 =head2 Compilation Units Revisited
 
 Z<CHP-4-SECT-1.2>
 
-The example above could have been written using simple labels instead
-of separate compilation units:
+The term "compilation unit" is one that's been bandied about throughout the
+chapter and it's worth some amount of explanation here. A compilation unit
+is a section of code that forms a single unit. In some instances the term
+can be used to describe an entire file. In most other cases, it's used to
+describe a single subroutine. Our earlier example which created a C<'fact'>
+subroutine for calculating factorials could be considered to have used two
+separate compilation units: The C<main> subroutine and the C<fact> subroutine.
+Here is a way to rewrite that algorithm using only a single subroutine instead:
 
   .sub main
       $I1 = 5         # counter
@@ -454,49 +487,15 @@
 
 The unit of code from the C<fact> label definition to C<ret> is a
 reusable routine. There are several problems with this simple
-approach. First, the caller has to know to pass the argument to
-C<fact> in C<$I1> and to get the result from C<$I0>. Second, neither
-the caller nor the function itself preserves any registers. This is
-fine for the example above, because very few registers are used. But
-if this same bit of code were buried deeply in a math routine package,
-you would have a high risk of clobbering the caller's register values.
-
-X<PIR (Parrot intermediate representation);register allocation>
-X<data flow graph (DFG)>
-Another disadvantage of this approach is that C<_main> and C<fact>
-share the same compilation unit, so they're parsed and processed as
-one piece of code. When Parrot does register allocation, it calculates
-the data flow graph (DFG) of all symbols,N<The operation to calculate
-the DFG has a quadratic cost or better. It depends on I<n_lines *
-n_symbols>.> looks at their usage, calculates the interference between
-all possible combinations of symbols, and then assigns a Parrot
-register to each symbol. This process is less efficient for large
-compilation units than it is for several small ones, so it's better to
-keep the code modular. The optimizer will decide whether register
-usage is light enough to merit combining two compilation units, or
-even inlining the entire function.
-
-=begin sidebar A Short Note on the Optimizer
-
-Z<CHP-4-SIDEBAR-1>
-
-X<optimizer>
-The optimizer isn't powerful enough to inline small subroutines yet.
-But it already does other simpler optimizations. You may recall that
-the PASM opcode C<mul> (multiply) has a two-argument version that uses
-the same register for the destination and the first operand. When
-Parrot
-comes across a PIR statement like C<$I0 = $I0 * $I1>, it can optimize
-it to the two-argument C<mul $I0>, C<$I1> instead of C<mul $I0, $I0,
-$I1>. This kind of optimization is enabled by the C<-O1> command-line
-option.
-
-So you don't need to worry about finding the shortest PASM
-instruction, calculating constant terms, or avoiding branches to speed
-up your code. Parrot does it already.
-
-=end sidebar
+approach. In terms of the interface, the caller has to know to pass the
+argument to C<fact> in C<$I1> and to get the result from C<$I0>. This is
+different from how subroutines are normally invoked in PIR.
 
+Another disadvantage of this approach is that C<main> and C<fact>
+share the same compilation unit, so they're parsed and processed as
+one piece of code. They share registers, and they would also share LexInfo
+and LexPad PMCs, if any were needed by C<main>. This is a problem when trying
+to follow normal encapsulation guidelines.
 
 =head3 PASM Subroutines
 
@@ -507,9 +506,12 @@
 PIR code can include pure PASM compilation units. These are wrapped in
 the C<.emit> and C<.eom> directives instead of C<.sub> and C<.end>.
 The C<.emit> directive doesn't take a name, it only acts as a
-container for the PASM code. These primitive compilation units can be
-useful for grouping PASM functions or function wrappers. Subroutine
-entry labels inside C<.emit> blocks have to be global labels:
+container for the PASM code N<in terms of parser terminology, the C<.emit>
+directive causes the parser to transition into PASM mode. The C<.eom> directive
+causes the parser to transition back into PIR mode>. These primitive
+compilation units can be useful for grouping PASM functions or function
+wrappers. Subroutine entry labels inside C<.emit> blocks have to be global
+labels:
 
   .emit
   _substr:

Modified: branches/strings/docs/book/ch06_library.pod
==============================================================================
--- branches/strings/docs/book/ch06_library.pod	(original)
+++ branches/strings/docs/book/ch06_library.pod	Thu Jan 15 16:36:00 2009
@@ -23,6 +23,14 @@
 This chapter is going to give a brief overview of some of these libraries
 and how they are used.
 
+=head1 Loading and Using Libraries
+
+Libraries are precompiled code files that can be loaded into Parrot. There
+are ways to load a library into Parrot, each with a slightly different
+mechanism. The C<.loadlib> PIR directive causes the library file to be loaded
+at compile-time. The C<load_lib> obcode causes the library to be loaded
+dynamically at runtime.
+
 =head1 General Parrot Libraries
 
 =head2 F<Config.fpmc>

Modified: branches/strings/docs/pdds/pdd09_gc.pod
==============================================================================
--- branches/strings/docs/pdds/pdd09_gc.pod	(original)
+++ branches/strings/docs/pdds/pdd09_gc.pod	Thu Jan 15 16:36:00 2009
@@ -576,11 +576,6 @@
 PMCs) that PMC refers to. This flag is typically tested and the custom mark
 VTABLE method called from C<src/gc/api.c:mark_special>.
 
-=item PObj_data_is_PMC_array_FLAG
-
-Set if the data pointer points to an array of objects. The length of the
-array is C<PMC_int_val(SELF)>.
-
 =item PObj_external_FLAG
 
 Set if the buffer points to memory that came from outside Parrot's memory

Modified: branches/strings/docs/project/release_manager_guide.pod
==============================================================================
--- branches/strings/docs/project/release_manager_guide.pod	(original)
+++ branches/strings/docs/project/release_manager_guide.pod	Thu Jan 15 16:36:00 2009
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2008, The Perl Foundation.
+# Copyright (C) 2007-2009, The Perl Foundation.
 # $Id$
 
 =head1 Release Instructions
@@ -21,7 +21,7 @@
 A couple of days in advance: announce the new release to
 parrot-dev@lists.parrot.org and to the IRC channel #parrot.  Ask whether there
 are any showstopping bugs.  It's also good to ask for updates to F<NEWS>,
-F<CREDITS>, F<PLATFORMS>, F<RESPONSIBLE_PARTIES> and F<LANGUAGES_STATUS>.
+F<CREDITS>, F<PLATFORMS>, F<RESPONSIBLE_PARTIES> and L<https://trac.parrot.org/parrot/wiki/Languages>.
 
 You might also select a name for your release. For example, you could
 select a name from L<http://en.wikipedia.org/wiki/List_of_parrots>.

Modified: branches/strings/include/parrot/gc_mark_sweep.h
==============================================================================
--- branches/strings/include/parrot/gc_mark_sweep.h	(original)
+++ branches/strings/include/parrot/gc_mark_sweep.h	Thu Jan 15 16:36:00 2009
@@ -202,10 +202,6 @@
 int Parrot_gc_trace_children(PARROT_INTERP, size_t how_many)
         __attribute__nonnull__(1);
 
-void Parrot_gc_trace_pmc_data(PARROT_INTERP, ARGIN(PMC *p))
-        __attribute__nonnull__(1)
-        __attribute__nonnull__(2);
-
 int Parrot_gc_trace_root(PARROT_INTERP, Parrot_gc_trace_type trace)
         __attribute__nonnull__(1);
 
@@ -250,9 +246,6 @@
     || PARROT_ASSERT_ARG(pool)
 #define ASSERT_ARGS_Parrot_gc_trace_children __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_Parrot_gc_trace_pmc_data __attribute__unused__ int _ASSERT_ARGS_CHECK = \
-       PARROT_ASSERT_ARG(interp) \
-    || PARROT_ASSERT_ARG(p)
 #define ASSERT_ARGS_Parrot_gc_trace_root __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
 #define ASSERT_ARGS_Parrot_is_const_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = \

Modified: branches/strings/include/parrot/inter_call.h
==============================================================================
--- branches/strings/include/parrot/inter_call.h	(original)
+++ branches/strings/include/parrot/inter_call.h	Thu Jan 15 16:36:00 2009
@@ -299,16 +299,22 @@
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(src_ctx) \
     || PARROT_ASSERT_ARG(dest_ctx)
-#define ASSERT_ARGS_Parrot_pcc_invoke_sub_from_c_args \
+#define ASSERT_ARGS_Parrot_pcc_invoke_from_sig_object \
      __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(sub_obj) \
-    || PARROT_ASSERT_ARG(sig)
-#define ASSERT_ARGS_Parrot_pcc_invoke_sub_from_sig_object \
+    || PARROT_ASSERT_ARG(sig_obj)
+#define ASSERT_ARGS_Parrot_pcc_invoke_method_from_c_args \
+     __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+       PARROT_ASSERT_ARG(interp) \
+    || PARROT_ASSERT_ARG(pmc) \
+    || PARROT_ASSERT_ARG(method_name) \
+    || PARROT_ASSERT_ARG(signature)
+#define ASSERT_ARGS_Parrot_pcc_invoke_sub_from_c_args \
      __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(sub_obj) \
-    || PARROT_ASSERT_ARG(sig_obj)
+    || PARROT_ASSERT_ARG(sig)
 #define ASSERT_ARGS_Parrot_PCCINVOKE __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(pmc) \

Modified: branches/strings/include/parrot/oo.h
==============================================================================
--- branches/strings/include/parrot/oo.h	(original)
+++ branches/strings/include/parrot/oo.h	Thu Jan 15 16:36:00 2009
@@ -39,7 +39,6 @@
         ((PMC **)(x))[(y)] = (z); \
     } while (0)
 #define set_attrib_flags(x) do { \
-        PObj_data_is_PMC_array_SET(x); \
         PObj_active_destroy_SET(x); \
     } while (0)
 #define set_attrib_array_size(o, y) do { \

Modified: branches/strings/include/parrot/parrot.h
==============================================================================
--- branches/strings/include/parrot/parrot.h	(original)
+++ branches/strings/include/parrot/parrot.h	Thu Jan 15 16:36:00 2009
@@ -320,7 +320,6 @@
 #include "parrot/stat.h"
 #include "parrot/slice.h"
 #include "parrot/hll.h"
-#include "parrot/stm/backend.h"
 #include "parrot/pbcversion.h"
 
 #endif /* PARROT_PARROT_H_GUARD */

Modified: branches/strings/include/parrot/pobj.h
==============================================================================
--- branches/strings/include/parrot/pobj.h	(original)
+++ branches/strings/include/parrot/pobj.h	Thu Jan 15 16:36:00 2009
@@ -251,10 +251,6 @@
     PObj_report_FLAG            = POBJ_FLAG(23),
 
 /* PMC specific FLAGs */
-    /* Set to true if the PMC data pointer points to a malloced
-     * array of PObjs
-     */
-    PObj_data_is_PMC_array_FLAG = POBJ_FLAG(24),
     /* call object finalizer */
     PObj_need_finalize_FLAG     = POBJ_FLAG(25),
     /* a PMC that needs special handling in DOD, i.e one that has either:
@@ -350,7 +346,6 @@
     if ((PObj_get_FLAGS(o) & \
                 (PObj_active_destroy_FLAG | \
                  PObj_custom_mark_FLAG | \
-                 PObj_data_is_PMC_array_FLAG  | \
                  PObj_is_PMC_EXT_FLAG | \
                  PObj_needs_early_DOD_FLAG))) \
         DOD_flag_SET(is_special_PMC, o); \
@@ -361,19 +356,6 @@
 #define PObj_is_special_PMC_TEST(o) DOD_flag_TEST(is_special_PMC, o)
 #define PObj_is_special_PMC_SET(o) DOD_flag_SET(is_special_PMC, o)
 
-#define PObj_data_is_PMC_array_SET(o) do { \
-    PObj_special_SET(data_is_PMC_array, o); \
-    PObj_flag_SET(active_destroy, o); \
-    } while (0)
-
-#define PObj_data_is_PMC_array_CLEAR(o) do {\
-    PObj_special_CLEAR(data_is_PMC_array, o); \
-    PObj_flag_CLEAR(active_destroy, o); \
-    } while (0)
-
-#define PObj_data_is_PMC_array_TEST(o) \
-    PObj_flag_TEST(data_is_PMC_array, o)
-
 #define PObj_needs_early_DOD_TEST(o) PObj_flag_TEST(needs_early_DOD, o)
 #define PObj_needs_early_DOD_SET(o) PObj_special_SET(needs_early_DOD, o)
 #define PObj_needs_early_DOD_CLEAR(o) PObj_special_CLEAR(needs_early_DOD, o)

Modified: branches/strings/include/parrot/thread.h
==============================================================================
--- branches/strings/include/parrot/thread.h	(original)
+++ branches/strings/include/parrot/thread.h	Thu Jan 15 16:36:00 2009
@@ -105,9 +105,6 @@
      */
     Parrot_cond  interp_cond;
 
-    /* STM transaction log */
-    struct STM_tx_log   *stm_log;
-
     /* COW'd constant tables */
     Hash             *const_tables;
 } Thread_data;

Modified: branches/strings/languages/README
==============================================================================
--- branches/strings/languages/README	(original)
+++ branches/strings/languages/README	Thu Jan 15 16:36:00 2009
@@ -1,3 +1,4 @@
 This directory contains implementations of programming languages based on Parrot.
 
-See F<LANGUAGES_STATUS.pod> and L<https://trac.parrot.org/parrot/wiki/Languages>.
+The state of language implementations is tracked in
+L<https://trac.parrot.org/parrot/wiki/Languages>.

Added: branches/strings/languages/WMLScript/Configure.pl
==============================================================================
--- (empty file)
+++ branches/strings/languages/WMLScript/Configure.pl	Thu Jan 15 16:36:00 2009
@@ -0,0 +1,21 @@
+# $Id$
+# Copyright (C) 2009, The Perl Foundation.
+
+use strict;
+use warnings;
+use 5.008;
+
+my $build_dir = '../..';
+my $hll       = 'WMLScript';
+my $cmd       = qq{$^X -Ilib tools/dev/reconfigure.pl --step=gen::languages --languages=$hll};
+
+print "Running '$cmd' in $build_dir\n";
+chdir $build_dir;
+`$cmd`
+
+# Local Variables:
+#   mode: cperl
+#   cperl-indent-level: 4
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:

Modified: branches/strings/languages/WMLScript/config/makefiles/root.in
==============================================================================
--- branches/strings/languages/WMLScript/config/makefiles/root.in	(original)
+++ branches/strings/languages/WMLScript/config/makefiles/root.in	Thu Jan 15 16:36:00 2009
@@ -13,9 +13,9 @@
 O        = @o@
 LOAD_EXT = @load_ext@
 PARROT_DYNEXT = @build_dir@/runtime/parrot/dynext
-#CONDITIONED_LINE(darwin):
-#CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
-#CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 SRM=Stack
 
@@ -91,6 +91,10 @@
 $(LIBPATH)/wmlsconsole.pbc: $(LIBPATH)/wmlsconsole.pir
 	$(PARROT) --output=$(LIBPATH)/wmlsconsole.pbc $(LIBPATH)/wmlsconsole.pir
 
+# regenerate the Makefile
+Makefile: config/makefiles/root.in
+	$(PERL) Configure.pl
+
 help:
 	@echo ""
 	@echo "Following targets are available for the user:"

Modified: branches/strings/languages/ecmascript/js.pir
==============================================================================
--- branches/strings/languages/ecmascript/js.pir	(original)
+++ branches/strings/languages/ecmascript/js.pir	Thu Jan 15 16:36:00 2009
@@ -65,6 +65,10 @@
     #jsmeta = get_hll_global ['JSObject'], '!JSMETA'
     #jsmeta.'new_class'('JS::Compiler', 'parent'=>'PCT::HLLCompiler')
 
+    #.local pmc jsmeta
+    #jsmeta = get_hll_global ['JSObject'], '!JSMETA'
+    #jsmeta.'new_class'('JS::Compiler', 'parent'=>'PCT::HLLCompiler')
+
     $P0 = get_hll_global ['PCT'], 'HLLCompiler'
     $P1 = $P0.'new'()
     $P1.'language'('JS')

Added: branches/strings/languages/lua/Configure.pl
==============================================================================
--- (empty file)
+++ branches/strings/languages/lua/Configure.pl	Thu Jan 15 16:36:00 2009
@@ -0,0 +1,21 @@
+# $Id$
+# Copyright (C) 2009, The Perl Foundation.
+
+use strict;
+use warnings;
+use 5.008;
+
+my $build_dir = '../..';
+my $hll       = 'lua';
+my $cmd       = qq{$^X -Ilib tools/dev/reconfigure.pl --step=gen::languages --languages=$hll};
+
+print "Running '$cmd' in $build_dir\n";
+chdir $build_dir;
+`$cmd`
+
+# Local Variables:
+#   mode: cperl
+#   cperl-indent-level: 4
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:

Modified: branches/strings/languages/lua/config/makefiles/root.in
==============================================================================
--- branches/strings/languages/lua/config/makefiles/root.in	(original)
+++ branches/strings/languages/lua/config/makefiles/root.in	Thu Jan 15 16:36:00 2009
@@ -14,11 +14,10 @@
 PGE      = $(PARROT) ../../runtime/parrot/library/PGE/Perl6Grammar.pir
 TGE      = $(PARROT) ../../compilers/tge/tgc.pir
 PBC_TO_EXE = ../../pbc_to_exe@exe@
-RECONFIGURE = $(PERL) @build_dir@/tools/dev/reconfigure.pl
 PMCBUILD = $(PERL) @build_dir@/tools/build/dynpmc.pl
-#CONDITIONED_LINE(darwin):
-#CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
-#CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 ## places to look for things
 LIBPATH  = src/lib
@@ -88,7 +87,7 @@
  src/PASTGrammar_gen.pir \
  src/POSTGrammar_gen.pir \
  $(LIBPATH)/luabytecode_gen.pir \
- $(LIBPATH)/gl.pir \
+#IF(has_opengl): $(LIBPATH)/gl.pir \
  $(LIBPATH)/sha1.pir
 
 GEN_PBC = \
@@ -105,16 +104,16 @@
  bit.pbc \
  bitlib.pbc \
  complex.pbc \
- $(LIBPATH)/gl.pbc \
- gl_binding.pbc \
- glut.pbc \
+#IF(has_opengl): $(LIBPATH)/gl.pbc \
+#IF(has_opengl): gl_binding.pbc \
+#IF(has_opengl): glut.pbc \
  lfs.pbc \
  lpeg.pbc \
  markdown.pbc \
  mathx.pbc \
- md5.pbc \
+#IF(has_crypto): md5.pbc \
  random.pbc \
- sha1.pbc \
+#IF(has_crypto): sha1.pbc \
  struct.pbc \
  uuid.pbc \
  $(GEN_PIR) \
@@ -215,17 +214,17 @@
 complex.pbc: $(LIBPATH)/complex.pir
 	-$(PARROT) --output=complex.pbc $(LIBPATH)/complex.pir
 
-$(LIBPATH)/gl.pir: $(LIBPATH)/gl.lua lua.pbc
-	-$(PARROT) luap.pir --target=pir $(LIBPATH)/gl.lua > $(LIBPATH)/gl.pir
-
-$(LIBPATH)/gl.pbc: $(LIBPATH)/gl.pir
-	-$(PARROT) --output=$(LIBPATH)/gl.pbc $(LIBPATH)/gl.pir
-
-gl_binding.pbc: $(LIBPATH)/gl_binding.pir
-	-$(PARROT) --output=gl_binding.pbc $(LIBPATH)/gl_binding.pir
-
-glut.pbc: $(LIBPATH)/glut.pir
-	-$(PARROT) --output=glut.pbc $(LIBPATH)/glut.pir
+#IF(has_opengl):$(LIBPATH)/gl.pir: $(LIBPATH)/gl.lua lua.pbc
+#IF(has_opengl):	-$(PARROT) luap.pir --target=pir $(LIBPATH)/gl.lua > $(LIBPATH)/gl.pir
+#IF(has_opengl):
+#IF(has_opengl):$(LIBPATH)/gl.pbc: $(LIBPATH)/gl.pir
+#IF(has_opengl):	-$(PARROT) --output=$(LIBPATH)/gl.pbc $(LIBPATH)/gl.pir
+#IF(has_opengl):
+#IF(has_opengl):gl_binding.pbc: $(LIBPATH)/gl_binding.pir
+#IF(has_opengl):	-$(PARROT) --output=gl_binding.pbc $(LIBPATH)/gl_binding.pir
+#IF(has_opengl):
+#IF(has_opengl):glut.pbc: $(LIBPATH)/glut.pir
+#IF(has_opengl):	-$(PARROT) --output=glut.pbc $(LIBPATH)/glut.pir
 
 lfs.pbc: $(LIBPATH)/lfs.pir
 	-$(PARROT) --output=lfs.pbc $(LIBPATH)/lfs.pir
@@ -239,15 +238,15 @@
 mathx.pbc: $(LIBPATH)/mathx.pir
 	-$(PARROT) --output=mathx.pbc $(LIBPATH)/mathx.pir
 
-md5.pbc: $(LIBPATH)/md5.pir
-	-$(PARROT) --output=md5.pbc $(LIBPATH)/md5.pir
+#IF(has_crypto):md5.pbc: $(LIBPATH)/md5.pir
+#IF(has_crypto):	-$(PARROT) --output=md5.pbc $(LIBPATH)/md5.pir
 
 random.pbc: $(LIBPATH)/random.pir
 	-$(PARROT) --output=random.pbc $(LIBPATH)/random.pir
 
-sha1.pbc: $(LIBPATH)/md5.pir
-	$(PERL) -pe "s|md5|sha1|g; s|MD5|SHA1|g" $(LIBPATH)/md5.pir > $(LIBPATH)/sha1.pir
-	-$(PARROT) --output=sha1.pbc $(LIBPATH)/sha1.pir
+#IF(has_crypto):sha1.pbc: $(LIBPATH)/md5.pir
+#IF(has_crypto):	$(PERL) -pe "s|md5|sha1|g; s|MD5|SHA1|g" $(LIBPATH)/md5.pir > $(LIBPATH)/sha1.pir
+#IF(has_crypto):	-$(PARROT) --output=sha1.pbc $(LIBPATH)/sha1.pir
 
 struct.pbc: $(LIBPATH)/struct.pir
 	-$(PARROT) --output=struct.pbc $(LIBPATH)/struct.pir
@@ -263,7 +262,7 @@
 
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
-	cd ../.. && $(RECONFIGURE) --step=gen::languages --languages=lua
+	$(PERL) Configure.pl
 
 help:
 	@echo ""

Added: branches/strings/languages/markdown/Configure.pl
==============================================================================
--- (empty file)
+++ branches/strings/languages/markdown/Configure.pl	Thu Jan 15 16:36:00 2009
@@ -0,0 +1,21 @@
+# $Id$
+# Copyright (C) 2009, The Perl Foundation.
+
+use strict;
+use warnings;
+use 5.008;
+
+my $build_dir = '../..';
+my $hll       = 'markdown';
+my $cmd       = qq{$^X -Ilib tools/dev/reconfigure.pl --step=gen::languages --languages=$hll};
+
+print "Running '$cmd' in $build_dir\n";
+chdir $build_dir;
+`$cmd`
+
+# Local Variables:
+#   mode: cperl
+#   cperl-indent-level: 4
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:

Modified: branches/strings/languages/markdown/config/makefiles/root.in
==============================================================================
--- branches/strings/languages/markdown/config/makefiles/root.in	(original)
+++ branches/strings/languages/markdown/config/makefiles/root.in	Thu Jan 15 16:36:00 2009
@@ -15,10 +15,9 @@
 CP            = @cp@
 PARROT        = ../../parrot@exe@
 CAT           = $(PERL) -MExtUtils::Command -e cat
-RECONFIGURE   = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
-#CONDITIONED_LINE(darwin):
-#CONDITIONED_LINE(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
-#CONDITIONED_LINE(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+#IF(darwin):
+#IF(darwin):# MACOSX_DEPLOYMENT_TARGET must be defined for OS X compilation/linking
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
 
 ## places to look for things
 PGE_LIBRARY   = $(BUILD_DIR)/runtime/parrot/library/PGE
@@ -57,7 +56,7 @@
 
 # regenerate the Makefile
 Makefile: config/makefiles/root.in
-	cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=markdown
+	$(PERL) Configure.pl
 
 # This is a listing of all targets, that are meant to be called by users
 help:

Modified: branches/strings/languages/perl6/config/makefiles/root.in
==============================================================================
--- branches/strings/languages/perl6/config/makefiles/root.in	(original)
+++ branches/strings/languages/perl6/config/makefiles/root.in	Thu Jan 15 16:36:00 2009
@@ -48,12 +48,14 @@
 
 BUILTINS_PIR = \
   src/classes/Object.pir \
+  src/classes/Any.pir \
+  src/classes/Signature.pir \
+  src/classes/Role.pir \
   src/classes/Abstraction.pir \
   src/classes/Protoobject.pir \
   src/classes/Positional.pir \
   src/classes/Associative.pir \
   src/classes/Callable.pir \
-  src/classes/Any.pir \
   src/classes/Bool.pir \
   src/classes/Str.pir \
   src/classes/Num.pir \
@@ -76,12 +78,10 @@
   src/classes/Failure.pir \
   src/classes/Exception.pir \
   src/classes/Nil.pir \
-  src/classes/Role.pir \
   src/classes/Pair.pir \
   src/classes/Whatever.pir \
   src/classes/Capture.pir \
   src/classes/Match.pir \
-  src/classes/Signature.pir \
   src/classes/Grammar.pir \
   src/classes/Module.pir \
   src/builtins/globals.pir \

Modified: branches/strings/languages/perl6/docs/spectest-progress.csv
==============================================================================
--- branches/strings/languages/perl6/docs/spectest-progress.csv	(original)
+++ branches/strings/languages/perl6/docs/spectest-progress.csv	Thu Jan 15 16:36:00 2009
@@ -236,3 +236,5 @@
 "2009-01-11 00:00",35386,6143,0,331,1478,7952,11288,279
 "2009-01-12 00:00",35432,6218,0,331,1425,7974,11470,281
 "2009-01-13 00:00",35477,6233,0,333,1425,7991,11487,282
+"2009-01-14 00:00",35517,6233,0,337,1425,7995,11491,282
+"2009-01-15 00:00",35576,6254,0,337,1425,8016,11525,284

Modified: branches/strings/languages/perl6/perl6.pir
==============================================================================
--- branches/strings/languages/perl6/perl6.pir	(original)
+++ branches/strings/languages/perl6/perl6.pir	Thu Jan 15 16:36:00 2009
@@ -173,6 +173,14 @@
 
 .sub 'parse_name' :method
     .param string name
+    ##  remove any type parameterization for now
+    .local string type_param
+    type_param = ''
+    $I0 = index name, '['
+    if $I0 == -1 goto type_param_done
+    type_param = substr name, $I0
+    name = substr name, 0, $I0
+  type_param_done:
     ##  divide name based on ::
     .local pmc list
     list = split '::', name
@@ -198,6 +206,11 @@
     push list, $S0
     goto iter_loop
   iter_done:
+    if type_param == '' goto no_add_type_param
+    $S0 = pop list
+    concat $S0, type_param
+    push list, $S0
+  no_add_type_param:
     .return (list)
 .end
 

Modified: branches/strings/languages/perl6/src/builtins/enums.pir
==============================================================================
--- branches/strings/languages/perl6/src/builtins/enums.pir	(original)
+++ branches/strings/languages/perl6/src/builtins/enums.pir	Thu Jan 15 16:36:00 2009
@@ -11,6 +11,7 @@
     # Set up bool role.
     .local pmc bool_role
     bool_role = "!keyword_role"("bool")
+    bool_role = bool_role.'!select'()
     get_global $P21, "Object"
     "!keyword_has"(bool_role, "$!bool", $P21)
     get_global $P24, "bool_role_bool"

Modified: branches/strings/languages/perl6/src/builtins/guts.pir
==============================================================================
--- branches/strings/languages/perl6/src/builtins/guts.pir	(original)
+++ branches/strings/languages/perl6/src/builtins/guts.pir	Thu Jan 15 16:36:00 2009
@@ -205,6 +205,7 @@
 
     # It's an abstraction.
     $P0 = get_hll_global 'Abstraction'
+    $P0 = $P0.'!select'()
     subset.'add_role'($P0)
 
     # Instantiate it - we'll only ever create this one instance.
@@ -355,6 +356,43 @@
 .end
 
 
+=item !ADDTOROLE
+
+Adds a given role initializing multi-variant to a Role object, creating it
+and putting it in the namespace if it doesn't already exist.
+
+=cut
+
+.sub '!ADDTOROLE'
+    .param pmc variant
+
+    # Get short name of role.
+    .local pmc ns
+    .local string short_name
+    ns = variant.'get_namespace'()
+    ns = ns.'get_name'()
+    short_name = pop ns
+    $I0 = index short_name, '['
+    if $I0 == -1 goto have_short_name
+    short_name = substr short_name, 0, $I0
+  have_short_name:
+
+    # See if we have a Role object already.
+    .local pmc role_obj
+    role_obj = get_root_global ns, short_name
+    if null role_obj goto need_role_obj
+    $I0 = isa role_obj, 'NameSpace'
+    unless $I0 goto have_role_obj
+  need_role_obj:
+    role_obj = new 'Perl6Role'
+    set_root_global ns, short_name, role_obj
+  have_role_obj:
+
+    # Add this variant.
+    role_obj.'!add_variant'(variant)
+.end
+
+
 =item !meta_create(type, name, also)
 
 Create a metaclass object for C<type> with the given C<name>.
@@ -398,16 +436,37 @@
     .return (metaclass)
 
   role:
+    # This is a little fun. We only want to create the Parrot role and suck
+    # in the methods once per role definition. We do this and it is attached to
+    # the namespace. Then we attach this "master role" to a new one we create
+    # per invocation, so the methods can be newclosure'd and added into it in
+    # the body.
     .local pmc info, metarole
+    ns = get_hll_namespace nsarray
+    metarole = get_class ns
+    unless null metarole goto have_role
+
     info = new 'Hash'
     $P0 = nsarray[-1]
     info['name'] = $P0
     info['namespace'] = nsarray
     metarole = new 'Role', info
-    nsarray = clone nsarray
-    $S0 = pop nsarray
-    set_hll_global nsarray, $S0, metarole
-    .return (metarole)
+  have_role:
+
+    # Copy list of roles done by the metarole.
+    .local pmc result, tmp, it
+    result = new 'Role'
+    setprop result, '$!orig_role', metarole
+    tmp = metarole.'roles'()
+    it = iter tmp
+  roles_loop:
+    unless it goto roles_loop_end
+    tmp = shift it
+    result.'add_role'(tmp)
+    goto roles_loop
+  roles_loop_end:
+
+    .return (result)
 .end
 
 
@@ -457,6 +516,7 @@
 .sub '!meta_compose' :multi()
     .param pmc metaclass
     # Currently, nothing to do.
+    .return (metaclass)
 .end
 
 
@@ -470,6 +530,8 @@
     .param pmc metaclass
     .param string type
     .param string name
+    .param pmc pos_args   :slurpy
+    .param pmc named_args :slurpy :named
 
     if type == 'trait_auxiliary:is' goto is
     if type == 'trait_auxiliary:does' goto does
@@ -487,12 +549,15 @@
     .return ()
 
   does:
-    ##  get the role to be composed
+    ##  get the Role object for the role to be composed
     $P0 = compreg 'Perl6'
     $P0 = $P0.'parse_name'(name)
     $S0 = pop $P0
     $P0 = get_hll_global $P0, $S0
 
+    ##  select the correct role based upon any parameters
+    $P0 = $P0.'!select'(pos_args :flat, named_args :flat :named)
+
     ##  add it to the class.
     metaclass.'add_role'($P0)
 .end
@@ -699,10 +764,11 @@
     .param pmc class
     .param pmc role
 
-    .local pmc role_attrs, class_attrs, ra_iter
+    .local pmc role_attrs, class_attrs, ra_iter, fixup_list
     .local string cur_attr
-    role_attrs = inspect role, "attributes"
-    class_attrs = inspect class, "attributes"
+    role_attrs = role."attributes"()
+    class_attrs = class."attributes"()
+    fixup_list = new ["ResizableStringArray"]
     ra_iter = iter role_attrs
   ra_iter_loop:
     unless ra_iter goto ra_iter_loop_end
@@ -737,9 +803,30 @@
 
   no_conflict:
     addattribute class, cur_attr
+    push fixup_list, cur_attr
   merge:
     goto ra_iter_loop
   ra_iter_loop_end:
+
+    # Now we need, for any merged in attributes, to copy property data.
+    .local pmc fixup_iter, class_props, role_props, props_iter
+    class_attrs = class."attributes"()
+    fixup_iter = iter fixup_list
+  fixup_iter_loop:
+    unless fixup_iter goto fixup_iter_loop_end
+    cur_attr = shift fixup_iter
+    role_props = role_attrs[cur_attr]
+    class_props = class_attrs[cur_attr]
+    props_iter = iter role_props
+  props_iter_loop:
+    unless props_iter goto props_iter_loop_end
+    $S0 = shift props_iter
+    $P0 = role_props[$S0]
+    class_props[$S0] = $P0
+    goto props_iter_loop
+  props_iter_loop_end:
+    goto fixup_iter_loop
+  fixup_iter_loop_end:
 .end
 
 
@@ -751,27 +838,39 @@
 
 .sub '!keyword_role'
     .param string name
-    .local pmc info, role
+    .local pmc info, role, helper
 
-    # Need to make sure it ends up attached to the right namespace.
+    # Create Parrot-level role. Need to make sure it gets its methods from
+    # the right namespace.
     .local pmc ns
     ns = split '::', name
     name = ns[-1]
     info = new 'Hash'
     info['name'] = name
     info['namespace'] = ns
-
-    # Create role.
     role = new 'Role', info
 
-    # Stash in namespace.
-    $I0 = elements ns
-    dec $I0
-    ns = $I0
-    set_hll_global ns, name, role
-
+    # Now we need to wrap it up as a Perl6Role.
+    helper = find_name '!keyword_role_helper'
+    helper = clone helper
+    setprop helper, '$!metarole', role
+    $P0 = new ["Signature"]
+    setprop helper, '$!signature', $P0
+    role = new ["Perl6Role"]
+    role.'!add_variant'(helper)
+
+    # Store it in the namespace.
+    ns = clone ns
+    $S0 = pop ns
+    set_hll_global ns, $S0, role
     .return(role)
 .end
+.sub '!keyword_role_helper'
+    $P0 = new 'ParrotInterpreter'
+    $P0 = $P0['sub']
+    $P0 = getprop '$!metarole', $P0
+    .return ($P0)
+.end
 
 
 =item !keyword_enum(name)
@@ -813,51 +912,10 @@
     'die'('does keyword can only be used with roles.')
   role_ok:
 
-    # Get Parrot to compose the role for us (handles the methods).
+    # Get Parrot to compose the role for us (handles the methods), then call
+    # attribute composer.
     addrole class, role
-
-    # Parrot doesn't handle composing the attributes; we do that here for now.
-    .local pmc role_attrs, class_attrs, ra_iter
-    .local string cur_attr
-    role_attrs = inspect role, "attributes"
-    class_attrs = inspect class, "attributes"
-    ra_iter = iter role_attrs
-  ra_iter_loop:
-    unless ra_iter goto ra_iter_loop_end
-    cur_attr = shift ra_iter
-
-    # Check that this attribute doesn't conflict with one already in the class.
-    $I0 = exists class_attrs[cur_attr]
-    unless $I0 goto no_conflict
-
-    # We have a name conflict. Let's compare the types. If they match, then we
-    # can merge the attributes.
-    .local pmc class_attr_type, role_attr_type
-    $P0 = class_attrs[cur_attr]
-    if null $P0 goto conflict
-    class_attr_type = $P0['type']
-    if null class_attr_type goto conflict
-    $P0 = role_attrs[cur_attr]
-    if null $P0 goto conflict
-    role_attr_type = $P0['type']
-    if null role_attr_type goto conflict
-    $I0 = '!SAMETYPE_EXACT'(class_attr_type, role_attr_type)
-    if $I0 goto merge
-
-  conflict:
-    $S0 = "Conflict of attribute '"
-    $S0 = concat cur_attr
-    $S0 = concat "' in composition of role '"
-    $S1 = role
-    $S0 = concat $S1
-    $S0 = concat "'"
-    'die'($S0)
-
-  no_conflict:
-    addattribute class, cur_attr
-  merge:
-    goto ra_iter_loop
-  ra_iter_loop_end:
+    '!compose_role_attributes'(class, role)
 .end
 
 
@@ -873,10 +931,9 @@
     .param pmc type     :optional
     .param int got_type :opt_flag
     if got_type goto with_type
-    class.'add_attribute'(attr_name)
-    .return ()
+    .tailcall '!meta_attribute'(class, attr_name, 'Perl6Scalar')
   with_type:
-    class.'add_attribute'(attr_name, type)
+    .tailcall '!meta_attribute'(class, attr_name, 'Perl6Scalar', 'type'=>type)
 .end
 
 

Modified: branches/strings/languages/perl6/src/builtins/op.pir
==============================================================================
--- branches/strings/languages/perl6/src/builtins/op.pir	(original)
+++ branches/strings/languages/perl6/src/builtins/op.pir	Thu Jan 15 16:36:00 2009
@@ -400,6 +400,8 @@
     .local pmc derived
     derived = new 'Class'
     addparent derived, parrot_class
+    $I0 = isa role, 'Perl6Role'
+    if $I0 goto one_role_select
     $I0 = isa role, 'Role'
     if $I0 goto one_role
     $I0 = isa role, 'List'
@@ -407,6 +409,8 @@
   error:
     'die'("'does' expects a role or a list of roles")
 
+  one_role_select:
+    role = role.'!select'()
   one_role:
     '!keyword_does'(derived, role)
     goto added_roles
@@ -418,24 +422,33 @@
     unless role_it goto roles_loop_end
     cur_role = shift role_it
     $I0 = isa cur_role, 'Role'
+    if $I0 goto have_parrot_role
+    $I0 = isa cur_role, 'Perl6Role'
     unless $I0 goto error
+    cur_role = cur_role.'!select'()
+  have_parrot_role:
     '!keyword_does'(derived, cur_role)
     goto roles_loop
   roles_loop_end:
   added_roles:
 
-    # Register proto-object.
-    .local pmc p6meta, proto
-    p6meta = get_hll_global ['Perl6Object'], '$!P6META'
-    proto = var.'WHAT'()
-    p6meta.'register'(derived, 'protoobject'=>proto)
-
     # Instantiate the class to make it form itself.
     $P0 = new derived
 
+    # Create a new meta-class, but associate with existing proto-object.
+    .local pmc p6meta, old_proto, new_proto
+    p6meta = get_hll_global ['Perl6Object'], '$!P6META'
+    new_proto = p6meta.'register'(derived)
+    $P0 = new_proto.'HOW'()
+    old_proto = var.'WHAT'()
+    setattribute $P0, 'protoobject', old_proto
+
     # Re-bless the object into the subclass.
     rebless_subclass var, derived
 
+    # We need to set any initial attribute values up.
+    new_proto.'BUILD'(var)
+
     # If we were given something to initialize with, do so.
     unless have_init_value goto no_init
     .local pmc attrs
@@ -445,9 +458,9 @@
     $I0 = elements attrs
     if $I0 != 1 goto attr_error
     attr_name = attrs[0]
-    attr_name = substr attr_name, 2 # lop of sigil and twigil
+    attr_name = substr attr_name, 2 # lop off sigil and twigil
     $P0 = var.attr_name()
-    assign $P0, init_value
+    'infix:='($P0, init_value)
   no_init:
 
     # We're done - return.
@@ -465,25 +478,19 @@
     .param int have_value :opt_flag
 
     # First off, is the role actually a role?
+    $I0 = isa role, 'Perl6Role'
+    if $I0 goto have_role
     $I0 = isa role, 'Role'
     if $I0 goto have_role
 
     # If not, it may be an enum. If we don't have a value, get the class of
     # the thing passed as a role and find out.
     if have_value goto error
-    .local pmc the_class, prop, role_list
+    .local pmc the_class
     push_eh error
     the_class = class role
-    prop = getprop 'enum', the_class
-    if null prop goto error
-    unless prop goto error
-
-    # We have an enum; get the one role of the class and set the value.
-    role_list = inspect the_class, 'roles'
-    value = role
-    role = role_list[0]
-    pop_eh
-    goto have_role
+    role = getprop 'enum', the_class
+    unless null role goto have_role
 
     # Did anything go wrong?
   error:

Modified: branches/strings/languages/perl6/src/classes/Code.pir
==============================================================================
--- branches/strings/languages/perl6/src/classes/Code.pir	(original)
+++ branches/strings/languages/perl6/src/classes/Code.pir	Thu Jan 15 16:36:00 2009
@@ -18,6 +18,7 @@
     p6meta = get_hll_global ['Perl6Object'], '$!P6META'
     codeproto = p6meta.'new_class'('Code', 'parent'=>'Any')
     $P0 = get_hll_global 'Callable'
+    $P0 = $P0.'!select'()
     p6meta.'add_role'($P0, 'to'=>codeproto)
     codeproto.'!IMMUTABLE'()
     p6meta.'register'('Sub', 'parent'=>codeproto, 'protoobject'=>codeproto)

Modified: branches/strings/languages/perl6/src/classes/List.pir
==============================================================================
--- branches/strings/languages/perl6/src/classes/List.pir	(original)
+++ branches/strings/languages/perl6/src/classes/List.pir	Thu Jan 15 16:36:00 2009
@@ -12,6 +12,7 @@
     p6meta = get_hll_global ['Perl6Object'], '$!P6META'
     listproto = p6meta.'new_class'('List', 'parent'=>'ResizablePMCArray Any')
     $P0 = get_hll_global 'Positional'
+    $P0 = $P0.'!select'()
     p6meta.'add_role'($P0, 'to'=>listproto)
     p6meta.'register'('ResizablePMCArray', 'parent'=>listproto, 'protoobject'=>listproto)
 

Modified: branches/strings/languages/perl6/src/classes/Mapping.pir
==============================================================================
--- branches/strings/languages/perl6/src/classes/Mapping.pir	(original)
+++ branches/strings/languages/perl6/src/classes/Mapping.pir	Thu Jan 15 16:36:00 2009
@@ -15,6 +15,7 @@
     p6meta = get_hll_global ['Perl6Object'], '$!P6META'
     mappingproto = p6meta.'new_class'('Mapping', 'parent'=>'Hash Any')
     $P0 = get_hll_global 'Associative'
+    $P0 = $P0.'!select'()
     p6meta.'add_role'($P0, 'to'=>mappingproto)
     p6meta.'register'('Hash', 'parent'=>mappingproto, 'protoobject'=>mappingproto)
     $P0 = get_hll_namespace ['Mapping']

Modified: branches/strings/languages/perl6/src/classes/Match.pir
==============================================================================
--- branches/strings/languages/perl6/src/classes/Match.pir	(original)
+++ branches/strings/languages/perl6/src/classes/Match.pir	Thu Jan 15 16:36:00 2009
@@ -13,8 +13,10 @@
     p6meta = get_hll_global ['Perl6Object'], '$!P6META'
     matchproto = p6meta.'new_class'('Match', 'parent'=>'PGE::Match Any')
     $P0 = get_hll_global 'Positional'
+    $P0 = $P0.'!select'()
     p6meta.'add_role'($P0, 'to'=>matchproto)
     $P0 = get_hll_global 'Associative'
+    $P0 = $P0.'!select'()
     p6meta.'add_role'($P0, 'to'=>matchproto)
 .end
 

Modified: branches/strings/languages/perl6/src/classes/Role.pir
==============================================================================
--- branches/strings/languages/perl6/src/classes/Role.pir	(original)
+++ branches/strings/languages/perl6/src/classes/Role.pir	Thu Jan 15 16:36:00 2009
@@ -4,19 +4,70 @@
 
 src/classes/Role.pir - methods for the Role class
 
+=head1 Description
+
+This class represents a role in Perl 6. It is not substitutable for a Parrot
+role, nor does it subclass it. Instead, it provides a way to get at a Parrot
+level role through a multiple dispatch (or perhaps from a cache). You can see
+it as a kind of "role factory", which manufactures roles of a particular
+short name for a particular set of parameters.
+
 =head1 Methods
 
 =over 4
 
 =cut
 
-.namespace ['Role']
+.namespace ['Perl6Role']
 
 .sub 'onload' :anon :init :load
     .local pmc p6meta, roleproto
     p6meta = get_hll_global ['Perl6Object'], '$!P6META'
-    roleproto = p6meta.'new_class'('Perl6Role', 'parent'=>'Role Any', 'name'=>'Role')
-    p6meta.'register'('Role', 'parent'=>roleproto, 'protoobject'=>roleproto)
+    roleproto = p6meta.'new_class'('Perl6Role', 'parent'=>'Any', 'name'=>'Role', 'attr'=>'$!selector @!created')
+    p6meta.'register'('Role', 'proto'=>'roleproto')
+.end
+
+
+=item !add_variant
+
+Adds a parameterized variant of the role.
+
+=cut
+
+.sub '!add_variant' :method
+    .param pmc variant
+    .local pmc selector
+    selector = getattribute self, '$!selector'
+    unless null selector goto have_selector
+    selector = new 'Perl6MultiSub'
+    setattribute self, '$!selector', selector
+  have_selector:
+    push selector, variant
+.end
+
+
+=item !select
+
+Selects a variant of the role to do based upon the supplied parameters.
+
+=cut
+
+.sub '!select' :method
+    .param pmc pos_args  :slurpy
+    .param pmc name_args :slurpy :named
+
+    # XXX We need to look through the parameters we have and keep track
+    # of variants we did already initialize/parameterize with.
+    .local pmc selector, result, created_list
+    selector = getattribute self, '$!selector'
+    result = selector(pos_args :flat, name_args :flat :named)
+    created_list = getattribute self, '@!created'
+    unless null created_list goto got_created_list
+    created_list = new 'ResizablePMCArray'
+    setattribute self, '@!created', created_list
+  got_created_list:
+    push created_list, result
+    .return (result)
 .end
 
 
@@ -36,11 +87,54 @@
     topic = topic.'WHAT'()
   no_proto:
 
-    $I0 = does topic, self
+    # Now go over the roles we've created and see if one of them is done.
+    .local pmc created, it
+    created = getattribute self, '@!created'
+    if null created goto it_loop_end
+    it = iter created
+    $I0 = 0
+  it_loop:
+    unless it goto it_loop_end
+    $P0 = shift it
+    $I0 = does topic, $P0
+    if $I0 == 0 goto it_loop
+  it_loop_end:
+
     $P0 = 'prefix:?'($I0)
     .return ($P0)
 .end
 
+
+=item postcircumfix:<[ ]>
+
+Selects a role based upon type.
+
+=cut
+
+.sub 'postcircumfix:[ ]' :method
+    .param pmc pos_args  :slurpy
+    .param pmc name_args :slurpy :named
+
+    # Need to unwrap the arguments (they are wrapped by postcircumfix:[ ]
+    # multi), then call !select.
+    pos_args = pos_args[0]
+    .tailcall self.'!select'(pos_args :flat, name_args :flat :named)
+.end
+
+
+=item elements (vtable method)
+
+Gives the number of possible parameterized roles we can select from (but really
+just here so postcircumfix:[ ] doesn't explode).
+
+=cut
+
+.sub 'elements' :vtable
+    $P0 = getattribute self, '$!selector'
+    $I0 = elements $P0
+    .return ($I0)
+.end
+
 =back
 
 =cut

Modified: branches/strings/languages/perl6/src/classes/Signature.pir
==============================================================================
--- branches/strings/languages/perl6/src/classes/Signature.pir	(original)
+++ branches/strings/languages/perl6/src/classes/Signature.pir	Thu Jan 15 16:36:00 2009
@@ -154,7 +154,7 @@
 .sub 'params' :method
     $P0 = getattribute self, "@!params"
     unless null $P0 goto done
-    $P0 = 'list'()
+    $P0 = new 'ResizablePMCArray'
     setattribute self, "@!params", $P0
   done:
     .return ($P0)

Modified: branches/strings/languages/perl6/src/parser/actions.pm
==============================================================================
--- branches/strings/languages/perl6/src/parser/actions.pm	(original)
+++ branches/strings/languages/perl6/src/parser/actions.pm	Thu Jan 15 16:36:00 2009
@@ -371,11 +371,22 @@
 method end_statement($/) {
     my $past := $( $<block> );
     $past.blocktype('declaration');
-    declare_implicit_routine_vars($past);                  # FIXME
-    my $sub := PAST::Compiler.compile( $past );
-    PIR q<  $P0 = get_hll_global ['Perl6'], '@?END_BLOCKS' >;
-    PIR q<  $P1 = find_lex '$sub' >;
-    PIR q<  push $P0, $P1 >;
+    declare_implicit_routine_vars($past);
+    $past.loadinit().push(
+        PAST::Op.new(
+            :pasttype('callmethod'),
+            :name('push'),
+            PAST::Var.new(
+                :namespace('Perl6'),
+                :name('@?END_BLOCKS'),
+                :scope('package')
+            ),
+            PAST::Var.new(
+                :name('block'),
+                :scope('register')
+            )
+        )
+    );
     make $past;
 }
 
@@ -600,16 +611,20 @@
                 ),
                 PAST::Op.new(
                     :pasttype('call'),
-                    :name('!keyword_role'),
+                   :name('!keyword_role'),
                     PAST::Val.new( :value($name) )
                 )
             ),
             PAST::Op.new(
                 :pasttype('call'),
                 :name('!keyword_has'),
-                PAST::Var.new(
-                    :name('def'),
-                    :scope('register')
+                PAST::Op.new(
+                    :pasttype('callmethod'),
+                    :name('!select'),
+                    PAST::Var.new(
+                        :name('def'),
+                        :scope('register')
+                    )
                 ),
                 PAST::Val.new( :value("$!" ~ $name) ),
                 # XXX Set declared type here, when we parse that.
@@ -621,9 +636,13 @@
             PAST::Op.new(
                 :pasttype('callmethod'),
                 :name('add_method'),
-                PAST::Var.new(
-                    :name('def'),
-                    :scope('register')
+                PAST::Op.new(
+                    :pasttype('callmethod'),
+                    :name('!select'),
+                    PAST::Var.new(
+                        :name('def'),
+                        :scope('register')
+                    )
                 ),
                 PAST::Val.new( :value($name) ),
                 make_accessor($/, undef, "$!" ~ $name, 1, 'attribute')
@@ -634,9 +653,13 @@
             $role_past.push(PAST::Op.new(
                 :pasttype('callmethod'),
                 :name('add_method'),
-                PAST::Var.new(
-                    :name('def'),
-                    :scope('register')
+                PAST::Op.new(
+                    :pasttype('callmethod'),
+                    :name('!select'),
+                    PAST::Var.new(
+                        :name('def'),
+                        :scope('register')
+                    )
                 ),
                 PAST::Val.new( :value($_) ),
                 PAST::Block.new(
@@ -664,28 +687,32 @@
             PAST::Op.new(
                 :pasttype('bind'),
                 PAST::Var.new(
-                    :name('def'),
+                    :name('class_def'),
                     :scope('register'),
                     :isdecl(1)
                 ),
                 PAST::Op.new(
                     :pasttype('call'),
                     :name('!keyword_enum'),
-                    PAST::Var.new(
-                        :name('def'),
-                        :scope('register')
+                    PAST::Op.new(
+                        :pasttype('callmethod'),
+                        :name('!select'),
+                        PAST::Var.new(
+                            :name('def'),
+                            :scope('register')
+                        )
                     )
                 )
             ),
             PAST::Op.new(
                 :inline('    setprop %0, "enum", %1'),
                 PAST::Var.new(
-                    :name('def'),
+                    :name('class_def'),
                     :scope('register')
                 ),
-                PAST::Val.new(
-                    :value(1),
-                    :returns('Int')
+                PAST::Var.new(
+                    :name('def'),
+                    :scope('register')
                 )
             )
         );
@@ -698,7 +725,7 @@
             :name('add_vtable_override'),
             PAST::Var.new(
                 :scope('register'),
-                :name('def')
+                :name('class_def')
             ),
             'invoke',
             PAST::Block.new(
@@ -715,7 +742,7 @@
             :name('add_vtable_override'),
             PAST::Var.new(
                 :scope('register'),
-                :name('def')
+                :name('class_def')
             ),
             'get_string',
             PAST::Block.new(
@@ -736,7 +763,7 @@
             :name('add_vtable_override'),
             PAST::Var.new(
                 :scope('register'),
-                :name('def')
+                :name('class_def')
             ),
             'get_integer',
             PAST::Block.new(
@@ -757,7 +784,7 @@
             :name('add_vtable_override'),
             PAST::Var.new(
                 :scope('register'),
-                :name('def')
+                :name('class_def')
             ),
             'get_number',
             PAST::Block.new(
@@ -792,7 +819,7 @@
                     :pasttype('callmethod'),
                     :name('new'),
                     PAST::Var.new(
-                        :name('def'),
+                        :name('class_def'),
                         :scope('register')
                     ),
                     PAST::Val.new(
@@ -963,6 +990,17 @@
     }
     elsif $sym eq 'does' {
         $trait.push( ~$<name> );
+        if $<EXPR> {
+            for @(build_call($( $<EXPR>[0] ))) {
+                if $_.returns() eq 'Pair' {
+                    $_[1].named($_[0]);
+                    $trait.push($_[0]);
+                }
+                else {
+                    $trait.push($_);
+                }
+            }
+        }
     }
     make $trait;
 }
@@ -980,8 +1018,17 @@
 method signature($/, $key) {
     our @?BLOCK;
     if $key eq 'open' {
+        our $?BLOCK_OPEN;
         my $sigpast := PAST::Op.new( :pasttype('stmts'), :node($/) );
-        my $block    := PAST::Block.new( $sigpast, :blocktype('declaration') );
+        my $block;
+        if $?BLOCK_OPEN {
+            $block := $?BLOCK_OPEN;
+            $?BLOCK_OPEN := 0;
+            $block.unshift( $sigpast);
+        }
+        else {
+            $block := PAST::Block.new( $sigpast, :blocktype('declaration') );
+        }
         $block<explicit_signature> := 1;
         @?BLOCK.unshift($block);
     }
@@ -1093,6 +1140,18 @@
     my $sigil := $<param_var><sigil>;
     my $quant := $<quant>;
 
+    ##  if it was type a type capture and nothing else, need to make a PAST::Var
+    unless $<param_var> {
+        unless $<type_constraint> == 1 {
+            $/.panic("Invalid signature; cannot have two consecutive parameter separators.");
+        }
+        our @?BLOCK;
+        my $name := ~$<type_constraint>[0];
+        $var     := PAST::Var.new( :scope('parameter') );
+        $var.name($var.unique());
+        @?BLOCK[0].symbol( $var.name(), :scope('lexical') );
+    }
+
     ##  handle slurpy and optional flags
     if $quant eq '*' {
         $var.slurpy( $sigil eq '@' || $sigil eq '%' );
@@ -1425,11 +1484,29 @@
     # See note at top of file for %?CLASSMAP.
     if %?CLASSMAP{$modulename} { $modulename := %?CLASSMAP{$modulename}; }
 
-    if ($modulename) {
-        $block.namespace( Perl6::Compiler.parse_name($modulename) );
-    }
+    if $?PKGDECL eq 'role' {
+        # Parametric roles need to have their bodies evaluated per type-
+        # parmeterization, and are "invoked" by 'does'. We make them
+        # multis, and ensure they have a signature. XXX Need to put
+        # $?CLASS as first item in signature always too.
+        $block.blocktype('declaration');
+
+        # Also need to put this (possibly parameterized) role into the
+        # set of possible roles.
+        $block.loadinit().push(
+            PAST::Op.new( :name('!ADDTOROLE'), :pasttype('call'),
+                PAST::Var.new( :name('block'), :scope('register') )
+            )
+        );
 
-    if $key eq 'block' {
+        # And if there's no signature, make sure we set one up and add [] to
+        # the namespace name.
+        if $modulename eq ~$<module_name>[0]<name> {
+            $modulename := $modulename ~ '[]';
+            block_signature($block);
+        }
+    }
+    elsif $key eq 'block' {
         # A normal block acts like a BEGIN and is executed ASAP.
         $block.blocktype('declaration');
         $block.pirflags(':load :init');
@@ -1442,6 +1519,10 @@
         $block.blocktype('immediate');
     }
 
+    if ($modulename) {
+        $block.namespace( Perl6::Compiler.parse_name($modulename) );
+    }
+
     #  Create a node at the beginning of the block's initializer
     #  for package initializations
     my $init := PAST::Stmts.new();
@@ -1483,11 +1564,33 @@
     );
 
     #  ...and at the end of the block's initializer (after any other
-    #  items added by the block), we finalize the composition. This
-    # returns a proto, which we need to keep around and also return at
-    # the end of initialization for anonymous classes.
-    if $<module_name> eq "" && ($?PKGDECL eq 'class' || $?PKGDECL eq 'role'
-            || $?PKGDECL eq 'grammar') {
+    #  items added by the block), we finalize the composition.
+    if $?PKGDECL eq 'role' {
+        #  For a role, we now need to produce a new one which clones the original,
+        #  but without the methods. Then we need to add back the methods. We emit
+        #  PIR here to do it rather than doing a call, since we need to call
+        #  new_closure from the correct scope.
+        $block[0].push(PAST::Op.new(:inline(
+                '    .local pmc orig_role, meths, meth_iter',
+                '    orig_role = getprop "$!orig_role", %0',
+                '    meths = orig_role."methods"()',
+                '    meth_iter = iter meths',
+                '  it_loop:',
+                '    unless meth_iter goto it_loop_end',
+                '    $S0 = shift meth_iter',
+                '    $P0 = meths[$S0]',
+                '    $P0 = newclosure $P0',
+                '    %0."add_method"($S0, $P0)',
+                '    goto it_loop',
+                '  it_loop_end:',
+                '    .return (%0)'
+            ),
+            $?METACLASS
+        ));
+    }
+    elsif $<module_name> eq "" && ($?PKGDECL eq 'class' || $?PKGDECL eq 'grammar') {
+        #  We need to keep the proto around and return it at the end of
+        #  initialization for anonymous classes.
         $block[0].push(PAST::Op.new(
             :pasttype('bind'),
             PAST::Var.new(:name('proto_store'), :scope('register'), :isdecl(1)),

Modified: branches/strings/languages/perl6/src/parser/grammar.pg
==============================================================================
--- branches/strings/languages/perl6/src/parser/grammar.pg	(original)
+++ branches/strings/languages/perl6/src/parser/grammar.pg	Thu Jan 15 16:36:00 2009
@@ -406,7 +406,7 @@
 rule trait_auxiliary {
     [
     | $<sym>=[is] <name><postcircumfix>?
-    | $<sym>=[does] <name>['['<EXPR>']']?
+    | $<sym>=[does] <name>['['<EXPR>?']']?
     | $<sym>=[will] <identifier> <block>
     ]
     {*}
@@ -493,6 +493,11 @@
     |   $<named>=[':'?]
         <param_var>
         $<quant>=[ <[ ? ! ]>? ]
+    |   <?{{
+            $I0 = match['type_constraint']
+            $I0 = $I0 > 0
+            .return ($I0)
+        }}> <?>
     ]
     <trait>*
     <post_constraint>*

Modified: branches/strings/languages/perl6/src/parser/methods.pir
==============================================================================
--- branches/strings/languages/perl6/src/parser/methods.pir	(original)
+++ branches/strings/languages/perl6/src/parser/methods.pir	Thu Jan 15 16:36:00 2009
@@ -101,7 +101,7 @@
     # XXX The following should be covered by a check for does Abstraction
     $I0 = isa check_symbol, 'P6protoobject'
     if $I0 goto type_ok
-    $I0 = isa check_symbol, 'Role'
+    $I0 = isa check_symbol, 'Perl6Role'
     if $I0 goto type_ok
     $P0 = class check_symbol
     $P0 = getprop 'enum', $P0

Modified: branches/strings/languages/perl6/src/pmc/perl6multisub.pmc
==============================================================================
--- branches/strings/languages/perl6/src/pmc/perl6multisub.pmc	(original)
+++ branches/strings/languages/perl6/src/pmc/perl6multisub.pmc	Thu Jan 15 16:36:00 2009
@@ -214,6 +214,8 @@
 Takes two candidates and determines if the first one is narrower than the
 second. Returns a true value if they are.
 
+=cut
+
 */
 static INTVAL is_narrower(PARROT_INTERP, candidate_info *a, candidate_info *b) {
     STRING *ACCEPTS = CONST_STRING(interp, "ACCEPTS");
@@ -266,6 +268,8 @@
 Takes a ResizablePMCArray of the candidates, collects information about them
 and then does a topological sort of them.
 
+=cut
+
 */
 static candidate_info** sort_candidiates(PARROT_INTERP, PMC *candidates, PMC **proto_out) {
     INTVAL i, j, sig_elems, candidates_to_sort, result_pos;
@@ -315,10 +319,7 @@
                     VTABLE_inspect_str(interp, candidate, CONST_STRING(interp, "pos_optional")));
 
         /* Type information. */
-        meth = VTABLE_find_method(interp, candidate,
-                CONST_STRING(interp, "signature"));
-        signature = (PMC*)Parrot_run_meth_fromc_args(interp, meth, candidate,
-                CONST_STRING(interp, "signature"), "P");
+        signature = VTABLE_getprop(interp, candidate, CONST_STRING(interp, "$!signature"));
         meth = VTABLE_find_method(interp, signature,
                 CONST_STRING(interp, "params"));
         params = (PMC*)Parrot_run_meth_fromc_args(interp, meth, signature,
@@ -433,6 +434,8 @@
 or throws an error saying that the dispatch failed if there were no
 candidates or that it was ambiguous if there were tied candidates.
 
+=cut
+
 */
 
 static PMC* do_dispatch(PARROT_INTERP, candidate_info **candidates, PMC *proto,
@@ -644,6 +647,8 @@
 Checks if a PMC is invokable; returns a true value if so and a false value if
 not.
 
+=cut
+
 */
 static int check_invokable(PARROT_INTERP, PMC *value) {
     STRING * const _sub = CONST_STRING(interp, "Sub");
@@ -896,6 +901,8 @@
 
 Marks the candidate list.
 
+=cut
+
 */
     VTABLE void mark() {
         PMC *candidates;

Modified: branches/strings/languages/perl6/t/pmc/perl6multisub-type.t
==============================================================================
--- branches/strings/languages/perl6/t/pmc/perl6multisub-type.t	(original)
+++ branches/strings/languages/perl6/t/pmc/perl6multisub-type.t	Thu Jan 15 16:36:00 2009
@@ -61,7 +61,9 @@
     # Create a couple of roles.
     .local pmc R1, R2
     R1 = '!keyword_role'('R1')
+    R1 = R1.'!select'()
     R2 = '!keyword_role'('R2')
+    R2 = R2.'!select'()
 
     # Set up multis.
     $P0 = new "Perl6MultiSub"

Modified: branches/strings/languages/perl6/t/spectest.data
==============================================================================
--- branches/strings/languages/perl6/t/spectest.data	(original)
+++ branches/strings/languages/perl6/t/spectest.data	Thu Jan 15 16:36:00 2009
@@ -222,11 +222,14 @@
 S12-role/composition.t
 S12-role/mixin.t
 S12-role/namespaced.t
+S12-role/parameterized-basic.t
+S12-role/parameterized-mixin.t
 S12-subset/multi-dispatch.t
 S12-subset/subtypes.t
 S16-filehandles/io.t
 S16-filehandles/io_in_for_loops.t
 S16-filehandles/io_in_while_loops.t
+S16-io/bare-say.t
 S16-io/basic-open.t
 S16-io/say.t
 S16-unfiled/slurp.t

Modified: branches/strings/languages/pipp/Configure.pl
==============================================================================
--- branches/strings/languages/pipp/Configure.pl	(original)
+++ branches/strings/languages/pipp/Configure.pl	Thu Jan 15 16:36:00 2009
@@ -6,10 +6,10 @@
 use 5.008;
 
 my $build_dir = '../..';
-my $cmd = qq{$^X -Ilib tools/dev/reconfigure.pl --step=gen::languages --languages=pipp};
+my $hll       = 'pipp';
+my $cmd       = qq{$^X -Ilib tools/dev/reconfigure.pl --step=gen::languages --languages=$hll};
 
 print "Running '$cmd' in $build_dir\n";
-
 chdir $build_dir;
 `$cmd`
 

Modified: branches/strings/languages/pipp/docs/internals.pod
==============================================================================
--- branches/strings/languages/pipp/docs/internals.pod	(original)
+++ branches/strings/languages/pipp/docs/internals.pod	Thu Jan 15 16:36:00 2009
@@ -23,7 +23,7 @@
 =head1 Bytecode generation
 
 The parse tree is transformed to a Parrot Abstrace Syntax Tree.
-PIR und Bytecode is theb generated from the PAST.
+PIR und Bytecode is then generated from the PAST.
 
 =head1 Variables
 
@@ -31,14 +31,37 @@
 
 =item globals in top file
 
+Lexical. Might need extra treatment.
+
 =item globals in included files
 
-=item class scope
+Lexical in scope of the included file.
+
+=item Class constants
+
+=item Class members
 
 =item function and method scope
 
+Lexical is scope of the function or method.
+
+=item $this
+
+Bound to register C<self>.
+
 =item constants
 
+Currently constants are stored in the hash ['pipp'; 'php_constants'].
+The functions C<define> and C<defined> access this package scoped hash.
+This approach works good enough for constants in the global namespace.
+For namespaced constants the above approach could be extended to
+consider the namespace part of the constant, the current namespace and
+the active namespace aliases.
+
+Another approach is to treat constants as namespaced variables and
+work with standard PAST techniques.
+Experiments using that approach are underway.
+
 =back
 
 =head1 Functions and closures
@@ -47,6 +70,8 @@
 
 =head2 Closures
 
+TODO: see C<t/php/closures.t>
+
 =head2 Internal functions
 
 =head1 Object orientation
@@ -65,7 +90,6 @@
 The current namespace can be queried with B<__NAMESPACE__>.
 Namespaces are case insensitive.
 No global code can precede the first B<namespace> directive.
-Free code is disallowed within namespaces.
 
 =head2 Implementation in Pipp
 
@@ -73,6 +97,7 @@
 some divergences in Pipp. 
 Only the bracketed syntax is supported.
 Code outside the scope of namespaces directives is allowed.
+'const' outside a declared namespace is allowed.
 
 =head2 SEE ALSO
 

Modified: branches/strings/languages/pipp/docs/pipp.pod
==============================================================================
--- branches/strings/languages/pipp/docs/pipp.pod	(original)
+++ branches/strings/languages/pipp/docs/pipp.pod	Thu Jan 15 16:36:00 2009
@@ -31,6 +31,8 @@
 
 =item Only bracketed version of namespaces. No check for unnamespaced code.
 
+=item 'const' outside a declared namespace is allowed.
+
 =back
 
 =head1 Implementation

Modified: branches/strings/languages/pipp/src/pct/actions.pm
==============================================================================
--- branches/strings/languages/pipp/src/pct/actions.pm	(original)
+++ branches/strings/languages/pipp/src/pct/actions.pm	Thu Jan 15 16:36:00 2009
@@ -20,6 +20,7 @@
 class Pipp::Grammar::Actions;
 
 method TOP($/, $key) {
+    our $?NS := '';
     our @?BLOCK; # A stack of PAST::Block
     our @?SUPER_GLOBALS :=
           ( '$_GET', '$_POST', '$_SERVER', '$_GLOBALS',
@@ -113,19 +114,22 @@
         );
 }
 
-method namespace_statement($/) {
-    my $ns_name := +$<NAMESPACE_NAME> ?? ~$<NAMESPACE_NAME>[0] !! '';
-    my $block :=
-        PAST::Block.new(
-            :namespace($ns_name),
-            $( $<statement_list> )
-        );
+method namespace_statement($/, $key) {
+    our $?NS;
 
-    # set up scope 'package' for the superglobals
-    our @?SUPER_GLOBALS;
-    for ( @?SUPER_GLOBALS ) { $block.symbol( :scope('package'), $_ ); }
+    if $key eq 'open' {
+        $?NS := +$<NAMESPACE_NAME> ?? ~$<NAMESPACE_NAME>[0] !! '';
+    }
+    else {
+        my $block :=
+            PAST::Block.new(
+                :namespace($?NS),
+                $( $<statement_list> )
+            );
+        $?NS := '';
 
-    make $block;
+        make $block;
+    }
 }
 
 method return_statement($/) {
@@ -297,6 +301,26 @@
     make $past;
 }
 
+method namespace_constant_definition($/) {
+    our $?NS;
+    my $past := PAST::Block.new( :name('namespace_constant_definition') );
+    my $loadinit := $past.loadinit();
+    $loadinit.unshift(
+        PAST::Op.new(
+            :pasttype('call'),
+            :name('define'),
+            :node( $/ ),
+            PAST::Val.new(
+                :value( $?NS ~ '\\' ~ ~$<CONSTANT_NAME> ),
+                :returns('PhpString'),
+            ),
+            $( $<literal> ),
+        )
+    );
+
+    make $past;
+}
+
 method argument_list($/) {
     my $past := PAST::Op.new(
                     :pasttype('call'),

Modified: branches/strings/languages/pipp/src/pct/grammar.pg
==============================================================================
--- branches/strings/languages/pipp/src/pct/grammar.pg	(original)
+++ branches/strings/languages/pipp/src/pct/grammar.pg	Thu Jan 15 16:36:00 2009
@@ -119,20 +119,21 @@
 # statements
 
 rule statement {
-    | <namespace_statement>     {*}  #= namespace_statement
-    | <return_statement>        {*}  #= return_statement
-    | <require_once_statement>  {*}  #= require_once_statement
-    | <echo_statement>          {*}  #= echo_statement
-    | <expression_statement>    {*}  #= expression_statement
-    | <if_statement>            {*}  #= if_statement
-    | <while_statement>         {*}  #= while_statement
-    | <do_while_statement>      {*}  #= do_while_statement
-    | <for_statement>           {*}  #= for_statement
-    | <inline_sea_short_tag>    {*}  #= inline_sea_short_tag
-    | <inline_sea_script_tag>   {*}  #= inline_sea_script_tag
-    | [ <var_assign> ';' ]      {*}  #= var_assign
-    | <function_definition>     {*}  #= function_definition
-    | <class_definition>        {*}  #= class_definition
+    | <namespace_statement>            {*}  #= namespace_statement
+    | <return_statement>               {*}  #= return_statement
+    | <require_once_statement>         {*}  #= require_once_statement
+    | <echo_statement>                 {*}  #= echo_statement
+    | <expression_statement>           {*}  #= expression_statement
+    | <namespace_constant_definition>  {*}  #= namespace_constant_definition
+    | <if_statement>                   {*}  #= if_statement
+    | <while_statement>                {*}  #= while_statement
+    | <do_while_statement>             {*}  #= do_while_statement
+    | <for_statement>                  {*}  #= for_statement
+    | <inline_sea_short_tag>           {*}  #= inline_sea_short_tag
+    | <inline_sea_script_tag>          {*}  #= inline_sea_script_tag
+    | [ <var_assign> ';' ]             {*}  #= var_assign
+    | <function_definition>            {*}  #= function_definition
+    | <class_definition>               {*}  #= class_definition
 }
 
 rule statement_list {
@@ -146,8 +147,8 @@
 }
 
 rule namespace_statement {
-    'namespace' <NAMESPACE_NAME>? '{' <statement_list> '}'
-    {*}
+    'namespace' <NAMESPACE_NAME>?  {*}       #= open
+    '{' <statement_list> '}'       {*}       #= close
 }
 
 # return can appear inside and outside functions
@@ -240,7 +241,7 @@
 #
 token CLASS_NAME               { <ident> }
 
-token CONSTANT_NAME            { <ident> }
+token CONSTANT_NAME            { <NAMESPACED_IDENT> }
 
 token CLASS_CONSTANT_ACCESSOR  { '::' }
 
@@ -258,7 +259,9 @@
 
 token NAMESPACE_SEPARATOR      { '\\' }
 
-token NAMESPACE_NAME           { <ident>? [ <.NAMESPACE_SEPARATOR> <ident> ]* }
+token NAMESPACE_NAME           { <.NAMESPACE_SEPARATOR>? <ident> [ <.NAMESPACE_SEPARATOR> <ident> ]* }
+
+token NAMESPACED_IDENT         { <.NAMESPACE_SEPARATOR>? <ident> [ <.NAMESPACE_SEPARATOR> <ident> ]* }
 
 token VAR_NAME                 { '$' <ident> }
 
@@ -395,10 +398,8 @@
 
 # declarations
 rule closure {
-    'function' <param_list> <bind_list>?
-    {*}                                     #= open
-    '{' <statement_list> '}'
-    {*}                                     #= close
+    'function' <param_list> <bind_list>?  {*}   #= open
+    '{' <statement_list> '}'              {*}   #= close
 }
 
 rule bind_list {
@@ -406,10 +407,8 @@
 }
 
 rule function_definition {
-    'function' <FUNCTION_NAME> <param_list>
-    {*}                                     #= open
-    '{' <statement_list> '}'
-    {*}                                     #= close
+    'function' <FUNCTION_NAME> <param_list> {*}  #= open
+    '{' <statement_list> '}'                {*}  #= close
 }
 
 rule param_list {
@@ -432,13 +431,12 @@
 }
 
 rule class_definition {
-    'class' <CLASS_NAME> [ 'implements' <INTERFACE_NAME> ]? '{'
-    {*}                                     #= open
+    'class' <CLASS_NAME> [ 'implements' <INTERFACE_NAME> ]?  {*}  #= open
+    '{'
         <class_constant_definition>*
         <class_member_definition>*
         <class_method_definition>*
-    '}'
-    {*}                                     #= close
+    '}'                                                      {*}  #= close
 }
 
 rule class_constant_definition {
@@ -446,15 +444,20 @@
     {*}
 }
 
+# In PHP 5.3 a constand definition outside a declared namespace is forbidden
+# In Pipp this is not checked
+rule namespace_constant_definition {
+    'const' <CONSTANT_NAME> '=' <literal> <.statement_delimiter>
+    {*}
+}
+
 rule class_member_definition {
     'public' <VAR_NAME> '=' <literal> <.statement_delimiter>
 }
 
 rule class_method_definition {
-    'function' <METHOD_NAME> <param_list>
-    {*}                                     #= open
-    '{' <statement_list> '}'
-    {*}                                     #= close
+    'function' <METHOD_NAME> <param_list> {*}  #= open
+    '{' <statement_list> '}'              {*}  #= close
 }
 
 token curly_interpolation {

Modified: branches/strings/languages/t/harness
==============================================================================
--- branches/strings/languages/t/harness	(original)
+++ branches/strings/languages/t/harness	Thu Jan 15 16:36:00 2009
@@ -44,7 +44,7 @@
 =head1 TODO
 
 It should be possible to use non-Perl5 test files,
-like for languages/perl6, languages/pheme or languages/eclectus.
+like for languages/perl6 or languages/pheme.
 
 =cut
 
@@ -57,8 +57,10 @@
 
 
 # Step 0: handle command line args
+my $do_gen_html;       # smoke testing
 my $languages_list;    # select a subset of languages
-my $result = GetOptions( 'languages=s'   => \$languages_list );
+my $result = GetOptions( 'html'          => \$do_gen_html,
+                         'languages=s'   => \$languages_list );
 
 # Step 1: find harness files for testable languages
 
@@ -66,7 +68,6 @@
 #
 # BASIC                No t/harness, two implementations
 # ecmascript           No t/harness
-# eclectus
 # forth                No t/harness
 # perl6                test scripts are written in Perl 6, not Perl 5
 # pheme                test scripts are written in Scheme, not Perl 5
@@ -112,7 +113,74 @@
 chomp(@tests);
 
 # Step 3: test.
-Test::Harness::runtests(@tests);
+
+if ( ! $do_gen_html ) {
+    Test::Harness::runtests(@tests);
+}
+else {
+    my $html_fn = "languages_smoke.html";
+    my @smoke_config_vars = qw(
+      osname archname cc build_dir cpuarch revision VERSION optimize DEVEL
+    );
+
+    eval {
+        require Test::TAP::HTMLMatrix;
+        require Test::TAP::Model::Visual;
+    };
+    die "You must have Test::TAP::HTMLMatrix installed.\n\n$@"
+        if $@;
+
+    {
+        no warnings qw/redefine once/;
+        *Test::TAP::Model::run_tests = sub {
+            my $self = shift;
+
+            $self->_init;
+            $self->{meat}{start_time} = time();
+
+            my %stats;
+
+            foreach my $file (@_) {
+                my $data;
+                print STDERR "- $file\n";
+                $data = $self->run_test($file);
+                $stats{tests} += $data->{results}{max} || 0;
+                $stats{ok}    += $data->{results}{ok}  || 0;
+            }
+
+            printf STDERR "%s OK from %s tests (%.2f%% ok)\n\n",
+            $stats{ok},
+            $stats{tests},
+            $stats{ok} / $stats{tests} * 100;
+
+            $self->{meat}{end_time} = time();
+        };
+
+        my $start = time();
+        my $model = Test::TAP::Model::Visual->new_with_tests(@tests);
+        my $end   = time();
+
+        my $duration = $end - $start;
+        my $languages = join( q{ }, @unified_testable_languages );
+        my $v = Test::TAP::HTMLMatrix->new(
+            $model,
+            join("\n",
+                 "languages: $languages",
+                 "duration: $duration",
+                 "branch: unknown",
+                 "harness_args: languages",
+                 map { "$_: $PConfig{$_}" } sort @smoke_config_vars),
+        );
+
+        $v->has_inline_css(1); # no separate css file
+
+        open HTML, '>', $html_fn;
+        print HTML $v->html();
+        close HTML;
+
+        print "$html_fn has been generated.\n";
+    }
+}
 
 # Local Variables:
 #   mode: cperl

Modified: branches/strings/lib/Parrot/Docs/Section/Languages.pm
==============================================================================
--- branches/strings/lib/Parrot/Docs/Section/Languages.pm	(original)
+++ branches/strings/lib/Parrot/Docs/Section/Languages.pm	Thu Jan 15 16:36:00 2009
@@ -39,7 +39,6 @@
         'Language Implementations',
         'languages.html',
         '',
-        $self->new_item( '', 'languages/LANGUAGES_STATUS.pod' ),
         $self->new_item( '', 'languages/t/harness' ),
         $self->new_section( 'abc',         'abc.html',        '', 'languages/abc' ),
         $self->new_section( 'APL',         'apl.html',        '', 'languages/APL' ),
@@ -52,7 +51,6 @@
         $self->new_section( 'Cola',        'cola.html',       '', 'languages/cola' ),
         $self->new_section( 'Common Lisp', 'lisp.html',       '', 'languages/lisp' ),
         $self->new_section( '.Net',        'dotnet.html',     '', 'languages/dotnet' ),
-        $self->new_section( 'eclectus',    'eclectus.html',   '', 'languages/eclectus' ),
         $self->new_section( 'ecmascript',  'ecmascript.html', '', 'languages/ecmascript' ),
         $self->new_section( 'forth',       'forth.html',      '', 'languages/forth' ),
         $self->new_section( 'Jako',        'jako.html',       '', 'languages/jako' ),

Modified: branches/strings/lib/Parrot/Docs/Section/Tests.pm
==============================================================================
--- branches/strings/lib/Parrot/Docs/Section/Tests.pm	(original)
+++ branches/strings/lib/Parrot/Docs/Section/Tests.pm	Thu Jan 15 16:36:00 2009
@@ -52,7 +52,6 @@
         $self->new_group( 'Ops Tests',                           '', 't/op',  't/dynoplibs' ),
         $self->new_group( 'PMC Tests',                           '', 't/pmc', 't/dynpmc' ),
         $self->new_group( 'C Source Code Tests',                 '', 't/src' ),
-        $self->new_group( 'Software Transactional Memory Tests', '', 't/stm' ),
         $self->new_group( 'Stress Tests',                        '', 't/stress' ),
     );
 }

Modified: branches/strings/lib/Parrot/Harness/Smoke.pm
==============================================================================
--- branches/strings/lib/Parrot/Harness/Smoke.pm	(original)
+++ branches/strings/lib/Parrot/Harness/Smoke.pm	Thu Jan 15 16:36:00 2009
@@ -12,6 +12,12 @@
 
 Following subroutines are supported:
 
+    generate_html_smoke_report (
+        tests       => \@tests,
+        args        => $args,
+        file        => 'smoke.html',
+    );
+
     my %env_data = collect_test_environment_data();
 
     send_archive_to_smolder( %env_data );
@@ -27,6 +33,7 @@
 use Parrot::Config qw/%PConfig/;
 use base qw( Exporter );
 our @EXPORT_OK = qw(
+    generate_html_smoke_report
     collect_test_environment_data
     send_archive_to_smolder
 );
@@ -114,6 +121,73 @@
     return $compiler;
 }
 
+sub generate_html_smoke_report {
+    my $argsref = shift;
+    my $html_fn = $argsref->{file};
+    my @smoke_config_vars = qw(
+        osname archname cc build_dir cpuarch revision VERSION optimize DEVEL
+    );
+
+    eval {
+        require Test::TAP::HTMLMatrix;
+        require Test::TAP::Model::Visual;
+    };
+    die "You must have Test::TAP::HTMLMatrix installed.\n\n$@"
+        if $@;
+
+    {
+      no warnings qw/redefine once/;
+      *Test::TAP::Model::run_tests = sub {
+        my $self = shift;
+
+        $self->_init;
+        $self->{meat}{start_time} = time();
+
+        my %stats;
+
+        foreach my $file (@_) {
+            my $data;
+            print STDERR "- $file\n";
+            $data = $self->run_test($file);
+            $stats{tests} += $data->{results}{max} || 0;
+            $stats{ok}    += $data->{results}{ok}  || 0;
+        }
+
+        printf STDERR "%s OK from %s tests (%.2f%% ok)\n\n",
+            $stats{ok},
+            $stats{tests},
+            $stats{ok} / $stats{tests} * 100;
+
+        $self->{meat}{end_time} = time();
+      };
+
+      my $start = time();
+      my $model = Test::TAP::Model::Visual->new();
+      $model->run_tests( @{ $argsref->{tests} } );
+
+      my $end = time();
+
+      my $duration = $end - $start;
+
+      my $v = Test::TAP::HTMLMatrix->new(
+        $model,
+        join("\n",
+             "duration: $duration",
+             "branch: unknown",
+             "harness_args: " . (($argsref->{args}) ? $argsref->{args} : "N/A"),
+             map { "$_: $PConfig{$_}" } sort @smoke_config_vars),
+      );
+
+      $v->has_inline_css(1); # no separate css file
+
+      open my $HTML, '>', $html_fn;
+      print {$HTML} $v->html();
+      close $HTML;
+
+      print "$html_fn has been generated.\n";
+    }
+}
+
 1;
 
 # Local Variables:

Modified: branches/strings/lib/Parrot/Manifest.pm
==============================================================================
--- branches/strings/lib/Parrot/Manifest.pm	(original)
+++ branches/strings/lib/Parrot/Manifest.pm	Thu Jan 15 16:36:00 2009
@@ -13,19 +13,20 @@
     my $self = bless( {}, $class );
 
     my %data = (
-        id     => '$' . 'Id$',
-        time   => scalar gmtime,
-        cmd    => -d '.svn' ? 'svn' : 'svk',
-        script => $argsref->{script},
-        file   => $argsref->{file} ? $argsref->{file} : q{MANIFEST},
-        skip   => $argsref->{skip} ? $argsref->{skip} : q{MANIFEST.SKIP},
+        id         => '$' . 'Id$',
+        time       => scalar gmtime,
+        cmd        => -d '.svn' ? 'svn' : 'svk',
+        script     => $argsref->{script},
+        file       => $argsref->{file}      ? $argsref->{file}      : q{MANIFEST},
+        skip       => $argsref->{skip}      ? $argsref->{skip}      : q{MANIFEST.SKIP},
+        gitignore  => $argsref->{gitignore} ? $argsref->{gitignore} : q{.gitignore},
     );
 
     my $status_output_ref = [qx($data{cmd} status -v)];
 
     # grab the versioned resources:
-    my @versioned_files  = ();
-    my @dirs             = ();
+    my @versioned_files;
+    my @dirs;
     my @versioned_output = grep !/^[?D]/, @{$status_output_ref};
     for my $line (@versioned_output) {
         my @line_info = split( /\s+/, $line );
@@ -50,36 +51,37 @@
 
     # initialize the object from the prepared values (Damian, p. 98)
     %$self = %data;
+
     return $self;
 }
 
 sub prepare_manifest {
     my $self = shift;
-    my %manifest_lines;
 
+    my %manifest_lines;
     for my $file ( @{ $self->{versioned_files} } ) {
         $manifest_lines{$file} = _get_manifest_entry($file);
     }
+
     return \%manifest_lines;
 }
 
 sub determine_need_for_manifest {
     my $self               = shift;
     my $proposed_files_ref = shift;
-    if ( !-f $self->{file} ) {
-        return 1;
+
+    return 1 unless -f $self->{file};
+
+    my $current_files_ref        = $self->_get_current_files();
+    my $different_patterns_count = 0;
+    foreach my $cur ( keys %{$current_files_ref} ) {
+        $different_patterns_count++ unless $proposed_files_ref->{$cur};
     }
-    else {
-        my $current_files_ref        = $self->_get_current_files();
-        my $different_patterns_count = 0;
-        foreach my $cur ( keys %{$current_files_ref} ) {
-            $different_patterns_count++ unless $proposed_files_ref->{$cur};
-        }
-        foreach my $pro ( keys %{$proposed_files_ref} ) {
-            $different_patterns_count++ unless $current_files_ref->{$pro};
-        }
-        $different_patterns_count ? return 1 : return;
+    foreach my $pro ( keys %{$proposed_files_ref} ) {
+        $different_patterns_count++ unless $current_files_ref->{$pro};
     }
+
+    $different_patterns_count ? return 1 : return;
 }
 
 my $text_file_coda = <<'CODA';
@@ -92,6 +94,7 @@
 sub print_manifest {
     my $self               = shift;
     my $manifest_lines_ref = shift;
+
     my $print_str          = <<"END_HEADER";
 # ex: set ro:
 # $self->{id}
@@ -112,11 +115,13 @@
         or croak "Unable to open $self->{file} for writing";
     print $MANIFEST $print_str;
     close $MANIFEST or croak "Unable to close $self->{file} after writing";
+
     return 1;
 }
 
 sub _get_manifest_entry {
     my $file    = shift;
+
     my $special = _get_special();
     my $loc     = '[]';
     for ($file) {
@@ -136,6 +141,7 @@
             : m[^(apps/\w+)/] ? "[$1]"
             :                   '[]';
     }
+
     return $loc;
 }
 
@@ -180,53 +186,51 @@
         tools/build/revision_c.pl                       [devel]
         src/vtable.tbl                                  [devel]
     );
+
     return \%special;
 }
 
 sub _get_current_files {
     my $self          = shift;
-    my %current_files = ();
+
+    my %current_files;
     open my $FILE, "<", $self->{file}
         or die "Unable to open $self->{file} for reading";
     while ( my $line = <$FILE> ) {
         chomp $line;
+
         next if $line =~ /^\s*$/o;
+
         next if $line =~ /^#/o;
-        my @els = split /\s+/, $line;
-        $current_files{ $els[0] }++;
+
+        my ($file) = split /\s+/, $line;
+        $current_files{ $file }++;
     }
     close $FILE or die "Unable to close $self->{file} after reading";
+
     return \%current_files;
 }
 
 sub prepare_manifest_skip {
     my $self      = shift;
-    my $svnignore = `$self->{cmd} propget svn:ignore @{ $self->{dirs} }`;
 
-    # cope with trailing newlines in svn:ignore output
-    $svnignore =~ s/\n{3,}/\n\n/g;
-    my %ignore;
-    my @ignore = split( /\n\n/, $svnignore );
-    foreach (@ignore) {
-        my @cnt = m/( - )/g;
-        if ($#cnt) {
-            my @a = split /\n(?=(?:.*?) - )/, $_;
-            foreach (@a) {
-                m/^\s*(.*?) - (.+)/sm;
-                $ignore{$1} = $2 if $2;
-            }
-        }
-        else {
-            m/^(.*) - (.+)/sm;
-            $ignore{$1} = $2 if $2;
-        }
-    }
-    return $self->_compose_print_str( \%ignore );
+    my $ignores_ref = $self->_get_ignores();
+
+    return $self->_compose_manifest_skip($ignores_ref);
+}
+
+sub prepare_gitignore {
+    my $self      = shift;
+
+    my $ignores_ref = $self->_get_ignores();
+
+    return $self->_compose_gitignore($ignores_ref);
 }
 
 sub determine_need_for_manifest_skip {
     my $self      = shift;
     my $print_str = shift;
+
     if ( !-f $self->{skip} ) {
         return 1;
     }
@@ -240,6 +244,7 @@
         foreach my $pro ( keys %{$proposed_skips_ref} ) {
             $different_patterns_count++ unless $current_skips_ref->{$pro};
         }
+
         $different_patterns_count ? return 1 : return;
     }
 }
@@ -247,18 +252,94 @@
 sub print_manifest_skip {
     my $self      = shift;
     my $print_str = shift;
+
     open my $MANIFEST_SKIP, '>', $self->{skip}
         or die "Unable to open $self->{skip} for writing";
     $print_str .= $text_file_coda;
     print $MANIFEST_SKIP $print_str;
     close $MANIFEST_SKIP
         or die "Unable to close $self->{skip} after writing";
+
+    return 1;
+}
+
+sub print_gitignore {
+    my $self      = shift;
+    my $print_str = shift;
+
+    open my $GITIGNORE, '>', $self->{gitignore}
+        or die "Unable to open $self->{gitignore} for writing";
+    $print_str .= $text_file_coda;
+    print $GITIGNORE $print_str;
+    close $GITIGNORE
+        or die "Unable to close $self->{gitignore} after writing";
+
     return 1;
 }
 
-sub _compose_print_str {
+sub _get_ignores {
+    my $self      = shift;
+
+    my $svnignore = `$self->{cmd} propget svn:ignore @{ $self->{dirs} }`;
+
+    # cope with trailing newlines in svn:ignore output
+    $svnignore =~ s/\n{3,}/\n\n/g;
+    my %ignores;
+    my @ignore = split( /\n\n/, $svnignore );
+    foreach (@ignore) {
+        my @cnt = m/( - )/g;
+        if ($#cnt) {
+            my @a = split /\n(?=(?:.*?) - )/, $_;
+            foreach (@a) {
+                m/^\s*(.*?) - (.+)/sm;
+                $ignores{$1} = $2 if $2;
+            }
+        }
+        else {
+            m/^(.*) - (.+)/sm;
+            $ignores{$1} = $2 if $2;
+        }
+    }
+
+    return \%ignores;
+}
+
+sub _compose_gitignore {
+    my $self        = shift;
+    my $ignores_ref = shift;
+
+    my $print_str  = <<"END_HEADER";
+# ex: set ro:
+# $self->{id}
+# generated by $self->{script} $self->{time} UT
+#
+# This file should contain a transcript of the svn:ignore properties
+# of the directories in the Parrot subversion repository.
+# The .gitignore file is a convenience for developers  working with git-svn.
+# See http://www.kernel.org/pub/software/scm/git/docs/gitignore.html for the
+# format of this file.
+#
+END_HEADER
+
+    foreach my $directory ( sort keys %{$ignores_ref} ) {
+        my $dir = $directory;
+        $dir =~ s!\\!/!g;
+        $print_str .= "# generated from svn:ignore of '$dir/'\n";
+        foreach ( sort split /\n/, $ignores_ref->{$directory} ) {
+            $print_str .=
+                ( $dir ne '.' )
+                ? "/$dir/$_\n"
+                : "/$_\n";
+        }
+    }
+
+    return $print_str;
+}
+
+sub _compose_manifest_skip {
     my $self       = shift;
     my $ignore_ref = shift;
+
     my %ignore     = %{$ignore_ref};
     my $print_str  = <<"END_HEADER";
 # ex: set ro:
@@ -292,12 +373,14 @@
                 : "^$_\$\n^$_/\n";
         }
     }
+
     return $print_str;
 }
 
 sub _get_current_skips {
     my $self          = shift;
-    my %current_skips = ();
+
+    my %current_skips;
     open my $SKIP, "<", $self->{skip}
         or die "Unable to open $self->{skip} for reading";
     while ( my $line = <$SKIP> ) {
@@ -307,11 +390,13 @@
         $current_skips{$line}++;
     }
     close $SKIP or die "Unable to close $self->{skip} after reading";
+
     return \%current_skips;
 }
 
 sub _get_proposed_skips {
     my $print_str      = shift;
+
     my @proposed_lines = split /\n/, $print_str;
     my %proposed_skips = ();
     for my $line (@proposed_lines) {
@@ -319,6 +404,7 @@
         next if $line =~ /^#/o;
         $proposed_skips{$line}++;
     }
+
     return \%proposed_skips;
 }
 
@@ -337,13 +423,16 @@
     $mani = Parrot::Manifest->new($0);
 
     $manifest_lines_ref = $mani->prepare_manifest();
-    $need_for_files = $mani->determine_need_for_manifest($manifest_lines_ref);
+    $need_for_files     = $mani->determine_need_for_manifest($manifest_lines_ref);
     $mani->print_manifest($manifest_lines_ref) if $need_for_files;
 
-    $print_str = $mani->prepare_manifest_skip();
+    $print_str     = $mani->prepare_manifest_skip();
     $need_for_skip = $mani->determine_need_for_manifest_skip($print_str);
     $mani->print_manifest_skip($print_str) if $need_for_skip;
 
+    $print_str     = $mani->prepare_gitignore();
+    $mani->print_gitignore($print_str) if $need_for_skip;
+
 =head1 SEE ALSO
 
 F<tools/dev/mk_manifest_and_skip.pl>.

Modified: branches/strings/lib/Parrot/Pmc2c/Pmc2cMain.pm
==============================================================================
--- branches/strings/lib/Parrot/Pmc2c/Pmc2cMain.pm	(original)
+++ branches/strings/lib/Parrot/Pmc2c/Pmc2cMain.pm	Thu Jan 15 16:36:00 2009
@@ -17,7 +17,6 @@
 use Parrot::Pmc2c::PMC::Null ();
 use Parrot::Pmc2c::PMC::Ref ();
 use Parrot::Pmc2c::PMC::SharedRef ();
-use Parrot::Pmc2c::PMC::STMRef ();
 use Parrot::Pmc2c::PMC::Object ();
 use File::Spec ();
 use Carp;

Modified: branches/strings/lib/Parrot/Test/Harness.pm
==============================================================================
--- branches/strings/lib/Parrot/Test/Harness.pm	(original)
+++ branches/strings/lib/Parrot/Test/Harness.pm	Thu Jan 15 16:36:00 2009
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2008, The Perl Foundation.
+# Copyright (C) 2006-2009, The Perl Foundation.
 # $Id$
 
 =head1 NAME

Modified: branches/strings/src/gc/generational_ms.c
==============================================================================
--- branches/strings/src/gc/generational_ms.c	(original)
+++ branches/strings/src/gc/generational_ms.c	Thu Jan 15 16:36:00 2009
@@ -1599,7 +1599,6 @@
     ASSERT_ARGS(trace_children_cb)
     Arenas * const arena_base = interp->arena_base;
     const int lazy_dod = arena_base->lazy_dod;
-    const UINTVAL mask = PObj_data_is_PMC_array_FLAG | PObj_custom_mark_FLAG;
     Gc_gms_hdr *h;
 
     for (h = pool->gray; h != pool->white;) {
@@ -1614,26 +1613,10 @@
         arena_base->dod_trace_ptr = current;
         if (!PObj_needs_early_DOD_TEST(current))
             PObj_high_priority_DOD_CLEAR(current);
+
         /* mark children */
-        bits = PObj_get_FLAGS(current) & mask;
-        if (bits) {
-            if (bits == PObj_data_is_PMC_array_FLAG) {
-                /* malloced array of PMCs */
-                PMC ** const data = PMC_data(current);
-
-                if (data) {
-                    INTVAL i;
-                    for (i = 0; i < PMC_int_val(current); i++) {
-                        if (data[i]) {
-                            pobject_lives(interp, (PObj *)data[i]);
-                        }
-                    }
-                }
-            }
-            else {
-                /* All that's left is the custom */
-                VTABLE_mark(interp, current);
-            }
+        if (PObj_custom_mark_TEST(current)) {
+            VTABLE_mark(interp, current);
         }
         if (h != pool->gray) {
             /* if a gray was inserted DFS, it is next */

Modified: branches/strings/src/gc/mark_sweep.c
==============================================================================
--- branches/strings/src/gc/mark_sweep.c	(original)
+++ branches/strings/src/gc/mark_sweep.c	Thu Jan 15 16:36:00 2009
@@ -343,11 +343,6 @@
     PARROT_ASSERT(interp->DOD_registry);
     pobject_lives(interp, (PObj *)interp->DOD_registry);
 
-    /* Mark the transaction log */
-    /* XXX do this more generically? */
-    if (interp->thread_data && interp->thread_data->stm_log)
-        Parrot_STM_mark_transaction(interp);
-
     /* Mark the MMD cache. */
     if (interp->op_mmd_cache)
         Parrot_mmd_cache_mark(interp, interp->op_mmd_cache);
@@ -672,7 +667,7 @@
             arena_base->dod_mark_ptr = PMC_next_for_GC(obj) = obj;
         }
     }
-    else if (PObj_custom_mark_TEST(obj)) {
+    if (PObj_custom_mark_TEST(obj)) {
         PObj_get_FLAGS(obj) |= PObj_custom_GC_FLAG;
         VTABLE_mark(interp, obj);
     }
@@ -961,8 +956,6 @@
     const int      lazy_dod   = arena_base->lazy_dod;
     PMC           *current    = arena_base->dod_mark_start;
 
-    const UINTVAL mask = PObj_data_is_PMC_array_FLAG | PObj_custom_mark_FLAG;
-
     /*
      * First phase of mark is finished. Now if we are the owner
      * of a shared pool, we must run the mark phase of other
@@ -978,7 +971,6 @@
     pt_DOD_mark_root_finished(interp);
 
     do {
-        const UINTVAL bits = PObj_get_FLAGS(current) & mask;
         PMC *next;
 
         if (lazy_dod && arena_base->num_early_PMCs_seen >=
@@ -999,17 +991,9 @@
         if (PMC_metadata(current))
             pobject_lives(interp, (PObj *)PMC_metadata(current));
 
-        /* Start by checking if there's anything at all. This assumes that the
-         * largest percentage of PMCs won't have anything in their data
-         * pointer that we need to trace. */
-        if (bits) {
-            if (bits == PObj_data_is_PMC_array_FLAG)
-                Parrot_gc_trace_pmc_data(interp, current);
-            else {
-                /* All that's left is the custom */
-                PARROT_ASSERT(!PObj_on_free_list_TEST(current));
-                VTABLE_mark(interp, current);
-            }
+         if (PObj_custom_mark_TEST(current)) {
+            PARROT_ASSERT(!PObj_on_free_list_TEST(current));
+            VTABLE_mark(interp, current);
         }
 
         next = PMC_next_for_GC(current);
@@ -1029,37 +1013,6 @@
     return 1;
 }
 
-
-/*
-
-=item C<void Parrot_gc_trace_pmc_data>
-
-If the PMC is an array of PMCs, trace all elements in the array as children.
-Touches each object in the array to mark it as being alive. To determine
-whether a PMC is an array to be marked in this way, it is tested for the
-C<PObj_data_is_PMC_array_FLAG> flag.
-
-=cut
-
-*/
-
-void
-Parrot_gc_trace_pmc_data(PARROT_INTERP, ARGIN(PMC *p))
-{
-    ASSERT_ARGS(Parrot_gc_trace_pmc_data)
-    /* malloced array of PMCs */
-    PMC ** const data = PMC_data_typed(p, PMC **);
-
-    if (data) {
-        INTVAL i;
-
-        for (i = PMC_int_val(p) - 1; i >= 0; --i)
-            if (data[i])
-                pobject_lives(interp, (PObj *)data[i]);
-    }
-}
-
-
 /*
 
 =item C<void Parrot_add_to_free_list>

Modified: branches/strings/src/inter_call.c
==============================================================================
--- branches/strings/src/inter_call.c	(original)
+++ branches/strings/src/inter_call.c	Thu Jan 15 16:36:00 2009
@@ -2746,6 +2746,7 @@
         ARGMOD(STRING *method_name),
         ARGIN(const char *signature), ...)
 {
+    ASSERT_ARGS(Parrot_pcc_invoke_method_from_c_args)
     PMC *sig_obj;
     PMC *sub_obj;
     va_list args;
@@ -2782,7 +2783,7 @@
 Parrot_pcc_invoke_from_sig_object(PARROT_INTERP, ARGIN(PMC *sub_obj),
         ARGIN(PMC *sig_obj))
 {
-    ASSERT_ARGS(Parrot_pcc_invoke_sub_from_sig_object)
+    ASSERT_ARGS(Parrot_pcc_invoke_from_sig_object)
 #define PCC_ARG_MAX 1024
     /* variables from PCCINVOKE impl in PCCMETHOD.pm */
     /* args INSP, returns INSP */
@@ -2850,8 +2851,8 @@
      * don't. */
     if (sub_obj->vtable->base_type == enum_class_Sub
             && PMC_IS_NULL(interp->current_object)) {
-        INTVAL old_core  = interp->run_core;
-        opcode_t offset  = dest - interp->code->base.data;
+        const INTVAL old_core = interp->run_core;
+        const opcode_t offset = dest - interp->code->base.data;
 
         /* can't re-enter the runloop from here with PIC cores: RT #60048 */
         if (interp->run_core == PARROT_CGP_CORE

Modified: branches/strings/src/inter_create.c
==============================================================================
--- branches/strings/src/inter_create.c	(original)
+++ branches/strings/src/inter_create.c	Thu Jan 15 16:36:00 2009
@@ -349,13 +349,6 @@
 
     Parrot_do_dod_run(interp, GC_finish_FLAG);
 
-#if STM_PROFILE
-    if (interp->thread_data && interp->thread_data->stm_log
-    && !interp->parent_interpreter
-    &&  Interp_debug_TEST(interp, PARROT_THREAD_DEBUG_FLAG))
-        Parrot_STM_dump_profile(interp);
-#endif
-
     /*
      * that doesn't get rid of constant PMCs like these in vtable->data
      * so if such a PMC needs destroying, we get a memory leak, like for
@@ -387,22 +380,6 @@
                 Interp_flags_TEST(interp, PARROT_DESTROY_FLAG)))
         return;
 
-    if (interp->thread_data && interp->thread_data->stm_log) {
-        while (Parrot_STM_transaction_depth(interp) > 0) {
-            /* XXX */
-            fprintf(stderr, "interpreter %p had pending transaction on exit\n",
-                    (void *) interp);
-            Parrot_STM_abort(interp);
-        }
-#if STM_PROFILE
-        if (interp->parent_interpreter
-            && interp->thread_data->state & THREAD_STATE_JOINED)
-            Parrot_STM_merge_profile(interp->parent_interpreter,
-                                     interp);
-#endif
-        Parrot_STM_destroy(interp);
-    }
-
     if (interp->parent_interpreter
     &&  interp->thread_data
     && (interp->thread_data->state & THREAD_STATE_JOINED)) {

Modified: branches/strings/src/oo.c
==============================================================================
--- branches/strings/src/oo.c	(original)
+++ branches/strings/src/oo.c	Thu Jan 15 16:36:00 2009
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2007-2008, The Perl Foundation.
+Copyright (C) 2007-2009, The Perl Foundation.
 $Id$
 
 =head1 NAME
@@ -594,7 +594,7 @@
         if (!typeid_exists) {
             PMC    *classname_hash = interp->class_hash;
             /* set entry in name->type hash */
-            PMC    *item      = pmc_new(interp, enum_class_Integer);
+            PMC    *item     = pmc_new(interp, enum_class_Integer);
             PMC_int_val(item) = type;
 
             VTABLE_set_pmc_keyed(interp, classname_hash, name, item);
@@ -969,9 +969,9 @@
         return;
 
     if (PObj_is_class_TEST(_class)) {
-        SLOTTYPE * const class_array = PMC_data_typed(_class, SLOTTYPE *);
-        PMC *const class_name_pmc = get_attrib_num(class_array, PCD_CLASS_NAME);
-        class_name = PMC_str_val(class_name_pmc);
+        SLOTTYPE * const class_array    = PMC_data_typed(_class, SLOTTYPE *);
+        PMC *const       class_name_pmc = get_attrib_num(class_array, PCD_CLASS_NAME);
+        class_name                      = PMC_str_val(class_name_pmc);
     }
     else
         class_name = _class->vtable->whoami;

Modified: branches/strings/src/ops/ops.num
==============================================================================
--- branches/strings/src/ops/ops.num	(original)
+++ branches/strings/src/ops/ops.num	Thu Jan 15 16:36:00 2009
@@ -1009,264 +1009,258 @@
 clearn                          979
 clears                          980
 clearp                          981
-stm_start                       982
-stm_validate_ic                 983
-stm_commit_ic                   984
-stm_wait_ic                     985
-stm_abort                       986
-stm_depth_i                     987
-ord_i_s                         988
-ord_i_sc                        989
-ord_i_s_i                       990
-ord_i_sc_i                      991
-ord_i_s_ic                      992
-ord_i_sc_ic                     993
-chr_s_i                         994
-chr_s_ic                        995
-chopn_s_i                       996
-chopn_s_ic                      997
-chopn_s_s_i                     998
-chopn_s_sc_i                    999
-chopn_s_s_ic                   1000
-chopn_s_sc_ic                  1001
-concat_s_s                     1002
-concat_s_sc                    1003
-concat_p_p                     1004
-concat_p_s                     1005
-concat_p_sc                    1006
-concat_s_s_s                   1007
-concat_s_sc_s                  1008
-concat_s_s_sc                  1009
-concat_p_p_s                   1010
-concat_p_p_sc                  1011
-concat_p_p_p                   1012
-repeat_s_s_i                   1013
-repeat_s_sc_i                  1014
-repeat_s_s_ic                  1015
-repeat_s_sc_ic                 1016
-repeat_p_p_i                   1017
-repeat_p_p_ic                  1018
-repeat_p_p_p                   1019
-repeat_p_i                     1020
-repeat_p_ic                    1021
-repeat_p_p                     1022
-length_i_s                     1023
-length_i_sc                    1024
-bytelength_i_s                 1025
-bytelength_i_sc                1026
-pin_s                          1027
-unpin_s                        1028
-substr_s_s_i                   1029
-substr_s_sc_i                  1030
-substr_s_s_ic                  1031
-substr_s_sc_ic                 1032
-substr_s_s_i_i                 1033
-substr_s_sc_i_i                1034
-substr_s_s_ic_i                1035
-substr_s_sc_ic_i               1036
-substr_s_s_i_ic                1037
-substr_s_sc_i_ic               1038
-substr_s_s_ic_ic               1039
-substr_s_sc_ic_ic              1040
-substr_s_s_i_i_s               1041
-substr_s_s_ic_i_s              1042
-substr_s_s_i_ic_s              1043
-substr_s_s_ic_ic_s             1044
-substr_s_s_i_i_sc              1045
-substr_s_s_ic_i_sc             1046
-substr_s_s_i_ic_sc             1047
-substr_s_s_ic_ic_sc            1048
-substr_s_i_i_s                 1049
-substr_s_ic_i_s                1050
-substr_s_i_ic_s                1051
-substr_s_ic_ic_s               1052
-substr_s_i_i_sc                1053
-substr_s_ic_i_sc               1054
-substr_s_i_ic_sc               1055
-substr_s_ic_ic_sc              1056
-substr_s_p_i_i                 1057
-substr_s_p_ic_i                1058
-substr_s_p_i_ic                1059
-substr_s_p_ic_ic               1060
-index_i_s_s                    1061
-index_i_sc_s                   1062
-index_i_s_sc                   1063
-index_i_sc_sc                  1064
-index_i_s_s_i                  1065
-index_i_sc_s_i                 1066
-index_i_s_sc_i                 1067
-index_i_sc_sc_i                1068
-index_i_s_s_ic                 1069
-index_i_sc_s_ic                1070
-index_i_s_sc_ic                1071
-index_i_sc_sc_ic               1072
-sprintf_s_s_p                  1073
-sprintf_s_sc_p                 1074
-sprintf_p_p_p                  1075
-new_s                          1076
-new_s_i                        1077
-new_s_ic                       1078
-stringinfo_i_s_i               1079
-stringinfo_i_sc_i              1080
-stringinfo_i_s_ic              1081
-stringinfo_i_sc_ic             1082
-upcase_s_s                     1083
-upcase_s_sc                    1084
-upcase_s                       1085
-downcase_s_s                   1086
-downcase_s_sc                  1087
-downcase_s                     1088
-titlecase_s_s                  1089
-titlecase_s_sc                 1090
-titlecase_s                    1091
-join_s_s_p                     1092
-join_s_sc_p                    1093
-split_p_s_s                    1094
-split_p_sc_s                   1095
-split_p_s_sc                   1096
-split_p_sc_sc                  1097
-charset_i_s                    1098
-charset_i_sc                   1099
-charsetname_s_i                1100
-charsetname_s_ic               1101
-find_charset_i_s               1102
-find_charset_i_sc              1103
-trans_charset_s_i              1104
-trans_charset_s_ic             1105
-trans_charset_s_s_i            1106
-trans_charset_s_sc_i           1107
-trans_charset_s_s_ic           1108
-trans_charset_s_sc_ic          1109
-encoding_i_s                   1110
-encoding_i_sc                  1111
-encodingname_s_i               1112
-encodingname_s_ic              1113
-find_encoding_i_s              1114
-find_encoding_i_sc             1115
-trans_encoding_s_i             1116
-trans_encoding_s_ic            1117
-trans_encoding_s_s_i           1118
-trans_encoding_s_sc_i          1119
-trans_encoding_s_s_ic          1120
-trans_encoding_s_sc_ic         1121
-is_cclass_i_i_s_i              1122
-is_cclass_i_ic_s_i             1123
-is_cclass_i_i_sc_i             1124
-is_cclass_i_ic_sc_i            1125
-is_cclass_i_i_s_ic             1126
-is_cclass_i_ic_s_ic            1127
-is_cclass_i_i_sc_ic            1128
-is_cclass_i_ic_sc_ic           1129
-find_cclass_i_i_s_i_i          1130
-find_cclass_i_ic_s_i_i         1131
-find_cclass_i_i_sc_i_i         1132
-find_cclass_i_ic_sc_i_i        1133
-find_cclass_i_i_s_ic_i         1134
-find_cclass_i_ic_s_ic_i        1135
-find_cclass_i_i_sc_ic_i        1136
-find_cclass_i_ic_sc_ic_i       1137
-find_cclass_i_i_s_i_ic         1138
-find_cclass_i_ic_s_i_ic        1139
-find_cclass_i_i_sc_i_ic        1140
-find_cclass_i_ic_sc_i_ic       1141
-find_cclass_i_i_s_ic_ic        1142
-find_cclass_i_ic_s_ic_ic       1143
-find_cclass_i_i_sc_ic_ic       1144
-find_cclass_i_ic_sc_ic_ic      1145
-find_not_cclass_i_i_s_i_i      1146
-find_not_cclass_i_ic_s_i_i     1147
-find_not_cclass_i_i_sc_i_i     1148
-find_not_cclass_i_ic_sc_i_i    1149
-find_not_cclass_i_i_s_ic_i     1150
-find_not_cclass_i_ic_s_ic_i    1151
-find_not_cclass_i_i_sc_ic_i    1152
-find_not_cclass_i_ic_sc_ic_i   1153
-find_not_cclass_i_i_s_i_ic     1154
-find_not_cclass_i_ic_s_i_ic    1155
-find_not_cclass_i_i_sc_i_ic    1156
-find_not_cclass_i_ic_sc_i_ic   1157
-find_not_cclass_i_i_s_ic_ic    1158
-find_not_cclass_i_ic_s_ic_ic   1159
-find_not_cclass_i_i_sc_ic_ic   1160
-find_not_cclass_i_ic_sc_ic_ic  1161
-escape_s_s                     1162
-compose_s_s                    1163
-compose_s_sc                   1164
-spawnw_i_s                     1165
-spawnw_i_sc                    1166
-spawnw_i_p                     1167
-err_i                          1168
-err_s                          1169
-err_s_i                        1170
-err_s_ic                       1171
-time_i                         1172
-time_n                         1173
-gmtime_s_i                     1174
-gmtime_s_ic                    1175
-localtime_s_i                  1176
-localtime_s_ic                 1177
-decodetime_p_i                 1178
-decodetime_p_ic                1179
-decodelocaltime_p_i            1180
-decodelocaltime_p_ic           1181
-sysinfo_s_i                    1182
-sysinfo_s_ic                   1183
-sysinfo_i_i                    1184
-sysinfo_i_ic                   1185
-sleep_i                        1186
-sleep_ic                       1187
-sleep_n                        1188
-sleep_nc                       1189
-sizeof_i_i                     1190
-sizeof_i_ic                    1191
-store_lex_s_p                  1192
-store_lex_sc_p                 1193
-find_lex_p_s                   1194
-find_lex_p_sc                  1195
-get_namespace_p                1196
-get_namespace_p_p              1197
-get_namespace_p_pc             1198
-get_hll_namespace_p            1199
-get_hll_namespace_p_p          1200
-get_hll_namespace_p_pc         1201
-get_root_namespace_p           1202
-get_root_namespace_p_p         1203
-get_root_namespace_p_pc        1204
-get_global_p_s                 1205
-get_global_p_sc                1206
-get_global_p_p_s               1207
-get_global_p_pc_s              1208
-get_global_p_p_sc              1209
-get_global_p_pc_sc             1210
-get_hll_global_p_s             1211
-get_hll_global_p_sc            1212
-get_hll_global_p_p_s           1213
-get_hll_global_p_pc_s          1214
-get_hll_global_p_p_sc          1215
-get_hll_global_p_pc_sc         1216
-get_root_global_p_s            1217
-get_root_global_p_sc           1218
-get_root_global_p_p_s          1219
-get_root_global_p_pc_s         1220
-get_root_global_p_p_sc         1221
-get_root_global_p_pc_sc        1222
-set_global_s_p                 1223
-set_global_sc_p                1224
-set_global_p_s_p               1225
-set_global_pc_s_p              1226
-set_global_p_sc_p              1227
-set_global_pc_sc_p             1228
-set_hll_global_s_p             1229
-set_hll_global_sc_p            1230
-set_hll_global_p_s_p           1231
-set_hll_global_pc_s_p          1232
-set_hll_global_p_sc_p          1233
-set_hll_global_pc_sc_p         1234
-set_root_global_s_p            1235
-set_root_global_sc_p           1236
-set_root_global_p_s_p          1237
-set_root_global_pc_s_p         1238
-set_root_global_p_sc_p         1239
-set_root_global_pc_sc_p        1240
-find_name_p_s                  1241
-find_name_p_sc                 1242
+ord_i_s                         982
+ord_i_sc                        983
+ord_i_s_i                       984
+ord_i_sc_i                      985
+ord_i_s_ic                      986
+ord_i_sc_ic                     987
+chr_s_i                         988
+chr_s_ic                        989
+chopn_s_i                       990
+chopn_s_ic                      991
+chopn_s_s_i                     992
+chopn_s_sc_i                    993
+chopn_s_s_ic                    994
+chopn_s_sc_ic                   995
+concat_s_s                      996
+concat_s_sc                     997
+concat_p_p                      998
+concat_p_s                      999
+concat_p_sc                    1000
+concat_s_s_s                   1001
+concat_s_sc_s                  1002
+concat_s_s_sc                  1003
+concat_p_p_s                   1004
+concat_p_p_sc                  1005
+concat_p_p_p                   1006
+repeat_s_s_i                   1007
+repeat_s_sc_i                  1008
+repeat_s_s_ic                  1009
+repeat_s_sc_ic                 1010
+repeat_p_p_i                   1011
+repeat_p_p_ic                  1012
+repeat_p_p_p                   1013
+repeat_p_i                     1014
+repeat_p_ic                    1015
+repeat_p_p                     1016
+length_i_s                     1017
+length_i_sc                    1018
+bytelength_i_s                 1019
+bytelength_i_sc                1020
+pin_s                          1021
+unpin_s                        1022
+substr_s_s_i                   1023
+substr_s_sc_i                  1024
+substr_s_s_ic                  1025
+substr_s_sc_ic                 1026
+substr_s_s_i_i                 1027
+substr_s_sc_i_i                1028
+substr_s_s_ic_i                1029
+substr_s_sc_ic_i               1030
+substr_s_s_i_ic                1031
+substr_s_sc_i_ic               1032
+substr_s_s_ic_ic               1033
+substr_s_sc_ic_ic              1034
+substr_s_s_i_i_s               1035
+substr_s_s_ic_i_s              1036
+substr_s_s_i_ic_s              1037
+substr_s_s_ic_ic_s             1038
+substr_s_s_i_i_sc              1039
+substr_s_s_ic_i_sc             1040
+substr_s_s_i_ic_sc             1041
+substr_s_s_ic_ic_sc            1042
+substr_s_i_i_s                 1043
+substr_s_ic_i_s                1044
+substr_s_i_ic_s                1045
+substr_s_ic_ic_s               1046
+substr_s_i_i_sc                1047
+substr_s_ic_i_sc               1048
+substr_s_i_ic_sc               1049
+substr_s_ic_ic_sc              1050
+substr_s_p_i_i                 1051
+substr_s_p_ic_i                1052
+substr_s_p_i_ic                1053
+substr_s_p_ic_ic               1054
+index_i_s_s                    1055
+index_i_sc_s                   1056
+index_i_s_sc                   1057
+index_i_sc_sc                  1058
+index_i_s_s_i                  1059
+index_i_sc_s_i                 1060
+index_i_s_sc_i                 1061
+index_i_sc_sc_i                1062
+index_i_s_s_ic                 1063
+index_i_sc_s_ic                1064
+index_i_s_sc_ic                1065
+index_i_sc_sc_ic               1066
+sprintf_s_s_p                  1067
+sprintf_s_sc_p                 1068
+sprintf_p_p_p                  1069
+new_s                          1070
+new_s_i                        1071
+new_s_ic                       1072
+stringinfo_i_s_i               1073
+stringinfo_i_sc_i              1074
+stringinfo_i_s_ic              1075
+stringinfo_i_sc_ic             1076
+upcase_s_s                     1077
+upcase_s_sc                    1078
+upcase_s                       1079
+downcase_s_s                   1080
+downcase_s_sc                  1081
+downcase_s                     1082
+titlecase_s_s                  1083
+titlecase_s_sc                 1084
+titlecase_s                    1085
+join_s_s_p                     1086
+join_s_sc_p                    1087
+split_p_s_s                    1088
+split_p_sc_s                   1089
+split_p_s_sc                   1090
+split_p_sc_sc                  1091
+charset_i_s                    1092
+charset_i_sc                   1093
+charsetname_s_i                1094
+charsetname_s_ic               1095
+find_charset_i_s               1096
+find_charset_i_sc              1097
+trans_charset_s_i              1098
+trans_charset_s_ic             1099
+trans_charset_s_s_i            1100
+trans_charset_s_sc_i           1101
+trans_charset_s_s_ic           1102
+trans_charset_s_sc_ic          1103
+encoding_i_s                   1104
+encoding_i_sc                  1105
+encodingname_s_i               1106
+encodingname_s_ic              1107
+find_encoding_i_s              1108
+find_encoding_i_sc             1109
+trans_encoding_s_i             1110
+trans_encoding_s_ic            1111
+trans_encoding_s_s_i           1112
+trans_encoding_s_sc_i          1113
+trans_encoding_s_s_ic          1114
+trans_encoding_s_sc_ic         1115
+is_cclass_i_i_s_i              1116
+is_cclass_i_ic_s_i             1117
+is_cclass_i_i_sc_i             1118
+is_cclass_i_ic_sc_i            1119
+is_cclass_i_i_s_ic             1120
+is_cclass_i_ic_s_ic            1121
+is_cclass_i_i_sc_ic            1122
+is_cclass_i_ic_sc_ic           1123
+find_cclass_i_i_s_i_i          1124
+find_cclass_i_ic_s_i_i         1125
+find_cclass_i_i_sc_i_i         1126
+find_cclass_i_ic_sc_i_i        1127
+find_cclass_i_i_s_ic_i         1128
+find_cclass_i_ic_s_ic_i        1129
+find_cclass_i_i_sc_ic_i        1130
+find_cclass_i_ic_sc_ic_i       1131
+find_cclass_i_i_s_i_ic         1132
+find_cclass_i_ic_s_i_ic        1133
+find_cclass_i_i_sc_i_ic        1134
+find_cclass_i_ic_sc_i_ic       1135
+find_cclass_i_i_s_ic_ic        1136
+find_cclass_i_ic_s_ic_ic       1137
+find_cclass_i_i_sc_ic_ic       1138
+find_cclass_i_ic_sc_ic_ic      1139
+find_not_cclass_i_i_s_i_i      1140
+find_not_cclass_i_ic_s_i_i     1141
+find_not_cclass_i_i_sc_i_i     1142
+find_not_cclass_i_ic_sc_i_i    1143
+find_not_cclass_i_i_s_ic_i     1144
+find_not_cclass_i_ic_s_ic_i    1145
+find_not_cclass_i_i_sc_ic_i    1146
+find_not_cclass_i_ic_sc_ic_i   1147
+find_not_cclass_i_i_s_i_ic     1148
+find_not_cclass_i_ic_s_i_ic    1149
+find_not_cclass_i_i_sc_i_ic    1150
+find_not_cclass_i_ic_sc_i_ic   1151
+find_not_cclass_i_i_s_ic_ic    1152
+find_not_cclass_i_ic_s_ic_ic   1153
+find_not_cclass_i_i_sc_ic_ic   1154
+find_not_cclass_i_ic_sc_ic_ic  1155
+escape_s_s                     1156
+compose_s_s                    1157
+compose_s_sc                   1158
+spawnw_i_s                     1159
+spawnw_i_sc                    1160
+spawnw_i_p                     1161
+err_i                          1162
+err_s                          1163
+err_s_i                        1164
+err_s_ic                       1165
+time_i                         1166
+time_n                         1167
+gmtime_s_i                     1168
+gmtime_s_ic                    1169
+localtime_s_i                  1170
+localtime_s_ic                 1171
+decodetime_p_i                 1172
+decodetime_p_ic                1173
+decodelocaltime_p_i            1174
+decodelocaltime_p_ic           1175
+sysinfo_s_i                    1176
+sysinfo_s_ic                   1177
+sysinfo_i_i                    1178
+sysinfo_i_ic                   1179
+sleep_i                        1180
+sleep_ic                       1181
+sleep_n                        1182
+sleep_nc                       1183
+sizeof_i_i                     1184
+sizeof_i_ic                    1185
+store_lex_s_p                  1186
+store_lex_sc_p                 1187
+find_lex_p_s                   1188
+find_lex_p_sc                  1189
+get_namespace_p                1190
+get_namespace_p_p              1191
+get_namespace_p_pc             1192
+get_hll_namespace_p            1193
+get_hll_namespace_p_p          1194
+get_hll_namespace_p_pc         1195
+get_root_namespace_p           1196
+get_root_namespace_p_p         1197
+get_root_namespace_p_pc        1198
+get_global_p_s                 1199
+get_global_p_sc                1200
+get_global_p_p_s               1201
+get_global_p_pc_s              1202
+get_global_p_p_sc              1203
+get_global_p_pc_sc             1204
+get_hll_global_p_s             1205
+get_hll_global_p_sc            1206
+get_hll_global_p_p_s           1207
+get_hll_global_p_pc_s          1208
+get_hll_global_p_p_sc          1209
+get_hll_global_p_pc_sc         1210
+get_root_global_p_s            1211
+get_root_global_p_sc           1212
+get_root_global_p_p_s          1213
+get_root_global_p_pc_s         1214
+get_root_global_p_p_sc         1215
+get_root_global_p_pc_sc        1216
+set_global_s_p                 1217
+set_global_sc_p                1218
+set_global_p_s_p               1219
+set_global_pc_s_p              1220
+set_global_p_sc_p              1221
+set_global_pc_sc_p             1222
+set_hll_global_s_p             1223
+set_hll_global_sc_p            1224
+set_hll_global_p_s_p           1225
+set_hll_global_pc_s_p          1226
+set_hll_global_p_sc_p          1227
+set_hll_global_pc_sc_p         1228
+set_root_global_s_p            1229
+set_root_global_sc_p           1230
+set_root_global_p_s_p          1231
+set_root_global_pc_s_p         1232
+set_root_global_p_sc_p         1233
+set_root_global_pc_sc_p        1234
+find_name_p_s                  1235
+find_name_p_sc                 1236

Modified: branches/strings/src/pmc/callsignature.pmc
==============================================================================
--- branches/strings/src/pmc/callsignature.pmc	(original)
+++ branches/strings/src/pmc/callsignature.pmc	Thu Jan 15 16:36:00 2009
@@ -57,7 +57,6 @@
         sig_struct->hash       = NULL;
         PMC_int_val(SELF)      = CAPTURE_DATA_SIZE;
         PObj_active_destroy_SET(SELF);
-        PObj_data_is_PMC_array_SET(SELF);
         PObj_custom_mark_SET(SELF);
     }
 
@@ -187,6 +186,9 @@
 
 */
     VTABLE void mark() {
+        PMC ** const data = PMC_data_typed(SELF, PMC **);
+        INTVAL i;
+
         if (PARROT_CALLSIGNATURE(SELF)) {
             Parrot_CallSignature_attributes * const attrs = PARROT_CALLSIGNATURE(SELF);
 
@@ -201,6 +203,13 @@
             if (attrs->short_sig)
                 pobject_lives(interp, (PObj*)attrs->short_sig);
         }
+
+        if (!data)
+            return;
+
+        for (i = PMC_int_val(SELF) - 1; i >= 0; --i)
+            if (data[i])
+                pobject_lives(interp, (PObj *)data[i]);
     }
 
 

Modified: branches/strings/src/pmc/capture.pmc
==============================================================================
--- branches/strings/src/pmc/capture.pmc	(original)
+++ branches/strings/src/pmc/capture.pmc	Thu Jan 15 16:36:00 2009
@@ -54,7 +54,7 @@
         capture->hash           = NULL;
         PMC_int_val(SELF)       = CAPTURE_DATA_SIZE;
         PObj_active_destroy_SET(SELF);
-        PObj_data_is_PMC_array_SET(SELF);
+        PObj_custom_mark_SET(SELF);
     }
 
     VTABLE void destroy() {
@@ -509,6 +509,28 @@
 
 /*
 
+=item C<void mark(void)>
+
+Mark the array.
+
+=cut
+
+*/
+
+    VTABLE void mark() {
+        PMC ** const data = PMC_data_typed(SELF, PMC **);
+        INTVAL i;
+
+        if (!data)
+            return;
+
+        for (i = PMC_int_val(SELF) - 1; i >= 0; --i)
+            if (data[i])
+                pobject_lives(interp, (PObj *)data[i]);
+    }
+
+/*
+
 =back
 
 =head2 Methods

Modified: branches/strings/src/pmc/class.pmc
==============================================================================
--- branches/strings/src/pmc/class.pmc	(original)
+++ branches/strings/src/pmc/class.pmc	Thu Jan 15 16:36:00 2009
@@ -80,10 +80,6 @@
 A cache of visible attribute names to attribute indexes.
 A Null PMC is allocated during initialization.
 
-=item C<vtable_cache>
-
-Cache of the vtable used for objects (only STM).
-
 =item C<resolve_method>
 
 A list of method names the class provides used for name conflict resolution.
@@ -429,7 +425,6 @@
     ATTR PMC *attrib_metadata;  /* Hash of attributes in this class to hashes of metadata. */
     ATTR PMC *attrib_index;     /* Lookup table for attributes in this and parents. */
     ATTR PMC *attrib_cache;     /* Cache of visible attrib names to indexes. */
-    ATTR PMC *vtable_cache;     /* Cache of the vtable used for objects (only STM). */
     ATTR PMC *resolve_method;   /* List of method names the class provides to resolve
                                  * conflicts with methods from roles. */
     ATTR PMC *parent_overrides;
@@ -468,7 +463,6 @@
         _class->attrib_metadata = pmc_new(interp, enum_class_Hash);
         _class->attrib_index    = PMCNULL;
         _class->attrib_cache    = PMCNULL;
-        _class->vtable_cache    = PMCNULL; /* only used for STM */
         _class->resolve_method  = pmc_new(interp, enum_class_ResizablePMCArray);
 
         _class->vtable_overrides = pmc_new(interp, enum_class_Hash);

Modified: branches/strings/src/pmc/deleg_pmc.pmc
==============================================================================
--- branches/strings/src/pmc/deleg_pmc.pmc	(original)
+++ branches/strings/src/pmc/deleg_pmc.pmc	Thu Jan 15 16:36:00 2009
@@ -42,11 +42,7 @@
     }
 
     VTABLE void mark() {
-        /* don't pass that on
-         *
-         * NB objects have the flag PObj_data_is_PMC_array_FLAG set,
-         * marking is done internally in src/gc/api.c
-         */
+        /* don't pass that on */
     }
 
     VTABLE void destroy() {

Modified: branches/strings/src/pmc/fixedintegerarray.pmc
==============================================================================
--- branches/strings/src/pmc/fixedintegerarray.pmc	(original)
+++ branches/strings/src/pmc/fixedintegerarray.pmc	Thu Jan 15 16:36:00 2009
@@ -59,7 +59,7 @@
     VTABLE PMC *new_from_string(STRING *rep, INTVAL flags) {
         const INTVAL type = SELF->vtable->base_type;
         INTVAL  n, elem, i, l;
-        char   *p, *start;
+        char   *source, *p, *start;
         int     base;
 
         if (flags & PObj_constant_FLAG)
@@ -76,22 +76,28 @@
             Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_ENCODING,
                     "unhandled string encoding in constructor");
 
+        source = string_to_cstring(interp, rep);
+
         /* "()" - no args */
-        if (l <= 2 && ((char *)rep->strstart)[0] == '(')
+        if (l <= 2 && *source == '(') {
+            string_cstring_free(source);
             return SELF;
+        }
 
         /* count commas */
-        p = rep->strstart;
-        for (i = l, n = 0; i; --i, ++p) {
+        p = source;
+        n = 0;
+        while (*p) {
             if (*p == ',')
                 ++n;
+            p++;
         }
 
         /* presize the array */
         SELF.set_integer_native(n + 1);
 
         /* parse string */
-        p = rep->strstart;
+        p = source;
 
         for (i = l, n = 0; i; --i, ++p) {
             switch (*p) {
@@ -127,6 +133,7 @@
             }
         }
 
+        string_cstring_free(source);
         return SELF;
     }
 

Modified: branches/strings/src/pmc/fixedpmcarray.pmc
==============================================================================
--- branches/strings/src/pmc/fixedpmcarray.pmc	(original)
+++ branches/strings/src/pmc/fixedpmcarray.pmc	Thu Jan 15 16:36:00 2009
@@ -65,7 +65,7 @@
         PMC_int_val(SELF) = 0;
         PMC_data(SELF)    = NULL;
         PObj_active_destroy_SET(SELF);
-        PObj_data_is_PMC_array_SET(SELF);
+        PObj_custom_mark_SET(SELF);
     }
 
 /*
@@ -104,7 +104,7 @@
             PMC_int_val(dest) = size;
             PMC_data(dest)    = mem_allocate_n_typed(size, PMC *);
             mem_copy_n_typed(PMC_data(dest), PMC_data(SELF), size, PMC *);
-            PObj_data_is_PMC_array_SET(dest);
+            PObj_custom_mark_SET(dest);
         }
 
         return dest;
@@ -412,7 +412,7 @@
         }
 
         PMC_int_val2(SELF) = size;
-        PObj_data_is_PMC_array_SET(SELF);
+        PObj_custom_mark_SET(SELF);
     }
 /*
 
@@ -789,8 +789,32 @@
         return VTABLE_defined(INTERP, val);
     }
 
+/*
+
+=item C<void mark(void)>
+
+Mark the array.
+
+=cut
+
+*/
+
+    VTABLE void mark() {
+        PMC ** const data = PMC_data_typed(SELF, PMC **);
+        INTVAL i;
+
+        if (!data)
+            return;
+
+        for (i = PMC_int_val(SELF) - 1; i >= 0; --i)
+            if (data[i])
+                pobject_lives(interp, (PObj *)data[i]);
+    }
+
+
 }
 
+
 /*
 
 =back

Modified: branches/strings/src/pmc/object.pmc
==============================================================================
--- branches/strings/src/pmc/object.pmc	(original)
+++ branches/strings/src/pmc/object.pmc	Thu Jan 15 16:36:00 2009
@@ -791,7 +791,6 @@
         PMC *classobj;
         Parrot_Interp  master;
         INTVAL         type_num;
-        PMC           *vtable_cache = PMCNULL;
 
         if (PObj_is_PMC_shared_TEST(SELF))
             return SELF;
@@ -800,17 +799,6 @@
         classobj = VTABLE_get_class(INTERP, SELF);
         type_num = SELF->vtable->base_type;
 
-        /* keep the original vtable from going away... */
-        vtable_cache = PARROT_CLASS(classobj)->vtable_cache;
-        if (PMC_IS_NULL(vtable_cache)) {
-            vtable_cache = pmc_new(INTERP, enum_class_VtableCache);
-            PMC_struct_val(vtable_cache) = INTERP->vtables[type_num];
-            PARROT_CLASS(classobj)->vtable_cache = vtable_cache;
-        }
-
-        add_pmc_sync(INTERP, vtable_cache);
-        PObj_is_PMC_shared_SET(vtable_cache);
-
         /* make sure metadata doesn't go away unexpectedly */
         if (PMC_metadata(pmc))
             PMC_metadata(pmc) = pt_shared_fixup(interp, PMC_metadata(pmc));
@@ -860,7 +848,18 @@
 */
 
     VTABLE void morph(INTVAL type) {
-        SUPER(type);
+		PMC    * const classobj = VTABLE_get_class(interp, SELF);
+        STRING * meth_name      = CONST_STRING(interp, "morph");
+        /* If there's a vtable override for 'morph' run that instead. */
+        PMC * const method = Parrot_oo_find_vtable_override(interp,
+                classobj, meth_name);
+
+        if (!PMC_IS_NULL(method)) {
+            STRING *typename = string_copy(interp, interp->vtables[type]->whoami);
+            Parrot_run_meth_fromc_args(interp, method, SELF, meth_name, "vS", typename);
+        }
+        else
+            SUPER(type);
     }
 }
 

Modified: branches/strings/src/pmc/packfilefixupentry.pmc
==============================================================================
--- branches/strings/src/pmc/packfilefixupentry.pmc	(original)
+++ branches/strings/src/pmc/packfilefixupentry.pmc	Thu Jan 15 16:36:00 2009
@@ -33,7 +33,8 @@
 
 */
     VTABLE STRING *get_string() {
-        Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED, "Not implemented yet.");
+        PackFile_FixupEntry *pfentry = PMC_data_typed(SELF, PackFile_FixupEntry *);
+        return string_from_cstring(interp, pfentry->name, strlen(pfentry->name));
     }
 
 /*
@@ -60,7 +61,8 @@
 
 */
     VTABLE INTVAL get_integer() {
-        Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED, "Not implemented yet.");
+        PackFile_FixupEntry *pfentry = PMC_data_typed(SELF, PackFile_FixupEntry *);
+        return pfentry->offset;
     }
 
 
@@ -87,8 +89,10 @@
 =cut
 
 */
-    INTVAL get_type() {
-        Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED, "Not implemented yet.");
+    METHOD get_type() {
+        PackFile_FixupEntry *pfentry = PMC_data_typed(SELF, PackFile_FixupEntry *);
+        int rv = pfentry->type;
+        RETURN(INTVAL rv);
     }
 
 

Modified: branches/strings/src/pmc/packfilefixuptable.pmc
==============================================================================
--- branches/strings/src/pmc/packfilefixuptable.pmc	(original)
+++ branches/strings/src/pmc/packfilefixuptable.pmc	Thu Jan 15 16:36:00 2009
@@ -39,7 +39,8 @@
 
 */
     VTABLE INTVAL elements() {
-        Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED, "Not implemented yet.");
+        PackFile_FixupTable *pftable = PMC_data_typed(SELF, PackFile_FixupTable *);
+        return pftable->fixup_count;
     }
 
 
@@ -53,7 +54,14 @@
 
 */
     VTABLE PMC *get_pmc_keyed_int(INTVAL index)  {
-        Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED, "Not implemented yet.");
+        PackFile_FixupTable *pftable = PMC_data_typed(SELF, PackFile_FixupTable *);
+        PMC *rv;
+        if (index < 0 || index >= pftable->fixup_count)
+            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_OUT_OF_BOUNDS,
+                    "Requested data out of range.");
+        rv = pmc_new(interp, enum_class_PackfileFixupEntry);
+        PMC_data(rv) = pftable->fixups[index];
+        return rv;
     }
 
 

Modified: branches/strings/src/pmc/parrotrunningthread.pmc
==============================================================================
--- branches/strings/src/pmc/parrotrunningthread.pmc	(original)
+++ branches/strings/src/pmc/parrotrunningthread.pmc	Thu Jan 15 16:36:00 2009
@@ -82,6 +82,8 @@
 
 Change the thread ID we refer to to C<new_tid>.
 
+=cut
+
 */
 
     VTABLE void set_integer_native(INTVAL new_tid) {

Modified: branches/strings/src/pmc/pmc.num
==============================================================================
--- branches/strings/src/pmc/pmc.num	(original)
+++ branches/strings/src/pmc/pmc.num	Thu Jan 15 16:36:00 2009
@@ -4,89 +4,88 @@
 
 # default must be 0
 
-default.pmc		0
+default.pmc    0
 
 # now utility PMCs that don't do MMD
 
-null.pmc		1
-env.pmc			2
-perlenv.pmc		3
-key.pmc			4
-random.pmc		5
-unmanagedstruct.pmc	6
-managedstruct.pmc	7
-delegate.pmc		8
-csub.pmc		9
-compiler.pmc		10
-exception.pmc		11
-version.pmc		12
-vtablecache.pmc		13
-parrotio.pmc		14
-parrotlibrary.pmc	15
-constparrotlibrary.pmc  16
-parrotinterpreter.pmc	17
-parrotthread.pmc	18
-lexpad.pmc		19
-timer.pmc		20
-pointer.pmc		21
+null.pmc    1
+env.pmc    2
+perlenv.pmc    3
+key.pmc    4
+random.pmc    5
+unmanagedstruct.pmc    6
+managedstruct.pmc    7
+delegate.pmc    8
+csub.pmc    9
+compiler.pmc    10
+exception.pmc    11
+version.pmc    12
+parrotio.pmc    13
+parrotlibrary.pmc    14
+constparrotlibrary.pmc    15
+parrotinterpreter.pmc    16
+parrotthread.pmc    17
+lexpad.pmc    18
+timer.pmc    19
+pointer.pmc    20
 
 # sub and subroutine like pmcs
 
-sub.pmc			22
-closure.pmc		23
-continuation.pmc	24
-retcontinuation.pmc	25
-exception_handler.pmc	26
-coroutine.pmc		27
-eval.pmc		28
-nci.pmc			29
+sub.pmc    21
+closure.pmc    22
+continuation.pmc    23
+retcontinuation.pmc    24
+exception_handler.pmc    25
+coroutine.pmc    26
+eval.pmc    27
+nci.pmc    28
 
 # scalars
 
-# abstract scalar.pmc		29
+# abstract scalar.pmc		28
 
 # base types
-float.pmc		30
-integer.pmc		31
-bigint.pmc              32
-complex.pmc             33
-string.pmc		34
+float.pmc    29
+integer.pmc    30
+bigint.pmc    31
+complex.pmc    32
+string.pmc    33
 
 # abstract perlscalar.pmc
-perlint.pmc		35
-perlnum.pmc		36
-perlstring.pmc		37
-perlundef.pmc		38
-boolean.pmc		39
+perlint.pmc    34
+perlnum.pmc    35
+perlstring.pmc    36
+perlundef.pmc    37
+boolean.pmc    38
 
-ref.pmc			40
-sharedref.pmc		41
+ref.pmc    39
+sharedref.pmc    40
 
 # arrays XXX this list isn't complete
 
-array.pmc		42
-fixedintegerarray.pmc	43
-intlist.pmc		44
-iterator.pmc		45
-perlarray.pmc		46
-pmcarray.pmc		47
-sarray.pmc		48
-constsarray.pmc 	49
-fixedstringarray.pmc		50
-multiarray.pmc		51
+array.pmc    41
+fixedintegerarray.pmc    42
+intlist.pmc    43
+iterator.pmc    44
+perlarray.pmc    45
+pmcarray.pmc    46
+sarray.pmc    47
+constsarray.pmc    48
+fixedstringarray.pmc    49
+multiarray.pmc    50
 
 
 # hashes
-hash.pmc		52
-perlhash.pmc		53
-orderedhash.pmc		54
+hash.pmc    51
+perlhash.pmc    52
+orderedhash.pmc    53
 
 # other
 
-tqueue.pmc		55
+tqueue.pmc    54
 
-parrotclass.pmc		56
-parrotobject.pmc	57
+parrotclass.pmc    55
+parrotobject.pmc    56
 
-os.pmc                  58
-file.pmc                59
+os.pmc    57
+file.pmc    58

Modified: branches/strings/src/pmc/undef.pmc
==============================================================================
--- branches/strings/src/pmc/undef.pmc	(original)
+++ branches/strings/src/pmc/undef.pmc	Thu Jan 15 16:36:00 2009
@@ -26,7 +26,7 @@
 #include "parrot/parrot.h"
 #define UNDEF_STRING_CLASS enum_class_String
 
-pmclass Undef extends default no_ro {
+pmclass Undef no_ro {
 
 /*
 

Modified: branches/strings/src/pmc/unmanagedstruct.pmc
==============================================================================
--- branches/strings/src/pmc/unmanagedstruct.pmc	(original)
+++ branches/strings/src/pmc/unmanagedstruct.pmc	Thu Jan 15 16:36:00 2009
@@ -643,7 +643,7 @@
     return toff;
 }
 
-pmclass UnManagedStruct extends default need_ext no_ro {
+pmclass UnManagedStruct need_ext no_ro {
 
 /*
 

Modified: branches/strings/t/codingstd/c_arg_assert.t
==============================================================================
--- branches/strings/t/codingstd/c_arg_assert.t	(original)
+++ branches/strings/t/codingstd/c_arg_assert.t	Thu Jan 15 16:36:00 2009
@@ -1,11 +1,11 @@
 #! perl
-# Copyright (C) 2008, The Perl Foundation.
+# Copyright (C) 2008-2009, The Perl Foundation.
 # $Id$
 
 use strict;
 use warnings;
-
 use lib qw( . lib ../lib ../../lib );
+
 use Test::More tests => 2;
 use Parrot::Distribution;
 
@@ -22,6 +22,7 @@
 
 Finds all the argument guards generated by headerizer (asserts to enforce the
 non-NULLness of specially marked pointers) are actually used.
+Verifies that macros are invoked on a sane position.
 
 =head1 SEE ALSO
 
@@ -35,47 +36,51 @@
 
 sub check_asserts {
     my @files = @_;
+
     my @defines;
     my %usages;
-    my @offsets;
+    my @misplaced;
 
-    # first, find the definitions and the usages
-    diag("finding definitions");
+    # first, find the definitions and the usages in all files
+    diag('finding macro definitions and invocations');
     foreach my $file (@files) {
-        my $path  = $file->path();
-        my @lines = ($file->read());
+        my $path     = $file->path();
+        my @lines    = $file->read();
+        my $fulltext = join('', @lines);
         foreach my $line (@lines) {
-            if($line =~ /^#define ASSERT_ARGS_([_a-zA-Z0-9]+)\s/s) {
-                push(@defines, [$1, $path] );
+            if ( my ($func) = $line =~ m/^#define ASSERT_ARGS_([_a-zA-Z0-9]+)\s/s ) {
+                push @defines, [$func, $path];
             }
-            if($line =~ /^\s+ASSERT_ARGS\(([_a-zA-Z0-9]+)\)$/) {
-                my $func = $1;
+            
+            if ( my ($func) = $line =~ m/^\s+ASSERT_ARGS\(([_a-zA-Z0-9]+)\)$/ ) {
                 $usages{$func} = 1;
-                my $fulltext = join('',@lines);
-                if($fulltext !~ /\n\{\s*ASSERT_ARGS\($func\)\n/s) {
-                    push(@offsets, $func);
+
+                # The ASSERT_ARGS macro needs to follow an opening curly bracket
+                if ($fulltext !~ m/\n\{\s*ASSERT_ARGS\($func\)\n/s) {
+                    push @misplaced, [$func, $path];
                 }
             }
         }
     }
 
     # next, cross reference them.
-    my @missing = grep { !exists($usages{$_->[0]}) } @defines;
-    ok(!scalar @missing);
-    if(scalar @missing) {
-        diag("unused assert macros found:");
-        foreach my $missing (sort { $a->[1] . $a->[0] cmp $b->[1] . $b->[0]} @missing) {
-            diag($missing->[1] . ": " . $missing->[0]);
+    my @missing = grep { ! exists($usages{$_->[0]}) } @defines;
+    ok(! @missing, 'no unused assert macros');
+    if (@missing) {
+        diag('unused assert macros found:');
+        foreach (sort { $a->[1] . $a->[0] cmp $b->[1] . $b->[0]} @missing) {
+            diag($_->[1] . ': ' . $_->[0]);
         }
-        diag(scalar(@missing) . " unused assert macros found in total.");
+        diag(scalar(@missing) . ' unused assert macros found in total.');
     }
-    ok(!scalar @offsets);
-    if(scalar @offsets) {
-        diag("The following macros exist but aren't at the top of their function:");
-        foreach my $offset (sort @offsets) {
-            diag($offset);
+
+    ok(! @misplaced, 'macros used in correct position');
+    if (@misplaced) {
+        diag(q{The following macros exist but aren't at the top of their function:});
+        foreach (sort @misplaced) {
+            diag($_->[1] . ': ' . $_->[0]);
         }
-        diag(scalar(@offsets) . " offset macros found in total.");
+        diag(scalar(@misplaced) . ' misplaced macros found in total.');
     }
 }
 

Modified: branches/strings/t/codingstd/linelength.t
==============================================================================
--- branches/strings/t/codingstd/linelength.t	(original)
+++ branches/strings/t/codingstd/linelength.t	Thu Jan 15 16:36:00 2009
@@ -43,7 +43,6 @@
     APL
     cardinal
     dotnet
-    eclectus
     lazy-k
     lua
     m4

Modified: branches/strings/t/codingstd/perlcritic.t
==============================================================================
--- branches/strings/t/codingstd/perlcritic.t	(original)
+++ branches/strings/t/codingstd/perlcritic.t	Thu Jan 15 16:36:00 2009
@@ -45,7 +45,7 @@
     # they wish to be tested. Language developers: don't break the build!
 
     my $languages_dir = File::Spec->catdir( $PConfig{build_dir}, 'languages');
-    my $filter_languages = qr/^\Q$languages_dir$PConfig{slash}\E(?!eclectus|m4|pipp)/x;
+    my $filter_languages = qr/^\Q$languages_dir$PConfig{slash}\E(?!m4|pipp)/x;
 
     @files = grep {! m/$filter_languages/}
              map  { $_->path }

Modified: branches/strings/t/harness
==============================================================================
--- branches/strings/t/harness	(original)
+++ branches/strings/t/harness	Thu Jan 15 16:36:00 2009
@@ -22,6 +22,7 @@
     Usage
 );
 use Parrot::Harness::Smoke qw(
+    generate_html_smoke_report
     send_archive_to_smolder
     collect_test_environment_data
 );
@@ -92,6 +93,15 @@
     send_archive_to_smolder(%env_data) if $longopts->{send_to_smolder};
 
 }
+elsif ($longopts->{html}) {
+    generate_html_smoke_report(
+        {
+            tests => \@tests,
+            args  => $args,
+            file  => 'smoke.html',
+        }
+    );
+}
 else {
     eval { require TAP::Harness };
     if ($@) {
@@ -186,6 +196,10 @@
 
 Invoke parrot with '--gc-debug'.
 
+=item C<--html>
+
+Emit a C<smoke.html> file instead of displaying results.
+
 =item C<--code-tests>
 
 Run only the file metadata and basic coding standards tests.

Added: branches/strings/t/oo/vtableoverride.t
==============================================================================
--- (empty file)
+++ branches/strings/t/oo/vtableoverride.t	Thu Jan 15 16:36:00 2009
@@ -0,0 +1,55 @@
+#! parrot
+# Copyright (C) 2007, The Perl Foundation.
+# $Id: vtableoverride.t 35599 2009-01-10 02:01:58Z whiteknight $
+
+=head1 NAME
+
+t/oo/vtableoverride.t - test various vtable overrides from PIR
+
+=head1 SYNOPSIS
+
+    % prove t/oo/vtableoverride.t
+
+=head1 DESCRIPTION
+
+Tests the behavior of VTABLE interfaces that have been overriden from PIR.
+
+=cut
+
+.sub main :main
+    .include 'test_more.pir'
+    plan(2)
+    $P0 = newclass "MyObject"
+    $P1 = new $P0
+    
+    # Test get_string
+    $S0 = $P1
+    is($S0, "[MyObject]", "get_string VTABLE override")
+    
+    # Test morph (doesn't actually perform a morph)
+    morph $P1, "String"
+
+.end
+
+.namespace [ 'MyObject' ]
+
+.sub 'get_string' :vtable
+    $S0 = "[MyObject]"
+    .return($S0)
+.end
+
+.sub 'morph' :vtable
+    .param string type
+    $S0 = self
+    $S1 = "Morphing " . $S0
+    $S1 = $S1 . " to type "
+    $S1 = $S1 . type
+    is($S1, "Morphing [MyObject] to type String", "Morph vtable override")
+.end
+    
+
+# Local Variables:
+#   mode: pir
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:

Modified: branches/strings/t/pmc/packfileconstanttable.t
==============================================================================
--- branches/strings/t/pmc/packfileconstanttable.t	(original)
+++ branches/strings/t/pmc/packfileconstanttable.t	Thu Jan 15 16:36:00 2009
@@ -6,7 +6,7 @@
 use warnings;
 use lib qw( . lib ../lib ../../lib );
 use Test::More;
-use Parrot::Test tests => 2;
+use Parrot::Test tests => 3;
 use Parrot::Config;
 
 =head1 NAME
@@ -50,6 +50,23 @@
 EOF
 
 
+# sanity check we have a PackfileConstantTable
+
+pir_output_is( <<'CODE' . $get_uuid_pbc, <<'OUT', 'sanity' );
+.sub 'test' :main
+    .local pmc pf, pfdir, pftable
+    .local string name
+    pf      = _pbc()
+    pfdir   = pf.'get_directory'()
+    pftable = pfdir[2]
+    name    = typeof pftable
+    say name
+.end
+CODE
+PackfileConstantTable
+OUT
+
+
 # PackfileConstantTable.elements
 
 pir_output_is( <<'CODE' . $get_uuid_pbc, <<'OUT', 'elements' );
@@ -70,9 +87,9 @@
 OUT
 
 
-# PackfileRawSegment.get_integer_keyed_int
+# PackfileConstantTable.get_type and PackfileConstantTable.get_*_keyed_int
 
-pir_output_is( <<'CODE' . $get_uuid_pbc, <<'OUT', 'get_integer_keyed_int' );
+pir_output_is( <<'CODE' . $get_uuid_pbc, <<'OUT', 'get_type, get_*_keyed_int' );
 .sub 'test' :main
     .local pmc pf, pfdir, pftable
     .local int size, this, type

Added: branches/strings/t/pmc/packfilefixupentry.t
==============================================================================
--- (empty file)
+++ branches/strings/t/pmc/packfilefixupentry.t	Thu Jan 15 16:36:00 2009
@@ -0,0 +1,125 @@
+#!perl
+# Copyright (C) 2009, The Perl Foundation.
+# $Id$
+
+use strict;
+use warnings;
+use lib qw( . lib ../lib ../../lib );
+use Test::More;
+use Parrot::Test tests => 3;
+use Parrot::Config;
+
+=head1 NAME
+
+t/pmc/packfilefixupentry.t - test the PackfileFixupEntry PMC
+
+
+=head1 SYNOPSIS
+
+    % prove t/pmc/packfilefixupentry.t
+
+=head1 DESCRIPTION
+
+Tests the PackfileFixupEntry PMC.
+
+=cut
+
+# Having some known data would be helpful, here.  For now, just make sure
+# the values returned seem sane.
+
+# common setup code for later tests
+
+my $get_uuid_pbc = <<'EOF';
+
+.sub _pbc
+    .include "stat.pasm"
+    .include "interpinfo.pasm"
+    .local pmc pf, pio
+    pf   = new ['Packfile']
+    $S0  = interpinfo .INTERPINFO_RUNTIME_PREFIX
+    $S0 .= "/runtime/parrot/library/uuid.pbc"
+    $I0  = stat $S0, .STAT_FILESIZE
+    pio  = open $S0, 'r'
+    $S0  = read pio, $I0
+    close pio
+    pf   = $S0
+    .return(pf)
+.end
+EOF
+
+
+# sanity check we start with a PackfileFixupTable
+
+pir_output_is( <<'CODE' . $get_uuid_pbc, <<'OUT', 'sanity1' );
+.sub 'test' :main
+    .local pmc pf, pfdir, pftable
+    .local string name
+    pf      = _pbc()
+    pfdir   = pf.'get_directory'()
+    pftable = pfdir[1]
+    name    = typeof pftable
+    say name
+.end
+CODE
+PackfileFixupTable
+OUT
+
+
+# sanity check we end up with a PackfileFixupTable
+
+pir_output_is( <<'CODE' . $get_uuid_pbc, <<'OUT', 'sanity2' );
+.sub 'test' :main
+    .local pmc pf, pfdir, pftable, pfentry
+    .local string name
+    pf      = _pbc()
+    pfdir   = pf.'get_directory'()
+    pftable = pfdir[1]
+    pfentry = pftable[0]
+    name    = typeof pfentry
+    say name
+.end
+CODE
+PackfileFixupEntry
+OUT
+
+
+# PackfileFixupEntry methods .get_string(), .get_integer(), .get_type()
+
+pir_output_is( <<'CODE' . $get_uuid_pbc, <<'OUT', 'sanity' );
+.sub 'test' :main
+    .local pmc pf, pfdir, pftable, pfentry
+    .local int size, this, data
+    .local string name, label
+    pf      = _pbc()
+    pfdir   = pf.'get_directory'()
+    pftable = pfdir[1]
+    size    = elements pftable
+    this    = 0
+    LOOP:
+    pfentry = pftable[this]
+    name    = typeof pfentry
+    eq name, "PackfileFixupEntry", NEXT
+    print "PackfileFixupTable["
+    print this
+    print "] returned an object of type: "
+    say name
+    goto DONE
+    NEXT:
+    this = this + 1
+    ge this, size, DONE
+    goto LOOP
+    gt size, 0, DONE
+    DONE:
+    say 'done.'
+.end
+CODE
+done.
+OUT
+
+
+# Local Variables:
+#   mode: cperl
+#   cperl-indent-level: 4
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:

Added: branches/strings/t/pmc/packfilefixuptable.t
==============================================================================
--- (empty file)
+++ branches/strings/t/pmc/packfilefixuptable.t	Thu Jan 15 16:36:00 2009
@@ -0,0 +1,128 @@
+#!perl
+# Copyright (C) 2009, The Perl Foundation.
+# $Id$
+
+use strict;
+use warnings;
+use lib qw( . lib ../lib ../../lib );
+use Test::More;
+use Parrot::Test tests => 3;
+use Parrot::Config;
+
+=head1 NAME
+
+t/pmc/packfilefixuptable.t - test the PackfileFixupTable PMC
+
+
+=head1 SYNOPSIS
+
+    % prove t/pmc/packfilefixuptable.t
+
+=head1 DESCRIPTION
+
+Tests the PackfileFixupTable PMC.
+
+=cut
+
+# Having some known data would be helpful, here.  For now, just make sure
+# the values returned have the right types.
+
+
+# common setup code for later tests
+
+my $get_uuid_pbc = <<'EOF';
+
+.sub _pbc
+    .include "stat.pasm"
+    .include "interpinfo.pasm"
+    .local pmc pf, pio
+    pf   = new ['Packfile']
+    $S0  = interpinfo .INTERPINFO_RUNTIME_PREFIX
+    $S0 .= "/runtime/parrot/library/uuid.pbc"
+    $I0  = stat $S0, .STAT_FILESIZE
+    pio  = open $S0, 'r'
+    $S0  = read pio, $I0
+    close pio
+    pf   = $S0
+    .return(pf)
+.end
+EOF
+
+
+# sanity check we have a PackfileFixupTable
+
+pir_output_is( <<'CODE' . $get_uuid_pbc, <<'OUT', 'sanity' );
+.sub 'test' :main
+    .local pmc pf, pfdir, pftable
+    .local string name
+    pf      = _pbc()
+    pfdir   = pf.'get_directory'()
+    pftable = pfdir[1]
+    name    = typeof pftable
+    say name
+.end
+CODE
+PackfileFixupTable
+OUT
+
+
+# PackfileFixupTable.elements
+
+pir_output_is( <<'CODE' . $get_uuid_pbc, <<'OUT', 'elements' );
+.sub 'test' :main
+    .local pmc pf, pfdir, pftable
+    .local int size
+    pf      = _pbc()
+    pfdir   = pf.'get_directory'()
+    pftable = pfdir[1]
+    size    = elements pftable
+    gt size, 0, DONE
+    say 'not '
+    DONE:
+    say 'greater'
+.end
+CODE
+greater
+OUT
+
+
+# PackfileFixupTable.get_pmc_keyed_int
+
+pir_output_is( <<'CODE' . $get_uuid_pbc, <<'OUT', 'get_pmc_keyed_int' );
+.sub 'test' :main
+    .local pmc pf, pfdir, pftable, pfentry
+    .local int size, this
+    .local string type
+    pf      = _pbc()
+    pfdir   = pf.'get_directory'()
+    pftable = pfdir[1]
+    size    = elements pftable
+    this    = 0
+    LOOP:
+    pfentry = pftable[this]
+    type    = typeof pfentry
+    eq type, "PackfileFixupEntry", NEXT
+    print "PackfileFixupTable["
+    print this
+    print "] returned an object of type: "
+    say type
+    goto DONE
+    NEXT:
+    this = this + 1
+    ge this, size, DONE
+    goto LOOP
+    gt size, 0, DONE
+    DONE:
+    say 'done.'
+.end
+CODE
+done.
+OUT
+
+
+# Local Variables:
+#   mode: cperl
+#   cperl-indent-level: 4
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:

Modified: branches/strings/t/pmc/pmc.t
==============================================================================
--- branches/strings/t/pmc/pmc.t	(original)
+++ branches/strings/t/pmc/pmc.t	Thu Jan 15 16:36:00 2009
@@ -49,7 +49,7 @@
 my $checkTypes;
 my %types_we_cant_test
     = map { $_ => 1; } (    # These require initializers.
-    qw(Null Iterator Enumerate Ref STMRef SharedRef
+    qw(Null Iterator Enumerate Ref SharedRef
         ParrotObject ParrotThread
         deleg_pmc BigInt LexInfo LexPad Slice Object),
 

Modified: branches/strings/t/steps/auto_pmc-01.t
==============================================================================
--- branches/strings/t/steps/auto_pmc-01.t	(original)
+++ branches/strings/t/steps/auto_pmc-01.t	Thu Jan 15 16:36:00 2009
@@ -146,7 +146,7 @@
 ########## --pmc ##########
 
 my @dummy_options = qw(
-default.pmc null.pmc env.pmc key.pmc random.pmc unmanagedstruct.pmc managedstruct.pmc delegate.pmc exception.pmc vtablecache.pmc parrotlibrary.pmc parrotinterpreter.pmc parrotthread.pmc lexpad.pmc timer.pmc pointer.pmc sub.pmc continuation.pmc retcontinuation.pmc exceptionhandler.pmc coroutine.pmc eval.pmc nci.pmc float.pmc integer.pmc bigint.pmc complex.pmc string.pmc boolean.pmc ref.pmc sharedref.pmc array.pmc fixedintegerarray.pmc intlist.pmc iterator.pmc sarray.pmc fixedstringarray.pmc multiarray.pmc hash.pmc orderedhash.pmc tqueue.pmc os.pmc file.pmc addrregistry.pmc bound_nci.pmc capture.pmc class.pmc codestring.pmc deleg_pmc.pmc enumerate.pmc exporter.pmc fixedbooleanarray.pmc fixedfloatarray.pmc fixedpmcarray.pmc lexinfo.pmc multisub.pmc namespace.pmc object.pmc pair.pmc parrotrunningthread.pmc pccmethod_test.pmc pmcproxy.pmc resizablebooleanarray.pmc resizablefloatarray.pmc resizableintegerarray.pmc resizablepmcarray.pmc resizablestringarray.pmc role.pmc scalar.pmc 
 scheduler.pmc slice.pmc stmlog.pmc stmref.pmc stmvar.pmc task.pmc undef.pmc
+default.pmc null.pmc env.pmc key.pmc random.pmc unmanagedstruct.pmc managedstruct.pmc delegate.pmc exception.pmc parrotlibrary.pmc parrotinterpreter.pmc parrotthread.pmc lexpad.pmc timer.pmc pointer.pmc sub.pmc continuation.pmc retcontinuation.pmc exceptionhandler.pmc coroutine.pmc eval.pmc nci.pmc float.pmc integer.pmc bigint.pmc complex.pmc string.pmc boolean.pmc ref.pmc sharedref.pmc array.pmc fixedintegerarray.pmc intlist.pmc iterator.pmc sarray.pmc fixedstringarray.pmc multiarray.pmc hash.pmc orderedhash.pmc tqueue.pmc os.pmc file.pmc addrregistry.pmc bound_nci.pmc capture.pmc class.pmc codestring.pmc deleg_pmc.pmc enumerate.pmc exporter.pmc fixedbooleanarray.pmc fixedfloatarray.pmc fixedpmcarray.pmc lexinfo.pmc multisub.pmc namespace.pmc object.pmc pair.pmc parrotrunningthread.pmc pccmethod_test.pmc pmcproxy.pmc resizablebooleanarray.pmc resizablefloatarray.pmc resizableintegerarray.pmc resizablepmcarray.pmc resizablestringarray.pmc role.pmc scalar.pmc scheduler.pmc sl
 ice.pmc task.pmc undef.pmc
 );
 my $dummy_options = join q{ } => @dummy_options;
 
@@ -168,7 +168,7 @@
 
 @dummy_options = qw(
 default.pmc null.pmc env.pmc key.pmc random.pmc unmanagedstruct.pmc
-managedstruct.pmc delegate.pmc constexception.pmc vtablecache.pmc parrotlibrary.pmc parrotinterpreter.pmc parrotthread.pmc lexpad.pmc timer.pmc pointer.pmc sub.pmc continuation.pmc retcontinuation.pmc exceptionhandler.pmc coroutine.pmc eval.pmc nci.pmc float.pmc integer.pmc bigint.pmc complex.pmc string.pmc boolean.pmc ref.pmc sharedref.pmc array.pmc fixedintegerarray.pmc intlist.pmc iterator.pmc sarray.pmc fixedstringarray.pmc multiarray.pmc hash.pmc orderedhash.pmc tqueue.pmc os.pmc file.pmc addrregistry.pmc bound_nci.pmc capture.pmc class.pmc codestring.pmc deleg_pmc.pmc enumerate.pmc exporter.pmc fixedbooleanarray.pmc fixedfloatarray.pmc fixedpmcarray.pmc lexinfo.pmc multisub.pmc namespace.pmc object.pmc pair.pmc parrotrunningthread.pmc pccmethod_test.pmc pmcproxy.pmc resizablebooleanarray.pmc resizablefloatarray.pmc resizableintegerarray.pmc resizablepmcarray.pmc resizablestringarray.pmc role.pmc scalar.pmc scheduler.pmc slice.pmc stmlog.pmc stmref.pmc stmvar.pmc task.p
 mc undef.pmc
+managedstruct.pmc delegate.pmc constexception.pmc parrotlibrary.pmc parrotinterpreter.pmc parrotthread.pmc lexpad.pmc timer.pmc pointer.pmc sub.pmc continuation.pmc retcontinuation.pmc exceptionhandler.pmc coroutine.pmc eval.pmc nci.pmc float.pmc integer.pmc bigint.pmc complex.pmc string.pmc boolean.pmc ref.pmc sharedref.pmc array.pmc fixedintegerarray.pmc intlist.pmc iterator.pmc sarray.pmc fixedstringarray.pmc multiarray.pmc hash.pmc orderedhash.pmc tqueue.pmc os.pmc file.pmc addrregistry.pmc bound_nci.pmc capture.pmc class.pmc codestring.pmc deleg_pmc.pmc enumerate.pmc exporter.pmc fixedbooleanarray.pmc fixedfloatarray.pmc fixedpmcarray.pmc lexinfo.pmc multisub.pmc namespace.pmc object.pmc pair.pmc parrotrunningthread.pmc pccmethod_test.pmc pmcproxy.pmc resizablebooleanarray.pmc resizablefloatarray.pmc resizableintegerarray.pmc resizablepmcarray.pmc resizablestringarray.pmc role.pmc scalar.pmc scheduler.pmc slice.pmc task.pmc undef.pmc
 );
 $dummy_options = join q{ } => @dummy_options;
 

Added: branches/strings/tools/dev/mk_gitignore.pl
==============================================================================
--- (empty file)
+++ branches/strings/tools/dev/mk_gitignore.pl	Thu Jan 15 16:36:00 2009
@@ -0,0 +1,48 @@
+##! perl
+# $Id$
+# Copyright (C) 2009, The Perl Foundation.
+
+use strict;
+use warnings;
+use lib qw| lib |;
+
+use Parrot::Manifest;
+
+my $script = $0;
+
+my $mani = Parrot::Manifest->new( { script => $script, } );
+
+my $print_str     = $mani->prepare_gitignore();
+$mani->print_gitignore($print_str);
+
+__END__
+
+=head1 NAME
+
+tools/dev/mk_manifest_and_skip.pl - Recreate MANIFEST and MANIFEST.SKIP
+
+=head1 SYNOPSIS
+
+    % perl tools/dev/mk_manifest_and_skip.pl
+
+=head1 DESCRIPTION
+
+Recreates MANIFEST and MANIFEST.SKIP from the subversion properties
+and the output of C<svn status>. .
+So far tested with svn 1.2.0 and svn 1.4.2.  This also worked with svk 1.08,
+but to keep our tasks manageable, we only guarantee support for Subversion.
+
+This won't work for git-svn.
+
+=head1 SEE ALSO
+
+Parrot::Manifest.
+
+=cut
+
+# Local Variables:
+#   mode: cperl
+#   cperl-indent-level: 4
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:

Modified: branches/strings/tools/dev/mk_language_shell.pl
==============================================================================
--- branches/strings/tools/dev/mk_language_shell.pl	(original)
+++ branches/strings/tools/dev/mk_language_shell.pl	Thu Jan 15 16:36:00 2009
@@ -287,18 +287,32 @@
 
 =cut
 
+.HLL '@lclang@'
+
 .namespace [ '@lang@';'Compiler' ]
 
 .loadlib '@lclang@_group'
 
-.sub 'onload' :anon :load :init
+.sub '' :anon :load :init
     load_bytecode 'PCT.pbc'
+    .local pmc parrotns, hllns, exports
+    parrotns = get_root_namespace ['parrot']
+    hllns = get_hll_namespace
+    exports = split ' ', 'PAST PCT PGE'
+    parrotns.'export_to'(hllns, exports)
+.end
+
+.include 'src/gen_grammar.pir'
+.include 'src/gen_actions.pir'
 
+.sub 'onload' :anon :load :init
     $P0 = get_hll_global ['PCT'], 'HLLCompiler'
     $P1 = $P0.'new'()
-    $P1.'language'('@lang@')
-    $P1.'parsegrammar'('@lang@::Grammar')
-    $P1.'parseactions'('@lang@::Grammar::Actions')
+    $P1.'language'('@lclang@')
+    $P0 = get_hll_namespace ['@lang@';'Grammar']
+    $P1.'parsegrammar'($P0)
+    $P0 = get_hll_namespace ['@lang@';'Grammar';'Actions']
+    $P1.'parseactions'($P0)
 .end
 
 =item main(args :slurpy)  :main
@@ -311,14 +325,11 @@
 .sub 'main' :main
     .param pmc args
 
-    $P0 = compreg '@lang@'
+    $P0 = compreg '@lclang@'
     $P1 = $P0.'command_line'(args)
 .end
 
-
 .include 'src/gen_builtins.pir'
-.include 'src/gen_grammar.pir'
-.include 'src/gen_actions.pir'
 
 =back
 
@@ -412,7 +423,7 @@
 class @lang@::Grammar::Actions;
 
 method TOP($/) {
-    my $past := PAST::Block.new( :blocktype('declaration'), :node( $/ ) );
+    my $past := PAST::Block.new( :blocktype('declaration'), :node( $/ ), :hll('@lclang@') );
     for $<statement> {
         $past.push( $( $_ ) );
     }

Modified: branches/strings/tools/dev/mk_manifest_and_skip.pl
==============================================================================
--- branches/strings/tools/dev/mk_manifest_and_skip.pl	(original)
+++ branches/strings/tools/dev/mk_manifest_and_skip.pl	Thu Jan 15 16:36:00 2009
@@ -1,10 +1,11 @@
 ##! perl
 # $Id$
-# Copyright (C) 2006-2007, The Perl Foundation.
+# Copyright (C) 2006-2009, The Perl Foundation.
 
 use strict;
 use warnings;
-use lib (qw| lib |);
+use lib qw| lib |;
+
 use Parrot::Manifest;
 
 my $script = $0;
@@ -31,10 +32,13 @@
 
 =head1 DESCRIPTION
 
-Recreates MANIFEST and MANIFEST.SKIP from the svn directories.
+Recreates MANIFEST and MANIFEST.SKIP from the subversion properties
+and the output of C<svn status>. .
 So far tested with svn 1.2.0 and svn 1.4.2.  This also worked with svk 1.08,
 but to keep our tasks manageable, we only guarantee support for Subversion.
 
+This won't work for git-svn.
+
 =head1 SEE ALSO
 
 Parrot::Manifest.

Added: branches/strings/tools/dev/pmcrenumber.pl
==============================================================================
--- (empty file)
+++ branches/strings/tools/dev/pmcrenumber.pl	Thu Jan 15 16:36:00 2009
@@ -0,0 +1,64 @@
+#! perl
+# Copyright (C) 2009, The Perl Foundation.
+# $Id$
+
+use strict;
+use warnings;
+
+my $pmc_num_file = $ARGV[0];
+
+my $pmc_order = 0;
+my $pmc_num_contents;
+
+open my $pmc_num_fh, '<', $pmc_num_file;
+
+for (<$pmc_num_fh>) {
+    if (/^([\w]+)\.pmc\s+\d+$/) {
+        $pmc_num_contents .= "$1.pmc    $pmc_order\n";
+        $pmc_order++;
+    }
+    else {
+        $pmc_num_contents .= $_;
+    }
+}
+
+close $pmc_num_fh;
+open  $pmc_num_fh, '>', $pmc_num_file;
+print $pmc_num_fh $pmc_num_contents;
+close $pmc_num_fh;
+
+
+################### DOCUMENTATION ####################
+
+=head1 NAME
+
+tools/dev/pmcrenumber.pl - Renumber F<src/pmc/pmc.num>.
+
+=head1 SYNOPSIS
+
+    $ perl tools/dev/pmcrenumber.pl pmc.num
+
+=head1 DESCRIPTION
+
+This program should be used when adding or removing PMCs.
+
+=head1 SEE ALSO
+
+=over 4
+
+=item F<lib/Parrot/OpsRenumber.pm>.
+
+=back
+
+=head1 AUTHOR
+
+Christoph Otto
+
+=cut
+
+# Local Variables:
+#   mode: cperl
+#   cperl-indent-level: 4
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About