develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r33955 - in branches/rakudoreg: . compilers/imcc compilers/ncigen compilers/ncigen/lib/Parrot/Test compilers/ncigen/src compilers/ncigen/t/NCIGENAST compilers/pct/src/PAST compilers/pct/src/PCT compilers/pct/src/POST compilers/pge/PGE compile

From:
jonathan
Date:
December 16, 2008 08:22
Subject:
[svn:parrot] r33955 - in branches/rakudoreg: . compilers/imcc compilers/ncigen compilers/ncigen/lib/Parrot/Test compilers/ncigen/src compilers/ncigen/t/NCIGENAST compilers/pct/src/PAST compilers/pct/src/PCT compilers/pct/src/POST compilers/pge/PGE compile
Message ID:
20081216162131.6BD94CBA12@x12.develooper.com
Author: jonathan
Date: Tue Dec 16 08:21:24 2008
New Revision: 33955

Added:
   branches/rakudoreg/languages/pipp/ROADMAP
      - copied unchanged from r33953, /trunk/languages/pipp/ROADMAP
   branches/rakudoreg/languages/pipp/docs/pipp.pod
      - copied unchanged from r33953, /trunk/languages/pipp/docs/pipp.pod
   branches/rakudoreg/t/perl/testlib/
      - copied from r33953, /trunk/t/perl/testlib/
   branches/rakudoreg/t/perl/testlib/answer.pir
      - copied unchanged from r33953, /trunk/t/perl/testlib/answer.pir
   branches/rakudoreg/t/perl/testlib/hello
      - copied unchanged from r33953, /trunk/t/perl/testlib/hello
   branches/rakudoreg/t/perl/testlib/hello.pasm
      - copied unchanged from r33953, /trunk/t/perl/testlib/hello.pasm
Removed:
   branches/rakudoreg/languages/pipp/TODO
   branches/rakudoreg/languages/pipp/docs/overview.pod
   branches/rakudoreg/languages/pipp/t/php/strings.t
Modified:
   branches/rakudoreg/   (props changed)
   branches/rakudoreg/DEPRECATED.pod
   branches/rakudoreg/MANIFEST
   branches/rakudoreg/MANIFEST.SKIP
   branches/rakudoreg/NEWS
   branches/rakudoreg/compilers/imcc/imcc.y
   branches/rakudoreg/compilers/imcc/imcparser.c
   branches/rakudoreg/compilers/imcc/optimizer.c
   branches/rakudoreg/compilers/ncigen/NCIGENP6.pm   (props changed)
   branches/rakudoreg/compilers/ncigen/lib/Parrot/Test/NCIGENAST.pm   (props changed)
   branches/rakudoreg/compilers/ncigen/ncigen.pir   (props changed)
   branches/rakudoreg/compilers/ncigen/ncigen.pl   (props changed)
   branches/rakudoreg/compilers/ncigen/src/NCIGENAST.pir   (props changed)
   branches/rakudoreg/compilers/ncigen/t/NCIGENAST/   (props changed)
   branches/rakudoreg/compilers/pct/src/PAST/Compiler.pir
   branches/rakudoreg/compilers/pct/src/PCT/HLLCompiler.pir
   branches/rakudoreg/compilers/pct/src/PCT/Node.pir
   branches/rakudoreg/compilers/pct/src/POST/Compiler.pir
   branches/rakudoreg/compilers/pct/src/POST/Node.pir
   branches/rakudoreg/compilers/pge/PGE/Exp.pir
   branches/rakudoreg/compilers/pge/PGE/Perl6Regex.pir
   branches/rakudoreg/compilers/pirc/new/pircompunit.c
   branches/rakudoreg/compilers/pirc/new/pircompunit.h
   branches/rakudoreg/compilers/pirc/new/piremit.c
   branches/rakudoreg/compilers/pirc/new/pirregalloc.c
   branches/rakudoreg/compilers/pirc/new/pirregalloc.h
   branches/rakudoreg/compilers/pirc/new/pirsymbol.c
   branches/rakudoreg/compilers/pirc/new/pirsymbol.h
   branches/rakudoreg/compilers/pirc/t/heredoc.t
   branches/rakudoreg/docs/book/ch11_pmcs.pod
   branches/rakudoreg/docs/book/ch12_opcodes.pod
   branches/rakudoreg/docs/pdds/pdd22_io.pod
   branches/rakudoreg/docs/pdds/pdd23_exceptions.pod
   branches/rakudoreg/examples/benchmarks/addit.pir
   branches/rakudoreg/examples/benchmarks/fib.pir
   branches/rakudoreg/examples/tge/branch/transform.pir
   branches/rakudoreg/ext/SQLite3/DBDI.pm
   branches/rakudoreg/ext/SQLite3/DBDI/Driver/SQLite3.pm
   branches/rakudoreg/ext/SQLite3/gen_sqlite3.pl   (props changed)
   branches/rakudoreg/ext/SQLite3/t/test.p6   (props changed)
   branches/rakudoreg/languages/dotnet/src/translation.rules
   branches/rakudoreg/languages/dotnet/src/translator.pir
   branches/rakudoreg/languages/dotnet/t/args.t
   branches/rakudoreg/languages/dotnet/t/array.t
   branches/rakudoreg/languages/dotnet/t/bitwise.t
   branches/rakudoreg/languages/dotnet/t/box.t
   branches/rakudoreg/languages/dotnet/t/branch.t
   branches/rakudoreg/languages/dotnet/t/calling.t
   branches/rakudoreg/languages/dotnet/t/callvirt.t
   branches/rakudoreg/languages/dotnet/t/castclass.t
   branches/rakudoreg/languages/dotnet/t/compare.t
   branches/rakudoreg/languages/dotnet/t/conditional.t
   branches/rakudoreg/languages/dotnet/t/constants.t
   branches/rakudoreg/languages/dotnet/t/constructor.t
   branches/rakudoreg/languages/dotnet/t/conv.t
   branches/rakudoreg/languages/dotnet/t/convovf.t
   branches/rakudoreg/languages/dotnet/t/enum.t
   branches/rakudoreg/languages/dotnet/t/exceptions.t
   branches/rakudoreg/languages/dotnet/t/external.t
   branches/rakudoreg/languages/dotnet/t/field.t
   branches/rakudoreg/languages/dotnet/t/finally.t
   branches/rakudoreg/languages/dotnet/t/floatarray.t
   branches/rakudoreg/languages/dotnet/t/hierachy.t
   branches/rakudoreg/languages/dotnet/t/i8.t
   branches/rakudoreg/languages/dotnet/t/inheritance.t
   branches/rakudoreg/languages/dotnet/t/initializer.t
   branches/rakudoreg/languages/dotnet/t/intarray.t
   branches/rakudoreg/languages/dotnet/t/interface.t
   branches/rakudoreg/languages/dotnet/t/isinst.t
   branches/rakudoreg/languages/dotnet/t/locals.t
   branches/rakudoreg/languages/dotnet/t/loop.t
   branches/rakudoreg/languages/dotnet/t/math.t
   branches/rakudoreg/languages/dotnet/t/mathovf.t
   branches/rakudoreg/languages/dotnet/t/mp.t
   branches/rakudoreg/languages/dotnet/t/mp_pmc.t
   branches/rakudoreg/languages/dotnet/t/null.t
   branches/rakudoreg/languages/dotnet/t/overloading.t
   branches/rakudoreg/languages/dotnet/t/overloadprimitives.t
   branches/rakudoreg/languages/dotnet/t/recursion.t
   branches/rakudoreg/languages/dotnet/t/staticfield.t
   branches/rakudoreg/languages/dotnet/t/staticmethod.t
   branches/rakudoreg/languages/dotnet/t/string.t
   branches/rakudoreg/languages/dotnet/t/switch.t
   branches/rakudoreg/languages/dotnet/t/unsigned.t
   branches/rakudoreg/languages/dotnet/t/valuetypes.t
   branches/rakudoreg/languages/ecmascript/src/parser/actions.pm
   branches/rakudoreg/languages/ecmascript/src/parser/grammar.pg
   branches/rakudoreg/languages/ecmascript/t/00-comments.t   (props changed)
   branches/rakudoreg/languages/jako/lib/Jako/Construct/Block/Bare.pm
   branches/rakudoreg/languages/jako/lib/Jako/Construct/Block/Conditional.pm
   branches/rakudoreg/languages/jako/lib/Jako/Construct/Block/Loop.pm
   branches/rakudoreg/languages/lua/t/io.t
   branches/rakudoreg/languages/lua/t/test/bisect-output-win32.txt   (props changed)
   branches/rakudoreg/languages/pipp/   (props changed)
   branches/rakudoreg/languages/pipp/README
   branches/rakudoreg/languages/pipp/Test.php   (props changed)
   branches/rakudoreg/languages/pipp/docs/namespaces.pod   (props changed)
   branches/rakudoreg/languages/pipp/src/common/eval.pir   (props changed)
   branches/rakudoreg/languages/pipp/src/common/guts.pir   (props changed)
   branches/rakudoreg/languages/pipp/src/pmc/phpnull.pmc   (props changed)
   branches/rakudoreg/languages/pipp/t/in_php/array.t   (props changed)
   branches/rakudoreg/languages/pipp/t/php/string.t
   branches/rakudoreg/languages/pipp/t/php_qa_testsuite/   (props changed)
   branches/rakudoreg/languages/pipp/t/pmc/null.t   (props changed)
   branches/rakudoreg/lib/Parrot/Test.pm
   branches/rakudoreg/src/embed.c
   branches/rakudoreg/src/events.c
   branches/rakudoreg/src/exceptions.c
   branches/rakudoreg/src/io/socket_unix.c
   branches/rakudoreg/src/multidispatch.c
   branches/rakudoreg/src/ops/core.ops
   branches/rakudoreg/src/packfile.c
   branches/rakudoreg/src/pmc/capture.pmc
   branches/rakudoreg/src/pmc/exception.pmc
   branches/rakudoreg/src/pmc/filehandle.pmc
   branches/rakudoreg/src/pmc/namespace.pmc
   branches/rakudoreg/src/string.c
   branches/rakudoreg/src/tsq.c
   branches/rakudoreg/t/codingstd/perlcritic.t
   branches/rakudoreg/t/compilers/pct/complete_workflow.t
   branches/rakudoreg/t/dynoplibs/myops.t
   branches/rakudoreg/t/perl/Parrot_Test.t
   branches/rakudoreg/t/pmc/eval.t
   branches/rakudoreg/t/pmc/key.t

Log:
[rakudo] Oops, meant to commit all updates from trunk, not just the Rakudo ones...

Modified: branches/rakudoreg/DEPRECATED.pod
==============================================================================
--- branches/rakudoreg/DEPRECATED.pod	(original)
+++ branches/rakudoreg/DEPRECATED.pod	Tue Dec 16 08:21:24 2008
@@ -164,4 +164,17 @@
 
 =back
 
+=head1 Misc.
+
+=over 4
+
+=item 'make smoke' [post 0.8.2]
+
+The functionality currently provided by "make smoke" will be changing to
+be an alias for "make smolder_test". We're moving towards smolder as our
+single point of online test reporting, and will keep the make target to
+simplify the switch for anyone currently smoking parrot.  See RT #49276.
+
+=back
+
 =cut

Modified: branches/rakudoreg/MANIFEST
==============================================================================
--- branches/rakudoreg/MANIFEST	(original)
+++ branches/rakudoreg/MANIFEST	Tue Dec 16 08:21:24 2008
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Wed Dec 10 22:05:34 2008 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sun Dec 14 21:18:26 2008 UT
 #
 # See tools/dev/install_files.pl for documentation on the
 # format of this file.
@@ -1573,6 +1573,7 @@
 languages/ecmascript/src/builtin/builtins.pir               [ecmascript]
 languages/ecmascript/src/parser/actions.pm                  [ecmascript]
 languages/ecmascript/src/parser/grammar.pg                  [ecmascript]
+languages/ecmascript/t/00-comments.t                        [ecmascript]
 languages/ecmascript/t/01-literals.t                        [ecmascript]
 languages/ecmascript/t/harness                              [ecmascript]
 languages/forth/MAINTAINER                                  [forth]
@@ -2126,6 +2127,7 @@
 languages/perl6/src/classes/Abstraction.pir                 [perl6]
 languages/perl6/src/classes/Any.pir                         [perl6]
 languages/perl6/src/classes/Array.pir                       [perl6]
+languages/perl6/src/classes/Associative.pir                 [perl6]
 languages/perl6/src/classes/Block.pir                       [perl6]
 languages/perl6/src/classes/Bool.pir                        [perl6]
 languages/perl6/src/classes/Capture.pir                     [perl6]
@@ -2249,13 +2251,13 @@
 languages/pipp/Configure.pl                                 [pipp]
 languages/pipp/MAINTAINER                                   [pipp]
 languages/pipp/README                                       [pipp]
-languages/pipp/TODO                                         [pipp]
+languages/pipp/ROADMAP                                      [pipp]
 languages/pipp/Test.php                                     [pipp]
 languages/pipp/config/makefiles/root.in                     [pipp]
 languages/pipp/docs/antlr3.pod                              [pipp]
 languages/pipp/docs/extensions.pod                          [pipp]
 languages/pipp/docs/namespaces.pod                          [pipp]
-languages/pipp/docs/overview.pod                            [pipp]
+languages/pipp/docs/pipp.pod                                [pipp]
 languages/pipp/docs/testing.pod                             [pipp]
 languages/pipp/lib/Parrot/Test/Pipp.pm                      [pipp]
 languages/pipp/lib/Parrot/Test/Pipp/Antlr3.pm               [pipp]
@@ -2439,7 +2441,6 @@
 languages/pipp/t/php/selection.txt                          [pipp]
 languages/pipp/t/php/sha1.t                                 [pipp]
 languages/pipp/t/php/string.t                               [pipp]
-languages/pipp/t/php/strings.t                              [pipp]
 languages/pipp/t/php/superglobals.t                         [pipp]
 languages/pipp/t/php/tags.t                                 [pipp]
 languages/pipp/t/php/type.t                                 [pipp]
@@ -3485,6 +3486,9 @@
 t/perl/Parrot_IO.t                                          []
 t/perl/Parrot_Test.t                                        []
 t/perl/README                                               []
+t/perl/testlib/answer.pir                                   []
+t/perl/testlib/hello                                        []
+t/perl/testlib/hello.pasm                                   []
 t/pharness/01-default_tests.t                               []
 t/pharness/02-get_test_prog_args.t                          []
 t/pharness/03-handle_long_options.t                         []

Modified: branches/rakudoreg/MANIFEST.SKIP
==============================================================================
--- branches/rakudoreg/MANIFEST.SKIP	(original)
+++ branches/rakudoreg/MANIFEST.SKIP	Tue Dec 16 08:21:24 2008
@@ -1,6 +1,6 @@
 # ex: set ro:
 # $Id$
-# generated by tools/dev/mk_manifest_and_skip.pl Tue Dec  9 06:24:54 2008 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sat Dec 13 11:27:31 2008 UT
 #
 # This file should contain a transcript of the svn:ignore properties
 # of the directories in the Parrot subversion repository. (Needed for
@@ -1149,6 +1149,8 @@
 ^languages/pipp/pipp_phc_past\.pir/
 ^languages/pipp/pipp_phc_past\.xml$
 ^languages/pipp/pipp_phc_past\.xml/
+^languages/pipp/pipp_test_run\.tar\.gz$
+^languages/pipp/pipp_test_run\.tar\.gz/
 # generated from svn:ignore of 'languages/pipp/src/antlr3/'
 ^languages/pipp/src/antlr3/.*\.class$
 ^languages/pipp/src/antlr3/.*\.class/

Modified: branches/rakudoreg/NEWS
==============================================================================
--- branches/rakudoreg/NEWS	(original)
+++ branches/rakudoreg/NEWS	Tue Dec 16 08:21:24 2008
@@ -1,11 +1,22 @@
 # $Id$
 
 New in December 2008 Release
+- Implementation
+  + fixed lexical semantics
+  + added the 'capture_lex' opcode
+  + added automatic resume for nonfatal exceptions
 - Compilers
   + IMCC
     - removed undocumented .param int <stringc> => <ident> syntax
     - .line directive now only takes an integer argument
     - new .file directive to specify the file name being compiled
+  + PCT
+    - properly handles lexical generation and closure semantics
+    - uses :subid instead of name lookups to reference PAST::Block nodes
+    - added PAST::Control node type (exception handlers)
+  + PGE
+    - add support for <?{{...}}> and <!{{...}}> assertions
+    - Match objects use Capture PMC instead of Capture_PIR
   + PIRC
     - add macro handling to PASM mode
     - disable vanilla register allocation in PASM mode, but do allow optimization
@@ -13,16 +24,23 @@
     - first bits of bytecode generation. No sub calling/returning yet.
 - Languages
   + Rakudo
+    - fixed lexical handling and recursion
     - refactored subtypes implementation
     - support for quotes with multi-character delimiters
-    - implemented list slices
+    - implemented list slices (Positional role)
     - list assignment
     - reduction meta operators
     - hyper meta operators
     - cross meta operators
     - more builtin functions
+    - added Nil type
     - basic support for protos
     - iterator on filehandle objects
+    - basic support for exception handlers
+    - warn
+  + Lua
+    - added complex & mathx libraries
+    - merge LuaClosure & LuaFunction PMC
   + Pipp
     - added support for a return value from user defined functions
     - added incomplete implemention of 'require_once'
@@ -35,6 +53,7 @@
     - .yield (in .begin/end_yield) is now .set_yield
     - .return (in .begin/end_return) is now .set_return
     - .namespace x / .endnamespace x syntax is removed
+  + Capture_PIR (runtime/parrot/library/Parrot/Capture_PIR.pir)
 
 New in 0.8.1
 - Implementation
@@ -102,6 +121,7 @@
   + Tests
     - further improvements to parallel tests
     - tests no longer leave filesystem breadcrumbs
+    - more thorough testing of Parrot::Test itself
 
 New in 0.8.0
 - Implementation

Modified: branches/rakudoreg/compilers/imcc/imcc.y
==============================================================================
--- branches/rakudoreg/compilers/imcc/imcc.y	(original)
+++ branches/rakudoreg/compilers/imcc/imcc.y	Tue Dec 16 08:21:24 2008
@@ -295,7 +295,7 @@
     const int type_enum = atoi(type);
     const int ascii = (*constant == '\'' || *constant == '"');
     SymReg *rhs;
-    SymReg *r[2];
+    SymReg *r[3];
     char   *name;
 
     if (left->type == VTADDRESS) {      /* IDENTIFIER */
@@ -347,7 +347,7 @@
     ARGIN(const char *name), ARGMOD(SymReg *left), ARGIN(const char *constant))
 {
     SymReg *rhs;
-    SymReg *r[2];
+    SymReg *r[3];
     char   *const_name;
     const int ascii       = (*constant == '\'' || *constant == '"');
     char   *unquoted_name = str_dup(name + 1);

Modified: branches/rakudoreg/compilers/imcc/imcparser.c
==============================================================================
--- branches/rakudoreg/compilers/imcc/imcparser.c	(original)
+++ branches/rakudoreg/compilers/imcc/imcparser.c	Tue Dec 16 08:21:24 2008
@@ -619,7 +619,7 @@
     const int type_enum = atoi(type);
     const int ascii = (*constant == '\'' || *constant == '"');
     SymReg *rhs;
-    SymReg *r[2];
+    SymReg *r[3];
     char   *name;
 
     if (left->type == VTADDRESS) {      /* IDENTIFIER */
@@ -671,7 +671,7 @@
     ARGIN(const char *name), ARGMOD(SymReg *left), ARGIN(const char *constant))
 {
     SymReg *rhs;
-    SymReg *r[2];
+    SymReg *r[3];
     char   *const_name;
     const int ascii       = (*constant == '\'' || *constant == '"');
     char   *unquoted_name = str_dup(name + 1);
@@ -3171,8 +3171,8 @@
 
   case 53:
 #line 996 "compilers/imcc/imcc.y"
-    { 
-          IMCC_INFO(interp)->cur_call->pcc_sub->pragma = (yyvsp[(5) - (6)].t); 
+    {
+          IMCC_INFO(interp)->cur_call->pcc_sub->pragma = (yyvsp[(5) - (6)].t);
           if (!IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->subid) {
             IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->subid = str_dup(
             IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->name);

Modified: branches/rakudoreg/compilers/imcc/optimizer.c
==============================================================================
--- branches/rakudoreg/compilers/imcc/optimizer.c	(original)
+++ branches/rakudoreg/compilers/imcc/optimizer.c	Tue Dec 16 08:21:24 2008
@@ -1511,7 +1511,7 @@
 
     /* Unreachable instructions */
 
-    for (last = unit->instructions, ins=last->next;
+    for (last = unit->instructions, last && (ins = last->next);
          last && ins;
          ins = ins->next) {
         if ((last->type & IF_goto) && !(ins->type & ITLABEL) &&

Modified: branches/rakudoreg/compilers/pct/src/PAST/Compiler.pir
==============================================================================
--- branches/rakudoreg/compilers/pct/src/PAST/Compiler.pir	(original)
+++ branches/rakudoreg/compilers/pct/src/PAST/Compiler.pir	Tue Dec 16 08:21:24 2008
@@ -96,10 +96,41 @@
     ##  type of exception handler we support
     .local pmc controltypes
     controltypes = new 'Hash'
-    $P0 = split ' ', '.CONTROL_RETURN .CONTROL_OK .CONTROL_BREAK .CONTROL_CONTINUE .CONTROL_ERROR .CONTROL_TAKE .CONTROL_LOOP_NEXT .CONTROL_LOOP_LAST .CONTROL_LOOP_REDO'
+    $P0 = new 'ResizablePMCArray'
+    $P0.'push'(.CONTROL_RETURN)
+    $P0.'push'(.CONTROL_OK)
+    $P0.'push'(.CONTROL_BREAK)
+    $P0.'push'(.CONTROL_CONTINUE)
+    $P0.'push'(.CONTROL_ERROR)
+    $P0.'push'(.CONTROL_TAKE)
+    $P0.'push'(.CONTROL_LOOP_NEXT)
+    $P0.'push'(.CONTROL_LOOP_LAST)
+    $P0.'push'(.CONTROL_LOOP_REDO)
     controltypes['CONTROL']   = $P0
-    $P0 = split ' ', '.CONTROL_TAKE'
+    $P0 = new 'ResizablePMCArray'
+    $P0.'push'(.CONTROL_TAKE)
     controltypes['GATHER']   = $P0
+    $P0 = new 'ResizablePMCArray'
+    $P0.'push'(.CONTROL_OK)
+    controltypes['OK'] = $P0
+    $P0 = new 'ResizablePMCArray'
+    $P0.'push'(.CONTROL_BREAK)
+    controltypes['BREAK'] = $P0
+    $P0 = new 'ResizablePMCArray'
+    $P0.'push'(.CONTROL_CONTINUE)
+    controltypes['CONTINUE'] = $P0
+    $P0 = new 'ResizablePMCArray'
+    $P0.'push'(.CONTROL_ERROR)
+    controltypes['ERROR'] = $P0
+    $P0 = new 'ResizablePMCArray'
+    $P0.'push'(.CONTROL_LOOP_NEXT)
+    controltypes['NEXT'] = $P0
+    $P0 = new 'ResizablePMCArray'
+    $P0.'push'(.CONTROL_LOOP_LAST)
+    controltypes['LAST'] = $P0
+    $P0 = new 'ResizablePMCArray'
+    $P0.'push'(.CONTROL_LOOP_REDO)
+    controltypes['REDO'] = $P0
     set_global '%!controltypes', controltypes
 
     $P0 = new 'CodeString'
@@ -732,22 +763,23 @@
 
     ##  pir-encode name and namespace
     .local string blockreg, blockref
-    name = self.'escape'(name)
     blockreg = self.'uniquereg'('P')
     if ns goto block_ns
     blockref = concat ".const 'Sub' ", blockreg
     concat blockref, ' = '
-    concat blockref, name
+    $P0 = bpost.'subid'()
+    $S0 = self.'escape'($P0)
+    concat blockref, $S0
     goto have_blockref
   block_ns:
     $P0 = get_global '%!codestring'
-    ns = $P0.'key'(ns)
     blockref = concat 'get_hll_global ', blockreg
+    $S0 = $P0.'key'(ns)
     concat blockref, ', '
-    $S0 = ns
     concat blockref, $S0
+    $S0 = self.'escape'(name)
     concat blockref, ', '
-    concat blockref, name
+    concat blockref, $S0
   have_blockref:
 
     ##  determine the outer POST::Sub for the new one
@@ -878,9 +910,9 @@
     .local pmc lisub
     $P0 = get_hll_global ['POST'], 'Sub'
     lisub = $P0.'new'('outer'=>bpost, 'pirflags'=>':load :init')
+    lisub.'push_pirop'(blockref)
     lisub.'push_pirop'('.local pmc', 'block')
-    lisub.'push_pirop'('interpinfo', '$P20', .INTERPINFO_CURRENT_SUB)
-    lisub.'push_pirop'('callmethod', '"get_outer"', '$P20', 'result'=>'block')
+    lisub.'push_pirop'('set', 'block', blockreg)
     .local pmc lipast, lipost
     lipast = node.'loadinit'()
     lipost = self.'as_post'(lipast, 'rtype'=>'v')

Modified: branches/rakudoreg/compilers/pct/src/PCT/HLLCompiler.pir
==============================================================================
--- branches/rakudoreg/compilers/pct/src/PCT/HLLCompiler.pir	(original)
+++ branches/rakudoreg/compilers/pct/src/PCT/HLLCompiler.pir	Tue Dec 16 08:21:24 2008
@@ -745,8 +745,10 @@
     $I0 = adverbs['version']
     if $I0 goto version
 
+    
     $S0 = adverbs['e']
-    if $S0 goto eval_line
+    $I0 = exists adverbs['e']
+    if $I0 goto eval_line
 
     .local pmc result
     result = box ''

Modified: branches/rakudoreg/compilers/pct/src/PCT/Node.pir
==============================================================================
--- branches/rakudoreg/compilers/pct/src/PCT/Node.pir	(original)
+++ branches/rakudoreg/compilers/pct/src/PCT/Node.pir	Tue Dec 16 08:21:24 2008
@@ -97,38 +97,6 @@
 .end
 
 
-=item clone
-
-Create and returns a clone of a PAST node.
-
-=cut
-
-.sub 'clone' :vtable :method
-    .local pmc res
-    $S0 = typeof self
-    $P0 = split ';', $S0
-    res = new $P0
-    .local pmc iter
-    iter = self.'iterator'()
-  iter_child_loop:
-    unless iter goto iter_child_end
-    $P0 = shift iter
-    $P1 = clone $P0
-    res.'push'($P1)
-    goto iter_child_loop
-  iter_child_end:
-    iter = new 'Iterator', self
-  iter_attr_loop:
-    unless iter goto iter_attr_end
-    $S0 = shift iter
-    $P0 = iter[$S0]
-    res[$S0] = $P0
-    goto iter_attr_loop
-  iter_attr_end:
-    .return (res)
-.end
-
-
 =item unshift(child)
 
 Add C<child> to the beginning of the invocant's list of children.

Modified: branches/rakudoreg/compilers/pct/src/POST/Compiler.pir
==============================================================================
--- branches/rakudoreg/compilers/pct/src/POST/Compiler.pir	(original)
+++ branches/rakudoreg/compilers/pct/src/POST/Compiler.pir	Tue Dec 16 08:21:24 2008
@@ -211,8 +211,7 @@
     $I0 = index pirflags, ':subid('
     if $I0 >= 0 goto pirflags_subid_done
     .local string subid
-    subid = code.'unique'()
-    node.'subid'(subid)
+    subid = node.'subid'()
     pirflags = concat pirflags, ' :subid("'
     pirflags .= subid
     pirflags .= '")'
@@ -299,6 +298,8 @@
 
     options['target'] = 'pir'
     options['grammar'] = ''
+    $P0 = node.'subid'()
+    options['subid'] = $P0
     .local pmc source, compiler, pir
     source = node[0]
     $S0 = node.'compiler'()

Modified: branches/rakudoreg/compilers/pct/src/POST/Node.pir
==============================================================================
--- branches/rakudoreg/compilers/pct/src/POST/Node.pir	(original)
+++ branches/rakudoreg/compilers/pct/src/POST/Node.pir	Tue Dec 16 08:21:24 2008
@@ -197,6 +197,12 @@
 .sub 'subid' :method
     .param pmc value           :optional
     .param int has_value       :opt_flag
+    if has_value goto getset_value
+    $I0 = exists self['subid']
+    if $I0 goto getset_value
+    value = self.'unique'()
+    has_value = 1
+  getset_value:
     .tailcall self.'attr'('subid', value, has_value)
 .end
 

Modified: branches/rakudoreg/compilers/pge/PGE/Exp.pir
==============================================================================
--- branches/rakudoreg/compilers/pge/PGE/Exp.pir	(original)
+++ branches/rakudoreg/compilers/pge/PGE/Exp.pir	Tue Dec 16 08:21:24 2008
@@ -128,6 +128,15 @@
     name = code.'escape'(name)
     namecorou = code.'escape'(namecorou)
 
+    .local string subid
+    subid = ''
+    $P0 = adverbs['subid']
+    if null $P0 goto have_subid
+    $S0 = code.'escape'($P0)
+    subid = concat ':subid(', $S0
+    concat subid, ')'
+  have_subid:
+
     ##   Perform reduction/optimization on the
     ##   expression tree before generating PIR.
     .local pmc exp
@@ -151,17 +160,17 @@
     ##   Generate the initial PIR code for a backtracking (uncut) rule.
     .local string returnop
     returnop = '.yield'
-    code.'emit'(<<"        CODE", name, namecorou, .INTERPINFO_CURRENT_SUB)
-      .sub %0 :method
+    code.'emit'(<<"        CODE", name, subid, namecorou, .INTERPINFO_CURRENT_SUB)
+      .sub %0 :method %1
           .param pmc adverbs   :slurpy :named
           .local pmc mob
-          .const 'Sub' corou = %1
+          .const 'Sub' corou = %2
           $P0 = corou
           $P0 = clone $P0
           mob = $P0(self, adverbs)
           .return (mob)
       .end
-      .sub %1
+      .sub '' :subid(%2)
           .param pmc mob       :unique_reg
           .param pmc adverbs   :unique_reg
           .local string target :unique_reg
@@ -169,7 +178,7 @@
           .local int cpos, iscont :unique_reg
           $P0 = get_hll_global ['PGE'], 'Match'
           (mob, cpos, target, mfrom, mpos, iscont) = $P0.'new'(mob, adverbs :flat :named)
-          $P0 = interpinfo %2
+          $P0 = interpinfo %3
           setattribute mob, '&!corou', $P0
           .local int lastpos
           lastpos = length target
@@ -180,8 +189,8 @@
   code_cutrule:
     ##   Initial code for a rule that cannot be backtracked into.
     returnop = '.return'
-    code.'emit'(<<"        CODE", name)
-      .sub %0 :method
+    code.'emit'(<<"        CODE", name, subid)
+      .sub %0 :method %1
           .param pmc adverbs      :unique_reg :slurpy :named
           .local pmc mob
           .local string target    :unique_reg
@@ -1423,19 +1432,23 @@
     ##  two different compilers.  Also, if the sources can be lengthy
     ##  we might be well served to use a hashed representation of
     ##  the source.
-    code.'emit'(<<"        CODE", label, next, lang, value)
+    code.'emit'(<<"        CODE", label, lang, value)
         %0: # closure
-          $S1 = %3
+          $S1 = %2
           $P0 = get_hll_global ['PGE';'Match'], '%!cache'
           $P1 = $P0[$S1]
           unless null $P1 goto %0_1
-          $P1 = compreg %2
+          $P1 = compreg %1
           $P1 = $P1($S1)
           $P0[$S1] = $P1
         %0_1:
+        CODE
+    $I0 = self['iszerowidth']
+    if $I0 goto closure_zerowidth
+    code.'emit'(<<"        CODE", next)
           mpos = pos
           ($P0 :optional, $I0 :opt_flag) = $P1(mob)
-          if $I0 == 0 goto %1
+          if $I0 == 0 goto %0
           mob.'result_object'($P0)
           push ustack, pos
           local_branch cstack, succeed
@@ -1445,6 +1458,21 @@
           goto fail
         CODE
     .return ()
+  closure_zerowidth:
+    ##  we're doing a <?{{ or <!{{ assertion.
+    .local string test
+    test = 'if'
+    $I0 = self['isnegated']
+    unless $I0 goto have_test
+    test = 'unless'
+  have_test:
+    code.'emit'(<<"        CODE", test, next)
+          mpos = pos
+          $P0 = $P1(mob)
+          %0 $P0 goto %1
+          goto fail
+        CODE
+    .return ()
 .end
 
 .namespace [ 'PGE';'Exp';'Action' ]

Modified: branches/rakudoreg/compilers/pge/PGE/Perl6Regex.pir
==============================================================================
--- branches/rakudoreg/compilers/pge/PGE/Perl6Regex.pir	(original)
+++ branches/rakudoreg/compilers/pge/PGE/Perl6Regex.pir	Tue Dec 16 08:21:24 2008
@@ -218,7 +218,9 @@
     optable.'newtok'('term:<commit>', 'equiv'=>'term:', 'nows'=>1, 'match'=>'PGE::Exp::Cut')
 
     $P0 = get_global 'parse_closure'
-    optable.'newtok'("term:{{",       'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+    optable.'newtok'("term:{{",   'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+    optable.'newtok'("term:<?{{", 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
+    optable.'newtok'("term:<!{{", 'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
 
     $P0 = get_global 'parse_action'
     optable.'newtok'("term:{*}",      'equiv'=>'term:', 'nows'=>1, 'parsed'=>$P0)
@@ -1078,6 +1080,8 @@
 
 .sub 'parse_closure'
     .param pmc mob
+    .local pmc key
+    key = mob['KEY']
     .local string target
     .local int pos, len
     (mob, pos, target) = mob.'new'(mob, 'grammar'=>'PGE::Exp::Closure')
@@ -1089,8 +1093,19 @@
     inc pos
     goto init
   body:
-    $S0 = repeat "}", len
-    $I0 = index target, $S0, pos
+    .local string close
+    close = repeat "}", len
+    if key == '<?{{' goto assert_pos
+    if key == '<!{{' goto assert_neg
+    goto have_close
+  assert_neg:
+    mob['isnegated'] = 1
+  assert_pos:
+    mob['iszerowidth'] = 1
+    concat close, '>'
+    inc len
+  have_close:
+    $I0 = index target, close, pos
     if $I0 < pos goto err_noclose
     $I1 = $I0 - pos
     $S1 = substr target, pos, $I1

Modified: branches/rakudoreg/compilers/pirc/new/pircompunit.c
==============================================================================
--- branches/rakudoreg/compilers/pirc/new/pircompunit.c	(original)
+++ branches/rakudoreg/compilers/pirc/new/pircompunit.c	Tue Dec 16 08:21:24 2008
@@ -19,25 +19,6 @@
 Due to this organization, adding an element to a list can be done in
 O(c) (constant) time.
 
-Currently, no Parrot Byte Code is generated; instead, the generated
-data structure can be printed, which results in a PASM representation
-of the parsed PIR code. Through the symbol management, which is done
-in F<pirsymbol.c>, a vanilla register allocator is implemented.
-
-
-
-=head1 TODO
-
-=over 4
-
-=item * calculate offsets for global (sub) labels.
-
-=item * fix local label offset calculation: make this work for all :flow (PARROT_JUMP_RELATIVE) ops.
-
-=item * generate PackFiles (PBC).
-
-=back
-
 =cut
 
 */
@@ -75,9 +56,6 @@
 =cut
 
 */
-/*
-PARROT_DOES_NOT_RETURN
-*/
 void
 panic(lexer_state * lexer, char const * const message) {
     fprintf(stderr, "Fatal: %s\n", message);
@@ -297,13 +275,12 @@
     newsub->parameters  = NULL;
     newsub->statements  = NULL;
     newsub->flags       = 0;
-    newsub->codesize    = 0;
     newsub->startoffset = lexer->codesize; /* start offset in bytecode */
 
     init_hashtable(lexer, &newsub->symbols, HASHTABLE_SIZE_INIT);
     init_hashtable(lexer, &newsub->labels, HASHTABLE_SIZE_INIT);
 
-    for (index = 0; index < 4; index++) { /* 4 is the number of Parrot types. */
+    for (index = 0; index < NUM_PARROT_TYPES; ++index) {
         newsub->registers[index] = NULL; /* set all "register" tables to NULL */
         newsub->regs_used[index] = 0;    /* set all register counts to 0 */
     }
@@ -1671,7 +1648,10 @@
 =item C<void
 remove_all_operands(lexer_state * const lexer)>
 
-Remove all operands of the current instruction.
+Remove all operands of the current instruction. This is done
+by simply setting the pointer to the operands to NULL; all
+memory for the operands is allocated through PIRC memory
+functions, which is automatically freed after compilation.
 
 =cut
 
@@ -1688,6 +1668,7 @@
 expr_from_key(key * const k)>
 
 Wraps the key C<k> in an C<expression> node and returns that.
+The returned expression node has type EXPR_KEY.
 
 =cut
 
@@ -1863,7 +1844,7 @@
         return;
     }
     else {
-        int numargs = 0;
+
         argiter = args;
         do {
             int flag = 0;
@@ -2348,40 +2329,66 @@
 
 /*
 
-=item C<void
-close_sub(lexer_state * const lexer)>
-
-Finalize the subroutine. Generate the final instructions in the current
-subroutine; if the C<:main> flag was set on the subroutine, this is the
-C<end> instruction; otherwise, a I<normal> C<return> sequence is generated.
+=item C<static void
+emit_sub_leaving_instructions(lexer_state * const lexer)>
 
-Then, all local labels are fixed up; i.e., all label identifiers are converted
-into their offsets.
+Emit final instructions for the current subroutine. In case
+this is a C<:main> sub, the "end" instruction is emitted,
+otherwise it's a standard return sequence.
 
 =cut
 
 */
-void
-close_sub(lexer_state * const lexer) {
-    int opcode;
-
+static void
+emit_sub_leaving_instructions(lexer_state * const lexer) {
     /* a :main-marked sub ends with the "end" instruction;
      * otherwise it's this pair:
      *
      *    set_returns_pc
      *    returncc
      */
-
-
-    if (TEST_FLAG(lexer->subs->flags, SUB_FLAG_MAIN)) {
+    if (TEST_FLAG(lexer->subs->flags, SUB_FLAG_MAIN))
         new_sub_instr(lexer, PARROT_OP_end, "end");
-    }
     else {
-        /* XXX if there was already a return sequence explicitly, we shouldn't do this. */
-
         new_sub_instr(lexer, PARROT_OP_set_returns_pc, "set_returns_pc");
         new_sub_instr(lexer, PARROT_OP_returncc, "returncc");
     }
+}
+
+/*
+
+=item C<void
+close_sub(lexer_state * const lexer)>
+
+Finalize the subroutine. Generate the final instructions in the current
+subroutine, if needed. Then, all local labels are fixed up; i.e., all
+label identifiers are converted into their offsets. The endoffset of this
+subroutine is stored.
+If register optimization was requested, this is invoked here.
+
+=cut
+
+*/
+void
+close_sub(lexer_state * const lexer) {
+    int need_leaving_instr = 1;
+
+    /* don't generate leaving instructions if the last instruction was already
+     * leaving the sub.
+     */
+    if (CURRENT_INSTRUCTION(lexer)) {
+        switch (CURRENT_INSTRUCTION(lexer)->opcode) {
+            case PARROT_OP_end:
+            case PARROT_OP_returncc:
+                need_leaving_instr = 0;
+                break;
+            default:
+                break;
+        }
+    }
+
+    if (need_leaving_instr)
+        emit_sub_leaving_instructions(lexer);
 
     /* fix up all local branch labels */
     fixup_local_labels(lexer);
@@ -2394,6 +2401,24 @@
         linear_scan_register_allocation(lexer->lsr);
 }
 
+/*
+
+=item C<void
+update_sub_register_usage(lexer_state * const lexer, unsigned reg_usage[NUM_PARROT_TYPES])>
+
+Update register usage for the current subroutine with the register usage
+information in C<reg_usage>.
+
+=cut
+
+*/
+void
+update_sub_register_usage(lexer_state * const lexer, unsigned reg_usage[NUM_PARROT_TYPES]) {
+    int i;
+    for (i = 0; i < NUM_PARROT_TYPES; ++i)
+        CURRENT_SUB(lexer)->regs_used[i] = reg_usage[i];
+}
+
 
 /*
 

Modified: branches/rakudoreg/compilers/pirc/new/pircompunit.h
==============================================================================
--- branches/rakudoreg/compilers/pirc/new/pircompunit.h	(original)
+++ branches/rakudoreg/compilers/pirc/new/pircompunit.h	Tue Dec 16 08:21:24 2008
@@ -25,6 +25,8 @@
 
 } pir_type;
 
+/* Parrot has 4 types */
+#define NUM_PARROT_TYPES    4
 
 
 /* selector values for the expression value union */
@@ -308,9 +310,6 @@
     char const         *nsentry;       /* name by which the sub is stored in the namespace */
     char const         *methodname;    /* name of this sub by which it's stored as a method */
     int                 flags;         /* this sub's flags */
-    unsigned            codesize;      /* total number of integers to store for this sub:
-                                          1 for each op and 1 for each operand.
-                                        */
     int                 startoffset;   /* start offset in bytecode where this sub starts */
     int                 endoffset;     /* end offset in bytecode where this sub ends */
 
@@ -451,6 +450,9 @@
 void set_op_labelflag(struct lexer_state * const lexer, int flag);
 void convert_inv_to_instr(struct lexer_state * const lexer, invocation * const inv);
 
+void update_sub_register_usage(struct lexer_state * const lexer,
+                               unsigned reg_usage[NUM_PARROT_TYPES]);
+
 void panic(struct lexer_state * lexer, char const * const message);
 
 #endif /* PARROT_PIR_PIRCOMPUNIT_H_GUARD */

Modified: branches/rakudoreg/compilers/pirc/new/piremit.c
==============================================================================
--- branches/rakudoreg/compilers/pirc/new/piremit.c	(original)
+++ branches/rakudoreg/compilers/pirc/new/piremit.c	Tue Dec 16 08:21:24 2008
@@ -560,7 +560,6 @@
 
     /* iterate over all instructions and emit them */
     do {
-        fprintf(stderr, "%d integers needed for storing this sub\n", subiter->codesize);
         fprintf(stderr, "start offset of sub '%s' is: %d\tend offest: %d\n",
                     subiter->sub_name, subiter->startoffset, subiter->endoffset);
 

Modified: branches/rakudoreg/compilers/pirc/new/pirregalloc.c
==============================================================================
--- branches/rakudoreg/compilers/pirc/new/pirregalloc.c	(original)
+++ branches/rakudoreg/compilers/pirc/new/pirregalloc.c	Tue Dec 16 08:21:24 2008
@@ -24,23 +24,20 @@
 
 */
 
-
 /*
 
-=item C<lsr_allocator *
-new_linear_scan_register_allocator(void)>
+=item C<static void
+reset_register_count(lsr_allocator * const lsr)>
 
-Constructor for a linear scan register allocator.
-Initializates the allocator, and returns it.
+Reset the register counters; there's one counter for each register
+type (string, num, int, pmc).
 
 =cut
 
 */
-lsr_allocator *
-new_linear_scan_register_allocator(struct lexer_state *lexer) {
-    lsr_allocator *lsr = (lsr_allocator *)mem_sys_allocate_zeroed(sizeof (lsr_allocator));
+static void
+reset_register_count(lsr_allocator * const lsr) {
     int i;
-
     /* the "r" field keeps track of the number of registers that must be allocated by
      * parrot. In the original implementation, "r" is constant, and indicates the number
      * of available registers. In parrot, this is flexible, so we increment it only
@@ -50,6 +47,22 @@
      */
     for (i = 0; i < 4; ++i)
         lsr->r[i] = 1;
+}
+
+/*
+
+=item C<lsr_allocator *
+new_linear_scan_register_allocator(struct lexer_state * lexer)>
+
+Constructor for a linear scan register allocator.
+Initializates the allocator, and returns it.
+
+=cut
+
+*/
+lsr_allocator *
+new_linear_scan_register_allocator(struct lexer_state *lexer) {
+    lsr_allocator *lsr = (lsr_allocator *)mem_sys_allocate_zeroed(sizeof (lsr_allocator));
 
     lsr->lexer = lexer;
 
@@ -85,6 +98,7 @@
 void
 destroy_linear_scan_regiser_allocator(lsr_allocator *lsr) {
     pir_type type;
+    live_interval *i;
 
     for (type = 0; type < 4; ++type) {
         live_interval *iter = lsr->intervals[type];
@@ -94,6 +108,14 @@
         }
     }
 
+    /* free all cached interval objects */
+    i = lsr->cached_intervals;
+    while (i != NULL) {
+        live_interval *tmp = i;
+        i = i->nextc;
+        mem_sys_free(tmp);
+    }
+
     mem_sys_free(lsr);
 }
 
@@ -135,15 +157,31 @@
 PARROT_WARN_UNUSED_RESULT
 live_interval *
 new_live_interval(lsr_allocator * const lsr, unsigned firstuse_location, pir_type type) {
-    live_interval *i = (live_interval *)mem_sys_allocate_zeroed(sizeof (live_interval));
-    static int count = 0;
+    live_interval *i;
+    /* check whether there's an interval object that we can re-use, to prevent
+     * memory malloc() and free()s.
+     */
+    if (lsr->cached_intervals) {
+
+        i = lsr->cached_intervals;
+        lsr->cached_intervals = i->nextc;
+
+        /* clear fields */
+        i->nexti = i->previ   = NULL;
+        i->nexta = i->preva   = NULL;
+        i->nextc = NULL;
+    }
+    else {
+        /* there's no interval object to be re-used (none allocated yet, or all are used). */
+        i = (live_interval *)mem_sys_allocate_zeroed(sizeof (live_interval));
+    }
 
     /* this is the first usage of the register, and up to now also the last */
     i->startpoint = i->endpoint = firstuse_location;
 
-    /*fprintf(stderr, "Live interval %d (location: %u)\n", ++count, firstuse_location);*/
     add_live_interval(lsr, i, type);
     return i;
+
 }
 
 /*
@@ -242,6 +280,7 @@
         return;
     }
 
+    /* look for the right place to insert; sort on increasing end point */
     while (iter->nexta && iter->endpoint < i->endpoint) {
         iter = iter->nexta;
     }
@@ -415,6 +454,24 @@
 
 /*
 
+=item C<static void
+cache_interval_objects(lsr_allocator * const lsr, live_interval * interval)>
+
+Store the interval C<interval> on a caching list; whenever a new C<live_interval>
+object is requested, these interval objects can be re-used, instead of malloc()ing
+a new one.
+
+=cut
+
+*/
+static void
+cache_interval_object(lsr_allocator * const lsr, live_interval * interval) {
+    interval->nextc = lsr->cached_intervals;
+    lsr->cached_intervals = interval;
+}
+
+/*
+
 =item C<void
 linear_scan_register_allocation(lsr_allocator * const lsr)>
 
@@ -430,8 +487,14 @@
     live_interval * i;
     pir_type type = 0; /* types run from 0 to 4; see pircompunit.h */
 
+    reset_register_count(lsr);
+
     for (type = 0; type < 4; ++type) { /* handle each of the 4 parrot types separately. */
 
+        /* cache the objects on the active list for reuse */
+        for (i = lsr->active[type]; i != NULL; i = i->nexta)
+            cache_interval_object(lsr, i);
+
         /* intialize active intervals list to NULL */
         lsr->active[type] = NULL;
 
@@ -440,6 +503,11 @@
         */
         for (i = lsr->intervals[type]; i != NULL; i = i->nexti) {
 
+            /* expire all intervals whose endpoint is smaller than i's start
+             * point; that means that i can be mapped to a register that was
+             * previously assigned to one of the expired intervals; that one
+             * is no longer needed (hence it expired).
+             */
             expire_old_intervals(lsr, i, type);
 
             /* get a free register */
@@ -453,10 +521,16 @@
             add_interval_to_active(lsr, i, type);
         }
 
+         /* cache the objects on the list for reuse */
+        for (i = lsr->intervals[type]; i != NULL; i = i->nexti)
+            cache_interval_object(lsr, i);
+
         /* clear list of intervals */
         lsr->intervals[type] = NULL;
     }
 
+    /* update the register usage in the current subroutine structure. */
+    update_sub_register_usage(lsr->lexer, lsr->r);
 
 }
 

Modified: branches/rakudoreg/compilers/pirc/new/pirregalloc.h
==============================================================================
--- branches/rakudoreg/compilers/pirc/new/pirregalloc.h	(original)
+++ branches/rakudoreg/compilers/pirc/new/pirregalloc.h	Tue Dec 16 08:21:24 2008
@@ -47,6 +47,9 @@
         struct   live_interval *preva;
 /*    } prev; */
 
+    /* pointer to next on the cached objects list. */
+    struct live_interval *nextc;
+
 } live_interval;
 
 /* structure to store a second-hand register, so we can re-use it later. */
@@ -68,6 +71,11 @@
     /* reusable registers; were used by variables, which are now "dead"; (1 list per type) */
     free_reg      *free_regs[4];
 
+    /* list of cached intervals; don't malloc/free objects, but keep them on a list
+     * and re-used malloc()ed objects. Only free them when destroying the lsr.
+     */
+    live_interval *cached_intervals;
+
     /* list of free_reg objects that we can re-use, to save memory allocations. */
     free_reg      *cached_regs;
 

Modified: branches/rakudoreg/compilers/pirc/new/pirsymbol.c
==============================================================================
--- branches/rakudoreg/compilers/pirc/new/pirsymbol.c	(original)
+++ branches/rakudoreg/compilers/pirc/new/pirsymbol.c	Tue Dec 16 08:21:24 2008
@@ -48,6 +48,8 @@
 */
 
 
+#define NO_REG_ALLOCATED    -1
+
 /*
 
 =item C<static int
@@ -167,7 +169,7 @@
     symbol *sym = pir_mem_allocate_zeroed_typed(lexer, symbol);
     sym->name   = name;
     sym->type   = type;
-    sym->color  = -1; /* -1 means no PASM reg has been allocated yet for this symbol */
+    sym->color  = NO_REG_ALLOCATED;
 
     sym->next   = NULL;
     return sym;
@@ -253,7 +255,7 @@
         for (i = 0; i < symbols->size; i++) {
             bucket *b = get_bucket(symbols, i);
             while (b) {
-                if (bucket_symbol(b)->color == -1)
+                if (bucket_symbol(b)->color == NO_REG_ALLOCATED)
                     fprintf(stderr, "Warning: in sub '%s': symbol '%s' declared but not used\n",
                                     subiter->sub_name, bucket_symbol(b)->name);
 
@@ -291,7 +293,7 @@
         symbol *sym = bucket_symbol(buck);
 
         if (STREQ(sym->name, name)) {
-            if (sym->color == -1)  /* no PASM register assigned yet */
+            if (sym->color == NO_REG_ALLOCATED)  /* no PASM register assigned yet */
                 /* get a new reg from vanilla reg. allocator */
                 assign_vanilla_register(lexer, sym);
             else  /* update end point of interval */
@@ -328,7 +330,7 @@
     pir_reg *r = pir_mem_allocate_zeroed_typed(lexer, pir_reg);
 
     r->type    = type;
-    r->color   = -1; /* -1 means no PASM register is allocated for this PIR register. */
+    r->color   = NO_REG_ALLOCATED;
 
     r->regno   = regno;
     r->next    = NULL;

Modified: branches/rakudoreg/compilers/pirc/new/pirsymbol.h
==============================================================================
--- branches/rakudoreg/compilers/pirc/new/pirsymbol.h	(original)
+++ branches/rakudoreg/compilers/pirc/new/pirsymbol.h	Tue Dec 16 08:21:24 2008
@@ -20,10 +20,18 @@
 #include "pircompunit.h"
 #include "pirregalloc.h"
 
+/* core info of all symbols and PIR registers ($I42, etc.). */
+typedef struct syminfo {
+    int            color;
+    pir_type       type;
+    live_interval *interval;
+
+} syminfo;
 
 
 /* structure to represent a declared local variable or parameter */
 typedef struct symbol {
+    syminfo        info;
     int            color;
     pir_type       type;
     live_interval *interval;
@@ -38,6 +46,7 @@
 
 /* structure to represent a PIR register. */
 typedef struct pir_reg {
+    syminfo         info;
     int             color;
     pir_type        type;
     live_interval  *interval;

Modified: branches/rakudoreg/compilers/pirc/t/heredoc.t
==============================================================================
--- branches/rakudoreg/compilers/pirc/t/heredoc.t	(original)
+++ branches/rakudoreg/compilers/pirc/t/heredoc.t	Tue Dec 16 08:21:24 2008
@@ -58,8 +58,6 @@
     yield
     set_returns "\n Some text returned through return\n"
     returncc
-    set_returns
-    returncc
 OUTPUT
 
 pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "heredoc string assignment");

Modified: branches/rakudoreg/docs/book/ch11_pmcs.pod
==============================================================================
--- branches/rakudoreg/docs/book/ch11_pmcs.pod	(original)
+++ branches/rakudoreg/docs/book/ch11_pmcs.pod	Tue Dec 16 08:21:24 2008
@@ -93,7 +93,13 @@
 internally. C<PMC_EXT> is necessary to handle data sharing between threads
 or interpreters, storing attributes in the PMC, and a few other uses as
 well. The C<singleton> flag means that there can only be one instantiated
-object of this class.
+object of this class. The C<is_ro> and C<has_ro> flags indicate that the
+PMC class is read-only or that it contains read-only data, respectively.
+The C<is_shared> flag indicates that the PMC is intended to be shared
+between multiple interpreters, and therefore special synchronization
+logic should be applied. The C<abstract> flag indicates that the PMC
+class cannot be instantiated directly, but can be inherited from by a
+non-abstract PMC class.
 
 The C<provides> keyword is used to show that the PMC provides certain
 standard interfaces. For instance, you can specify C<provides array>

Modified: branches/rakudoreg/docs/book/ch12_opcodes.pod
==============================================================================
--- branches/rakudoreg/docs/book/ch12_opcodes.pod	(original)
+++ branches/rakudoreg/docs/book/ch12_opcodes.pod	Tue Dec 16 08:21:24 2008
@@ -127,7 +127,7 @@
 C<void **> values. In the computed goto core, all the labels represent
 different opcodes, so they are stored in an array:
 
-  void **my_labels[] = {
+  void *my_labels[] = {
       &&label1,
 	  &&label2,
 	  &&label3
@@ -142,29 +142,60 @@
 
 Jumping to one of these labels is done with a command like this:
 
-  goto my_labels[opcode_number];
+  goto *my_labels[opcode_number];
 
 Actually, opcodes are pointed to by an C<opcode_t *> pointer, and all
 opcodes are stored sequentially in memory, so the actual jump in the
 computed goto core must increment the pointer and then jump to the new
 version. In C it looks something like this:
 
-  goto my_labels[*(current_opcode += 1)];
+  goto *my_labels[*(current_opcode += 1)];
 
-Each opcode is a label, and at the end of each opcode an instruction like
-this is performed to move to the next opcode in series, or else some
-kind of control flow occurs that moves it to a non-sequential location:
+Each opcode is an index into the array of labels, and at the end of each
+opcode an instruction like this is performed to move to the next opcode
+in series, or else some kind of control flow occurs that moves it to a
+non-sequential location:
 
-  goto my_lables[*(current_opcode = destination)];
+  goto *my_lables[*(current_opcode = destination)];
 
 These are simplifications on what really happens in this core, because
 the actual code has been optimized quite a bit from what has been
-presented here. 
+presented here. However, as we shall see with the precomputed goto core,
+it isn't optimized as aggressively as is possible.
 
 =item* Precomputed Goto Core
 
-Thought the Computed Goto core was hard enough to understand? Precomputed
-goto takes the concept a little further.
+The precomputed goto core is an amazingly optimized fast core that uses
+the same computed goto feature, but performs the array dereferencing
+before the core even starts. In the computed goto core, you have this
+operation to move to the next opcode:
+
+  goto *my_labels[*(current_opcode += 1)];
+
+This single line of code is deceptively complex. A number of machine code
+operations must be performed to complete this step: The value of
+C<current_opcode> must be incremented to the next value, that value must
+be dereferenced to find the opcode value. In C, arrays are pointers, so
+C<my_labels> gets dereferenced and an offset is taken according to find
+the stored label reference. That label reference is then dereferenced, and
+the jump is performed.
+
+That's a lot of steps to execute before we can jump to the next opcode.
+Now, what, if each opcode value was replaced with the value of the jump
+label beforehand? If C<current_opcode> points to a label referenced
+already, we don't need the array at all. We can replace that entire mess
+above with this line:
+
+  goto **(current_opcode += 1);
+
+That's far fewer machine instructions to execute before we can move to the
+next opcode, which means faster throughput. Remember that whatever dispatch
+mechanism is used will be called after every singly opcode, and some large
+programs may have millions of opcodes! Every single machine instruction
+that can be cut out of the dispatch mechanism could increase the execution
+speed of Parrot in a significant and noticable way. The precomputed goto
+core, while not available on all compilers, takes the idea of optimization
+to the extreme.
 
 =item* Tracing Core
 

Modified: branches/rakudoreg/docs/pdds/pdd22_io.pod
==============================================================================
--- branches/rakudoreg/docs/pdds/pdd22_io.pod	(original)
+++ branches/rakudoreg/docs/pdds/pdd22_io.pod	Tue Dec 16 08:21:24 2008
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2007, The Perl Foundation.
+# Copyright (C) 2001-2008, The Perl Foundation.
 # $Id$
 
 =head1 NAME

Modified: branches/rakudoreg/docs/pdds/pdd23_exceptions.pod
==============================================================================
--- branches/rakudoreg/docs/pdds/pdd23_exceptions.pod	(original)
+++ branches/rakudoreg/docs/pdds/pdd23_exceptions.pod	Tue Dec 16 08:21:24 2008
@@ -41,23 +41,21 @@
 
 =item B<push_eh I<LABEL>>
 
-=item B<push_eh I<INVOCABLE_PMC>>
+=item B<push_eh I<EXCEPTIONHANDLER_PMC>>
 
-Push an invocable PMC -- usually a closure or, in rarer cases, a subroutine or
-continuation -- onto the exception handler stack.
+Push an exception handler pmc onto the exception handler stack.
 
 When an exception is thrown, Parrot walks up the stack of active exception
 handlers, invoking each one in turn, but still in the dynamic context of the
 exception (i.e. the call stack is I<not> unwound first).  See below for more
 detail.
 
-If a I<LABEL> is provided, Parrot creates and pushes a continuation that
-resumes execution at I<LABEL> if invoked, which has the effect of
+If a I<LABEL> is provided, Parrot creates and pushes an exception handler
+that resumes execution at I<LABEL> if invoked, which has the effect of
 unconditionally handling all errors, and unwinding the stack to that label.
 
-If a I<INVOCABLE_PMC> is provided, Parrot pushes the pmc which will execute
-if invoked, which has the effect of unconditionally handling all errors,
-replacing the stack with that execution context of the invocable pmc.
+If an I<EXCEPTIONHANDLER_PMC> is provided, Parrot pushes that pmc itself
+onto the exception handler stack.
 
 =item B<pop_eh>
 
@@ -69,15 +67,16 @@
 Throw an exception consisting of the given I<EXCEPTION> PMC, after taking a
 continuation at the next opcode. When a I<CONTINUATION> is passed in, it will
 use that instead of generating a new continuation. Active exception handlers
-(if any) will be invoked with I<EXCEPTION> as the only parameter, and the
-return continuation stored within that exception object.
+(if any) will be invoked with I<EXCEPTION> as the only parameter. The
+I<CONTINUATION> is stored in the 'resume' slot of the I<EXCEPTION>.
 
 PMCs other than Parrot's Exception PMC may also be thrown, but they must
 support the interface of an Exception PMC. An HLL may implement throwing any
-arbitrary type of PMC, by storing that PMC as the payload of an Exception PMC.
+arbitrary type of PMC, by storing that PMC in the 'payload' slot of the
+Exception PMC.
 
-Exception handlers can resume execution immediately after the C<throw> opcode
-by invoking the resume continuation which is stored in the exception object.
+Exception handlers can resume execution after handling the exception by
+invoking the continuation stored in the 'resume' slot of the exception object.
 That continuation must be invoked with no parameters; in other words, C<throw>
 never returns a value.
 
@@ -91,14 +90,17 @@
 
 =item B<die [ I<MESSAGE> ]>
 
-The C<die> opcode throws an exception of type C<exception;death> with a
-payload of I<MESSAGE>.  If I<MESSAGE> is a string register, the exception
-payload is a C<String> PMC containing I<MESSAGE>; if I<MESSAGE> is a PMC, it
-is used directly as the exception payload.
+The C<die> opcode throws an exception of type C<exception;death> and severity
+C<EXCEPT_error> with a payload of I<MESSAGE>.  The exception payload is a
+C<String> PMC containing I<MESSAGE>.
+
+{{NOTE: Exception classes NYI.  Currently throws CONTROL_ERROR}}
 
 The default when no I<MESSAGE> is given is "Fatal exception at LINE in
 FILE." followed by a backtrace.
 
+{{NOTE: Not yet implemented.}}
+
 If this exception is not handled, it results in Parrot returning an error
 indication and the stringification of I<MESSAGE> to its embedding environment.
 When running standalone, this means writing the stringification of I<MESSAGE>
@@ -110,10 +112,16 @@
 Throw an exception of type C<exception;exit> with a payload of I<EXITCODE>,
 which defaults to zero, as an Integer PMC.
 
+{{NOTE: Exception classes NYI. Currently throws a type based on the
+EXITCODE.}}
+
 If not handled, this exception results in Parrot returning I<EXITCODE>
 as a status to its embedded environment, or when running standalone,
 to execute the C function C<exit(I<EXITCODE>)>.
 
+{{NOTE: This is not currently the case.  Parrot now stores the EXITCODE
+argument in the type, not the payload}}
+
 =back
 
 =head2 Exception Introspection Opcodes
@@ -149,7 +157,7 @@
 context).
 
 =item 4
-If the handler is C<rethrow>n, repeat steps 1-3 above, finding the next
+If the exception is C<rethrow>n, repeat steps 1-3 above, finding the next
 exception handler.
 
 =item 5
@@ -184,12 +192,18 @@
 =item B<PMC *get_attr_str(STRING *name)>
 
 Retreive an attribute from the Exception. All exceptions will have at least
-C<message>, C<severity>, and C<payload> attributes.
+C<message>, C<severity>, C<resume>, and C<payload> attributes.
 
 The C<message> is an exception's human-readable self-description.  Note that
 the type of the returned PMC isn't required to be C<String>, but you should
 still be able to stringify and print it.
 
+The C<severity> is an integer from an internal Parrot enum of exception
+severities.
+
+The C<resume> is a continuation that you can invoke to resume normal execution
+of the program.
+
 The C<payload> more specifically identifies the detailed cause/nature of
 the exception.  Each exception class will have its own specific payload
 type(s).  See the table of standard exception classes for examples.
@@ -197,7 +211,7 @@
 =item B<PMC *set_attr_str(STRING *name, PMC *value)>
 
 Set an attribute on the Exception. All exceptions will have at least
-C<message>, C<severity>, and C<payload> attributes.
+C<message>, C<severity>, C<resume>, and C<payload> attributes.
 
 =item B<PMC *annotations()>
 
@@ -205,12 +219,16 @@
 the exception was thrown. If none were in effect, returns an empty Hash. See
 the PIR PDD for syntax for declaring and semantics of bytecode annotations.
 
+{{NOTE: Not yet implemented}}
+
 =item B<PMC *annotations(STRING *name)>
 
 Returns a PMC representing the bytecode annotation with the key specified in
 C<name> at the point where the exception was thrown. If there was no such
 annotation in effect, a NULL PMC will be returned.
 
+{{NOTE: Not yet implemented}}
+
 =back
 
 =head2 Standard Parrot Exceptions
@@ -219,6 +237,12 @@
 Parrot throws them when internal Parrot errors occur, but any user code can
 throw them too.
 
+{{NOTE: Currently NYI.  Parrot currently uses integers to represent exception
+types.}}
+
+{{NOTE: Questions about how this interoperates with custom HLL exception
+classes}}
+
 =over
 
 =item B<exception>
@@ -390,6 +414,9 @@
 exception. Other exceptions at the run-loop level are also generally
 resumable.
 
+{{NOTE: Currently only implemented for the actual throwing opcodes, throw,
+die, exit.}}
+
 You resume from an exception by invoking the return continuation stored
 in the 'resume' attribute of the exception.
 
@@ -417,6 +444,8 @@
 
   src/ops/core.ops
   src/exceptions.c
+  src/pmc/exception.pmc
+  src/pmc/exceptionhandler.pmc
 
 =cut
 

Modified: branches/rakudoreg/examples/benchmarks/addit.pir
==============================================================================
--- branches/rakudoreg/examples/benchmarks/addit.pir	(original)
+++ branches/rakudoreg/examples/benchmarks/addit.pir	Tue Dec 16 08:21:24 2008
@@ -62,9 +62,7 @@
         add sum, a2
         add sum, a3
         add sum, a4
-        .begin_return
-    .return sum
-    .end_return
+    .return (sum)
 .end
 
 =head1 SEE ALSO

Modified: branches/rakudoreg/examples/benchmarks/fib.pir
==============================================================================
--- branches/rakudoreg/examples/benchmarks/fib.pir	(original)
+++ branches/rakudoreg/examples/benchmarks/fib.pir	Tue Dec 16 08:21:24 2008
@@ -54,9 +54,7 @@
     r2 = _fib(n2)
     n = r1 + r2
 ret:
-    .begin_return
-    .return n
-    .end_return
+    .return (n)
 .end
 
 =head1 SEE ALSO

Modified: branches/rakudoreg/examples/tge/branch/transform.pir
==============================================================================
--- branches/rakudoreg/examples/tge/branch/transform.pir	(original)
+++ branches/rakudoreg/examples/tge/branch/transform.pir	Tue Dec 16 08:21:24 2008
@@ -4,7 +4,8 @@
 
 =head1 SYNOPSIS
 
-  $ parrot transform.pir branch.g
+  # must be run from this directory ...
+  $ ../../../parrot transform.pir branch.g 
 
 =head1 DESCRIPTION
 
@@ -28,7 +29,7 @@
     # Compile a grammar from the source grammar file
     .local pmc grammar
     grammar = new 'TGE'
-    grammar.agcompile(source)
+    grammar.'agcompile'(source)
 
     # Build up the tree for testing
     .local pmc tree
@@ -36,10 +37,10 @@
 
     # Apply the grammar to the test tree
     .local pmc AGI
-    AGI = grammar.apply(tree)
+    AGI = grammar.'apply'(tree)
 
     # Retrieve the value of a top level attribute
-    $P4 = AGI.get('gmin')
+    $P4 = AGI.'get'('gmin')
     print "----\nthe global minimum attribute value is: "
     print $P4
     print " of type: "
@@ -48,7 +49,7 @@
     print "\n"
 
     # Rerieve the transformed tree
-    $P5 = AGI.get('result')
+    $P5 = AGI.'get'('result')
 #    $S5 = typeof $P5
 #    print $S5
 #    print "\n"

Modified: branches/rakudoreg/ext/SQLite3/DBDI.pm
==============================================================================
--- branches/rakudoreg/ext/SQLite3/DBDI.pm	(original)
+++ branches/rakudoreg/ext/SQLite3/DBDI.pm	Tue Dec 16 08:21:24 2008
@@ -2,6 +2,8 @@
 # $Id$
 # Copyright (C) 2008 The Perl Foundation
 
+use v6;
+
 class DBDI::DriverManager {
     method getConnection($url, $login, $password) {
         my $c1 = $url.index(":");

Modified: branches/rakudoreg/ext/SQLite3/DBDI/Driver/SQLite3.pm
==============================================================================
--- branches/rakudoreg/ext/SQLite3/DBDI/Driver/SQLite3.pm	(original)
+++ branches/rakudoreg/ext/SQLite3/DBDI/Driver/SQLite3.pm	Tue Dec 16 08:21:24 2008
@@ -2,6 +2,8 @@
 # $Id$
 # Copyright (C) 2008 The Perl Foundation
 
+use v6;
+
 use SQLite3;
 use DBDI;
 

Modified: branches/rakudoreg/languages/dotnet/src/translation.rules
==============================================================================
--- branches/rakudoreg/languages/dotnet/src/translation.rules	(original)
+++ branches/rakudoreg/languages/dotnet/src/translation.rules	Tue Dec 16 08:21:24 2008
@@ -1544,11 +1544,11 @@
 (${PTEMP0}, ${ITEMP0}) = field_info_from_token(${ASSEMBLY}, ${ARG0})
 
 # Build attribute access.
-${INS} = concat "$P1000000 = new "
+${INS} = concat "$P1000000 = new \""
 ${PTEMP1} = ${DTYPES}[0]
 ${STEMP0} = ${PTEMP1}["reg_type_pmc"]
 ${INS} = concat ${STEMP0}
-${INS} = concat "\n$P1000000 = getattribute "
+${INS} = concat "\"\n$P1000000 = getattribute "
 ${INS} = concat ${STACK0}
 ${INS} = concat ", \""
 ${STEMP0} = ${PTEMP0}
@@ -1582,11 +1582,11 @@
 (${PTEMP0}, ${ITEMP0}, ${STEMP1}) = field_info_from_token(${ASSEMBLY}, ${ARG0})
 
 # Build attribute access.
-${INS} = concat "$P1000000 = new "
+${INS} = concat "$P1000000 = new \""
 ${PTEMP1} = ${DTYPES}[0]
 ${STEMP0} = ${PTEMP1}["reg_type_pmc"]
 ${INS} = concat ${STEMP0}
-${INS} = concat "\n$P1000000 = get_hll_global "
+${INS} = concat "\"\n$P1000000 = get_hll_global "
 ${STEMP1} = namespace_to_key(${STEMP1})
 ${INS} = concat ${STEMP1}
 ${INS} = concat ", \""
@@ -1622,13 +1622,13 @@
 (${PTEMP0}, ${ITEMP0}) = field_info_from_token(${ASSEMBLY}, ${ARG0})
 
 # Build attribute store.
-${INS} = concat "$P1000000 = new "
+${INS} = concat "$P1000000 = new \""
 ${ITEMP0} = elements ${STYPES}
 dec ${ITEMP0}
 ${PTEMP1} = ${STYPES}[${ITEMP0}]
 ${STEMP0} = ${PTEMP1}["reg_type_pmc"]
 ${INS} = concat ${STEMP0}
-${INS} = concat "\n$P1000000 = "
+${INS} = concat "\"\n$P1000000 = "
 ${INS} = concat ${STACK0}
 ${INS} = concat "\nsetattribute "
 ${INS} = concat ${STACK1}
@@ -1650,13 +1650,13 @@
 ${STEMP1} = namespace_to_key(${STEMP1})
 
 # Build static field store.
-${INS} = concat "$P1000000 = new "
+${INS} = concat "$P1000000 = new \""
 ${ITEMP0} = elements ${STYPES}
 dec ${ITEMP0}
 ${PTEMP1} = ${STYPES}[${ITEMP0}]
 ${STEMP0} = ${PTEMP1}["reg_type_pmc"]
 ${INS} = concat ${STEMP0}
-${INS} = concat "\n$P1000000 = "
+${INS} = concat "\"\n$P1000000 = "
 ${INS} = concat ${STACK0}
 ${INS} = concat "\nset_hll_global "
 ${INS} = concat ${STEMP1}
@@ -1908,7 +1908,7 @@
 arguments = ttype
 instruction = <<INS
 $P1000000 = ${STACK0}.'load_pmc'()
-$P1000000.__init()
+$P1000000.'init'()
 INS
 typeinfo = # None
 
@@ -1964,20 +1964,20 @@
 goto stobj_DONE
 
 stobj_INT:
-${INS} = concat "$P1000000 = new .Integer\n$P1000000 = "
+${INS} = concat "$P1000000 = new 'Integer'\n$P1000000 = "
 ${INS} = concat ${STACK0}
 ${INS} = concat "\n"
 goto stobj_DONE
 
 stobj_NUM:
-${INS} = concat "$P1000000 = new .Float\n$P1000000 = "
+${INS} = concat "$P1000000 = new 'Float'\n$P1000000 = "
 ${INS} = concat ${STACK0}
 ${INS} = concat "\n"
 goto stobj_DONE
 
 stobj_DONE:
 ${INS} = concat ${STACK1}
-${INS} = concat ".store_pmc($P1000000)\n"
+${INS} = concat ".'store_pmc'($P1000000)\n"
 PIR
 typeinfo = # None
 
@@ -1999,7 +1999,7 @@
 ${INS} = concat ${DEST0}
 ${INS} = concat " = clone "
 ${INS} = concat ${STACK0}
-${INS} = concat "\n$P1000000 = new .Integer\n$P1000000 = 1\nsetprop "
+${INS} = concat "\n$P1000000 = new 'Integer'\n$P1000000 = 1\nsetprop "
 ${INS} = concat ${DEST0}
 ${INS} = concat ", \"boxed\", $P1000000\n"
 goto box_DONE
@@ -2021,61 +2021,61 @@
 throw ${PTEMP0}
 box_I4:
 ${STEMP0} = "System.Int32"
-${INS} = concat "$P1000000 = new Integer\n$P1000000 = "
+${INS} = concat "$P1000000 = new 'Integer'\n$P1000000 = "
 ${INS} = concat ${STACK0}
 ${INS} = concat "\n"
 goto box_EMIT
 box_U4:
 ${STEMP0} = "System.UInt32"
-${INS} = concat "$P1000000 = new Integer\n$P1000000 = "
+${INS} = concat "$P1000000 = new 'Integer'\n$P1000000 = "
 ${INS} = concat ${STACK0}
 ${INS} = concat "\n"
 goto box_EMIT
 box_I2:
 ${STEMP0} = "System.Int16"
-${INS} = concat "$P1000000 = new Integer\n$P1000000 = "
+${INS} = concat "$P1000000 = new 'Integer'\n$P1000000 = "
 ${INS} = concat ${STACK0}
 ${INS} = concat "\n"
 goto box_EMIT
 box_U2:
 ${STEMP0} = "System.UInt16"
-${INS} = concat "$P1000000 = new Integer\n$P1000000 = "
+${INS} = concat "$P1000000 = new 'Integer'\n$P1000000 = "
 ${INS} = concat ${STACK0}
 ${INS} = concat "\n"
 goto box_EMIT
 box_I1:
 ${STEMP0} = "System.SByte"
-${INS} = concat "$P1000000 = new Integer\n$P1000000 = "
+${INS} = concat "$P1000000 = new 'Integer'\n$P1000000 = "
 ${INS} = concat ${STACK0}
 ${INS} = concat "\n"
 goto box_EMIT
 box_U1:
 ${STEMP0} = "System.Byte"
-${INS} = concat "$P1000000 = new Integer\n$P1000000 = "
+${INS} = concat "$P1000000 = new 'Integer'\n$P1000000 = "
 ${INS} = concat ${STACK0}
 ${INS} = concat "\n"
 goto box_EMIT
 box_I:
 ${STEMP0} = "System.IntPtr"
-${INS} = concat "$P1000000 = new Integer\n$P1000000 = "
+${INS} = concat "$P1000000 = new 'Integer'\n$P1000000 = "
 ${INS} = concat ${STACK0}
 ${INS} = concat "\n"
 goto box_EMIT
 box_U:
 ${STEMP0} = "System.UIntPtr"
-${INS} = concat "$P1000000 = new Integer\n$P1000000 = "
+${INS} = concat "$P1000000 = new 'Integer'\n$P1000000 = "
 ${INS} = concat ${STACK0}
 ${INS} = concat "\n"
 goto box_EMIT
 box_R4:
 ${STEMP0} = "System.Single"
-${INS} = concat "$P1000000 = new Float\n$P1000000 = "
+${INS} = concat "$P1000000 = new 'Float'\n$P1000000 = "
 ${INS} = concat ${STACK0}
 ${INS} = concat "\n"
 goto box_EMIT
 box_R8:
 ${STEMP0} = "System.Double"
-${INS} = concat "$P1000000 = new Float\n$P1000000 = "
+${INS} = concat "$P1000000 = new 'Float'\n$P1000000 = "
 ${INS} = concat ${STACK0}
 ${INS} = concat "\n"
 goto box_EMIT
@@ -2134,13 +2134,13 @@
 ${PTEMP0}["_message"] = "Attempt to unbox unknown built-in."
 throw ${PTEMP0}
 unbox_integer:
-${INS} = concat "$P1000000 = new Integer\n$I1000000 = "
+${INS} = concat "$P1000000 = new 'Integer'\n$I1000000 = "
 ${INS} = concat ${STACK0}
 ${INS} = concat "\n$P1000000 = $I1000000\n"
 ${STACK0} = "$P1000000"
 goto unbox_EMIT
 unbox_float:
-${INS} = concat "$P1000000 = new Float\n$N1000000 = "
+${INS} = concat "$P1000000 = new 'Float'\n$N1000000 = "
 ${INS} = concat ${STACK0}
 ${INS} = concat "\n$P1000000 = $N1000000\n"
 ${STACK0} = "$P1000000"
@@ -2246,7 +2246,7 @@
 pir = <<PIR
 # Always start with the same thing.
 ${INS} = concat ${DEST0}
-${INS} = concat " = new ."
+${INS} = concat " = new \""
 
 # Now decide on array type to use.
 ${PTEMP0} = ${DTYPES}[0]
@@ -2279,7 +2279,7 @@
 
 # Now do final stuff.
 newarr_FINAL:
-${INS} = concat "\n"
+${INS} = concat "\"\n"
 ${INS} = concat ${DEST0}
 ${INS} = concat " = "
 ${INS} = concat ${STACK0}
@@ -3353,7 +3353,7 @@
 ${INS} = concat ${STEMP0}
 ${INS} = concat "\n"
 ${INS} = concat ${DEST0}
-${INS} = concat ".set_high_bits("
+${INS} = concat ".'set_high_bits'("
 ${STEMP0} = ${ARG1}
 ${INS} = concat ${STEMP0}
 ${INS} = concat ")\n"

Modified: branches/rakudoreg/languages/dotnet/src/translator.pir
==============================================================================
--- branches/rakudoreg/languages/dotnet/src/translator.pir	(original)
+++ branches/rakudoreg/languages/dotnet/src/translator.pir	Tue Dec 16 08:21:24 2008
@@ -115,7 +115,7 @@
 .end
 .sub ".ctor" :method :multi("System.String", string)
     .param string s
-    $P0 = new .String
+    $P0 = new "String"
     $P0 = s
     setattribute self, "Chars", $P0
 .end
@@ -327,6 +327,8 @@
     pir_output = concat ", \".cctor\"\n$P0()\n"
 
     # This is the end of the on load type setup sub.
+    pir_output = concat "pop_eh\n"
+    pir_output = concat "pop_eh\n"
     pir_output = concat "FAILED:\n.end\n\n"
 
     # If it's an interface, emit code to prevent it being instantiated.
@@ -334,7 +336,7 @@
     is_interface = band flags, 0x20
     if is_interface == 0 goto NOT_INTERFACE
     pir_output = concat <<"PIR"
-.sub __init :method
+.sub 'init' :method :vtable
     $P0 = class self
     $S0 = classname $P0
 PIR
@@ -356,7 +358,7 @@
     is_abstract = band flags, 0x80
     if is_abstract == 0 goto NOT_ABSTRACT
     pir_output = concat <<"PIR"
-.sub __init :method
+.sub 'init' :method :vtable
     $P0 = class self
     $S0 = classname $P0
 PIR
@@ -544,7 +546,7 @@
     goto DONE_INIT
 
 FLOAT_TYPE:
-    init_body = concat "$P0 = new .Float\n$P0 = 0.0\nsetattribute self, \""
+    init_body = concat "$P0 = new 'Float'\n$P0 = 0.0\nsetattribute self, \""
     init_body = concat name
     init_body = concat "\", $P0\n"
     goto DONE_INIT
@@ -567,11 +569,11 @@
 ILOOP_END:
 
     # Build the code.
-    pir_output = ".sub __init :method\n"
+    pir_output = ".sub 'init' :method :vtable\n"
     pir_output = concat init_body
     pir_output = concat <<"PIR"
 .end
-.sub __clone :method
+.sub 'clone' :method :vtable
 .local pmc cpy
 $P0 = class self
 $P1 = classname $P0
@@ -585,29 +587,29 @@
     # enums.
     if parent != "[ \"System\" ; \"Enum\" ]" goto NOT_ENUM
     pir_output = concat <<"PIR"
-.sub __get_integer
+.sub 'get_integer' :vtable
     .param pmc s
     $P0 = getattribute s, "value__"
     $I0 = $P0
     .return($I0)
 .end
-.sub __set_integer_native
+.sub 'set_integer_native' :vtable
     .param pmc s
     .param int i
     $P0 = new 'Integer'
     $P0 = i
     setattribute s, "value__", $P0
 .end
-.sub __get_number
+.sub 'get_number' :vtable
     .param pmc s
     $P0 = getattribute s, "value__"
     $N0 = $P0
     .return($N0)
 .end
-.sub __set_number_native
+.sub 'set_number_native' :vtable
     .param pmc s
     .param num i
-    $P0 = new Float
+    $P0 = new 'Float'
     $P0 = i
     setattribute s, "value__", $P0
 .end

Modified: branches/rakudoreg/languages/dotnet/t/args.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/args.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/args.t	Tue Dec 16 08:21:24 2008
@@ -50,7 +50,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.no_args()
+	$I0 = obj."no_args"()
 	print $I0
 	print "\n"
 .end
@@ -64,11 +64,11 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
 	$I0 = 42
-	$I1 = obj.one_arg($I0)
+	$I1 = obj."one_arg"($I0)
 	print $I1
 	print "\n"
 	$I0 = 7
-	$I1 = obj.one_arg($I0)
+	$I1 = obj."one_arg"($I0)
 	print $I1
 	print "\n"
 .end
@@ -82,7 +82,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.three_args(1,2,3)
+	$I0 = obj."three_args"(1,2,3)
 	print $I0
 	print "\n"
 .end
@@ -95,7 +95,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.ten_args(1,2,3,4,5,6,7,8,9,10)
+	$I0 = obj."ten_args"(1,2,3,4,5,6,7,8,9,10)
 	print $I0
 	print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/array.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/array.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/array.t	Tue Dec 16 08:21:24 2008
@@ -67,7 +67,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$P0 = obj.create_array()
+	$P0 = obj."create_array"()
 	print $P0
 	print "\n"
 .end
@@ -80,8 +80,8 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$P0 = obj.create_array()
-	$I1 = obj.array_length($P0)
+	$P0 = obj."create_array"()
+	$I1 = obj."array_length"($P0)
 	print $I1
 	print "\n"
 .end
@@ -94,7 +94,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.create_and_length()
+	$I0 = obj."create_and_length"()
 	print $I0
 	print "\n"
 .end
@@ -107,7 +107,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.loadstore_test()
+	$I0 = obj."loadstore_test"()
 	print $I0
 	print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/bitwise.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/bitwise.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/bitwise.t	Tue Dec 16 08:21:24 2008
@@ -59,7 +59,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.and(65, 1088)
+	$I0 = obj."and"(65, 1088)
 	print $I0
 	print "\n"
 .end
@@ -72,7 +72,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.or(65, 1024)
+	$I0 = obj."or"(65, 1024)
 	print $I0
 	print "\n"
 .end
@@ -85,7 +85,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.xor(0xF0, 0x77)
+	$I0 = obj."xor"(0xF0, 0x77)
 	print $I0
 	print "\n"
 .end
@@ -98,7 +98,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.not(0xFFFFFFF0)
+	$I0 = obj."not"(0xFFFFFFF0)
 	print $I0
 	print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/box.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/box.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/box.t	Tue Dec 16 08:21:24 2008
@@ -58,7 +58,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.box_1()
+	$I0 = obj."box_1"()
 	print $I0
     print "\n"
 .end
@@ -71,7 +71,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.box_2()
+	$I0 = obj."box_2"()
 	print $I0
     print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/branch.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/branch.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/branch.t	Tue Dec 16 08:21:24 2008
@@ -47,7 +47,7 @@
 				return 1;
 			else
 				return 0;
-        }		
+        }
     }
 }
 CSHARP
@@ -61,19 +61,19 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.lt(5,7)
+	$I0 = obj."lt"(5,7)
 	print $I0
 	print "\n"
-	$I0 = obj.lt(400,8)
+	$I0 = obj."lt"(400,8)
 	print $I0
 	print "\n"
-	$I0 = obj.lt(5,-7)
+	$I0 = obj."lt"(5,-7)
 	print $I0
 	print "\n"
-	$I0 = obj.lt(-400,8123)
+	$I0 = obj."lt"(-400,8123)
 	print $I0
 	print "\n"
-	$I0 = obj.lt(4,4)
+	$I0 = obj."lt"(4,4)
 	print $I0
 	print "\n"
 .end
@@ -90,19 +90,19 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.le(5,7)
+	$I0 = obj."le"(5,7)
 	print $I0
 	print "\n"
-	$I0 = obj.le(400,8)
+	$I0 = obj."le"(400,8)
 	print $I0
 	print "\n"
-	$I0 = obj.le(5,-7)
+	$I0 = obj."le"(5,-7)
 	print $I0
 	print "\n"
-	$I0 = obj.le(-400,8123)
+	$I0 = obj."le"(-400,8123)
 	print $I0
 	print "\n"
-	$I0 = obj.le(4,4)
+	$I0 = obj."le"(4,4)
 	print $I0
 	print "\n"
 .end
@@ -119,19 +119,19 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.gt(5,7)
+	$I0 = obj."gt"(5,7)
 	print $I0
 	print "\n"
-	$I0 = obj.gt(400,8)
+	$I0 = obj."gt"(400,8)
 	print $I0
 	print "\n"
-	$I0 = obj.gt(5,-7)
+	$I0 = obj."gt"(5,-7)
 	print $I0
 	print "\n"
-	$I0 = obj.gt(-400,8123)
+	$I0 = obj."gt"(-400,8123)
 	print $I0
 	print "\n"
-	$I0 = obj.gt(4,4)
+	$I0 = obj."gt"(4,4)
 	print $I0
 	print "\n"
 .end
@@ -148,19 +148,19 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.ge(5,7)
+	$I0 = obj."ge"(5,7)
 	print $I0
 	print "\n"
-	$I0 = obj.ge(400,8)
+	$I0 = obj."ge"(400,8)
 	print $I0
 	print "\n"
-	$I0 = obj.ge(5,-7)
+	$I0 = obj."ge"(5,-7)
 	print $I0
 	print "\n"
-	$I0 = obj.ge(-400,8123)
+	$I0 = obj."ge"(-400,8123)
 	print $I0
 	print "\n"
-	$I0 = obj.ge(4,4)
+	$I0 = obj."ge"(4,4)
 	print $I0
 	print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/calling.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/calling.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/calling.t	Tue Dec 16 08:21:24 2008
@@ -71,7 +71,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.call_no_args(29)
+	$I0 = obj."call_no_args"(29)
     print $I0
     print "\n"
 .end
@@ -84,7 +84,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.call_one_arg()
+	$I0 = obj."call_one_arg"()
     print $I0
     print "\n"
 .end
@@ -97,7 +97,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.call_many_args(2, 3)
+	$I0 = obj."call_many_args"(2, 3)
     print $I0
     print "\n"
 .end
@@ -110,7 +110,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.call_void()
+	$I0 = obj."call_void"()
     print $I0
     print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/callvirt.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/callvirt.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/callvirt.t	Tue Dec 16 08:21:24 2008
@@ -53,7 +53,7 @@
 	load_bytecode "t.pbc"
 	obj1 = new [ "Testing" ; "Test" ]
     obj2 = new [ "Testing" ; "mummy" ]
-	$I0 = obj1.test_call(obj2)
+	$I0 = obj1."test_call"(obj2)
     print $I0
     print "\n"
 .end
@@ -67,7 +67,7 @@
 	load_bytecode "t.pbc"
 	obj1 = new [ "Testing" ; "Test" ]
     obj2 = new [ "Testing" ; "baby" ]
-	$I0 = obj1.test_call(obj2)
+	$I0 = obj1."test_call"(obj2)
     print $I0
     print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/castclass.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/castclass.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/castclass.t	Tue Dec 16 08:21:24 2008
@@ -56,7 +56,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.pos()
+	$I0 = obj."pos"()
     print $I0
     print "\n"
 .end
@@ -70,7 +70,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh caught
-	$I0 = obj.neg()
+	$I0 = obj."neg"()
     print "not "
 caught:
     print "ok\n"

Modified: branches/rakudoreg/languages/dotnet/t/compare.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/compare.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/compare.t	Tue Dec 16 08:21:24 2008
@@ -60,16 +60,16 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.is_same(0, 0)
+	$I0 = obj."is_same"(0, 0)
 	print $I0
 	print "\n"
-    $I0 = obj.is_same(0, 1)
+    $I0 = obj."is_same"(0, 1)
 	print $I0
 	print "\n"
-    $I0 = obj.is_same(1, 0)
+    $I0 = obj."is_same"(1, 0)
 	print $I0
 	print "\n"
-    $I0 = obj.is_same(42, 42)
+    $I0 = obj."is_same"(42, 42)
 	print $I0
 	print "\n"
 .end
@@ -85,16 +85,16 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.is_lt(0, 0)
+	$I0 = obj."is_lt"(0, 0)
 	print $I0
 	print "\n"
-    $I0 = obj.is_lt(0, 1)
+    $I0 = obj."is_lt"(0, 1)
 	print $I0
 	print "\n"
-    $I0 = obj.is_lt(1, 0)
+    $I0 = obj."is_lt"(1, 0)
 	print $I0
 	print "\n"
-    $I0 = obj.is_lt(42, 42)
+    $I0 = obj."is_lt"(42, 42)
 	print $I0
 	print "\n"
 .end
@@ -110,16 +110,16 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.is_lt_un(0, 0)
+	$I0 = obj."is_lt_un"(0, 0)
 	print $I0
 	print "\n"
-    $I0 = obj.is_lt_un(0, 1)
+    $I0 = obj."is_lt_un"(0, 1)
 	print $I0
 	print "\n"
-    $I0 = obj.is_lt_un(1, 0)
+    $I0 = obj."is_lt_un"(1, 0)
 	print $I0
 	print "\n"
-    $I0 = obj.is_lt_un(42, 42)
+    $I0 = obj."is_lt_un"(42, 42)
 	print $I0
 	print "\n"
 .end
@@ -135,16 +135,16 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.is_gt(0, 0)
+	$I0 = obj."is_gt"(0, 0)
 	print $I0
 	print "\n"
-    $I0 = obj.is_gt(0, 1)
+    $I0 = obj."is_gt"(0, 1)
 	print $I0
 	print "\n"
-    $I0 = obj.is_gt(1, 0)
+    $I0 = obj."is_gt"(1, 0)
 	print $I0
 	print "\n"
-    $I0 = obj.is_gt(42, 42)
+    $I0 = obj."is_gt"(42, 42)
 	print $I0
 	print "\n"
 .end
@@ -160,16 +160,16 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.is_gt_un(0, 0)
+	$I0 = obj."is_gt_un"(0, 0)
 	print $I0
 	print "\n"
-    $I0 = obj.is_gt_un(0, 1)
+    $I0 = obj."is_gt_un"(0, 1)
 	print $I0
 	print "\n"
-    $I0 = obj.is_gt_un(1, 0)
+    $I0 = obj."is_gt_un"(1, 0)
 	print $I0
 	print "\n"
-    $I0 = obj.is_gt_un(42, 42)
+    $I0 = obj."is_gt_un"(42, 42)
 	print $I0
 	print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/conditional.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/conditional.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/conditional.t	Tue Dec 16 08:21:24 2008
@@ -58,19 +58,19 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.clip(0)
+	$I0 = obj."clip"(0)
 	print $I0
 	print "\n"
-	$I0 = obj.clip(1)
+	$I0 = obj."clip"(1)
 	print $I0
 	print "\n"
-	$I0 = obj.clip(-1)
+	$I0 = obj."clip"(-1)
 	print $I0
 	print "\n"
-	$I0 = obj.clip(-500)
+	$I0 = obj."clip"(-500)
 	print $I0
 	print "\n"
-	$I0 = obj.clip(42)
+	$I0 = obj."clip"(42)
 	print $I0
 	print "\n"
 .end
@@ -87,22 +87,22 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.band_pass(1)
+	$I0 = obj."band_pass"(1)
 	print $I0
 	print "\n"
-	$I0 = obj.band_pass(2)
+	$I0 = obj."band_pass"(2)
 	print $I0
 	print "\n"
-	$I0 = obj.band_pass(3)
+	$I0 = obj."band_pass"(3)
 	print $I0
 	print "\n"
-	$I0 = obj.band_pass(4)
+	$I0 = obj."band_pass"(4)
 	print $I0
 	print "\n"
-	$I0 = obj.band_pass(5)
+	$I0 = obj."band_pass"(5)
 	print $I0
 	print "\n"
-	$I0 = obj.band_pass(6)
+	$I0 = obj."band_pass"(6)
 	print $I0
 	print "\n"
 .end
@@ -120,16 +120,16 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.is_42(99)
+	$I0 = obj."is_42"(99)
 	print $I0
 	print "\n"
-	$I0 = obj.is_42(-2)
+	$I0 = obj."is_42"(-2)
 	print $I0
 	print "\n"
-	$I0 = obj.is_42(42)
+	$I0 = obj."is_42"(42)
 	print $I0
 	print "\n"
-	$I0 = obj.is_42(-42)
+	$I0 = obj."is_42"(-42)
 	print $I0
 	print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/constants.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/constants.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/constants.t	Tue Dec 16 08:21:24 2008
@@ -57,7 +57,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.zero2eight()
+	$I0 = obj."zero2eight"()
 	print $I0
 	print "\n"
 .end
@@ -70,7 +70,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.m1()
+	$I0 = obj."m1"()
 	print $I0
 	print "\n"
 .end
@@ -83,7 +83,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.bigger_consts()
+	$I0 = obj."bigger_consts"()
 	print $I0
 	print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/constructor.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/constructor.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/constructor.t	Tue Dec 16 08:21:24 2008
@@ -77,7 +77,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.cc_no_args()
+	$I0 = obj."cc_no_args"()
     print $I0
     print "\n"
 .end
@@ -90,12 +90,12 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$N0 = obj.cc_args(10, 2.45)
+	$N0 = obj."cc_args"(10, 2.45)
     print $N0
     print "\n"
 .end
 PIR
-12.450000
+12.45
 OUTPUT
 
 ## Clean up.

Modified: branches/rakudoreg/languages/dotnet/t/conv.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/conv.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/conv.t	Tue Dec 16 08:21:24 2008
@@ -22,7 +22,7 @@
 		{
 			return (sbyte) x;
 		}
-		
+
 		public sbyte conv_i1_f(float x)
 		{
 			return (sbyte) x;
@@ -32,7 +32,7 @@
 		{
 			return (byte) x;
 		}
-		
+
 		public byte conv_u1_f(float x)
 		{
 			return (byte) x;
@@ -42,7 +42,7 @@
 		{
 			return (short) x;
 		}
-		
+
 		public short conv_i2_f(float x)
 		{
 			return (short) x;
@@ -52,7 +52,7 @@
 		{
 			return (ushort) x;
 		}
-		
+
 		public ushort conv_u2_f(float x)
 		{
 			return (ushort) x;
@@ -62,7 +62,7 @@
 		{
 			return (int) x;
 		}
-		
+
 		public uint conv_u4_f(float x)
 		{
 			return (uint) x;
@@ -90,16 +90,16 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.conv_i1_i(42)
+	$I0 = obj."conv_i1_i"(42)
 	print $I0
 	print "\n"
-	$I0 = obj.conv_i1_i(-42)
+	$I0 = obj."conv_i1_i"(-42)
 	print $I0
 	print "\n"
-	$I0 = obj.conv_i1_i(258)
+	$I0 = obj."conv_i1_i"(258)
 	print $I0
 	print "\n"
-	$I0 = obj.conv_i1_i(-258)
+	$I0 = obj."conv_i1_i"(-258)
 	print $I0
 	print "\n"
 .end
@@ -115,16 +115,16 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.conv_i1_f(42.0)
+	$I0 = obj."conv_i1_f"(42.0)
 	print $I0
 	print "\n"
-	$I0 = obj.conv_i1_f(-42.0)
+	$I0 = obj."conv_i1_f"(-42.0)
 	print $I0
 	print "\n"
-	$I0 = obj.conv_i1_f(258.0)
+	$I0 = obj."conv_i1_f"(258.0)
 	print $I0
 	print "\n"
-	$I0 = obj.conv_i1_f(-258.0)
+	$I0 = obj."conv_i1_f"(-258.0)
 	print $I0
 	print "\n"
 .end
@@ -140,10 +140,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.conv_u1_i(42)
+	$I0 = obj."conv_u1_i"(42)
 	print $I0
 	print "\n"
-	$I0 = obj.conv_u1_i(258)
+	$I0 = obj."conv_u1_i"(258)
 	print $I0
 	print "\n"
 .end
@@ -157,10 +157,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.conv_u1_f(42.0)
+	$I0 = obj."conv_u1_f"(42.0)
 	print $I0
 	print "\n"
-	$I0 = obj.conv_u1_f(258.0)
+	$I0 = obj."conv_u1_f"(258.0)
 	print $I0
 	print "\n"
 .end
@@ -174,16 +174,16 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.conv_i2_i(42)
+	$I0 = obj."conv_i2_i"(42)
 	print $I0
 	print "\n"
-	$I0 = obj.conv_i2_i(-42)
+	$I0 = obj."conv_i2_i"(-42)
 	print $I0
 	print "\n"
-	$I0 = obj.conv_i2_i(70000)
+	$I0 = obj."conv_i2_i"(70000)
 	print $I0
 	print "\n"
-	$I0 = obj.conv_i2_i(-70000)
+	$I0 = obj."conv_i2_i"(-70000)
 	print $I0
 	print "\n"
 .end
@@ -199,16 +199,16 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.conv_i2_f(42.0)
+	$I0 = obj."conv_i2_f"(42.0)
 	print $I0
 	print "\n"
-	$I0 = obj.conv_i2_f(-42.0)
+	$I0 = obj."conv_i2_f"(-42.0)
 	print $I0
 	print "\n"
-	$I0 = obj.conv_i2_f(70000.0)
+	$I0 = obj."conv_i2_f"(70000.0)
 	print $I0
 	print "\n"
-	$I0 = obj.conv_i2_f(-70000.0)
+	$I0 = obj."conv_i2_f"(-70000.0)
 	print $I0
 	print "\n"
 .end
@@ -224,10 +224,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.conv_u2_i(42)
+	$I0 = obj."conv_u2_i"(42)
 	print $I0
 	print "\n"
-	$I0 = obj.conv_u2_i(70000)
+	$I0 = obj."conv_u2_i"(70000)
 	print $I0
 	print "\n"
 .end
@@ -241,10 +241,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.conv_u2_f(42.0)
+	$I0 = obj."conv_u2_f"(42.0)
 	print $I0
 	print "\n"
-	$I0 = obj.conv_u2_f(70000.0)
+	$I0 = obj."conv_u2_f"(70000.0)
 	print $I0
 	print "\n"
 .end
@@ -258,10 +258,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.conv_i4_f(42.0)
+	$I0 = obj."conv_i4_f"(42.0)
 	print $I0
 	print "\n"
-	$I0 = obj.conv_i4_f(-42.0)
+	$I0 = obj."conv_i4_f"(-42.0)
 	print $I0
 	print "\n"
 .end
@@ -275,7 +275,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.conv_u4_f(42.0)
+	$I0 = obj."conv_u4_f"(42.0)
 	print $I0
 	print "\n"
 .end
@@ -288,10 +288,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$N0 = obj.conv_r4_i(42)
+	$N0 = obj."conv_r4_i"(42)
 	print $N0
 	print "\n"
-	$N0 = obj.conv_r4_i(-42)
+	$N0 = obj."conv_r4_i"(-42)
 	print $N0
 	print "\n"
 .end
@@ -305,10 +305,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$N0 = obj.conv_r8_i(42)
+	$N0 = obj."conv_r8_i"(42)
 	print $N0
 	print "\n"
-	$N0 = obj.conv_r8_i(-42)
+	$N0 = obj."conv_r8_i"(-42)
 	print $N0
 	print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/convovf.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/convovf.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/convovf.t	Tue Dec 16 08:21:24 2008
@@ -105,7 +105,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.u1(200)
+	$I0 = obj."u1"(200)
 	print $I0
 	print "\n"
 .end
@@ -119,7 +119,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$I0 = obj.u1(300)
+	$I0 = obj."u1"(300)
 	print "failed\n"
     end
 handler:
@@ -136,7 +136,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$I0 = obj.u1(-5)
+	$I0 = obj."u1"(-5)
 	print "failed\n"
     end
 handler:
@@ -152,7 +152,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.i1(100)
+	$I0 = obj."i1"(100)
 	print $I0
 	print "\n"
 .end
@@ -165,7 +165,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.i1(-5)
+	$I0 = obj."i1"(-5)
 	print $I0
     print "\n"
     end
@@ -180,7 +180,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$I0 = obj.i1(128)
+	$I0 = obj."i1"(128)
 	print "failed\n"
     end
 handler:
@@ -197,7 +197,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$I0 = obj.i1(-129)
+	$I0 = obj."i1"(-129)
 	print "failed\n"
     end
 handler:
@@ -213,7 +213,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.u2(33000)
+	$I0 = obj."u2"(33000)
 	print $I0
 	print "\n"
 .end
@@ -227,7 +227,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$I0 = obj.u2(68000)
+	$I0 = obj."u2"(68000)
 	print "failed\n"
     end
 handler:
@@ -244,7 +244,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$I0 = obj.u2(-5)
+	$I0 = obj."u2"(-5)
 	print "failed\n"
     end
 handler:
@@ -260,7 +260,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.i2(10000)
+	$I0 = obj."i2"(10000)
 	print $I0
 	print "\n"
 .end
@@ -273,7 +273,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.i2(-5)
+	$I0 = obj."i2"(-5)
 	print $I0
     print "\n"
     end
@@ -288,7 +288,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$I0 = obj.i2(32768)
+	$I0 = obj."i2"(32768)
 	print "failed\n"
     end
 handler:
@@ -305,7 +305,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$I0 = obj.i2(-32769)
+	$I0 = obj."i2"(-32769)
 	print "failed\n"
     end
 handler:
@@ -321,7 +321,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.u4(5000000)
+	$I0 = obj."u4"(5000000)
 	print $I0
 	print "\n"
 .end
@@ -335,7 +335,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$I0 = obj.u4(-5)
+	$I0 = obj."u4"(-5)
 	print "failed\n"
     end
 handler:
@@ -351,7 +351,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.u1_un(200)
+	$I0 = obj."u1_un"(200)
 	print $I0
 	print "\n"
 .end
@@ -365,7 +365,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$I0 = obj.u1_un(300)
+	$I0 = obj."u1_un"(300)
 	print "failed\n"
     end
 handler:
@@ -381,7 +381,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.i1_un(100)
+	$I0 = obj."i1_un"(100)
 	print $I0
 	print "\n"
 .end
@@ -395,7 +395,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$I0 = obj.i1_un(128)
+	$I0 = obj."i1_un"(128)
 	print "failed\n"
     end
 handler:
@@ -412,7 +412,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$I0 = obj.i1_un(-1)
+	$I0 = obj."i1_un"(-1)
 	print "failed\n"
     end
 handler:
@@ -428,7 +428,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.u2_un(33000)
+	$I0 = obj."u2_un"(33000)
 	print $I0
 	print "\n"
 .end
@@ -442,7 +442,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$I0 = obj.u2_un(68000)
+	$I0 = obj."u2_un"(68000)
 	print "failed\n"
     end
 handler:
@@ -458,7 +458,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.i2_un(10000)
+	$I0 = obj."i2_un"(10000)
 	print $I0
 	print "\n"
 .end
@@ -472,7 +472,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$I0 = obj.i2_un(32768)
+	$I0 = obj."i2_un"(32768)
 	print "failed\n"
     end
 handler:
@@ -489,7 +489,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$I0 = obj.i2_un(-1)
+	$I0 = obj."i2_un"(-1)
 	print "failed\n"
     end
 handler:
@@ -505,7 +505,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.i4_un(5000000)
+	$I0 = obj."i4_un"(5000000)
 	print $I0
 	print "\n"
 .end
@@ -519,7 +519,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$I0 = obj.i4_un(-5)
+	$I0 = obj."i4_un"(-5)
 	print "failed\n"
     end
 handler:
@@ -535,7 +535,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$N0 = obj.u1_f(200.0)
+	$N0 = obj."u1_f"(200.0)
 	print $N0
 	print "\n"
 .end
@@ -549,7 +549,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$N0 = obj.u1_f(300.0)
+	$N0 = obj."u1_f"(300.0)
 	print "failed\n"
     end
 handler:
@@ -566,7 +566,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$N0 = obj.u1_f(-5.0)
+	$N0 = obj."u1_f"(-5.0)
 	print "failed\n"
     end
 handler:
@@ -582,7 +582,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$N0 = obj.i1_f(100.0)
+	$N0 = obj."i1_f"(100.0)
 	print $N0
 	print "\n"
 .end
@@ -595,7 +595,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$N0 = obj.i1_f(-5.0)
+	$N0 = obj."i1_f"(-5.0)
 	print $N0
     print "\n"
     end
@@ -610,7 +610,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$N0 = obj.i1_f(128.0)
+	$N0 = obj."i1_f"(128.0)
 	print "failed\n"
     end
 handler:
@@ -627,7 +627,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$N0 = obj.i1_f(-129.0)
+	$N0 = obj."i1_f"(-129.0)
 	print "failed\n"
     end
 handler:
@@ -643,7 +643,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$N0 = obj.u2_f(33000.0)
+	$N0 = obj."u2_f"(33000.0)
 	print $N0
 	print "\n"
 .end
@@ -657,7 +657,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$N0 = obj.u2_f(68000.0)
+	$N0 = obj."u2_f"(68000.0)
 	print "failed\n"
     end
 handler:
@@ -674,7 +674,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$N0 = obj.u2_f(-5.0)
+	$N0 = obj."u2_f"(-5.0)
 	print "failed\n"
     end
 handler:
@@ -690,7 +690,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$N0 = obj.i2_f(10000.0)
+	$N0 = obj."i2_f"(10000.0)
 	print $N0
 	print "\n"
 .end
@@ -703,7 +703,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$N0 = obj.i2_f(-5.0)
+	$N0 = obj."i2_f"(-5.0)
 	print $N0
     print "\n"
     end
@@ -718,7 +718,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$N0 = obj.i2_f(32768.0)
+	$N0 = obj."i2_f"(32768.0)
 	print "failed\n"
     end
 handler:
@@ -735,7 +735,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$N0 = obj.i2_f(-32769.0)
+	$N0 = obj."i2_f"(-32769.0)
 	print "failed\n"
     end
 handler:

Modified: branches/rakudoreg/languages/dotnet/t/enum.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/enum.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/enum.t	Tue Dec 16 08:21:24 2008
@@ -97,7 +97,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.value()
+	$I0 = obj."value"()
 	print $I0
     print "\n"
 .end
@@ -110,7 +110,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.or()
+	$I0 = obj."or"()
 	print $I0
     print "\n"
 .end
@@ -123,7 +123,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.or_int()
+	$I0 = obj."or_int"()
 	print $I0
     print "\n"
 .end
@@ -136,10 +136,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.cond_1(0)
+	$I0 = obj."cond_1"(0)
 	print $I0
     print "\n"
-    $I0 = obj.cond_1(42)
+    $I0 = obj."cond_1"(42)
 	print $I0
     print "\n"
 .end
@@ -153,10 +153,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.cond_2(2)
+	$I0 = obj."cond_2"(2)
 	print $I0
     print "\n"
-    $I0 = obj.cond_2(0)
+    $I0 = obj."cond_2"(0)
 	print $I0
     print "\n"
 .end
@@ -170,10 +170,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.argument(1)
+	$I0 = obj."argument"(1)
 	print $I0
     print "\n"
-    $I0 = obj.argument(0)
+    $I0 = obj."argument"(0)
 	print $I0
     print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/exceptions.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/exceptions.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/exceptions.t	Tue Dec 16 08:21:24 2008
@@ -182,7 +182,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.simple(0)
+	$I0 = obj."simple"(0)
     print $I0
     print "\n"
 .end
@@ -195,7 +195,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.simple(1)
+	$I0 = obj."simple"(1)
     print $I0
     print "\n"
 .end
@@ -208,10 +208,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.typed(1)
+	$I0 = obj."typed"(1)
     print $I0
     print "\n"
-    $I0 = obj.typed(0)
+    $I0 = obj."typed"(0)
     print $I0
     print "\n"
 .end
@@ -225,10 +225,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.nested1(0)
+	$I0 = obj."nested1"(0)
     print $I0
     print "\n"
-    $I0 = obj.nested1(1)
+    $I0 = obj."nested1"(1)
     print $I0
     print "\n"
 .end
@@ -242,10 +242,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.nested2(0)
+	$I0 = obj."nested2"(0)
     print $I0
     print "\n"
-    $I0 = obj.nested2(1)
+    $I0 = obj."nested2"(1)
     print $I0
     print "\n"
 .end
@@ -259,10 +259,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.nested3(0)
+	$I0 = obj."nested3"(0)
     print $I0
     print "\n"
-    $I0 = obj.nested3(1)
+    $I0 = obj."nested3"(1)
     print $I0
     print "\n"
 .end
@@ -276,10 +276,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.nested4(0)
+	$I0 = obj."nested4"(0)
     print $I0
     print "\n"
-    $I0 = obj.nested4(1)
+    $I0 = obj."nested4"(1)
     print $I0
     print "\n"
 .end
@@ -293,10 +293,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.nested5(0)
+	$I0 = obj."nested5"(0)
     print $I0
     print "\n"
-    $I0 = obj.nested5(1)
+    $I0 = obj."nested5"(1)
     print $I0
     print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/external.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/external.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/external.t	Tue Dec 16 08:21:24 2008
@@ -68,7 +68,7 @@
     load_bytecode "external.pbc"
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$P0 = obj.create_monkey()
+	$P0 = obj."create_monkey"()
     unless null $P0 goto IS_OK
     print "busted\n"
 IS_OK:
@@ -84,8 +84,8 @@
     load_bytecode "external.pbc"
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$P0 = obj.create_monkey()
-    $I0 = obj.monkey_age_doubled($P0)
+	$P0 = "obj.create_monkey"()
+    $I0 = obj."monkey_age_doubled"($P0)
     print $I0
     print "\n"
 .end
@@ -99,8 +99,8 @@
     load_bytecode "external.pbc"
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$P0 = obj.create_monkey()
-    $S0 = obj.monkey_talk($P0)
+	$P0 = obj."create_monkey"()
+    $S0 = obj."monkey_talk"($P0)
     print $S0
     print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/field.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/field.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/field.t	Tue Dec 16 08:21:24 2008
@@ -48,7 +48,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	obj.set_x(28)
+	obj."set_x"(28)
     $P0 = new 'Integer'
     $P0 = getattribute obj, "x"
 	print $P0
@@ -63,7 +63,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	obj.set_y(14)
+	obj."set_y"(14)
     $P0 = new 'Integer'
     $P0 = getattribute obj, "y"
 	print $P0
@@ -78,9 +78,9 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	obj.set_x(28)
-	obj.set_y(14)
-    $I0 = obj.add()
+	obj."set_x"(28)
+	obj."set_y"(14)
+    $I0 = obj."add"()
 	print $I0
 	print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/finally.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/finally.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/finally.t	Tue Dec 16 08:21:24 2008
@@ -178,13 +178,17 @@
 ## Attempt to translate.
 ok( translate( "t.dll", "t.pbc" ), 'translate' );
 
+SKIP:
+{
+skip( "infinite loop (missing pop_eh)", 6);
+
 ## Tests.
 is( run_pir(<<'PIR'), <<'OUTPUT', 'unwind over' );
 .sub main
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.unwind_over()
+	$I0 = obj."unwind_over"()
     print $I0
     print "\n"
 .end
@@ -197,7 +201,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.unwind_over_2()
+	$I0 = obj."unwind_over_2"()
     print $I0
     print "\n"
 .end
@@ -210,7 +214,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.try_finally()
+	$I0 = obj."try_finally"()
     print $I0
     print "\n"
 .end
@@ -223,7 +227,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.mixed()
+	$I0 = obj."mixed"()
     print $I0
     print "\n"
 .end
@@ -236,10 +240,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.nested_1(0)
+	$I0 = obj."nested_1"(0)
     print $I0
     print "\n"
-    $I0 = obj.nested_1(1)
+    $I0 = obj."nested_1"(1)
     print $I0
     print "\n"
 .end
@@ -253,10 +257,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.nested_2(0)
+	$I0 = obj."nested_2"(0)
     print $I0
     print "\n"
-    $I0 = obj.nested_2(1)
+    $I0 = obj."nested_2"(1)
     print $I0
     print "\n"
 .end
@@ -264,6 +268,7 @@
 31
 23
 OUTPUT
+}
 
 ## Clean up.
 unlink qw(t.dll t.pbc);

Modified: branches/rakudoreg/languages/dotnet/t/floatarray.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/floatarray.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/floatarray.t	Tue Dec 16 08:21:24 2008
@@ -54,7 +54,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$N0 = obj.test_float()
+	$N0 = obj."test_float"()
 	print $N0
 	print "\n"
 .end
@@ -67,7 +67,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$N0 = obj.test_double()
+	$N0 = obj."test_double"()
 	print $N0
 	print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/hierachy.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/hierachy.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/hierachy.t	Tue Dec 16 08:21:24 2008
@@ -61,7 +61,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-    $I0 = obj.check_it_works()
+    $I0 = obj."check_it_works"()
     print $I0
     print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/i8.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/i8.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/i8.t	Tue Dec 16 08:21:24 2008
@@ -36,11 +36,11 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$P0 = obj.set_long()
-    $I0 = $P0.get_high_bits()
+	$P0 = obj."set_long"()
+    $I0 = $P0."get_high_bits"()
 	print $I0
 	print "\n"
-    $I0 = $P0.get_low_bits()
+    $I0 = $P0."get_low_bits"()
 	print $I0
 	print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/inheritance.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/inheritance.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/inheritance.t	Tue Dec 16 08:21:24 2008
@@ -92,7 +92,7 @@
 	load_bytecode "t.pbc"
 	obj1 = new [ "Testing" ; "Test" ]
     obj2 = new [ "Testing" ; "baby" ]
-	$I0 = obj1.test_2_up(obj2)
+	$I0 = obj1."test_2_up"(obj2)
     print $I0
     print "\n"
 .end
@@ -106,7 +106,7 @@
 	load_bytecode "t.pbc"
 	obj1 = new [ "Testing" ; "Test" ]
     obj2 = new [ "Testing" ; "baby" ]
-	$I0 = obj1.test_1_up(obj2)
+	$I0 = obj1."test_1_up"(obj2)
     print $I0
     print "\n"
 .end
@@ -120,7 +120,7 @@
 	load_bytecode "t.pbc"
 	obj1 = new [ "Testing" ; "Test" ]
     obj2 = new [ "Testing" ; "baby" ]
-	$I0 = obj1.test_cur(obj2)
+	$I0 = obj1."test_cur"(obj2)
     print $I0
     print "\n"
 .end
@@ -134,7 +134,7 @@
 	load_bytecode "t.pbc"
 	obj1 = new [ "Testing" ; "Test" ]
     obj2 = new [ "Testing" ; "mummy" ]
-	$I0 = obj1.test(obj2)
+	$I0 = obj1."test"(obj2)
     print $I0
     print "\n"
 .end
@@ -148,7 +148,7 @@
 	load_bytecode "t.pbc"
 	obj1 = new [ "Testing" ; "Test" ]
     obj2 = new [ "Testing" ; "baby" ]
-	$I0 = obj1.test(obj2)
+	$I0 = obj1."test"(obj2)
     print $I0
     print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/initializer.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/initializer.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/initializer.t	Tue Dec 16 08:21:24 2008
@@ -42,7 +42,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.get_x()
+	$I0 = obj."get_x"()
 	print $I0
 	print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/intarray.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/intarray.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/intarray.t	Tue Dec 16 08:21:24 2008
@@ -90,7 +90,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.test_sbyte()
+	$I0 = obj."test_sbyte"()
 	print $I0
 	print "\n"
 .end
@@ -103,7 +103,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.test_byte()
+	$I0 = obj."test_byte"()
 	print $I0
 	print "\n"
 .end
@@ -116,7 +116,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.test_short()
+	$I0 = obj."test_short"()
 	print $I0
 	print "\n"
 .end
@@ -129,7 +129,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.test_ushort()
+	$I0 = obj."test_ushort"()
 	print $I0
 	print "\n"
 .end
@@ -142,7 +142,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.test_int()
+	$I0 = obj."test_int"()
 	print $I0
 	print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/interface.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/interface.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/interface.t	Tue Dec 16 08:21:24 2008
@@ -130,7 +130,7 @@
     addparent cls, prt
 	obj = new "badness"
     push_eh handler
-    obj.kick()
+    obj."kick"()
     print "not "
 handler:
     print "ok\n"
@@ -144,9 +144,9 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-    obj.setup()
-    obj.kick_da_brother(10)
-    $I0 = obj.ready_to_sell()
+    obj."setup"()
+    obj."kick_da_brother"(10)
+    $I0 = obj."ready_to_sell"()
     print $I0
     print "\n"
 .end
@@ -159,9 +159,9 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-    obj.setup()
-    obj.kick_da_brother(1000) # ouch!
-    $I0 = obj.ready_to_sell()
+    obj."setup"()
+    obj."kick_da_brother"(1000) # ouch!
+    $I0 = obj."ready_to_sell"()
     print $I0
     print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/isinst.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/isinst.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/isinst.t	Tue Dec 16 08:21:24 2008
@@ -59,7 +59,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.pos()
+	$I0 = obj."pos"()
     print $I0
     print "\n"
 .end
@@ -72,7 +72,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.neg()
+	$I0 = obj."neg"()
     print $I0
     print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/locals.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/locals.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/locals.t	Tue Dec 16 08:21:24 2008
@@ -67,7 +67,7 @@
         .local pmc obj
         load_bytecode "t.pbc"
         obj = new [ "Testing" ; "Test" ]
-        $I0 = obj.no_locals()
+        $I0 = obj."no_locals"()
         print $I0
         print "\n"
 .end
@@ -80,7 +80,7 @@
         .local pmc obj
         load_bytecode "t.pbc"
         obj = new [ "Testing" ; "Test" ]
-        $I0 = obj.few_locals()
+        $I0 = obj."few_locals"()
         print $I0
         print "\n"
 .end
@@ -93,7 +93,7 @@
         .local pmc obj
         load_bytecode "t.pbc"
         obj = new [ "Testing" ; "Test" ]
-        $I0 = obj.fib_locals()
+        $I0 = obj."fib_locals"()
         print $I0
         print "\n"
 .end
@@ -106,7 +106,7 @@
         .local pmc obj
         load_bytecode "t.pbc"
         obj = new [ "Testing" ; "Test" ]
-        $I0 = obj.locals_with_args(2,3)
+        $I0 = obj."locals_with_args"(2,3)
         print $I0
         print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/loop.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/loop.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/loop.t	Tue Dec 16 08:21:24 2008
@@ -57,19 +57,19 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.add_hundred(0)
+	$I0 = obj."add_hundred"(0)
 	print $I0
 	print "\n"
-	$I0 = obj.add_hundred(21)
+	$I0 = obj."add_hundred"(21)
 	print $I0
 	print "\n"
-	$I0 = obj.add_hundred(-1)
+	$I0 = obj."add_hundred"(-1)
 	print $I0
 	print "\n"
-	$I0 = obj.add_hundred(-500)
+	$I0 = obj."add_hundred"(-500)
 	print $I0
 	print "\n"
-	$I0 = obj.add_hundred(42)
+	$I0 = obj."add_hundred"(42)
 	print $I0
 	print "\n"
 .end
@@ -86,16 +86,16 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.multiply(4,5)
+	$I0 = obj."multiply"(4,5)
 	print $I0
 	print "\n"
-	$I0 = obj.multiply(6,3)
+	$I0 = obj."multiply"(6,3)
 	print $I0
 	print "\n"
-	$I0 = obj.multiply(0,1)
+	$I0 = obj."multiply"(0,1)
 	print $I0
 	print "\n"
-	$I0 = obj.multiply(9,0)
+	$I0 = obj."multiply"(9,0)
 	print $I0
 	print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/math.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/math.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/math.t	Tue Dec 16 08:21:24 2008
@@ -37,7 +37,7 @@
         {
             return x / y;
         }
-		
+
 		public int rem(int x, int y)
         {
             return x % y;
@@ -60,10 +60,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.add(500,72)
+	$I0 = obj."add"(500,72)
 	print $I0
 	print "\n"
-	$I0 = obj.add(500,-72)
+	$I0 = obj."add"(500,-72)
 	print $I0
 	print "\n"
 .end
@@ -94,10 +94,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.mul(50,7)
+	$I0 = obj."mul"(50,7)
 	print $I0
 	print "\n"
-	$I0 = obj.mul(-7,-6)
+	$I0 = obj."mul"(-7,-6)
 	print $I0
 	print "\n"
 .end
@@ -111,13 +111,13 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.div(12,3)
+	$I0 = obj."div"(12,3)
 	print $I0
 	print "\n"
-	$I0 = obj.div(15,14)
+	$I0 = obj."div"(15,14)
 	print $I0
 	print "\n"
-	$I0 = obj.div(-121,11)
+	$I0 = obj."div"(-121,11)
 	print $I0
 	print "\n"
 .end
@@ -132,10 +132,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.rem(13,3)
+	$I0 = obj."rem"(13,3)
 	print $I0
 	print "\n"
-	$I0 = obj.rem(-15,13)
+	$I0 = obj."rem"(-15,13)
 	print $I0
 	print "\n"
 .end
@@ -149,10 +149,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.neg(100)
+	$I0 = obj."neg"(100)
 	print $I0
 	print "\n"
-	$I0 = obj.neg(-15)
+	$I0 = obj."neg"(-15)
 	print $I0
 	print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/mathovf.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/mathovf.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/mathovf.t	Tue Dec 16 08:21:24 2008
@@ -60,7 +60,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.add(500,72)
+	$I0 = obj."add"(500,72)
 	print $I0
 	print "\n"
 .end
@@ -74,7 +74,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$I0 = obj.add(2147483640, 100)
+	$I0 = obj."add"(2147483640, 100)
 	print "failed\n"
     end
 handler:
@@ -90,7 +90,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.add_un(500,72)
+	$I0 = obj."add_un"(500,72)
 	print $I0
 	print "\n"
 .end
@@ -103,9 +103,9 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.add_un(2147483647, 2147483647)
+	$I0 = obj."add_un"(2147483647, 2147483647)
     push_eh handler
-    $I0 = obj.add_un($I0, 10)
+    $I0 = obj."add_un"($I0, 10)
 	print "failed\n"
     end
 handler:
@@ -185,7 +185,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.mul(500,20)
+	$I0 = obj."mul"(500,20)
 	print $I0
 	print "\n"
 .end
@@ -199,7 +199,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
     push_eh handler
-	$I0 = obj.mul(214748364, 100)
+	$I0 = obj."mul"(214748364, 100)
 	print "failed\n"
     end
 handler:
@@ -215,7 +215,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.mul_un(500,20)
+	$I0 = obj."mul_un"(500,20)
 	print $I0
 	print "\n"
 .end
@@ -229,7 +229,7 @@
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
 	push_eh handler
-	$I0 = obj.mul_un(214748364, 214748364)
+	$I0 = obj."mul_un"(214748364, 214748364)
 	print "failed\n"
     end
 handler:

Modified: branches/rakudoreg/languages/dotnet/t/mp.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/mp.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/mp.t	Tue Dec 16 08:21:24 2008
@@ -106,7 +106,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.local_ints()
+	$I0 = obj."local_ints"()
 	print $I0
 	print "\n"
 .end
@@ -119,7 +119,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$N0 = obj.local_floats()
+	$N0 = obj."local_floats"()
 	print $N0
 	print "\n"
 .end
@@ -132,7 +132,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.param_ints(5, 10, 20, 40, 80, 160)
+	$I0 = obj."param_ints"(5, 10, 20, 40, 80, 160)
 	print $I0
 	print "\n"
 .end
@@ -145,7 +145,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$N0 = obj.param_floats(5.5, 7.5)
+	$N0 = obj."param_floats"(5.5, 7.5)
 	print $N0
 	print "\n"
 .end
@@ -158,7 +158,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.element()
+	$I0 = obj."element"()
 	print $I0
 	print "\n"
 .end
@@ -171,7 +171,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.field()
+	$I0 = obj."field"()
 	print $I0
 	print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/mp_pmc.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/mp_pmc.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/mp_pmc.t	Tue Dec 16 08:21:24 2008
@@ -39,9 +39,9 @@
     .local int tmp
 
     # Get register's value indirectly, increment it and store back indirectly.
-    tmp = ptr.load_int()
+    tmp = ptr."load_int"()
     inc tmp
-    ptr.store_int(tmp)
+    ptr."store_int"(tmp)
 .end
 PIR
 Jonathan will be 21 years old tomorrow! :-O
@@ -71,12 +71,12 @@
     .local num tmp
 
     # Get register's value indirectly, increment it and store back indirectly.
-    tmp = ptr.load_float()
+    tmp = ptr."load_float"()
     tmp = tmp * 2
-    ptr.store_float(tmp)
+    ptr."store_float"(tmp)
 .end
 PIR
-4.800000
+4.8
 OUTPUT
 
 is( run_pir(<<'PIR'), <<'OUTPUT', 'pmc reg' );
@@ -87,7 +87,7 @@
     $P0 = loadlib "dotnet_runtime"
 
     # Get the pointer.
-    the_test = new Float
+    the_test = new 'Float'
     the_test = 42.2
     ptr = net_reg_ptr the_test
 
@@ -105,11 +105,11 @@
     .local int tmp2
 
     # Get register's value indirectly, increment it and store back indirectly.
-    tmp = ptr.load_pmc()
+    tmp = ptr."load_pmc"()
     tmp2 = tmp
     tmp = new 'Integer'
     tmp = tmp2
-    ptr.store_pmc(tmp)
+    ptr."store_pmc"(tmp)
 .end
 PIR
 42
@@ -123,7 +123,7 @@
     $P0 = loadlib "dotnet_runtime"
 
     # Set up an array.
-    arr = new FixedIntegerArray
+    arr = new 'FixedIntegerArray'
     arr = 3
     arr[0] = 40
     arr[1] = 41
@@ -133,11 +133,11 @@
     ptr = net_ldelema arr, 1
 
     # Use the pointer to get value, increment it, store it again.
-    the_test = ptr.load_int()
+    the_test = ptr."load_int"()
     print the_test
     print "\n"
     inc the_test
-    ptr.store_int(the_test)
+    ptr."store_int"(the_test)
 
     # Print array element.
     the_test = arr[1]
@@ -157,7 +157,7 @@
     $P0 = loadlib "dotnet_runtime"
 
     # Set up an array.
-    arr = new FixedFloatArray
+    arr = new 'FixedFloatArray'
     arr = 3
     arr[0] = 14.2
     arr[1] = 5.9
@@ -167,11 +167,11 @@
     ptr = net_ldelema arr, 1
 
     # Use the pointer to get value, increment it, store it again.
-    the_test = ptr.load_float()
+    the_test = ptr."load_float"()
     print the_test
     print "\n"
     the_test = the_test * 2
-    ptr.store_float(the_test)
+    ptr."store_float"(the_test)
 
     # Print array element.
     the_test = arr[1]
@@ -179,8 +179,8 @@
     print "\n"
 .end
 PIR
-5.900000
-11.800000
+5.9
+11.8
 OUTPUT
 
 is( run_pir(<<'PIR'), <<'OUTPUT', 'pmc element' );
@@ -190,15 +190,15 @@
     $P0 = loadlib "dotnet_runtime"
 
     # Set up an array.
-    arr = new FixedFloatArray
+    arr = new 'FixedFloatArray'
     arr = 3
-    the_test = new Float
+    the_test = new 'Float'
     the_test = 14.2
     arr[0] = the_test
-    the_test = new Float
+    the_test = new 'Float'
     the_test = 5.9
     arr[1] = the_test
-    the_test = new Float
+    the_test = new 'Float'
     the_test = 18.7
     arr[2] = the_test
 
@@ -206,12 +206,12 @@
     ptr = net_ldelema arr, 1
 
     # Use the pointer to get value, increment it, store it again.
-    the_test = ptr.load_pmc()
+    the_test = ptr."load_pmc"()
     print the_test
     print "\n"
-    the_test = new Float
+    the_test = new 'Float'
     the_test = 11.8
-    ptr.store_float(the_test)
+    ptr."store_float"(the_test)
 
     # Print array element.
     the_test = arr[1]
@@ -242,12 +242,12 @@
     ptr = net_ldflda obj, "age"
 
     # Use the pointer to get the age attribute and change it.
-    the_test = ptr.load_int()
+    the_test = ptr."load_int"()
     print "The monkey was "
     print the_test
     print " years old.\n"
     inc the_test
-    ptr.store_int(the_test)
+    ptr."store_int"(the_test)
 
     # Print attribute.
     $P1 = getattribute obj, "age"
@@ -271,7 +271,7 @@
     $P0 = newclass "monkey"
     addattribute $P0, "height"
     obj = new "monkey"
-    $P1 = new Float
+    $P1 = new 'Float'
     $P1 = 1.79
     setattribute obj, "height", $P1
 
@@ -279,12 +279,12 @@
     ptr = net_ldflda obj, "height"
 
     # Use the pointer to get the height attribute and change it.
-    the_test = ptr.load_float()
+    the_test = ptr."load_float"()
     print "The monkey was "
     print the_test
     print " meters tall.\n"
     the_test = 1.82
-    ptr.store_float(the_test)
+    ptr."store_float"(the_test)
 
     # Print attribute.
     $P1 = getattribute obj, "height"
@@ -293,7 +293,7 @@
     print " meters tall.\n"
 .end
 PIR
-The monkey was 1.790000 meters tall.
+The monkey was 1.79 meters tall.
 The monkey is now 1.82 meters tall.
 OUTPUT
 
@@ -307,7 +307,7 @@
     $P0 = newclass "monkey"
     addattribute $P0, "name"
     obj = new "monkey"
-    $P1 = new String
+    $P1 = new 'String'
     $P1 = "Derek"
     setattribute obj, "name", $P1
 
@@ -315,13 +315,13 @@
     ptr = net_ldflda obj, "name"
 
     # Use the pointer to get the name attribute and change it.
-    the_test = ptr.load_pmc()
+    the_test = ptr."load_pmc"()
     print "The monkey was called "
     print the_test
     print ".\n"
-    $P1 = new String
+    $P1 = new 'String'
     $P1 = "Bradley"
-    ptr.store_pmc($P1)
+    ptr."store_pmc"($P1)
 
     # Print attribute.
     the_test = getattribute obj, "name"

Modified: branches/rakudoreg/languages/dotnet/t/null.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/null.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/null.t	Tue Dec 16 08:21:24 2008
@@ -40,7 +40,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$P0 = obj.ret_null()
+	$P0 = obj."ret_null"()
     if null $P0 goto IS_NULL
 	print "not null\n"
 IS_NULL:
@@ -55,8 +55,8 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-    $P0 = obj.ret_null()
-	$I0 = obj.comp_null($P0)
+    $P0 = obj."ret_null"()
+	$I0 = obj."comp_null"($P0)
     print $I0
     print "\n"
 .end
@@ -69,7 +69,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.comp_null(obj)
+	$I0 = obj."comp_null"(obj)
     print $I0
     print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/overloading.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/overloading.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/overloading.t	Tue Dec 16 08:21:24 2008
@@ -94,7 +94,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.one_arg_i()
+	$I0 = obj."one_arg_i"()
     print $I0
     print "\n"
 .end
@@ -107,7 +107,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.two_args_ii()
+	$I0 = obj."two_args_ii"()
     print $I0
     print "\n"
 .end
@@ -120,7 +120,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.two_args_if()
+	$I0 = obj."two_args_if"()
     print $I0
     print "\n"
 .end
@@ -133,7 +133,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.test_obj_1()
+	$I0 = obj."test_obj_1"()
     print $I0
     print "\n"
 .end
@@ -146,7 +146,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.test_obj_2()
+	$I0 = obj."test_obj_2"()
     print $I0
     print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/overloadprimitives.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/overloadprimitives.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/overloadprimitives.t	Tue Dec 16 08:21:24 2008
@@ -118,7 +118,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.m_int()
+	$I0 = obj."m_int"()
     print $I0
     print "\n"
 .end
@@ -131,7 +131,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.m_uint()
+	$I0 = obj."m_uint"()
     print $I0
     print "\n"
 .end
@@ -144,7 +144,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.m_sbyte()
+	$I0 = obj."m_sbyte"()
     print $I0
     print "\n"
 .end
@@ -157,7 +157,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.m_byte()
+	$I0 = obj."m_byte"()
     print $I0
     print "\n"
 .end
@@ -170,7 +170,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.m_short()
+	$I0 = obj."m_short"()
     print $I0
     print "\n"
 .end
@@ -183,7 +183,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.m_ushort()
+	$I0 = obj."m_ushort"()
     print $I0
     print "\n"
 .end
@@ -196,7 +196,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.m_float()
+	$I0 = obj."m_float"()
     print $I0
     print "\n"
 .end
@@ -209,7 +209,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.m_double()
+	$I0 = obj."m_double"()
     print $I0
     print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/recursion.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/recursion.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/recursion.t	Tue Dec 16 08:21:24 2008
@@ -38,16 +38,16 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.factorial(0)
+	$I0 = obj."factorial"(0)
     print $I0
     print "\n"
-    $I0 = obj.factorial(1)
+    $I0 = obj."factorial"(1)
     print $I0
     print "\n"
-    $I0 = obj.factorial(2)
+    $I0 = obj."factorial"(2)
     print $I0
     print "\n"
-    $I0 = obj.factorial(10)
+    $I0 = obj."factorial"(10)
     print $I0
     print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/staticfield.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/staticfield.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/staticfield.t	Tue Dec 16 08:21:24 2008
@@ -49,7 +49,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	obj.set_x(26)
+	obj."set_x"(26)
     $P0 = new 'Integer'
     $P0 = get_hll_global [ "Testing" ; "Test" ], "x"
 	print $P0
@@ -65,7 +65,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	obj.set_y(16)
+	obj."set_y"(16)
     $P0 = new 'Integer'
     $P0 = get_hll_global [ "Testing" ; "Test" ], "y"
 	print $P0
@@ -80,9 +80,9 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	obj.set_x(26)
-	obj.set_y(16)
-    $I0 = obj.add()
+	obj."set_x"(26)
+	obj."set_y"(16)
+    $I0 = obj."add"()
 	print $I0
 	print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/staticmethod.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/staticmethod.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/staticmethod.t	Tue Dec 16 08:21:24 2008
@@ -66,7 +66,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	obj.test_no_args()
+	obj."test_no_args"()
     $P0 = new 'Integer'
     $P0 = get_hll_global [ "Testing" ; "Test" ], "x"
 	print $P0
@@ -82,7 +82,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	obj.test_args(10)
+	obj."test_args"(10)
     $P0 = new 'Integer'
     $P0 = get_hll_global [ "Testing" ; "Test" ], "y"
 	print $P0
@@ -97,7 +97,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-    $I0 = obj.test_ret()
+    $I0 = obj."test_ret"()
 	print $I0
 	print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/string.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/string.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/string.t	Tue Dec 16 08:21:24 2008
@@ -45,7 +45,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$S0 = obj.ret_string()
+	$S0 = obj."ret_string"()
 	print $S0
 .end
 PIR
@@ -57,7 +57,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$S0 = obj.ret_string_with_quotes()
+	$S0 = obj."ret_string_with_quotes"()
 	print $S0
 .end
 PIR
@@ -69,7 +69,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$S0 = obj.ret_string_with_quotes_s()
+	$S0 = obj."ret_string_with_quotes_s"()
 	print $S0
 .end
 PIR

Modified: branches/rakudoreg/languages/dotnet/t/switch.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/switch.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/switch.t	Tue Dec 16 08:21:24 2008
@@ -42,16 +42,16 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.test(0)
+	$I0 = obj."test"(0)
 	print $I0
 	print "\n"
-    $I0 = obj.test(1)
+    $I0 = obj."test"(1)
 	print $I0
 	print "\n"
-    $I0 = obj.test(2)
+    $I0 = obj."test"(2)
 	print $I0
 	print "\n"
-    $I0 = obj.test(3)
+    $I0 = obj."test"(3)
 	print $I0
 	print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/unsigned.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/unsigned.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/unsigned.t	Tue Dec 16 08:21:24 2008
@@ -72,19 +72,19 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.uge(500, 800)
+	$I0 = obj."uge"(500, 800)
 	print $I0
 	print "\n"
-	$I0 = obj.uge(42, -20202)
+	$I0 = obj."uge"(42, -20202)
 	print $I0
 	print "\n"
-	$I0 = obj.uge(800, 500)
+	$I0 = obj."uge"(800, 500)
 	print $I0
 	print "\n"
-	$I0 = obj.uge(-20202, 42)
+	$I0 = obj."uge"(-20202, 42)
 	print $I0
 	print "\n"
-	$I0 = obj.uge(5, 5)
+	$I0 = obj."uge"(5, 5)
 	print $I0
 	print "\n"
 .end
@@ -101,19 +101,19 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.ugt(500, 800)
+	$I0 = obj."ugt"(500, 800)
 	print $I0
 	print "\n"
-	$I0 = obj.ugt(42, -20202)
+	$I0 = obj."ugt"(42, -20202)
 	print $I0
 	print "\n"
-	$I0 = obj.ugt(800, 500)
+	$I0 = obj."ugt"(800, 500)
 	print $I0
 	print "\n"
-	$I0 = obj.ugt(-20202, 42)
+	$I0 = obj."ugt"(-20202, 42)
 	print $I0
 	print "\n"
-	$I0 = obj.ugt(5, 5)
+	$I0 = obj."ugt"(5, 5)
 	print $I0
 	print "\n"
 .end
@@ -130,19 +130,19 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.ule(500, 800)
+	$I0 = obj."ule"(500, 800)
 	print $I0
 	print "\n"
-	$I0 = obj.ule(42, -20202)
+	$I0 = obj."ule"(42, -20202)
 	print $I0
 	print "\n"
-	$I0 = obj.ule(800, 500)
+	$I0 = obj."ule"(800, 500)
 	print $I0
 	print "\n"
-	$I0 = obj.ule(-20202, 42)
+	$I0 = obj."ule"(-20202, 42)
 	print $I0
 	print "\n"
-	$I0 = obj.ule(5, 5)
+	$I0 = obj."ule"(5, 5)
 	print $I0
 	print "\n"
 .end
@@ -159,19 +159,19 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.ult(500, 800)
+	$I0 = obj."ult"(500, 800)
 	print $I0
 	print "\n"
-	$I0 = obj.ult(42, -20202)
+	$I0 = obj."ult"(42, -20202)
 	print $I0
 	print "\n"
-	$I0 = obj.ult(800, 500)
+	$I0 = obj."ult"(800, 500)
 	print $I0
 	print "\n"
-	$I0 = obj.ult(-20202, 42)
+	$I0 = obj."ult"(-20202, 42)
 	print $I0
 	print "\n"
-	$I0 = obj.ult(5, 5)
+	$I0 = obj."ult"(5, 5)
 	print $I0
 	print "\n"
 .end
@@ -188,10 +188,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.udiv(84,2)
+	$I0 = obj."udiv"(84,2)
 	print $I0
 	print "\n"
-	$I0 = obj.udiv(5,3)
+	$I0 = obj."udiv"(5,3)
 	print $I0
 	print "\n"
 .end
@@ -205,10 +205,10 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.urem(84,2)
+	$I0 = obj."urem"(84,2)
 	print $I0
 	print "\n"
-	$I0 = obj.urem(5,3)
+	$I0 = obj."urem"(5,3)
 	print $I0
 	print "\n"
 .end

Modified: branches/rakudoreg/languages/dotnet/t/valuetypes.t
==============================================================================
--- branches/rakudoreg/languages/dotnet/t/valuetypes.t	(original)
+++ branches/rakudoreg/languages/dotnet/t/valuetypes.t	Tue Dec 16 08:21:24 2008
@@ -104,7 +104,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.locals_1()
+	$I0 = obj."locals_1"()
 	print $I0
     print "\n"
 .end
@@ -117,7 +117,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.locals_2()
+	$I0 = obj."locals_2"()
 	print $I0
     print "\n"
 .end
@@ -130,7 +130,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.locals_3()
+	$I0 = obj."locals_3"()
 	print $I0
     print "\n"
 .end
@@ -143,7 +143,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.pass()
+	$I0 = obj."pass"()
 	print $I0
     print "\n"
 .end
@@ -156,7 +156,7 @@
 	.local pmc obj
 	load_bytecode "t.pbc"
 	obj = new [ "Testing" ; "Test" ]
-	$I0 = obj.pass_ref()
+	$I0 = obj."pass_ref"()
 	print $I0
     print "\n"
 .end

Modified: branches/rakudoreg/languages/ecmascript/src/parser/actions.pm
==============================================================================
--- branches/rakudoreg/languages/ecmascript/src/parser/actions.pm	(original)
+++ branches/rakudoreg/languages/ecmascript/src/parser/actions.pm	Tue Dec 16 08:21:24 2008
@@ -395,6 +395,10 @@
     make $( $/{$key} );
 }
 
+method regular_expression_literal ($/) {
+    make PAST::Val.new( :value( ~$<regular_expression_literal> ), :node($/) );
+}
+
 method this($/) {
     ## XXX wait for PAST support for 'self'
     ## load 'self' into a register; when this PAST node is used as a child somewhere
@@ -546,7 +550,7 @@
     make $( $/{$key} );
 }
 
-method member_expression($/) {
+method member_expressionX($/) {
     my $member := $( $<member_prefix> );
 
     ## if there are any arguments, $member is invoked with these arguments.
@@ -681,7 +685,7 @@
     my $key  := $( $<property_name> );
 
     ## XXX my $key  := PAST::Val.new( $prop, :returns('String'), :node($/) );
-    my $val  := $( $<expression> );
+    my $val  := $( $<assignment_expression> );
 
     $val.named($key);
     make $val;

Modified: branches/rakudoreg/languages/ecmascript/src/parser/grammar.pg
==============================================================================
--- branches/rakudoreg/languages/ecmascript/src/parser/grammar.pg	(original)
+++ branches/rakudoreg/languages/ecmascript/src/parser/grammar.pg	Tue Dec 16 08:21:24 2008
@@ -51,6 +51,8 @@
 ##
 
 rule statement {
+##tewk  added function_expression, don't know if it should go here though
+    | <function_expression> {*}   #= function_expression
     | <expression_statement> {*}  #= expression_statement
     | <block> {*}                 #= block
     | <variable_statement> {*}    #= variable_statement
@@ -187,6 +189,8 @@
 
 rule expression_statement {
     ##<!['{'|'function']> ## is this necessary? isn't this fixed automatically by PGE?
+    #<!before \w>
+    #<!['{'|'function']>
     <expression> ';'
     {*}
 }
@@ -244,27 +248,73 @@
     | <identifier> {*}          #= identifier
     | <object_literal> {*}      #= object_literal
     | '(' <expression> ')' {*}  #= expression
+    | <regular_expression_literal> {*} #= regular_expression_literal
+}
+
+#RegularExpressionLiteral :: See section 7.8.5
+#/ RegularExpressionBody / RegularExpressionFlags
+token regular_expression_literal {
+  '/' <regular_expression_body> '/' <regular_expression_flags>? {*}
+}
+#RegularExpressionBody :: See section 7.8.5
+#RegularExpressionFirstChar RegularExpressionChars
+token regular_expression_body {
+  <regular_expression_first_char> <regular_expression_char>*
+}
+
+#RegularExpressionChars :: See section 7.8.5
+#[empty]
+#RegularExpressionChars RegularExpressionChar
+
+#RegularExpressionFirstChar :: See section 7.8.5
+#NonTerminator but not * or \ or /
+#BackslashSequence
+token regular_expression_first_char {
+  | <-[\n*\\/]>
+  | '\\' \N
+}
+
+#RegularExpressionChar :: See section 7.8.5
+#NonTerminator but not \ or /
+#BackslashSequence
+token regular_expression_char {
+  | <-[\n\\/]>
+  | '\\' \N
+}
+
+#BackslashSequence :: See section 7.8.5
+#\ NonTerminator
+#token backslash_sequence {
+#  '\\' \N
+#}
+#
+#token NonTerminator :: See section 7.8.5
+#SourceCharacter but not LineTerminator
+#token non_terminator {
+#  \N
+#}
+
+#RegularExpressionFlags :: See section 7.8.5
+#[empty]
+#RegularExpressionFlags IdentifierPart
+token regular_expression_flags {
+  <identifier_part>+
 }
 
 token this { 'this' {*} }
 
 rule array_literal {
-    '['
-    [
-    | <elision>
-    | <element_list> [',' <elision>]?
-    ]
-    ']'
+    '[' <elision>? <element_list>? [',' <elision>]?  ']'
     {*}
 }
 
 rule element_list {
-    <elision> <assignment_expression> [',' <elision> <assignment_expression>]*
+    <elision>? <assignment_expression> [',' <elision>? <assignment_expression>]*
     {*}
 }
 
 rule elision {
-    [$<comma>=',']* {*}
+    [$<comma>=',']+ {*}
 }
 
 token identifier {
@@ -273,6 +323,10 @@
     {*}
 }
 
+token <identifier_part> {
+    [<alpha>|<digit>|_]
+}
+
 token literal {
     | <str_literal> {*}            #= str_literal
     | <numeric_literal> {*}        #= numeric_literal
@@ -291,12 +345,12 @@
 token null { 'null' {*} }
 
 rule object_literal {
-    '{' [<property> [',' <property>]* ]? '}'
+    '{' [ <property> [',' <property> ]* ]? '}'
     {*}
 }
 
 rule property {
-    <property_name> ':' <expression>
+    <property_name> ':' <assignment_expression>
     {*}
 }
 
@@ -307,8 +361,8 @@
 }
 
 token numeric_literal {
-    | <decimal_literal> {*}        #= decimal_literal
     | <hex_integer_literal> {*}    #= hex_integer_literal
+    | <decimal_literal> {*}        #= decimal_literal
 }
 
 token hex_integer_literal {
@@ -318,13 +372,13 @@
 token hex_digits { <[0..9 a..f A..F]> }
 
 token decimal_literal {
-    | <integer_number> {*}         #= integer_number
     | <floating_point_number> {*}  #= floating_point_number
+    | <integer_number> {*}         #= integer_number
 }
 
 token floating_point_number {
     [
-    | <decimal_integer_literal> '.' <digit>+? <exponent_part>?
+    | <decimal_integer_literal> '.' <digit>* <exponent_part>?
     | '.' <digit>+ <exponent_part>?
     ]
     {*}

Modified: branches/rakudoreg/languages/jako/lib/Jako/Construct/Block/Bare.pm
==============================================================================
--- branches/rakudoreg/languages/jako/lib/Jako/Construct/Block/Bare.pm	(original)
+++ branches/rakudoreg/languages/jako/lib/Jako/Construct/Block/Bare.pm	Tue Dec 16 08:21:24 2008
@@ -30,11 +30,9 @@
     my $namespace = "BARE";    # TODO: Don't we need to do better than this?
 
     if ( $self->content ) {
-        $compiler->emit(".namespace ${namespace}");
         $compiler->indent;
         $self->SUPER::compile($compiler);
         $compiler->outdent;
-        $compiler->emit(".endnamespace ${namespace}");
     }
 
     return 1;

Modified: branches/rakudoreg/languages/jako/lib/Jako/Construct/Block/Conditional.pm
==============================================================================
--- branches/rakudoreg/languages/jako/lib/Jako/Construct/Block/Conditional.pm	(original)
+++ branches/rakudoreg/languages/jako/lib/Jako/Construct/Block/Conditional.pm	Tue Dec 16 08:21:24 2008
@@ -66,11 +66,9 @@
         $compiler->emit("${prefix}_THEN:");
 
         if ( $self->content ) {
-            $compiler->emit(".namespace ${namespace}_THEN");
             $compiler->indent;
             $self->SUPER::compile($compiler);
             $compiler->outdent;
-            $compiler->emit(".endnamespace ${namespace}_THEN");
         }
 
         $compiler->emit("  goto ${prefix}_LAST");
@@ -79,11 +77,9 @@
         $compiler->emit("${prefix}_ELSE:");
 
         if ( $self->content ) {
-            $compiler->emit(".namespace ${namespace}_ELSE");
             $compiler->indent;
             $self->SUPER::compile($compiler);
             $compiler->outdent;
-            $compiler->emit(".endnamespace ${namespace}_ELSE");
         }
 
         $compiler->emit("${prefix}_LAST:");

Modified: branches/rakudoreg/languages/jako/lib/Jako/Construct/Block/Loop.pm
==============================================================================
--- branches/rakudoreg/languages/jako/lib/Jako/Construct/Block/Loop.pm	(original)
+++ branches/rakudoreg/languages/jako/lib/Jako/Construct/Block/Loop.pm	Tue Dec 16 08:21:24 2008
@@ -55,22 +55,18 @@
         $compiler->emit("${prefix}_REDO:");
 
         if ( $self->content ) {
-            $compiler->emit(".namespace ${namespace}");
             $compiler->indent;
             $self->SUPER::compile($compiler);
             $compiler->outdent;
-            $compiler->emit(".endnamespace ${namespace}");
         }
     }
     elsif ( $kind eq 'continue' ) {
         $compiler->emit("${prefix}_CONT:");
 
         if ( $self->content ) {
-            $compiler->emit(".namespace ${namespace}_CONT");
             $compiler->indent;
             $self->SUPER::compile($compiler);
             $compiler->outdent;
-            $compiler->emit(".endnamespace ${namespace}_CONT");
         }
 
         $compiler->emit("  goto ${prefix}_NEXT");

Modified: branches/rakudoreg/languages/lua/t/io.t
==============================================================================
--- branches/rakudoreg/languages/lua/t/io.t	(original)
+++ branches/rakudoreg/languages/lua/t/io.t	Tue Dec 16 08:21:24 2008
@@ -184,7 +184,7 @@
 DATA
 close $Y;
 
-language_output_is( 'lua', << 'CODE', << 'OUTPUT', 'io:read *number', params => '< number.txt' );
+language_output_is( 'lua', << 'CODE', << 'OUTPUT', 'io:read *number', params => '< number.txt', todo => 'can\'t peek stdin, see RT #61290');
 while true do
     local n1, n2, n3 = io.read("*number", "*number", "*number")
     if not n1 then break end

Modified: branches/rakudoreg/languages/pipp/README
==============================================================================
--- branches/rakudoreg/languages/pipp/README	(original)
+++ branches/rakudoreg/languages/pipp/README	Tue Dec 16 08:21:24 2008
@@ -1,5 +1,11 @@
 # $Id$
 
 Pipp is Parrot's PHP.
+Pipp is an implementation of the language PHP that runs on Parrot
+and uses the Parrot Compiler Toolkit.
 
-For more information see docs/overview.pod.
+Run 'make test' for building and running the tests in F<t>.
+Run 'make smolder_test' for testing and submitting the test result to
+http://smolder.plusthree.com/app/public_projects/smoke_reports/10
+
+For more information see F<docs/pipp.pod> or visit L<http://pipp.org>.

Modified: branches/rakudoreg/languages/pipp/t/php/string.t
==============================================================================
--- branches/rakudoreg/languages/pipp/t/php/string.t	(original)
+++ branches/rakudoreg/languages/pipp/t/php/string.t	Tue Dec 16 08:21:24 2008
@@ -24,8 +24,7 @@
 use FindBin;
 use lib "$FindBin::Bin/../../../../lib", "$FindBin::Bin/../../lib";
 
-use Test::More     tests => 14;
-use Parrot::Test;
+use Parrot::Test tests => 35;
 
 
 language_output_is( 'Pipp', <<'CODE', <<'OUT', 'bin2hex' );
@@ -168,6 +167,310 @@
 Abc
 OUT
 
+language_output_is( 'Pipp', <<'CODE', <<'OUT', '== for equal strings' );
+<?php
+if ( 'asdf' == 'asdf' )
+{
+  echo "== for equal strings\n";
+}
+?>
+CODE
+== for equal strings
+OUT
+
+
+language_output_is( 'Pipp', <<'CODE', <<'OUT', '== for unequal strings' );
+<?php
+if ( 'asdf' == 'jklö' )
+{
+  echo "wrong turn\n";
+}
+else
+{
+  echo "== for unequal strings\n";
+}
+?>
+CODE
+== for unequal strings
+OUT
+
+
+language_output_is( 'Pipp', <<'CODE', <<'OUT', '!= for equal strings' );
+<?php
+if ( 'asdf' != 'asdf' )
+{
+  echo "dummy";
+}
+else
+{
+  echo "!= for equal strings\n";
+}
+?>
+CODE
+!= for equal strings
+OUT
+
+
+language_output_is( 'Pipp', <<'CODE', <<'OUT', '!= for unequal strings' );
+<?php
+if ( 'asdf' != 'jklö' )
+{
+  echo "!= for unequal strings\n";
+}
+?>
+CODE
+!= for unequal strings
+OUT
+
+
+language_output_is( 'Pipp', <<'CODE', <<'OUT', 'var_dump()' );
+<?php
+var_dump( 'asdf' );
+?>
+CODE
+string(4) "asdf"
+OUT
+
+
+language_output_is( 'Pipp', <<'CODE', <<'OUT', 'string interpolation, simple syntax' );
+<?php
+$var1 = "VAR1";
+$var2 = "VAR2";
+echo "$var1 $var2\n";
+?>
+CODE
+VAR1 VAR2
+OUT
+
+SKIP: {
+    skip 'runaway process', 1;
+
+    language_output_is( 'Pipp', <<'CODE', <<'OUT', 'dollar followed by a space' );
+<?php
+ 
+echo ";$ ;", "\n";
+
+?>
+CODE
+;$ ;
+OUT
+}
+
+language_output_is( 'Pipp', <<'CODE', <<'OUT', 'curly string interpolation, one var' );
+<?php
+$var1 = "VAR1";
+echo "{$var1}\n";
+?>
+CODE
+VAR1
+OUT
+
+language_output_is( 'Pipp', <<'CODE', <<'OUT', 'curly string interpolation, two vars', todo => 'broken' );
+<?php
+$var1 = "VAR1";
+$var2 = "VAR2";
+echo "{$var1} {$var2}\n";
+?>
+CODE
+VAR1 VAR2
+OUT
+
+language_output_is( 'Pipp', <<'CODE', <<'OUT', 'print a pair of curlies' );
+<?php
+echo "curlies: {}\n";
+?>
+CODE
+curlies: {}
+OUT
+
+
+language_output_is( 'Pipp', <<'CODE', <<'OUT', 'single quoted string' );
+<?php
+
+$dummy = 'INTERPOLATED';
+
+echo 'no variable expansion: $dummy', "\n";
+echo 'no variable expansion in twiddles: {$dummy}', "\n";
+echo 'backslash at end: \\', "\n";
+echo 'backslash not at end: \dummy', "\n";
+echo 'backslash before a space: \ ', "\n";
+echo 'escaped backslash before a space: \\ ', "\n";
+echo 'not a newline: \n', "\n";
+echo 'not a carriage return: \r', "\n";
+echo 'not a tab: \t', "\n";
+echo 'not a vertical tab: \v', "\n";
+echo 'not a form feed: \f', "\n";
+echo 'not an octal: \101', "\n";
+echo 'not an hex: \x41', "\n";
+echo 'single quote: \'', "\n";
+echo 'double quote: "', "\n";
+echo 'backslash and double quote: \"', "\n";
+echo 'escaped backslash and double quote: \\"', "\n";
+echo 'backslash and single quote: \\\'', "\n";
+echo 'two backslashes and a single quote: \\\\\'', "\n";
+echo 'backslash and a dollar: \$dummy', "\n";
+echo 'backslash and twiddles: \{$dummy}', "\n";
+
+?>
+CODE
+no variable expansion: $dummy
+no variable expansion in twiddles: {$dummy}
+backslash at end: \
+backslash not at end: \dummy
+backslash before a space: \ 
+escaped backslash before a space: \ 
+not a newline: \n
+not a carriage return: \r
+not a tab: \t
+not a vertical tab: \v
+not a form feed: \f
+not an octal: \101
+not an hex: \x41
+single quote: '
+double quote: "
+backslash and double quote: \"
+escaped backslash and double quote: \"
+backslash and single quote: \'
+two backslashes and a single quote: \\'
+backslash and a dollar: \$dummy
+backslash and twiddles: \{$dummy}
+OUT
+
+language_output_is( 'Pipp', <<'CODE', <<'OUT', 'double quoted string' );
+<?php
+
+$dummy = 'INTERPOLATED';
+
+echo "variable expansion: $dummy", "\n";
+echo "backslash at end: \\", "\n";
+echo "backslash not at end: \dummy", "\n";
+echo "backslash before a space: \ ", "\n";
+echo "escaped backslash before a space: \\ ", "\n";
+echo "a newline: \n", "\n";
+echo "a tab: \t", "\n";
+echo "an octal: \101", "\n";
+echo "an hex: \x41", "\n";
+echo "single quote: '", "\n";
+echo "double quote: \"", "\n";
+echo "backslash and double quote: \\\"", "\n";
+echo "backslash and single quote: \\'", "\n";
+echo "two backslashes and a single quote: \\\\'", "\n";
+echo "backslash and a dollar: \\\$dummy", "\n";
+echo "backslash and twiddles: \{$dummy}", "\n";
+
+?>
+CODE
+variable expansion: INTERPOLATED
+backslash at end: \
+backslash not at end: \dummy
+backslash before a space: \ 
+escaped backslash before a space: \ 
+a newline: 
+
+a tab: 	
+an octal: A
+an hex: A
+single quote: '
+double quote: "
+backslash and double quote: \"
+backslash and single quote: \'
+two backslashes and a single quote: \\'
+backslash and a dollar: \$dummy
+backslash and twiddles: \{INTERPOLATED}
+OUT
+
+language_output_is( 'Pipp', <<'CODE', <<'OUT', 'curly quotes in double quoted string' );
+<?php
+
+echo ";{;", "\n";
+echo ";\{;", "\n";
+
+?>
+CODE
+;{;
+;\{;
+OUT
+
+language_output_is( 'Pipp', <<'CODE', <<"OUT", 'vertical tab, new in PHP 5.3' );
+<?php
+
+echo "a vertical tab: \v", "\n";
+
+?>
+CODE
+a vertical tab: \013
+OUT
+
+language_output_is( 'Pipp', <<'CODE', <<"OUT", 'form feed, new in PHP 5.3' );
+<?php
+
+echo "a form feed: \f", "\n";
+
+?>
+CODE
+a form feed: \f
+OUT
+
+language_output_is( 'Pipp', <<'CODE', <<"OUT", 'carriage return' );
+<?php
+
+echo "a carriage return: \r<--", "\n";
+
+?>
+CODE
+a carriage return: \r<--
+OUT
+
+language_output_is( 'Pipp', <<'CODE', <<"OUT", 'hex escapes' );
+<?php
+
+echo "ABC \x41\x42\x43", "\n";
+
+?>
+CODE
+ABC ABC
+OUT
+
+language_output_is( 'Pipp', <<'CODE', <<"OUT", 'octal escapes' );
+<?php
+
+echo "ABC \101\102\103", "\n";
+
+?>
+CODE
+ABC ABC
+OUT
+
+language_output_is( 'Pipp', <<'CODE', <<"OUT", 'octals ge \400 escapes', todo => 'not implemented yet' );
+<?php
+
+echo "ABC \501\502\503", "\n";
+
+?>
+CODE
+ABC ABC
+OUT
+
+language_output_is( 'Pipp', <<'CODE', <<"OUT", 'hex escapes followed by a digit' );
+<?php
+
+echo "A1B2C3 \x411\x422\x433", "\n";
+
+?>
+CODE
+A1B2C3 A1B2C3
+OUT
+
+language_output_is( 'Pipp', <<'CODE', <<"OUT", 'octal escapes followed by a digit' );
+<?php
+
+echo "A1B2C3 \1011\1022\1033", "\n";
+
+?>
+CODE
+A1B2C3 A1B2C3
+OUT
+
 # Local Variables:
 #   mode: cperl
 #   cperl-indent-level: 4

Modified: branches/rakudoreg/lib/Parrot/Test.pm
==============================================================================
--- branches/rakudoreg/lib/Parrot/Test.pm	(original)
+++ branches/rakudoreg/lib/Parrot/Test.pm	Tue Dec 16 08:21:24 2008
@@ -200,7 +200,7 @@
 =item C<example_output_isnt( $example_f, $expected, @todo )>
 
 Determines the language, PIR or PASM, from the extension of C<$example_f> and runs
-the appropriate C<^language_output_(is|kike|isnt)> sub.
+the appropriate C<^language_output_(is|like|isnt)> sub.
 C<$example_f> is used as a description, so don't pass one.
 
 =item C<skip($why, $how_many)>
@@ -303,37 +303,10 @@
 sub run_command {
     my ( $command, %options ) = @_;
 
-    # To run the command in a different directory.
-    my $chdir = delete $options{CD};
+    my ( $out, $err, $chdir ) = _handle_test_options( \%options );
 
-    while ( my ( $key, $value ) = each %options ) {
-        $key =~ m/^STD(OUT|ERR)$/
-            or die "I don't know how to redirect '$key' yet!";
-        my $strvalue = "$value";        # filehandle `eq' string will fail
-        $value = File::Spec->devnull()  # on older perls, so stringify it
-            if $strvalue eq '/dev/null';
-    }
-
-    my $out = $options{'STDOUT'} || '';
-    my $err = $options{'STDERR'} || '';
-
-    local $ENV;
     if ($PConfig{parrot_is_shared}) {
-        my $blib_path = File::Spec->catfile( $PConfig{build_dir}, 'blib', 'lib' );
-        if ($^O eq 'cygwin') {
-            $ENV{PATH} = $blib_path . ':' . $ENV{PATH};
-        }
-        elsif ($^O eq 'MSWin32') {
-            $ENV{PATH} = $blib_path . ';' . $ENV{PATH};
-        }
-        else {
-            $ENV{LD_RUN_PATH} = $blib_path;
-        }
-    }
-
-    ##  File::Temp overloads 'eq' here, so we need the quotes. RT #58840
-    if ( $out and $err and "$out" eq "$err" ) {
-        $err = '&STDOUT';
+        _handle_blib_path();
     }
 
     local *OLDOUT if $out;    ## no critic Variables::ProhibitConditionalDeclarations
@@ -357,11 +330,7 @@
     # If $command isn't already an arrayref (because of a multi-command
     # test), make it so now so the code below can treat everybody the
     # same.
-    $command = [$command] unless ( ref $command );
-
-    if ( defined $ENV{VALGRIND} ) {
-        $_ = "$ENV{VALGRIND} $_" for (@$command);
-    }
+    $command = _handle_command( $command );
 
     my $orig_dir;
     if ($chdir) {
@@ -382,7 +351,7 @@
         chdir $orig_dir;
     }
 
-    my $exit_code = $?;
+    my $exit_message = _prepare_exit_message();
 
     close STDOUT or die "Can't close    stdout" if $out;
     close STDERR or die "Can't close    stderr" if $err;
@@ -390,11 +359,7 @@
     open STDOUT, ">&", \*OLDOUT or die "Can't restore  stdout" if $out;
     open STDERR, ">&", \*OLDERR or die "Can't restore  stderr" if $err;
 
-    return (
-          ( $exit_code < 0 )    ? $exit_code
-        : ( $exit_code & 0xFF ) ? "[SIGNAL $exit_code]"
-        : ( $? >> 8 )
-    );
+    return $exit_message;
 }
 
 sub per_test {
@@ -408,7 +373,6 @@
     return $t;
 }
 
-
 sub write_code_to_file {
     my ( $code, $code_f ) = @_;
 
@@ -537,8 +501,8 @@
     }
 }
 
-# The following methods are private.
-# They should not be used by modules inheriting from Parrot::Test.
+# The following methods are private.  They should not be used by modules
+# inheriting from Parrot::Test.
 
 sub _handle_error_output {
     my ( $builder, $real_output, $expected, $desc ) = @_;
@@ -554,21 +518,13 @@
 }
 
 sub _run_test_file {
-    local $SIG{__WARN__} = \&_report_odd_hash;
     my ( $func, $code, $expected, $desc, %extra ) = @_;
-
     my $path_to_parrot = path_to_parrot();
     my $parrot = File::Spec->join( File::Spec->curdir(), 'parrot' . $PConfig{exe} );
 
     # Strange Win line endings
     convert_line_endings($expected);
 
-    # set up default description
-    unless ($desc) {
-        ( undef, my $file, my $line ) = caller();
-        $desc = "($file line $line)";
-    }
-
     # $test_no will be part of temporary file
     my $test_no = $builder->current_test() + 1;
 
@@ -672,29 +628,16 @@
     return ( $out_f, $cmd, $exit_code );
 }
 
-sub _report_odd_hash {
-    my $warning = shift;
-    if ( $warning =~ m/Odd number of elements in hash assignment/ ) {
-        require Carp;
-        my @args = DB::uplevel_args();
-        shift @args;
-        my $func = ( caller() )[2];
-
-        Carp::carp("Odd $func invocation; probably missing description for TODO test");
-    }
-    else {
-        warn $warning;
-    }
-}
-
 sub _generate_test_functions {
 
     my $package        = 'Parrot::Test';
     my $path_to_parrot = path_to_parrot();
-    my $parrot         = File::Spec->join( File::Spec->curdir(), 'parrot' . $PConfig{exe} );
+    my $parrot         = File::Spec->join( File::Spec->curdir(),
+                            'parrot' . $PConfig{exe} );
     my $pirc           = File::Spec->join( File::Spec->curdir(),
                             qw( compilers pirc ), "pirc$PConfig{exe}" );
 
+    ##### 1: Parrot test map #####
     my %parrot_test_map = map {
         $_ . '_output_is'           => 'is_eq',
         $_ . '_error_output_is'     => 'is_eq',
@@ -713,6 +656,10 @@
             my ( $code, $expected, $desc, %extra ) = @_;
             my $args                               = $ENV{TEST_PROG_ARGS} || '';
 
+            # Due to ongoing changes in PBC format, all tests in
+            # t/native_pbc/*.t are currently being SKIPped.  This means we
+            # have no tests on which to model tests of the following block.
+            # Hence, test coverage will be lacking.
             if ( $func =~ /^pbc_output_/ && $args =~ /-r / ) {
                 # native tests with --run-pbc don't make sense
                 return $builder->skip("no native tests with -r");
@@ -723,7 +670,7 @@
             my $meth        = $parrot_test_map{$func};
             my $real_output = slurp_file($out_f);
 
-            unlink $out_f unless $ENV{POSTMORTEM};
+            _unlink_or_retain( $out_f );
 
             # set a todo-item for Test::Builder to find
             my $call_pkg = $builder->exported_to() || '';
@@ -741,14 +688,11 @@
                 $builder->ok( 0, $desc );
                 $builder->diag( "Exited with error code: $exit_code\n"
                         . "Received:\n$real_output\nExpected:\n$expected\n" );
-
                 return 0;
             }
-
             my $pass = $builder->$meth( $real_output, $expected, $desc );
             $builder->diag("'$cmd' failed with exit code $exit_code")
                 if not $pass and $exit_code;
-
             return $pass;
         };
 
@@ -757,6 +701,7 @@
         *{ $package . '::' . $func } = $test_sub;
     }
 
+    ##### 2: PIR-to-PASM test map #####
     my %pir_2_pasm_test_map = (
         pir_2_pasm_is      => 'is_eq',
         pir_2_pasm_isnt    => 'isnt_eq',
@@ -840,9 +785,7 @@
             $builder->diag("'$cmd' failed with exit code $exit_code")
                 if $exit_code and not $pass;
 
-            if ( !$ENV{POSTMORTEM} ) {
-                unlink $out_f;
-            }
+            _unlink_or_retain( $out_f );
 
             return $pass;
         };
@@ -852,6 +795,7 @@
         *{ $package . '::' . $func } = $test_sub;
     }
 
+    ##### 3: Language test map #####
     my %builtin_language_prefix = (
         PIR_IMCC  => 'pir',
         PASM_IMCC => 'pasm',
@@ -917,10 +861,14 @@
         *{ $package . '::' . $func } = $test_sub;
     }
 
+    ##### 4:  Example test map #####
     my %example_test_map = (
         example_output_is   => 'language_output_is',
         example_output_like => 'language_output_like',
         example_output_isnt => 'language_output_isnt',
+        example_error_output_is     => 'language_error_output_is',
+        example_error_output_isnt   => 'language_error_output_is',
+        example_error_output_like   => 'language_error_output_like',
     );
 
     foreach my $func ( keys %example_test_map ) {
@@ -938,7 +886,7 @@
             my ($extension) = $example_f =~ m{ [.]                    # introducing extension
                                                ( pasm | pir )         # match and capture the extension
                                                \z                     # at end of string
-                                             }ixms or Usage();
+                                             }ixms;
             if ( defined $extension ) {
                 my $code = slurp_file($example_f);
                 my $test_func = join( '::', $package, $example_test_map{$func} );
@@ -951,7 +899,7 @@
                 );
             }
             else {
-                fail( defined $extension, "no extension recognized for $example_f" );
+                $builder->diag("no extension recognized for $example_f");
             }
         };
 
@@ -960,10 +908,12 @@
         *{ $package . '::' . $func } = $test_sub;
     }
 
+    ##### 5: C test map #####
     my %c_test_map = (
-        c_output_is   => 'is_eq',
-        c_output_isnt => 'isnt_eq',
-        c_output_like => 'like'
+        c_output_is     => 'is_eq',
+        c_output_isnt   => 'isnt_eq',
+        c_output_like   => 'like',
+        c_output_unlike => 'unlike',
     );
 
     foreach my $func ( keys %c_test_map ) {
@@ -1072,11 +1022,11 @@
                 }
             }
 
-            unless ( $ENV{POSTMORTEM} ) {
-                unlink $out_f, $build_f, $exe_f, $obj_f;
-                unlink per_test( '.ilk', $test_no );
-                unlink per_test( '.pdb', $test_no );
-            }
+            _unlink_or_retain(
+                $out_f, $build_f, $exe_f, $obj_f,
+                per_test( '.ilk', $test_no ),
+                per_test( '.pdb', $test_no ),
+            );
 
             return $pass;
         };
@@ -1089,21 +1039,69 @@
     return;
 }
 
-=head1 SEE ALSO
+sub _handle_test_options {
+    my $options = shift;
+    # To run the command in a different directory.
+    my $chdir = delete $options->{CD} || '';
 
-=over 4
+    while ( my ( $key, $value ) = each %{ $options } ) {
+        $key =~ m/^STD(OUT|ERR)$/
+            or die "I don't know how to redirect '$key' yet!";
+        my $strvalue = "$value";        # filehandle `eq' string will fail
+        $value = File::Spec->devnull()  # on older perls, so stringify it
+            if $strvalue eq '/dev/null';
+    }
 
-=item F<t/harness>
+    my $out = $options->{'STDOUT'} || '';
+    my $err = $options->{'STDERR'} || '';
+    ##  File::Temp overloads 'eq' here, so we need the quotes. RT #58840
+    if ( $out and $err and "$out" eq "$err" ) {
+        $err = '&STDOUT';
+    }
+    return ( $out, $err, $chdir );
+}
 
-=item F<docs/tests.pod>
+sub _handle_blib_path {
+    my $blib_path =
+        File::Spec->catfile( $PConfig{build_dir}, 'blib', 'lib' );
+    if ($^O eq 'cygwin') {
+        $ENV{PATH} = $blib_path . ':' . $ENV{PATH};
+    }
+    elsif ($^O eq 'MSWin32') {
+        $ENV{PATH} = $blib_path . ';' . $ENV{PATH};
+    }
+    else {
+        $ENV{LD_RUN_PATH} = $blib_path;
+    }
+}
 
-=item L<Test/More>
+sub _handle_command {
+    my $command = shift;
+    $command = [$command] unless ( ref $command );
 
-=item L<Test/Builder>
+    if ( defined $ENV{VALGRIND} ) {
+        $_ = "$ENV{VALGRIND} $_" for (@$command);
+    }
+    return $command;
+}
 
-=back
+sub _prepare_exit_message {
+    my $exit_code = $?;
+    return (
+          ( $exit_code < 0 )    ? $exit_code
+        : ( $exit_code & 0xFF ) ? "[SIGNAL $exit_code]"
+        : ( $? >> 8 )
+    );
+}
 
-=cut
+sub _unlink_or_retain {
+    my @deletables = @_;
+    my $deleted = 0;
+    unless ( $ENV{POSTMORTEM} ) {
+        $deleted = unlink @deletables;
+    }
+    return $deleted;
+}
 
 package DB;
 
@@ -1115,6 +1113,22 @@
 
 1;
 
+=head1 SEE ALSO
+
+=over 4
+
+=item F<t/harness>
+
+=item F<docs/tests.pod>
+
+=item L<Test/More>
+
+=item L<Test/Builder>
+
+=back
+
+=cut
+
 # Local Variables:
 #   mode: cperl
 #   cperl-indent-level: 4

Modified: branches/rakudoreg/src/embed.c
==============================================================================
--- branches/rakudoreg/src/embed.c	(original)
+++ branches/rakudoreg/src/embed.c	Tue Dec 16 08:21:24 2008
@@ -454,6 +454,7 @@
         if (ferror(io)) {
             Parrot_io_eprintf(interp, "Parrot VM: Problem reading packfile from PIO:  code %d.\n",
                         ferror(io));
+            mem_sys_free(program_code);
             return NULL;
         }
         fclose(io);

Modified: branches/rakudoreg/src/events.c
==============================================================================
--- branches/rakudoreg/src/events.c	(original)
+++ branches/rakudoreg/src/events.c	Tue Dec 16 08:21:24 2008
@@ -805,7 +805,7 @@
     for (i = 0; i < ios->n; ++i) {
         parrot_event * const ev  = ios->events[i];
         PMC          * const pio = ev->u.io_event.pio;
-        const int            fd  = Parrot_io_getfd(NULL, pio);
+        const int            fd  = Parrot_io_getfd(ev->interp, pio);
 
         if (fd == ready_rd) {
             /* remove from event list */
@@ -909,7 +909,7 @@
                                 case IO_THR_MSG_ADD_SELECT_RD:
                                     {
                                         PMC * const pio = buf.ev->u.io_event.pio;
-                                        const int fd = Parrot_io_getfd(NULL, pio);
+                                        const int fd = Parrot_io_getfd(buf.ev->interp, pio);
                                         if (FD_ISSET(fd, &act_rfds)) {
                                             mem_sys_free(buf.ev);
                                             break;

Modified: branches/rakudoreg/src/exceptions.c
==============================================================================
--- branches/rakudoreg/src/exceptions.c	(original)
+++ branches/rakudoreg/src/exceptions.c	Tue Dec 16 08:21:24 2008
@@ -42,7 +42,7 @@
 
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
-static PMC * find_exception_handler(PARROT_INTERP, ARGIN(PMC *exception))
+static PMC * die_from_exception(PARROT_INTERP, ARGIN(PMC *exception))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
@@ -89,9 +89,9 @@
 
 /*
 
-=item C<static PMC * find_exception_handler>
+=item C<static PMC * die_from_exception>
 
-Find the exception handler for C<exception>.
+Print a stack trace for C<exception>, a message if there is one, and then exit.
 
 =cut
 
@@ -100,62 +100,55 @@
 PARROT_WARN_UNUSED_RESULT
 PARROT_CAN_RETURN_NULL
 static PMC *
-find_exception_handler(PARROT_INTERP, ARGIN(PMC *exception))
+die_from_exception(PARROT_INTERP, ARGIN(PMC *exception))
 {
-    PMC * const handler = Parrot_cx_find_handler_local(interp, exception);
-    if (!PMC_IS_NULL(handler)) {
-        return handler;
+    STRING * const message     = VTABLE_get_string(interp, exception);
+    INTVAL         exit_status = 1;
+    const INTVAL   severity    = VTABLE_get_integer_keyed_str(interp, exception, CONST_STRING(interp, "severity"));
+
+    /* flush interpreter output to get things printed in order */
+    Parrot_io_flush(interp, Parrot_io_STDOUT(interp));
+    Parrot_io_flush(interp, Parrot_io_STDERR(interp));
+
+    if (interp->debugger) {
+        Parrot_io_flush(interp->debugger, Parrot_io_STDOUT(interp->debugger));
+        Parrot_io_flush(interp->debugger, Parrot_io_STDERR(interp->debugger));
     }
-    else {
-        STRING * const message     = VTABLE_get_string(interp, exception);
-        INTVAL         exit_status = 1;
-        const INTVAL   severity    = VTABLE_get_integer_keyed_str(interp, exception, CONST_STRING(interp, "severity"));
 
-        /* flush interpreter output to get things printed in order */
-        Parrot_io_flush(interp, Parrot_io_STDOUT(interp));
-        Parrot_io_flush(interp, Parrot_io_STDERR(interp));
-
-        if (interp->debugger) {
-            Parrot_io_flush(interp->debugger, Parrot_io_STDOUT(interp->debugger));
-            Parrot_io_flush(interp->debugger, Parrot_io_STDERR(interp->debugger));
-        }
-
-        if (string_equal(interp, message, CONST_STRING(interp, "")) == 1) {
-            Parrot_io_eprintf(interp, "%S\n", message);
+    if (string_equal(interp, message, CONST_STRING(interp, "")) == 1) {
+        Parrot_io_eprintf(interp, "%S\n", message);
 
-            /* caution against output swap (with PDB_backtrace) */
-            fflush(stderr);
-            PDB_backtrace(interp);
-        }
-        else if (severity == EXCEPT_exit) {
-            /* TODO: get exit status based on type */
-            exit_status = VTABLE_get_integer_keyed_str(interp, exception, CONST_STRING(interp, "exit_code"));
-        }
-        else {
-            Parrot_io_eprintf(interp, "No exception handler and no message\n");
-            /* caution against output swap (with PDB_backtrace) */
-            fflush(stderr);
-            PDB_backtrace(interp);
-        }
-
-        /*
-         * returning NULL from here returns resume address NULL to the
-         * runloop, which will terminate the thread function finally
-         *
-         * RT #45917 this check should better be in Parrot_exit
-         */
-
-        /* no exception handler, but this is not the main thread */
-        if (interp->thread_data && interp->thread_data->tid)
-            pt_thread_detach(interp->thread_data->tid);
-
-        /*
-         * only main should run the destroy functions - exit handler chain
-         * is freed during Parrot_exit
-         */
-        Parrot_exit(interp, exit_status);
+        /* caution against output swap (with PDB_backtrace) */
+        fflush(stderr);
+        PDB_backtrace(interp);
+    }
+    else if (severity == EXCEPT_exit) {
+        /* TODO: get exit status based on type */
+        exit_status = VTABLE_get_integer_keyed_str(interp, exception, CONST_STRING(interp, "exit_code"));
+    }
+    else {
+        Parrot_io_eprintf(interp, "No exception handler and no message\n");
+        /* caution against output swap (with PDB_backtrace) */
+        fflush(stderr);
+        PDB_backtrace(interp);
     }
 
+    /*
+     * returning NULL from here returns resume address NULL to the
+     * runloop, which will terminate the thread function finally
+     *
+     * RT #45917 this check should better be in Parrot_exit
+     */
+
+    /* no exception handler, but this is not the main thread */
+    if (interp->thread_data && interp->thread_data->tid)
+        pt_thread_detach(interp->thread_data->tid);
+
+    /*
+     * only main should run the destroy functions - exit handler chain
+     * is freed during Parrot_exit
+     */
+    Parrot_exit(interp, exit_status);
 }
 
 /*
@@ -197,10 +190,30 @@
 Parrot_ex_throw_from_op(PARROT_INTERP, ARGIN(PMC *exception), ARGIN_NULLOK(void *dest))
 {
     opcode_t   *address;
-    PMC * const handler = find_exception_handler(interp, exception);
+    PMC * const handler = Parrot_cx_find_handler_local(interp, exception);
+    if (PMC_IS_NULL(handler)) {
+        STRING * const message     = VTABLE_get_string(interp, exception);
+        const INTVAL   severity    = VTABLE_get_integer_keyed_str(interp, exception, CONST_STRING(interp, "severity"));
+        PMC *dead;
+        if (severity < EXCEPT_error) {
+            PMC *resume = VTABLE_get_attr_str(interp, exception, CONST_STRING(interp, "resume"));
+            if (string_equal(interp, message, CONST_STRING(interp, "")) == 1) {
+                Parrot_io_eprintf(interp, "%S\n", message);
+            }
+            else {
+                Parrot_io_eprintf(interp, "%S\n", CONST_STRING(interp, "Warning"));
+            }
 
-    if (!handler)
-        return NULL;
+            /* caution against output swap (with PDB_backtrace) */
+            fflush(stderr);
+            /* PDB_backtrace(interp); */
+
+            if (!PMC_IS_NULL(resume)) {
+                return VTABLE_invoke(interp, resume, NULL);
+            }
+        }
+        dead = die_from_exception(interp, exception);
+    }
 
     address    = VTABLE_invoke(interp, handler, dest);
 
@@ -275,9 +288,12 @@
 void
 Parrot_ex_throw_from_c(PARROT_INTERP, ARGIN(PMC *exception))
 {
-    PMC * const        handler      = find_exception_handler(interp, exception);
+    PMC * const handler = Parrot_cx_find_handler_local(interp, exception);
     RunProfile * const profile      = interp->profile;
     Parrot_runloop    *return_point = interp->current_runloop;
+    if (PMC_IS_NULL(handler)) {
+        PMC *dead = die_from_exception(interp, exception);
+    }
 
     /* If profiling, remember end time of lastop and generate entry for
      * exception. */

Modified: branches/rakudoreg/src/io/socket_unix.c
==============================================================================
--- branches/rakudoreg/src/io/socket_unix.c	(original)
+++ branches/rakudoreg/src/io/socket_unix.c	Tue Dec 16 08:21:24 2008
@@ -98,8 +98,8 @@
         struct hostent *he = gethostbyname(s);
         /* XXX FIXME - Handle error condition better */
         if (!he) {
-            string_cstring_free(s);
             fprintf(stderr, "gethostbyname failure [%s]\n", s);
+            string_cstring_free(s);
             return NULL;
         }
         memcpy((char*)&sa.sin_addr, he->h_addr, sizeof (sa.sin_addr));

Modified: branches/rakudoreg/src/multidispatch.c
==============================================================================
--- branches/rakudoreg/src/multidispatch.c	(original)
+++ branches/rakudoreg/src/multidispatch.c	Tue Dec 16 08:21:24 2008
@@ -313,17 +313,6 @@
     mmd_search_global(interp, name, candidate_list);
 
     return Parrot_mmd_sort_manhattan_by_sig_pmc(interp, candidate_list, invoke_sig);
-
-    if (PMC_IS_NULL(candidate_list))
-        return PMCNULL;
-
-#if MMD_DEBUG
-    fprintf(stderr, "there were '%d' elements in the candidate_list\n",
-            (int) VTABLE_elements(interp, candidate_list));
-#endif
-
-    return VTABLE_get_pmc_keyed_int(interp, candidate_list, 0);
-
 }
 
 

Modified: branches/rakudoreg/src/ops/core.ops
==============================================================================
--- branches/rakudoreg/src/ops/core.ops	(original)
+++ branches/rakudoreg/src/ops/core.ops	Tue Dec 16 08:21:24 2008
@@ -1357,7 +1357,6 @@
 op dlvar(out PMC, invar PMC, in STR) {
     char * const name = string_to_cstring(interp, ($3));
     void * const p = Parrot_dlsym(PMC_IS_NULL($2) ? NULL : PMC_data($2), name);
-    string_cstring_free(name);
     if (p == NULL) {
         const char * const err = Parrot_dlerror();
         Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG,
@@ -1370,6 +1369,7 @@
         $1 = pmc_new(interp, enum_class_UnManagedStruct);
         PMC_data($1) = p;
     }
+    string_cstring_free(name);
 }
 
 inline op compreg(in STR, invar PMC) {

Modified: branches/rakudoreg/src/packfile.c
==============================================================================
--- branches/rakudoreg/src/packfile.c	(original)
+++ branches/rakudoreg/src/packfile.c	Tue Dec 16 08:21:24 2008
@@ -1764,6 +1764,12 @@
             if (pf->header->wordsize == 8)
                 pos = pf->src + seg->file_offset * 2;
 #endif
+            else
+            {
+                fprintf(stderr, "directory_unpack failed: invalid wordsize %d\n",
+                        pf->header->wordsize);
+                return 0;
+            }
         }
         else
             pos = pf->src + seg->file_offset;

Modified: branches/rakudoreg/src/pmc/capture.pmc
==============================================================================
--- branches/rakudoreg/src/pmc/capture.pmc	(original)
+++ branches/rakudoreg/src/pmc/capture.pmc	Tue Dec 16 08:21:24 2008
@@ -68,6 +68,31 @@
 
 /*
 
+=item C<PMC *clone()>
+
+Creates an identical copy of the Capture.
+
+=cut
+
+*/
+
+    VTABLE PMC *clone() {
+        PMC *array, *hash;
+        PMC *dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+        GET_ATTR_array(INTERP, SELF, array);
+        GET_ATTR_hash(INTERP, SELF, hash);
+        if (array)
+             array = VTABLE_clone(INTERP, array);
+        if (hash)
+             hash = VTABLE_clone(INTERP, hash);
+        SET_ATTR_array(INTERP, dest, array);
+        SET_ATTR_hash(INTERP, dest, hash);
+
+        return dest;
+    }
+
+/*
+
 =item C<void set_number_keyed_int(INTVAL key, FLOATVAL value)>
 
 =item C<void set_integer_keyed_int(INTVAL key, INTVAL value)>

Modified: branches/rakudoreg/src/pmc/exception.pmc
==============================================================================
--- branches/rakudoreg/src/pmc/exception.pmc	(original)
+++ branches/rakudoreg/src/pmc/exception.pmc	Tue Dec 16 08:21:24 2008
@@ -50,6 +50,7 @@
 */
 
 #include "parrot/parrot.h"
+#include "parrot/exceptions.h"
 
 pmclass Exception {
 
@@ -90,7 +91,7 @@
 
         /* Set up the core struct and default values for the exception object. */
         PMC_data(SELF)            = core_struct;
-        core_struct->severity     = 0;
+        core_struct->severity     = EXCEPT_error;
         core_struct->handled      = 0;
         core_struct->message      = CONST_STRING(interp, "");
         core_struct->payload      = PMCNULL;
@@ -122,7 +123,7 @@
         PMC_data(SELF)            = core_struct;
         core_struct->severity     = ishash ?
             VTABLE_get_integer_keyed_str(interp, values, CONST_STRING(interp, 'severity')) :
-            0;
+            EXCEPT_error;
         core_struct->handled      = 0;
         core_struct->message      = ishash ?
             VTABLE_get_string_keyed_str(interp, values, CONST_STRING(interp, 'message')) :

Modified: branches/rakudoreg/src/pmc/filehandle.pmc
==============================================================================
--- branches/rakudoreg/src/pmc/filehandle.pmc	(original)
+++ branches/rakudoreg/src/pmc/filehandle.pmc	Tue Dec 16 08:21:24 2008
@@ -228,6 +228,18 @@
 
 /*
 
+=item C<METHOD isatty()>
+
+=cut
+
+*/
+    METHOD isatty() {
+        INTVAL isatty = (PARROT_FILEHANDLE(SELF)->flags & PIO_F_CONSOLE) == PIO_F_CONSOLE;
+        RETURN(INTVAL isatty);
+    }
+
+/*
+
 =item C<METHOD close()>
 
 Close the filehandle.

Modified: branches/rakudoreg/src/pmc/namespace.pmc
==============================================================================
--- branches/rakudoreg/src/pmc/namespace.pmc	(original)
+++ branches/rakudoreg/src/pmc/namespace.pmc	Tue Dec 16 08:21:24 2008
@@ -246,9 +246,11 @@
 
         /* If it's a sub... */
         if (!PMC_IS_NULL(value) && VTABLE_isa(INTERP, value, CONST_STRING(INTERP, "Sub"))) {
-            int all_done = ns_insert_sub_keyed_str(interp, SELF, key, value);
-            if (all_done)
-                return;
+            /* TT #10; work around that Sub doesn't use PMC ATTRs */
+            if (value->vtable->base_type != enum_class_Object) {
+                if (ns_insert_sub_keyed_str(interp, SELF, key, value))
+                    return;
+            }
         }
 
         /* If it's an NCI method */
@@ -264,7 +266,9 @@
         if (!PMC_IS_NULL(value)
         &&   VTABLE_isa(INTERP, value, CONST_STRING(INTERP, "MultiSub"))) {
 
-            if (VTABLE_elements(interp, value) > 0) {
+            /* TT #10; work around that Sub doesn't use PMC ATTRs */
+            if (value->vtable->base_type != enum_class_Object
+            && VTABLE_elements(interp, value) > 0) {
                 Parrot_NameSpace_attributes * const nsinfo = PARROT_NAMESPACE(SELF);
                 PMC * const classobj = VTABLE_get_class(interp, SELF);
 

Modified: branches/rakudoreg/src/string.c
==============================================================================
--- branches/rakudoreg/src/string.c	(original)
+++ branches/rakudoreg/src/string.c	Tue Dec 16 08:21:24 2008
@@ -247,7 +247,6 @@
 
 */
 
-PARROT_INLINE
 void
 string_free(PARROT_INTERP, ARGIN(STRING *s))
 {
@@ -1357,8 +1356,6 @@
     UINTVAL new_length, uchar_size;
     String_iter iter;
 
-    Parrot_unmake_COW(interp, s);
-
     if (n < 0) {
         new_length = -n;
         if (new_length > s->strlen)
@@ -1378,6 +1375,8 @@
         return;
     }
 
+    Parrot_unmake_COW(interp, s);
+
     uchar_size = s->bufused / s->strlen;
     s->strlen  = new_length;
 

Modified: branches/rakudoreg/src/tsq.c
==============================================================================
--- branches/rakudoreg/src/tsq.c	(original)
+++ branches/rakudoreg/src/tsq.c	Tue Dec 16 08:21:24 2008
@@ -300,7 +300,7 @@
 
 =item C<void queue_signal>
 
-XXX Needs a description
+RT#48260: Document this!
 
 =cut
 

Modified: branches/rakudoreg/t/codingstd/perlcritic.t
==============================================================================
--- branches/rakudoreg/t/codingstd/perlcritic.t	(original)
+++ branches/rakudoreg/t/codingstd/perlcritic.t	Tue Dec 16 08:21:24 2008
@@ -48,7 +48,8 @@
     my $filter_languages = qr/^\Q$languages_dir$PConfig{slash}\E(?!eclectus|hq9plus|m4|pipp)/x;
 
     @files = grep {! m/$filter_languages/}
-             map { $_->path }
+             map  { $_->path }
+             grep { $_->read !~ m/use v6;/ }
              $dist->get_perl_language_files();
 } else {
     my $node = shift;

Modified: branches/rakudoreg/t/compilers/pct/complete_workflow.t
==============================================================================
--- branches/rakudoreg/t/compilers/pct/complete_workflow.t	(original)
+++ branches/rakudoreg/t/compilers/pct/complete_workflow.t	Tue Dec 16 08:21:24 2008
@@ -60,7 +60,7 @@
 thingy
 IN
 token TOP   { 'thingy' {*}  #= key_for_thingy
-            | 'stuff'  {*}  #= key_for_stuff  
+            | 'stuff'  {*}  #= key_for_stuff
             }
 GRAMMAR
 
@@ -158,15 +158,15 @@
 }
 token scope_a {
     <.INIT_SCOPE_A>
-    '<a>' 
+    '<a>'
     <thingy>
-    '</a>'  {*} 
+    '</a>'  {*}
 }
 token scope_b {
     <.INIT_SCOPE_B>
-    '<b>' 
+    '<b>'
     <thingy>
-    '</b>'  {*} 
+    '</b>'  {*}
 }
 token INIT_SCOPE_A {
   {*}
@@ -196,11 +196,11 @@
 }
 
 method INIT_SCOPE_A($/) {
-   our $?MY_OUR_VAR := 'scope a'; 
+   our $?MY_OUR_VAR := 'scope a';
 }
 
 method INIT_SCOPE_B($/) {
-   our $?MY_OUR_VAR := 'scope b'; 
+   our $?MY_OUR_VAR := 'scope b';
 }
 
 method thingy($/) {
@@ -229,23 +229,23 @@
 }
 token thingy_or_stuff {
       <THINGY> {*}  #= THINGY
-    | <STUFF>  {*}  #= STUFF  
+    | <STUFF>  {*}  #= STUFF
 }
 token THINGY {
     'thingy'
     {*}
-} 
+}
 token STUFF {
     'stuff'
     {*}
-} 
+}
 GRAMMAR
 
 method TOP($/) {
     my $past := PAST::Stmts.new();
     for $<thingy_or_stuff> {
         $past.push( $( $_ ) );
-    } 
+    }
 
     our $?MY_OUR_VAR;
     $past.unshift( $?MY_OUR_VAR );
@@ -298,7 +298,7 @@
 }
 
 
-# 10 test cases in this sub
+# 9 test cases in this sub
 sub test_pct
 {
     my ( $test_name, $in, $grammar, $actions, $out, @other ) = @_;
@@ -312,11 +312,17 @@
     my $PERL6GRAMMAR  = "$PGE_LIBRARY/Perl6Grammar.pbc";
     my $NQP           = "$BUILD_DIR/compilers/nqp/nqp.pbc";
 
-    my $sample_fn = 'complete_workflow_sample_input.txt';
-    Parrot::Test::write_code_to_file( $in, $sample_fn );
+    my $tempfile_opts = {
+         DIR      => $TEST_DIR,
+         UNLINK   => 1,
+    };
 
     # this will be passed to pir_output_is()
-    my $pir_code = <<'EOT';
+    my $pir_code = <<"EOT";
+#------------------------------#
+# The compiler mainline code   #
+#------------------------------#
+
 .namespace [ 'TestGrammar'; 'Compiler' ]
 
 .sub 'onload' :anon :load :init
@@ -328,14 +334,14 @@
     .local pmc args
     args = new 'ResizableStringArray'
     push args, "test_program"
-    push args, "complete_workflow_sample_input.txt"
+    push args, "$TEST_DIR/complete_workflow_sample_input.txt"
 
-    $P0 = new ['PCT'; 'HLLCompiler']
-    $P0.'language'('TestGrammar')
-    $P0.'parsegrammar'('TestGrammar::Grammar')
-    $P0.'parseactions'('TestGrammar::Grammar::Actions')
+    \$P0 = new ['PCT'; 'HLLCompiler']
+    \$P0.'language'('TestGrammar')
+    \$P0.'parsegrammar'('TestGrammar::Grammar')
+    \$P0.'parseactions'('TestGrammar::Grammar::Actions')
 
-    $P1 = $P0.'command_line'(args)
+    \$P1 = \$P0.'command_line'(args)
 
     .return()
 .end
@@ -343,8 +349,8 @@
 EOT
 
     # set up a file with the grammar
-    my ($PG, $pg_fn) = create_tempfile( SUFFIX => '.pg', DIR => $TEST_DIR, UNLINK => 1 );
-    print $PG <<"EOT";
+    my (undef, $pg_fn) = create_tempfile( SUFFIX => '.pg', %$tempfile_opts );
+    Parrot::Test::write_code_to_file( <<"EOT", $pg_fn );
 # DO NOT EDIT.
 # This file was generated by t/compilers/pct/complete_workflow.t
 
@@ -362,14 +368,13 @@
     # that is passed to pir_output_is().
     ( my $gen_parser_fn = $pg_fn ) =~s/pg$/pir/;
     my $rv = Parrot::Test::run_command(
-       qq{$PARROT $PERL6GRAMMAR $pg_fn},
-       STDOUT => $gen_parser_fn,
-       STDERR => $gen_parser_fn,
+       qq{$PARROT $PERL6GRAMMAR --output=$gen_parser_fn $pg_fn},
     );
     is( $rv, 0, "$test_name: generated PIR successfully" );
-    ok( -e $gen_parser_fn, "$test_name: generated parser exist" );
+    ok( -e $gen_parser_fn, "$test_name: generated parser file exists" );
     my $gen_parser = slurp_file($gen_parser_fn);
     unlink $gen_parser_fn;
+
     $pir_code .= <<"EOT";
 #------------------------------#
 # The generated parser         #
@@ -381,8 +386,8 @@
 
 
     # set up a file with the actions
-    my ($PM, $pm_fn) = create_tempfile( SUFFIX => '.pm', DIR => $TEST_DIR, UNLINK => 1 );
-    print $PM <<"EOT";
+    my (undef, $pm_fn) = create_tempfile( SUFFIX => '.pm', %$tempfile_opts );
+    Parrot::Test::write_code_to_file( <<"EOT", $pm_fn );
 # DO NOT EDIT.
 # This file was generated by t/compilers/pct/complete_workflow.t
 
@@ -396,14 +401,12 @@
     ok( -e $pm_fn, "$test_name: action file exists" );
 
     # compile the actions
-    ( my $gen_actions_fn = $pm_fn ) =~s/nqp$/pir/;
+    ( my $gen_actions_fn = $pm_fn ) =~s/pm$/pir/;
     $rv = Parrot::Test::run_command(
-       qq{$PARROT $NQP --target=pir $pm_fn},
-       STDOUT => $gen_actions_fn,
-       STDERR => $gen_actions_fn,
+        qq{$PARROT $NQP --target=pir --output=$gen_actions_fn $pm_fn},
     );
     is( $rv, 0, "$test_name: generated PIR successfully" );
-    ok( -e $gen_actions_fn, "$test_name: generated actions exist" );
+    ok( -e $gen_actions_fn, "$test_name: generated actions file exists" );
     my $gen_actions = slurp_file($gen_actions_fn);
     unlink $gen_actions_fn;
 
@@ -419,7 +422,11 @@
 
 EOT
 
-    pir_output_is( $pir_code, $out , "$test_name: output of compiler", @other );
+    # create the input file and run the compiled code
+    my $sample_fn = "$TEST_DIR/complete_workflow_sample_input.txt";
+    Parrot::Test::write_code_to_file( $in, $sample_fn );
+
+    pir_output_is( $pir_code, $out, "$test_name: output of compiler", @other );
 
     unlink $sample_fn;
 

Modified: branches/rakudoreg/t/dynoplibs/myops.t
==============================================================================
--- branches/rakudoreg/t/dynoplibs/myops.t	(original)
+++ branches/rakudoreg/t/dynoplibs/myops.t	Tue Dec 16 08:21:24 2008
@@ -79,8 +79,6 @@
     my @todo = $ENV{TEST_PROG_ARGS} =~ /-j/ ?
        ( todo => 'RT #49718, add scheduler features to JIT' ) : ();
 
-TODO: {
-local $TODO = 'fails on win32' if $^O =~ m/win32/i && ! $is_mingw;
 pir_output_is( << 'CODE', << 'OUTPUT', "one alarm", @todo );
 .loadlib "myops_ops"
 
@@ -110,7 +108,6 @@
 3
 done.
 OUTPUT
-}
 
 SKIP: {
     skip "three alarms, infinite loop under mingw32", 2 if $is_mingw;

Modified: branches/rakudoreg/t/perl/Parrot_Test.t
==============================================================================
--- branches/rakudoreg/t/perl/Parrot_Test.t	(original)
+++ branches/rakudoreg/t/perl/Parrot_Test.t	Tue Dec 16 08:21:24 2008
@@ -19,6 +19,12 @@
 use strict;
 use warnings;
 use Test::More;
+use Carp;
+use File::Spec;
+use lib qw( lib );
+use Parrot::Config;
+use IO::CaptureOutput qw| capture |;
+use Parrot::Config '%PConfig';
 
 BEGIN {
     eval "use Test::Builder::Tester;";
@@ -26,7 +32,7 @@
         plan( skip_all => "Test::Builder::Tester not installed\n" );
         exit 0;
     }
-    plan( tests => 66 );
+    plan( tests => 120 );
 }
 
 use lib qw( . lib ../lib ../../lib );
@@ -46,9 +52,11 @@
 
 can_ok( 'Parrot::Test', $_ ) for qw/
     c_output_is                     c_output_isnt
-    c_output_like
+    c_output_like                   c_output_unlike
     example_output_is               example_output_isnt
     example_output_like
+    example_error_output_is         example_error_output_isnt
+    example_error_output_like
     language_error_output_is        language_error_output_isnt
     language_error_output_like
     language_output_is              language_output_isnt
@@ -76,8 +84,6 @@
     write_code_to_file
     /;
 
-# RT#46891 test run_command()
-
 # per_test
 is( Parrot::Test::per_test(), undef, 'per_test() no args' );
 is( Parrot::Test::per_test( undef, 0 ),     undef, 'per_test() invalid first arg' );
@@ -120,6 +126,7 @@
 OUTPUT
 test_test($desc);
 
+
 $desc = 'pasm_output_isnt: success';
 test_out("ok 1 - $desc");
 pasm_output_isnt( <<'CODE', <<"OUTPUT", $desc );
@@ -131,9 +138,10 @@
 test_test($desc);
 
 
-# The exact error output for pasm_output_isnt() depends on the version of Test::Builder.
-# So, in order to avoid version dependent failures, be content with checking the
-# standard output.
+# The exact error output for pasm_output_isnt() depends on the version of
+# Test::Builder.  So, in order to avoid version dependent failures, be content
+# with checking the standard output.
+
 $desc = 'pasm_output_isnt: failure';
 test_out("not ok 1 - $desc");
 test_fail(+10);
@@ -226,9 +234,9 @@
 OUTPUT
 test_test($desc);
 
-# The exact error output for pir_output_isnt() depends on the version of Test::Builder.
-# So, in order to avoid version dependent failures, be content with checking the
-# standard output.
+# The exact error output for pir_output_isnt() depends on the version of
+# Test::Builder.  So, in order to avoid version dependent failures, be content
+# with checking the standard output.
 $desc = 'pir_output_isnt: failure';
 test_out("not ok 1 - $desc");
 test_fail(+10);
@@ -316,6 +324,369 @@
     test_test($desc);
 }
 
+##### PIR-to-PASM output test functions #####
+
+my $pir_2_pasm_code = <<'ENDOFCODE';
+.sub _test
+   noop
+   end
+.end
+ENDOFCODE
+
+pir_2_pasm_is( <<CODE, <<'OUT', "pir_2_pasm:  added return - end" );
+$pir_2_pasm_code
+CODE
+# IMCC does produce b0rken PASM files
+# see http://guest@rt.perl.org/rt3/Ticket/Display.html?id=32392
+_test:
+  noop
+  end
+OUT
+
+pir_2_pasm_isnt( <<CODE, <<'OUT', "pir_2_pasm:  added return - end" );
+$pir_2_pasm_code
+CODE
+_test:
+  noop
+  bend
+OUT
+
+pir_2_pasm_like( <<CODE, <<'OUT', "pir_2_pasm:  added return - end" );
+$pir_2_pasm_code
+CODE
+/noop\s+end/s
+OUT
+
+pir_2_pasm_unlike( <<CODE, <<'OUT', "pir_2_pasm:  added return - end" );
+$pir_2_pasm_code
+CODE
+/noop\s+bend/s
+OUT
+
+my $file = q{t/perl/testlib/hello.pasm};
+my $expected = qq{Hello World\n};
+example_output_is( $file, $expected );
+
+$expected = qq{Goodbye World\n};
+example_output_isnt( $file, $expected );
+
+$expected = qr{Hello World};
+example_output_like( $file, $expected );
+
+$file = q{t/perl/testlib/answer.pir};
+$expected = <<EXPECTED;
+The answer is
+42
+says Parrot!
+EXPECTED
+example_output_is( $file, $expected );
+
+# next is dying at _unlink_or_retain
+$expected = <<EXPECTED;
+The answer is
+769
+says Parrot!
+EXPECTED
+example_output_isnt( $file, $expected );
+
+$expected = qr/answer.*42.*Parrot!/s;
+example_output_like( $file, $expected );
+
+$file = q{t/perl/testlib/hello};
+$expected = qq{no extension recognized for $file};
+example_error_output_is( $file, $expected );
+
+$expected = qq{some extension recognized for $file};
+example_error_output_isnt( $file, $expected );
+
+$expected = qr{no extension recognized for $file};
+example_error_output_like( $file, $expected );
+
+##### C-output test functions #####
+
+my $c_code = <<'ENDOFCODE';
+    #include <stdio.h>
+    #include <stdlib.h>
+
+    int
+    main(int argc, char* argv[])
+    {
+        printf("Hello, World!\n");
+        exit(0);
+    }
+ENDOFCODE
+
+$desc = 'C:  is hello world';
+test_out("ok 1 - $desc");
+c_output_is( <<CODE, <<'OUTPUT', $desc );
+$c_code
+CODE
+Hello, World!
+OUTPUT
+test_test($desc);
+
+$desc = 'C:  isnt hello world';
+test_out("ok 1 - $desc");
+c_output_isnt( <<CODE, <<'OUTPUT', $desc );
+$c_code
+CODE
+Is Not Hello, World!
+OUTPUT
+test_test($desc);
+
+$desc = 'C:  like hello world';
+test_out("ok 1 - $desc");
+c_output_like( <<CODE, <<'OUTPUT', $desc );
+$c_code
+CODE
+/Hello, World/
+OUTPUT
+test_test($desc);
+
+$desc = 'C:  unlike hello world';
+test_out("ok 1 - $desc");
+c_output_unlike( <<CODE, <<'OUTPUT', $desc );
+$c_code
+CODE
+/foobar/
+OUTPUT
+test_test($desc);
+
+##### Tests for Parrot::Test internal subroutines #####
+
+# _handle_test_options()
+my ( $out, $chdir );
+( $out, $err, $chdir ) = Parrot::Test::_handle_test_options( {
+    STDOUT  => '/tmp/captureSTDOUT',
+    STDERR  => '/tmp/captureSTDERR',
+    CD      => '/tmp',
+} );
+is($out, '/tmp/captureSTDOUT', "Got expected value for STDOUT");
+is($err, '/tmp/captureSTDERR', "Got expected value for STDERR");
+is($chdir, '/tmp', "Got expected value for working directory");
+
+( $out, $err, $chdir ) = Parrot::Test::_handle_test_options( {
+    STDOUT  => '/tmp/captureSTDOUT',
+    STDERR  => '',
+    CD      => '/tmp',
+} );
+is($out, '/tmp/captureSTDOUT', "Got expected value for STDOUT");
+is($err, '', "Got expected value for STDERR");
+is($chdir, '/tmp', "Got expected value for working directory");
+
+( $out, $err, $chdir ) = Parrot::Test::_handle_test_options( {
+    STDOUT  => '',
+    STDERR  => '',
+    CD      => '',
+} );
+is($out, '', "Got expected value for STDOUT");
+is($err, '', "Got expected value for STDERR");
+is($chdir, '', "Got expected value for working directory");
+
+eval {
+    ( $out, $err, $chdir ) = Parrot::Test::_handle_test_options( {
+        STDJ    => '',
+        STDERR  => '',
+        CD      => '',
+    } );
+};
+like($@, qr/I don't know how to redirect 'STDJ' yet!/,
+    "Got expected error message for bad option");
+
+my $dn = File::Spec->devnull();
+( $out, $err, $chdir ) = Parrot::Test::_handle_test_options( {
+    STDOUT  => '',
+    STDERR  => ($^O eq 'MSWin32')? 'nul' : '/dev/null',
+    CD      => '',
+} );
+is($out, '', "Got expected value for STDOUT");
+is($err, $dn, "Got expected value for STDERR using null device");
+is($chdir, '', "Got expected value for working directory");
+
+( $out, $err, $chdir ) = Parrot::Test::_handle_test_options( {
+    STDOUT  => '/tmp/foobar',
+    STDERR  => '/tmp/foobar',
+    CD      => '',
+} );
+is($out, '/tmp/foobar', "Got expected value for STDOUT");
+is($err, '&STDOUT', "Got expected value for STDERR when same as STDOUT");
+is($chdir, '', "Got expected value for working directory");
+
+{
+    my $oldpath = $ENV{PATH};
+    my $oldldrunpath = $ENV{LD_RUN_PATH};
+    local $PConfig{build_dir} = 'foobar';
+    my $blib_path = File::Spec->catfile( $PConfig{build_dir}, 'blib', 'lib' );
+    {
+        local $^O = 'cygwin';
+        Parrot::Test::_handle_blib_path();
+        is( $ENV{PATH}, $blib_path . ':' . $oldpath,
+            "\$ENV{PATH} reset as expected for $^O");
+        $ENV{PATH} = $oldpath;
+    }
+    {
+        local $^O = 'MSWin32';
+        Parrot::Test::_handle_blib_path();
+        is( $ENV{PATH}, $blib_path . ';' . $oldpath,
+            "\$ENV{PATH} reset as expected for $^O");
+        $ENV{PATH} = $oldpath;
+    }
+    {
+        local $^O = 'not_cygwin_not_MSWin32';
+        Parrot::Test::_handle_blib_path();
+        is( $ENV{LD_RUN_PATH}, $blib_path,
+            "\$ENV{LD_RUN_PATH} reset as expected for $^O");
+        $ENV{LD_RUN_PATH} = $oldldrunpath;
+    }
+}
+
+my $command_orig;
+$command_orig = 'ls';
+is_deeply( Parrot::Test::_handle_command($command_orig), [ qw( ls ) ],
+    "Scalar command transformed into array ref as expected");
+$command_orig = [ qw( ls -l ) ];
+is( Parrot::Test::_handle_command($command_orig), $command_orig,
+    "Array ref holding multiple commands unchanged as expected");
+
+{
+    my $oldvalgrind      = defined $ENV{VALGRIND} ? $ENV{VALGRIND} : '';
+    $command_orig        = 'ls';
+    my $foo              = 'foobar';
+    local $ENV{VALGRIND} = $foo;
+    my $ret              = Parrot::Test::_handle_command($command_orig);
+
+    is( $ret->[0], "$foo $command_orig",
+        "Got expected value in Valgrind environment");
+
+    $ENV{VALGRIND} = $oldvalgrind;
+}
+
+{
+    local $? = -1;
+    my $exit_message = Parrot::Test::_prepare_exit_message();
+    is( $exit_message, -1, "Got expected exit message" );
+}
+
+{
+    local $? = 0;
+    my $exit_message = Parrot::Test::_prepare_exit_message();
+    is( $exit_message, 0, "Got expected exit message" );
+}
+
+{
+    local $? = 1;
+    my $exit_message = Parrot::Test::_prepare_exit_message();
+    is( $exit_message, q{[SIGNAL 1]}, "Got expected exit message" );
+}
+
+{
+    local $? = 255;
+    my $exit_message = Parrot::Test::_prepare_exit_message();
+    is( $exit_message, q{[SIGNAL 255]}, "Got expected exit message" );
+}
+
+{
+    local $? = 256;
+    my $exit_message = Parrot::Test::_prepare_exit_message();
+    is( $exit_message, 1, "Got expected exit message" );
+}
+
+{
+    local $? = 512;
+    my $exit_message = Parrot::Test::_prepare_exit_message();
+    is( $exit_message, 2, "Got expected exit message" );
+}
+
+{
+    my $q = $PConfig{PQ};
+    my $text = q{Hello, world};
+    my $cmd = "$^X -e ${q}print qq{$text\n};${q}";
+    my $exit_message;
+    my ($stdout, $stderr);
+    capture(
+        sub {
+            $exit_message = run_command(
+            $cmd,
+            'CD' => '',
+        ); },
+        \$stdout,
+        \$stderr,
+    );
+    like($stdout, qr/$text/, "Captured STDOUT");
+    is($exit_message, 0, "Got 0 as exit message");
+}
+undef $out;
+undef $err;
+undef $chdir;
+
+
+SKIP: {
+    skip 'feature not DWIMming even though test passes',
+    1;
+$desc = '';
+test_out("ok 1 - $desc");
+pasm_output_is( <<'CODE', <<'OUTPUT', $desc );
+    print "foo\n"
+    end
+CODE
+foo
+OUTPUT
+test_test($desc);
+}
+
+my $outfile = File::Spec->catfile( qw| t perl Parrot_Test_1.out | );
+{
+    unlink $outfile;
+    local $ENV{POSTMORTEM} = 1;
+    $desc = 'pir_output_is: success';
+    test_out("ok 1 - $desc");
+    pir_output_is( <<'CODE', <<'OUTPUT', $desc );
+.sub 'test' :main
+    print "foo\n"
+.end
+CODE
+foo
+OUTPUT
+    test_test($desc);
+    ok( -f $outfile,
+        "file created during test preserved due to \$ENV{POSTMORTEM}");
+    unlink $outfile;
+    ok( ! -f $outfile,
+        "file created during test has been deleted");
+}
+
+{
+    unlink $outfile;
+    local $ENV{POSTMORTEM} = 0;
+    $desc = 'pir_output_is: success';
+    test_out("ok 1 - $desc");
+    pir_output_is( <<'CODE', <<'OUTPUT', $desc );
+.sub 'test' :main
+    print "foo\n"
+.end
+CODE
+foo
+OUTPUT
+    test_test($desc);
+    ok( ! -f $outfile,
+        "file created during test was not retained");
+}
+
+
+# Cleanup t/perl/
+
+unless ( $ENV{POSTMORTEM} ) {
+    my $tdir = q{t/perl};
+    opendir my $DIRH, $tdir or croak "Unable to open $tdir for reading: $!";
+    my @need_cleanup =
+        grep { m/Parrot_Test_\d+\.(?:pir|pasm|out|c|o|build)$/ }
+        readdir $DIRH;
+    closedir $DIRH or croak "Unable to close $tdir after reading: $!";
+    for my $f (@need_cleanup) {
+        unlink qq{$tdir/$f} or croak "Unable to remove $f: $!";
+    }
+}
+
 # Local Variables:
 #   mode: cperl
 #   cperl-indent-level: 4

Modified: branches/rakudoreg/t/pmc/eval.t
==============================================================================
--- branches/rakudoreg/t/pmc/eval.t	(original)
+++ branches/rakudoreg/t/pmc/eval.t	Tue Dec 16 08:21:24 2008
@@ -316,6 +316,8 @@
 2 1 1 1
 OUTPUT
 
+TODO: {
+    local $TODO = "cannot 'rm' an open file on windows" if $^O eq 'MSWin32';
 pir_output_is( <<"CODE", <<'OUTPUT', "eval.get_string - same file" );
 .sub main :main
 
@@ -356,6 +358,7 @@
 CODE
 hello from foo_1
 OUTPUT
+}
 
 my (undef, $temp_file) = create_tempfile( UNLINK => 1 );
 

Modified: branches/rakudoreg/t/pmc/key.t
==============================================================================
--- branches/rakudoreg/t/pmc/key.t	(original)
+++ branches/rakudoreg/t/pmc/key.t	Tue Dec 16 08:21:24 2008
@@ -19,12 +19,12 @@
 .sub main :main
     .include 'include/test_more.pir'
 
-    plan(7)
+    plan(8)
 
     traverse_key_chain()
     extract_int_from_string_keys()
     extract_string_from_int_keys()
-    #do_not_collect_string_keys_early_rt_60128()
+    do_not_collect_string_keys_early_rt_60128()
     todo(0, 'register and non-register string keys should be COW (RT #60128)' )
 .end
 



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