Author: leo
Date: Tue Aug  9 04:25:39 2005
New Revision: 8882

Added:
   branches/leo-ctx5/languages/tcl/lib/commands/switch.pir
      - copied unchanged from r8881, trunk/languages/tcl/lib/commands/switch.pir
   branches/leo-ctx5/languages/tcl/t/cmd_namespace.t   (props changed)
      - copied unchanged from r8881, trunk/languages/tcl/t/cmd_namespace.t
   branches/leo-ctx5/runtime/parrot/library/Test/Builder/Tester.pir
      - copied unchanged from r8881, 
trunk/runtime/parrot/library/Test/Builder/Tester.pir
Modified:
   branches/leo-ctx5/MANIFEST
   branches/leo-ctx5/MANIFEST.SKIP
   branches/leo-ctx5/build_tools/build_nativecall.pl
   branches/leo-ctx5/build_tools/parrotdef.pl
   branches/leo-ctx5/classes/bound_nci.pmc
   branches/leo-ctx5/classes/parrotinterpreter.pmc
   branches/leo-ctx5/compilers/pge/PGE/Exp.pir
   branches/leo-ctx5/config/gen/makefiles/dynclasses_pl.in
   branches/leo-ctx5/config/init/hints/mswin32.pl
   branches/leo-ctx5/docs/ROADMAP
   branches/leo-ctx5/examples/assembly/sudoku.pir
   branches/leo-ctx5/imcc/pcc.c
   branches/leo-ctx5/imcc/t/syn/objects.t
   branches/leo-ctx5/languages/tcl/lib/   (props changed)
   branches/leo-ctx5/languages/tcl/lib/commands/lindex.pir
   branches/leo-ctx5/languages/tcl/t/cmd_global.t
   branches/leo-ctx5/languages/tcl/t/cmd_lindex.t
   branches/leo-ctx5/languages/tcl/t/cmd_proc.t
   branches/leo-ctx5/languages/tcl/t/cmd_string.t
   branches/leo-ctx5/runtime/parrot/library/Stream/Base.imc
   branches/leo-ctx5/runtime/parrot/library/Stream/Writer.imc
   branches/leo-ctx5/runtime/parrot/library/Test/Builder.pir
   branches/leo-ctx5/runtime/parrot/library/Test/Builder/Output.pir
   branches/leo-ctx5/src/inter_call.c
   branches/leo-ctx5/src/inter_run.c
   branches/leo-ctx5/src/objects.c
   branches/leo-ctx5/t/   (props changed)
   branches/leo-ctx5/t/op/gc.t
   branches/leo-ctx5/t/pmc/builtin.t
   branches/leo-ctx5/t/pmc/delegate.t
   branches/leo-ctx5/t/pmc/io.t
   branches/leo-ctx5/t/pmc/object-meths.t
   branches/leo-ctx5/t/pmc/objects.t
   branches/leo-ctx5/t/pmc/pmc.t
Log:
* merge -r8866:8881 from trunk

* start OO support for calls
* self is the first param for methods
* adjust PASM tests to receive object as 1st param
* remove 'method' from PGE/EXP.emit() - it's a plain Sub

Test status:

* bound nci tests are disabled
* 2 tests failing: t/library/streams_{18,20} due to method calls without
  passing an invocant (it seems).

Please make realclean ... and remove other existing PBCs


Modified: branches/leo-ctx5/MANIFEST
==============================================================================
--- branches/leo-ctx5/MANIFEST  (original)
+++ branches/leo-ctx5/MANIFEST  Tue Aug  9 04:25:39 2005
@@ -1410,6 +1410,7 @@ languages/tcl/lib/commands/return.pir   
 languages/tcl/lib/commands/set.pir                [tcl]
 languages/tcl/lib/commands/source.pir             [tcl]
 languages/tcl/lib/commands/string.pir             [tcl]
+languages/tcl/lib/commands/switch.pir             [tcl]
 languages/tcl/lib/commands/time.pir               [tcl]
 languages/tcl/lib/commands/unknown.pir            [tcl]
 languages/tcl/lib/commands/unset.pir              [tcl]
@@ -1456,6 +1457,7 @@ languages/tcl/t/cmd_list.t              
 languages/tcl/t/cmd_llength.t                     [tcl]
 languages/tcl/t/cmd_lrepeat.t                     [tcl]
 languages/tcl/t/cmd_lset.t                        [tcl]
+languages/tcl/t/cmd_namespace.t                   [tcl]
 languages/tcl/t/cmd_proc.t                        [tcl]
 languages/tcl/t/cmd_puts.t                        [tcl]
 languages/tcl/t/cmd_rename.t                      [tcl]
@@ -1617,6 +1619,7 @@ runtime/parrot/library/Stream/Writer.imc
 runtime/parrot/library/Test/Builder.pir           [library]
 runtime/parrot/library/Test/Builder/Output.pir    [library]
 runtime/parrot/library/Test/Builder/Test.pir      [library]
+runtime/parrot/library/Test/Builder/Tester.pir    [library]
 runtime/parrot/library/Test/Builder/TestPlan.pir  [library]
 runtime/parrot/library/config.imc                 [library]
 runtime/parrot/library/dumper.imc                 [library]

Modified: branches/leo-ctx5/MANIFEST.SKIP
==============================================================================
--- branches/leo-ctx5/MANIFEST.SKIP     (original)
+++ branches/leo-ctx5/MANIFEST.SKIP     Tue Aug  9 04:25:39 2005
@@ -1,5 +1,5 @@
 # $Id$
-# generated by gen_manifest_skip.pl Sat Jul 30 21:20:21 2005
+# generated by gen_manifest_skip.pl Mon Aug  8 21:55:25 2005
 #
 # Please update t/src/manifest.t when adding patterns here
 \B\.svn\b
@@ -71,6 +71,7 @@
 ^ast/.*\.flag/
 ^ast/.*\.o$
 ^ast/.*\.o/
+# generated from svn:ignore of 'blib/lib/'
 # generated from svn:ignore of 'build_tools/'
 ^build_tools/build_dynclasses\.pl$
 ^build_tools/build_dynclasses\.pl/
@@ -515,6 +516,7 @@
 ^languages/jako/t/.*\.pasm/
 ^languages/jako/t/.*\.pbc$
 ^languages/jako/t/.*\.pbc/
+# generated from svn:ignore of 'languages/lazy-k/'
 # generated from svn:ignore of 'languages/lisp/'
 ^languages/lisp/Makefile$
 ^languages/lisp/Makefile/
@@ -790,12 +792,11 @@
 ^languages/tcl/examples/Makefile$
 ^languages/tcl/examples/Makefile/
 # generated from svn:ignore of 'languages/tcl/lib/'
-^languages/tcl/lib/tcllib\.imc$
-^languages/tcl/lib/tcllib\.imc/
+^languages/tcl/lib/tcllib\.pir$
+^languages/tcl/lib/tcllib\.pir/
 ^languages/tcl/lib/.*\.pbc$
 ^languages/tcl/lib/.*\.pbc/
 # generated from svn:ignore of 'languages/tcl/lib/commands/'
-# generated from svn:ignore of 'languages/tcl/lib/macros/'
 # generated from svn:ignore of 'languages/tcl/t/'
 ^languages/tcl/t/.*\.tcl$
 ^languages/tcl/t/.*\.tcl/
@@ -903,6 +904,8 @@
 # generated from svn:ignore of 'runtime/parrot/library/Stream/'
 ^runtime/parrot/library/Stream/.*\.pbc$
 ^runtime/parrot/library/Stream/.*\.pbc/
+# generated from svn:ignore of 'runtime/parrot/library/Test/'
+# generated from svn:ignore of 'runtime/parrot/library/Test/Builder/'
 # generated from svn:ignore of 'runtime/parrot/library/YAML/'
 # generated from svn:ignore of 'runtime/parrot/library/YAML/Parser/'
 ^runtime/parrot/library/YAML/Parser/.*\.pbc$
@@ -939,8 +942,8 @@
 ^src/revision\.c$
 ^src/revision\.c/
 # generated from svn:ignore of 't/'
-^t/benchmarks_.*\.imc$
-^t/benchmarks_.*\.imc/
+^t/benchmarks_.*\.pir$
+^t/benchmarks_.*\.pir/
 ^t/benchmarks_.*\.pasm$
 ^t/benchmarks_.*\.pasm/
 # generated from svn:ignore of 't/dynclass/'

Modified: branches/leo-ctx5/build_tools/build_nativecall.pl
==============================================================================
--- branches/leo-ctx5/build_tools/build_nativecall.pl   (original)
+++ branches/leo-ctx5/build_tools/build_nativecall.pl   Tue Aug  9 04:25:39 2005
@@ -164,7 +164,7 @@ my %sig_char =
        b => "S",
        t => "S",
        P => "P",
-       O => "",              # XXX pdd03 P
+       O => "P",
        S => "S",
        I => "I",
        N => "N",
@@ -199,7 +199,6 @@ while (<>) {
                                 [EMAIL PROTECTED], [EMAIL PROTECTED]);
            $sig .= $sig_char{$_};
            $_ eq 'J' && $reg_num--;
-           $_ eq 'O' && $reg_num--;
         }
     }
 
@@ -449,10 +448,7 @@ sub make_arg {
     /J/ && do {
        return "interpreter";
     };
-    /O/ && do {
-       return "REG_PMC(2)";         # XXX
-    };
-    /P/ && do {
+    /[OP]/ && do {
        push @{$temps_ref}, "PMC *t_$temp_num;";
        push @{$extra_preamble_ref},
            "t_$temp_num = GET_NCI_P($reg_num);";

Modified: branches/leo-ctx5/build_tools/parrotdef.pl
==============================================================================
--- branches/leo-ctx5/build_tools/parrotdef.pl  (original)
+++ branches/leo-ctx5/build_tools/parrotdef.pl  Tue Aug  9 04:25:39 2005
@@ -31,6 +31,7 @@ my @funcnames = qw(

        Parrot_debug

        Parrot_disassemble

        Parrot_load_bytecode

+       Parrot_load_lib

        pmc_new

        pmc_reuse

        pmc_new_noinit


Modified: branches/leo-ctx5/classes/bound_nci.pmc
==============================================================================
--- branches/leo-ctx5/classes/bound_nci.pmc     (original)
+++ branches/leo-ctx5/classes/bound_nci.pmc     Tue Aug  9 04:25:39 2005
@@ -63,10 +63,6 @@ Set the bound object live.
              * see also classes/default.pmc:get_attr_str()
              * */
             PMC *multi = PMC_struct_val(SELF);
-            INTVAL i = REG_INT(3)++;
-            while (i--)
-                REG_PMC(6+i)=REG_PMC(5+i);
-            REG_PMC(5) = PMC_pmc_val(SELF);
             next = VTABLE_invoke(INTERP, multi, next);
         }
         else {

Modified: branches/leo-ctx5/classes/parrotinterpreter.pmc
==============================================================================
--- branches/leo-ctx5/classes/parrotinterpreter.pmc     (original)
+++ branches/leo-ctx5/classes/parrotinterpreter.pmc     Tue Aug  9 04:25:39 2005
@@ -243,7 +243,7 @@ create_interp(PMC *self, Parrot_Interp p
 }
 
 static int
-recursion_limit(Parrot_Interp interpreter, int l)
+recursion_limit(Parrot_Interp interpreter, PMC *self, int l)
 {
     int ret = interpreter->recursion_limit;
     interpreter->recursion_limit = l;
@@ -299,7 +299,7 @@ Class initialization.
              * misc functions
              */
             enter_nci_method(INTERP, typ,
-                    F2DPTR(recursion_limit), "recursion_limit", "iJi");
+                    F2DPTR(recursion_limit), "recursion_limit", "iJOi");
         }
 
     }

Modified: branches/leo-ctx5/compilers/pge/PGE/Exp.pir
==============================================================================
--- branches/leo-ctx5/compilers/pge/PGE/Exp.pir (original)
+++ branches/leo-ctx5/compilers/pge/PGE/Exp.pir Tue Aug  9 04:25:39 2005
@@ -236,7 +236,7 @@ Adds to the current code string, replaci
 
 =cut
 
-.sub "emit" method
+.sub "emit"
     .param pmc code                                # append to code
     .param string fmt                              # string to output
     .param string str1         :optional           # first %s substitution

Modified: branches/leo-ctx5/config/gen/makefiles/dynclasses_pl.in
==============================================================================
--- branches/leo-ctx5/config/gen/makefiles/dynclasses_pl.in     (original)
+++ branches/leo-ctx5/config/gen/makefiles/dynclasses_pl.in     Tue Aug  9 
04:25:39 2005
@@ -39,12 +39,8 @@ if ($^O eq 'MSWin32') {
     # Paths need quoting as they may contain spaces.
     $PATHQUOTE = '"';
     
-    # Also need various libraries in the link line.
-    my $extraLibs = '${libs} ${icu_shared}';
-    $extraLibs =~ s/blib/..\\blib/g;
-    $extraLibs =~ s/\Q$(A)\E/.lib/g;
-    $LD_LOAD_FLAGS =~ s/(-def:)/$extraLibs $1..\\/;
-    $LIBPARROT = '${build_dir}/parrot.lib';
+    $LD_LOAD_FLAGS =~ s/(-def:)/$1..\\/;
+    $LIBPARROT = '${build_dir}/parrot${a}';
 }
 
 # PMC2C Config
@@ -68,17 +64,30 @@ sub partial_link_cmd {
     my $liblist;
     my $def = '';
     if ($^O =~ /mswin32/i) {
-      $liblist = join( ' ', map { "$_.lib" } keys %$libs );
-      $def = "-def:$target ";
-      $def =~ s/\.dll/.def/i;
+        # Need to put various libraries in the link line.
+        $liblist = join( ' ', map { "$_.lib" } keys %$libs );
+        if ($CC =~ /gcc/i) {
+            $liblist =~ s/gdbm\.lib/-llibgdbm/i;
+        }
+        my $extraLibs = '${libs} ${icu_shared}';
+        $extraLibs =~ s/blib/..\\blib/g;
+        $extraLibs =~ s/\Q$(A)\E/.lib/g;
+        $liblist .= ' ' . $extraLibs;
+        if ($CC =~ /gcc/i) {
+            $def = "$target ";
+        } else {
+            $def = "-def:$target ";
+        }
+        $def =~ s/\.dll/.def/i;
     } else {
-      $liblist = join( ' ', map { "-l$_" } keys %$libs );
+        $liblist = join( ' ', map { "-l$_" } keys %$libs );
     }
 
     return
-        "$LD $LDFLAGS $LD_LOAD_FLAGS $liblist $PATHQUOTE$LIBPARROT$PATHQUOTE ".
+        "$LD $LDFLAGS $LD_LOAD_FLAGS ".
         "${ld_out}" . $target . " " . $def .
-        join(" ", map {"$PATHQUOTE$_$PATHQUOTE"} @$sources);
+        join(" ", map {"$PATHQUOTE$_$PATHQUOTE"} @$sources) .
+        " $liblist $PATHQUOTE$LIBPARROT$PATHQUOTE";
 }
 
 our $NOW = time();

Modified: branches/leo-ctx5/config/init/hints/mswin32.pl
==============================================================================
--- branches/leo-ctx5/config/init/hints/mswin32.pl      (original)
+++ branches/leo-ctx5/config/init/hints/mswin32.pl      Tue Aug  9 04:25:39 2005
@@ -189,5 +189,17 @@
                } else {
                        warn "unknown configuration";
                }
+
+               # We need to build a .def file to export parrot.exe symbols.
+               Configure::Data->set(
+                       ld_parrot_exe_def       => 'parrot.def',
+                       parrot_exe_def  => 'parrot.def',
+                       link_dynamic    => '-Wl,--out-implib,parrot.a',
+               );
+               # When building dynclasses we need to flag up the need to
+               # mark shared variables with __declspec(dllimport).
+               Configure::Data->set(
+                       cc_building_dynclass_flag => 
'-DPARROT_BUILDING_WIN32_DLL'
+               );
        }
 }

Modified: branches/leo-ctx5/docs/ROADMAP
==============================================================================
--- branches/leo-ctx5/docs/ROADMAP      (original)
+++ branches/leo-ctx5/docs/ROADMAP      Tue Aug  9 04:25:39 2005
@@ -22,6 +22,9 @@ This document is now becoming a roadmap,
 in a weeklong mindmeld with the Pumpking and the results are being
 encoded in this document, among others.
 
+For a high level overview of parrot milestones, please see:
+http://www.perlfoundation.org/gc/grants/2005-p6-proposal.html
+
 =head1 CURRENT RELEASE (0.2.3)
 
 Parrot 0.2.3 has been released on Aug 5th 2005. For a list of new and

Modified: branches/leo-ctx5/examples/assembly/sudoku.pir
==============================================================================
--- branches/leo-ctx5/examples/assembly/sudoku.pir      (original)
+++ branches/leo-ctx5/examples/assembly/sudoku.pir      Tue Aug  9 04:25:39 2005
@@ -797,7 +797,7 @@ ret_0:
 .end
 
 # count seen in one
-.sub check_seen method
+.sub check_seen
     .param pmc seen
     .local pmc it
     new it, .Iterator, seen
@@ -1391,19 +1391,19 @@ out:
 
 .namespace ["Dummy"]
 
-.sub "print" @MULTI(int, int, string)
+.sub "print" @MULTI(_, int, int, string), method
     .param int r
     .param int c
     .param string s
     print s
 .end
 
-.sub "print" @MULTI(string)
+.sub "print" @MULTI(_, string), method
     .param string s
     print s
 .end
 
-.sub "print" @MULTI(int)
+.sub "print" @MULTI(_, int), method
     .param int s
     print s
 .end
@@ -1416,7 +1416,7 @@ out:
 # TODO remember last position, parse newlines to increment row
 # this should better be all in a new library
 
-.sub "print" @MULTI(int, int, string), method
+.sub "print" @MULTI(_, int, int, string), method
     .param int r
     .param int c
     .param string s
@@ -1427,7 +1427,7 @@ out:
     f(win, r, c, s)
 .end
 
-.sub "print" @MULTI(string), method
+.sub "print" @MULTI(_, string), method
     .param string s
     .local pmc win, f
 
@@ -1436,7 +1436,7 @@ out:
     f(win, s)
 .end
 
-.sub "print" @MULTI(int), method
+.sub "print" @MULTI(_, int), method
     .param int i
     .local string s
     .local pmc win, f

Modified: branches/leo-ctx5/imcc/pcc.c
==============================================================================
--- branches/leo-ctx5/imcc/pcc.c        (original)
+++ branches/leo-ctx5/imcc/pcc.c        Tue Aug  9 04:25:39 2005
@@ -171,10 +171,14 @@ expand_pcc_sub(Parrot_Interp interp, IMC
 
 #ifdef OBJ_AS_PARAM
     /*
-     * if this sub references self, unshift it as first param
+     * if this sub isa method, unshift 'self' as first param
      */
-    if (unit->type & IMC_HAS_SELF) {
+    if (sub->pcc_sub->pragma & P_METHOD) {
         SymReg *self = get_sym("self");
+        if (!self) {
+            self = mk_symreg(interp, str_dup("self"), 'P');
+            self->type = VTIDENTIFIER;
+        }
         unshift_self(interp, sub, self);
     }
 

Modified: branches/leo-ctx5/imcc/t/syn/objects.t
==============================================================================
--- branches/leo-ctx5/imcc/t/syn/objects.t      (original)
+++ branches/leo-ctx5/imcc/t/syn/objects.t      Tue Aug  9 04:25:39 2005
@@ -24,7 +24,7 @@ pir_output_is(<<'CODE', <<'OUT', "meth c
 .end
 
 .namespace [ "Foo" ]
-.sub _meth
+.sub _meth method
     print "in meth\n"
 .end
 CODE
@@ -48,7 +48,7 @@ pir_output_is(<<'CODE', <<'OUT', "meth c
 .end
 
 .namespace [ "Foo" ]
-.sub _meth
+.sub _meth method
     .param pmc s
     print "in meth\n"
     print s
@@ -74,7 +74,7 @@ pir_output_is(<<'CODE', <<'OUT', "meth c
 .end
 
 .namespace [ "Foo" ]
-.sub _meth
+.sub _meth method
     .param pmc s
     print "in meth\n"
     print s
@@ -107,7 +107,7 @@ pir_output_is(<<'CODE', <<'OUT', "meth c
     end
 .end
 .namespace [ "Foo" ]
-.sub _meth
+.sub _meth method
     print "in meth\n"
 .end
 CODE
@@ -132,22 +132,22 @@ pir_output_is(<<'CODE', <<'OUT', "initia
 .end
 
 .namespace ["Foo"]
-.sub __init
+.sub __init method
     print "foo_init\n"
 .end
 
 .namespace ["Bar"]
-.sub __init
+.sub __init method
     print "bar_init\n"
 .end
 
 .namespace ["Baz"]
-.sub __init
+.sub __init method
     print "baz_init\n"
 .end
 
 .namespace [""]        # main again
-.sub _sub
+.sub _sub method
     print "in sub\n"
 .end
 CODE
@@ -203,7 +203,7 @@ pir_output_is(<<'CODE', <<'OUT', "explic
 .end
 
 .namespace [ "Foo" ]
-.sub _meth
+.sub _meth method
     print "in meth\n"
 .end
 CODE
@@ -231,7 +231,7 @@ pir_output_is(<<'CODE', <<'OUT', "explic
 .end
 
 .namespace [ "Foo" ]
-.sub _meth
+.sub _meth method
     print "in meth\n"
 .end
 CODE
@@ -259,7 +259,7 @@ pir_output_is(<<'CODE', <<'OUT', "explic
 .end
 
 .namespace [ "Foo" ]
-.sub _meth
+.sub _meth method
     .param string p1
     .param string p2
     print "in meth\n"
@@ -293,7 +293,7 @@ pir_output_is(<<'CODE', <<'OUT', "explic
 .end
 
 .namespace [ "Foo" ]
-.sub _meth
+.sub _meth method
     print "in meth\n"
 .end
 CODE
@@ -315,7 +315,7 @@ pir_output_is(<<'CODE', <<'OUT', "meth c
 .end
 
 .namespace [ "Foo" ]
-.sub open
+.sub open method
     print "in meth\n"
 .end
 CODE

Modified: branches/leo-ctx5/languages/tcl/lib/commands/lindex.pir
==============================================================================
--- branches/leo-ctx5/languages/tcl/lib/commands/lindex.pir     (original)
+++ branches/leo-ctx5/languages/tcl/lib/commands/lindex.pir     Tue Aug  9 
04:25:39 2005
@@ -13,12 +13,15 @@
   argc = argv
   if argc < 1 goto bad_args
   
-  .local pmc __list
-  __list = find_global "_Tcl", "__list"
+  .local pmc __list, _list_index
+  __list      = find_global "_Tcl", "__list"
+  _list_index = find_global "_Tcl", "_list_index"
 
+  .local pmc list
   $P0 = argv[0]
   (return_type, retval) = __list($P0)
   if return_type == TCL_ERROR goto done
+  list = retval
 
 have_list:
   if argc == 1 goto done
@@ -26,23 +29,25 @@ have_list:
 select_elem:
   $P0 = argv[1]
   .local pmc indices
-  (return_type, indices) = __list($P0)
+  (return_type, retval) = __list($P0)
   if return_type == TCL_ERROR goto done
+  indices = retval
   
   .local int index
   .local int elems
   elems = indices
   $I0 = 0
 select_loop:
-  if $I0 >= elems goto done
-  (return_type, retval) = __list(retval)
+  if $I0 >= elems goto have_elem
+  (return_type, retval) = __list(list)
   if return_type == TCL_ERROR goto done
+  list = retval
   
-  # use a string so we get the int value of the contents
-  # of the TclWord and not the size of the TclWord itself
-  $S0 = indices[$I0]
-  index = $S0
-  retval = retval[index]
+  $P0 = indices[$I0]
+  (return_type, retval) = _list_index(list, $P0)
+  if return_type == TCL_ERROR goto done
+  index = retval
+  list  = list[index]
   
   inc $I0
   goto select_loop
@@ -52,6 +57,8 @@ bad_args:
   retval = new TclString
   retval = "wrong # args: should be \"lindex list ?index...?\""
 
+have_elem:
+  retval = list
 done:
   .return(return_type, retval)
 .end

Modified: branches/leo-ctx5/languages/tcl/t/cmd_global.t
==============================================================================
--- branches/leo-ctx5/languages/tcl/t/cmd_global.t      (original)
+++ branches/leo-ctx5/languages/tcl/t/cmd_global.t      Tue Aug  9 04:25:39 2005
@@ -2,7 +2,7 @@
 
 use strict;
 use lib qw(tcl/t t . ../lib ../../lib ../../../lib);
-use Parrot::Test tests => 3;
+use Parrot::Test tests => 5;
 use vars qw($TODO);
 
 language_output_is("tcl",<<'TCL',<<OUT,"missing global");
@@ -38,3 +38,29 @@ language_output_is("tcl",<<'TCL',<<OUT,"
 TCL
 1 2 3
 OUT
+
+TODO: {
+
+local $TODO= "global doesn't deal if we haven't defined the global yet.";
+
+language_output_is("tcl",<<'TCL',<<OUT,"vivify global");
+proc j {} {
+  global a
+  set a 1
+}
+j
+puts $a
+TCL
+1
+OUT
+}
+
+language_output_is("tcl",<<'TCL',<<OUT,"nonvivifying global");
+proc j {} {
+  global a
+}
+j
+puts $a
+TCL
+can't read "a": no such variable
+OUT

Modified: branches/leo-ctx5/languages/tcl/t/cmd_lindex.t
==============================================================================
--- branches/leo-ctx5/languages/tcl/t/cmd_lindex.t      (original)
+++ branches/leo-ctx5/languages/tcl/t/cmd_lindex.t      Tue Aug  9 04:25:39 2005
@@ -2,7 +2,8 @@
 
 use strict;
 use lib qw(tcl/t t . ../lib ../../lib ../../../lib);
-use Parrot::Test tests => 3;
+use Parrot::Test tests => 4;
+use vars qw($TODO);
 
 language_output_is("tcl",<<'TCL',<<OUT,"lindex with list");
  set a {a b c}
@@ -18,9 +19,19 @@ TCL
 b
 OUT
 
-language_output_is("tcl",<<'TCL',<<OUT,"lindex with multiple indices")
+language_output_is("tcl",<<'TCL',<<OUT,"lindex with multiple indices");
  set a "a {a b} c"
  puts [lindex $a {1 1}]
 TCL
 b
 OUT
+
+TODO: {
+local $TODO = "wrong index types";
+language_output_is("tcl",<<'TCL',<<'OUT',"bogus index")
+ lindex a bogus
+TCL
+bad index "bogus": must be integer or end?-integer?
+OUT
+}
+

Modified: branches/leo-ctx5/languages/tcl/t/cmd_proc.t
==============================================================================
--- branches/leo-ctx5/languages/tcl/t/cmd_proc.t        (original)
+++ branches/leo-ctx5/languages/tcl/t/cmd_proc.t        Tue Aug  9 04:25:39 2005
@@ -2,9 +2,20 @@
 
 use strict;
 use lib qw(tcl/t t . ../lib ../../lib ../../../lib);
-use Parrot::Test tests => 4;
+use Parrot::Test tests => 5;
 use vars qw($SKIP $TODO);
 
+language_output_is("tcl",<<'TCL',<<OUT,"return value");
+ set a [proc me {} {
+  puts 2
+ }]
+ me
+ puts $a
+TCL
+2
+
+OUT
+
 language_output_is("tcl",<<'TCL',<<OUT,"noarg");
  proc me {} {
   puts 2

Modified: branches/leo-ctx5/languages/tcl/t/cmd_string.t
==============================================================================
--- branches/leo-ctx5/languages/tcl/t/cmd_string.t      (original)
+++ branches/leo-ctx5/languages/tcl/t/cmd_string.t      Tue Aug  9 04:25:39 2005
@@ -221,7 +221,8 @@ TCL
 OUT
 
 TODO: {
-local $TODO = "Parser error";
+local $TODO = "PGE Globbing doesn't do backslash escaping [#36820]"; 
+
 language_output_is("tcl",<<TCL,<<OUT,"string match \[");
   puts [string match {\[} {[}]
 TCL

Modified: branches/leo-ctx5/runtime/parrot/library/Stream/Base.imc
==============================================================================
--- branches/leo-ctx5/runtime/parrot/library/Stream/Base.imc    (original)
+++ branches/leo-ctx5/runtime/parrot/library/Stream/Base.imc    Tue Aug  9 
04:25:39 2005
@@ -44,7 +44,7 @@ END:
 
     # call our own close
     close = find_global "Stream::Base", "close"
-    close()
+    close(self)
 .end
 
 =item assign stream, source

Modified: branches/leo-ctx5/runtime/parrot/library/Stream/Writer.imc
==============================================================================
--- branches/leo-ctx5/runtime/parrot/library/Stream/Writer.imc  (original)
+++ branches/leo-ctx5/runtime/parrot/library/Stream/Writer.imc  Tue Aug  9 
04:25:39 2005
@@ -194,7 +194,7 @@ END_OF_STREAM:
     .param pmc writer
     .local pmc cont
     .local string str
-    
+
     cont = interpinfo .INTERPINFO_CURRENT_CONT
     self."setSource"( cont )
     str = writer()

Modified: branches/leo-ctx5/runtime/parrot/library/Test/Builder.pir
==============================================================================
--- branches/leo-ctx5/runtime/parrot/library/Test/Builder.pir   (original)
+++ branches/leo-ctx5/runtime/parrot/library/Test/Builder.pir   Tue Aug  9 
04:25:39 2005
@@ -59,17 +59,10 @@ This class defines the following methods
        addattribute tb_class, 'testplan'
        addattribute tb_class, 'results'
 
-       .local pmc output
-       .local pmc testplan
-       .local pmc results
+       .local pmc single
+       single = new .Undef
 
-       output   = new .Undef
-       testplan = new .Undef
-       results  = new .Undef
-
-       store_global 'Test::Builder::_singleton',   'output',   output
-       store_global 'Test::Builder::_singleton', 'testplan', testplan
-       store_global 'Test::Builder::_singleton',  'results',  results
+       store_global 'Test::Builder::_singleton', 'singleton', single
 .end
 
 =item C<new( args_hash )>
@@ -97,13 +90,16 @@ the same state.
 
 =cut
 
+.sub __fake_init method
+.end
+
 .sub __init method
        .param pmc args
        .local pmc output
        .local pmc testplan
        .local pmc results
 
-       (output, testplan, results) = _assign_default_args( args )
+       (output, testplan, results) = self.'_assign_default_args'( args )
        self.'_assign_args'( output, testplan, results )
 .end
 
@@ -128,7 +124,7 @@ This probably doesn't work correctly yet
 
 =cut
 
-.sub create method
+.sub create
        .param pmc args
 
        .local pmc output
@@ -158,35 +154,53 @@ This probably doesn't work correctly yet
   TESTPLAN_DEFINED:
 
     results    = new .ResizablePMCArray
+       .local int test_builder_type
 
-       self.'_assign_args'( output, testplan, results )
+       find_type test_builder_type, 'Test::Builder'
+       .local pmc real_init
+       .local pmc blank_init
+       real_init = find_global 'Test::Builder', '__init'
+       blank_init = find_global 'Test::Builder', '__fake_init'
+       store_global 'Test::Builder', '__init', blank_init
+
+       .local pmc test
+       test       = new test_builder_type
+       store_global 'Test::Builder', '__init', real_init
+
+       test.'_assign_args'( output, testplan, results )
+       .return( test )
 .end
 
-.sub _assign_default_args
+.sub _assign_default_args method
        .param pmc args
 
+       .local pmc single
+       single = find_global 'Test::Builder::_singleton', 'singleton'
+
        .local pmc output
        .local pmc testplan
        .local pmc results
-
-       output   = find_global 'Test::Builder::_singleton', 'output'
-       testplan = find_global 'Test::Builder::_singleton', 'testplan'
-       results  = find_global 'Test::Builder::_singleton', 'results'
-
        .local int is_defined
 
        # try for the global first
-       is_defined = isa output, 'Test::Builder::Output'
-       if is_defined goto OUTPUT_DEFINED
+       is_defined = isa single, 'Test::Builder'
+       unless is_defined goto CREATE_ATTRIBUTES
+
+       output   = single.'output'()
+       testplan = single.'testplan'()
+       results  = single.'results'()
 
+       goto RESULTS_DEFINED
+
+  CREATE_ATTRIBUTES:
        # now look in the args hash
        is_defined = exists args['output']
        unless is_defined goto CREATE_OUTPUT
        output     = args['output']
        goto OUTPUT_DEFINED
 
-       # now create a Test::Builder::Output object
   CREATE_OUTPUT:
+       # create a Test::Builder::Output object
        .local int output_type
        find_type  output_type, 'Test::Builder::Output'
 
@@ -195,31 +209,25 @@ This probably doesn't work correctly yet
        output     = new output_type, args_hash
 
   OUTPUT_DEFINED:
-       # look for the global testplan
-       is_defined = isa testplan, 'Test::Builder::TestPlan'
-       $S0 = typeof testplan
-       if is_defined goto TESTPLAN_DEFINED
-
        # now try in the args hash
        is_defined = exists args['testplan']
-       unless is_defined goto BACKUP_TESTPLAN
+       unless is_defined goto CREATE_TESTPLAN
        testplan = args['testplan']
        goto TESTPLAN_DEFINED
 
-  BACKUP_TESTPLAN:
+  CREATE_TESTPLAN:
        testplan   = new .String
        set testplan, 'global_testplan'
 
   TESTPLAN_DEFINED:
-       is_defined = isa results, 'ResizablePMCArray'
+       is_defined = defined results
        if is_defined goto RESULTS_DEFINED
        results    = new .ResizablePMCArray
 
-  RESULTS_DEFINED:
-       store_global 'Test::Builder::_singleton',   'output',   output
-       store_global 'Test::Builder::_singleton', 'testplan', testplan
-       store_global 'Test::Builder::_singleton',  'results',  results
+       # store this as the singleton
+       store_global 'Test::Builder::_singleton', 'singleton', self
 
+  RESULTS_DEFINED:
        .return( output, testplan, results )
 .end
 
@@ -311,7 +319,10 @@ declared a plan or if you pass an invali
        .local int is_defined
 
        .local int is_equal
+       .local int is_plan
 
+       is_plan = isa testplan, 'Test::Builder::TestPlan'
+       eq is_plan, 1, CHECK_REPLAN
        eq_str testplan, 'global_testplan', SET_GLOBAL_TESTPLAN
        goto CHECK_REPLAN
 
@@ -497,7 +508,7 @@ why you've skipped them.
 
        self.'report_test'( test_args )
        inc loop_count
-       if loop_count < number goto LOOP
+       if loop_count <= number goto LOOP
 
 .end
 

Modified: branches/leo-ctx5/runtime/parrot/library/Test/Builder/Output.pir
==============================================================================
--- branches/leo-ctx5/runtime/parrot/library/Test/Builder/Output.pir    
(original)
+++ branches/leo-ctx5/runtime/parrot/library/Test/Builder/Output.pir    Tue Aug 
 9 04:25:39 2005
@@ -126,6 +126,7 @@ unescaped newlines.
   SPLIT_LOOP:
        newline_index = index message, "\n"
        if newline_index == -1 goto END_LOOP
+       inc newline_index
        line = substr message, 0, newline_index, ''
        push lines, line
        if message goto SPLIT_LOOP

Modified: branches/leo-ctx5/src/inter_call.c
==============================================================================
--- branches/leo-ctx5/src/inter_call.c  (original)
+++ branches/leo-ctx5/src/inter_call.c  Tue Aug  9 04:25:39 2005
@@ -243,8 +243,12 @@ fetch_arg_str_sig(Interp *interpreter, s
 static int
 fetch_arg_pmc_sig(Interp *interpreter, struct call_state *st)
 {
-    va_list *ap = (va_list*)(st->src.u.sig.ap);
-    UVal_pmc(st->val) = va_arg(*ap, PMC*);
+    if (*st->src.u.sig.sig == 'O')
+        UVal_pmc(st->val) = CONTEXT(interpreter->ctx)->current_object;
+    else {
+        va_list *ap = (va_list*)(st->src.u.sig.ap);
+        UVal_pmc(st->val) = va_arg(*ap, PMC*);
+    }
     st->src.mode |= CALL_STATE_NEXT_ARG;
     return 1;
 }
@@ -270,6 +274,7 @@ next_arg(Interp *interpreter, struct cal
                     st->sig = PARROT_ARG_FLOATVAL; break;
                 case 'S':
                     st->sig = PARROT_ARG_STRING; break;
+                case 'O':
                 case 'P':
                     st->sig = PARROT_ARG_PMC; break;
             }

Modified: branches/leo-ctx5/src/inter_run.c
==============================================================================
--- branches/leo-ctx5/src/inter_run.c   (original)
+++ branches/leo-ctx5/src/inter_run.c   Tue Aug  9 04:25:39 2005
@@ -145,7 +145,8 @@ runops_args(Parrot_Interp interpreter, P
     struct parrot_regs_t *bp;
     parrot_context_t old_ctx;
     int i;
-    INTVAL src_n;
+    char new_sig[10];
+    const char *sig_p;
 
     old_ctx = interpreter->ctx;
     interpreter->current_cont  = new_ret_continuation_pmc(interpreter, NULL);
@@ -153,10 +154,22 @@ runops_args(Parrot_Interp interpreter, P
     dest = VTABLE_invoke(interpreter, sub, NULL);
     if (!dest)
         internal_exception(1, "Subroutine returned a NULL address");
-    src_n = strlen(sig) - 1;
-
-    if (src_n > 0) {
-        dest = parrot_pass_args_fromc(interpreter, sig + 1, src_n, dest,
+    if (PMC_IS_NULL(obj)) {
+        sig_p = sig + 1;
+    }
+    else if (sig[1] == 'O') {
+        sig_p = sig + 1;
+    }
+    else  {
+        size_t len = strlen(sig);
+        if (len > 8)
+            internal_exception(1, "too many arguments in runops_args");
+        new_sig[0] = 'O';
+        strcpy(new_sig + 1, sig + 1);
+        sig_p = new_sig;
+    }
+    if (*sig_p) {
+        dest = parrot_pass_args_fromc(interpreter, sig_p, 0, dest,
                 &old_ctx, ap);
     }
 

Modified: branches/leo-ctx5/src/objects.c
==============================================================================
--- branches/leo-ctx5/src/objects.c     (original)
+++ branches/leo-ctx5/src/objects.c     Tue Aug  9 04:25:39 2005
@@ -558,8 +558,8 @@ do_initcall(Interp* interpreter, PMC* cl
             Parrot_run_meth_fromc_args(interpreter, meth,
                     object, meth_str, "vP", init);
         else
-            Parrot_run_meth_fromc(interpreter, meth,
-                    object, meth_str);
+            Parrot_run_meth_fromc_args(interpreter, meth,
+                    object, meth_str, "v");
     }
     /*
      * 2. if class has a BUILD property call it for all classes
@@ -612,8 +612,8 @@ do_initcall(Interp* interpreter, PMC* cl
                 Parrot_run_meth_fromc_args(interpreter, meth,
                         object, meth_str, "vP", init);
             else
-                Parrot_run_meth_fromc(interpreter, meth,
-                        object, meth_str);
+                Parrot_run_meth_fromc_args(interpreter, meth,
+                        object, meth_str, "v");
         }
         else if (meth_str != NULL &&
                 string_length(interpreter, meth_str) != 0 && !default_meth) {

Modified: branches/leo-ctx5/t/op/gc.t
==============================================================================
--- branches/leo-ctx5/t/op/gc.t (original)
+++ branches/leo-ctx5/t/op/gc.t Tue Aug  9 04:25:39 2005
@@ -170,39 +170,38 @@ CODE
 ok
 OUTPUT
 
-output_is(<<'CODE', <<OUTPUT, "vanishing return continuation in method calls");
-    newclass P1, "Foo"
+pir_output_is(<<'CODE', <<OUTPUT, "vanishing return continuation in method 
calls");
+.sub main @MAIN
+    .local pmc o, cl
+    cl = newclass "Foo"
 
-    find_type I1, "Foo"
-    new P3, I1
+    find_type $I1, "Foo"
+    new o, $I1
     print "ok\n"
     end
+.end
 
 .namespace ["Foo"]
-.pcc_sub __init:
+.sub __init method
     print "init\n"
     sweep 1
     new P6, .String
     set P6, "hi"
-.include "interpinfo.pasm"
-    interpinfo P2, .INTERPINFO_CURRENT_OBJECT
-    callmethodcc "do_inc"
+    self."do_inc"()
     sweep 1
-    returncc
+.end
 
-.pcc_sub do_inc:
+.sub do_inc method
     sweep 1
-.include "interpinfo.pasm"
-    interpinfo P2, .INTERPINFO_CURRENT_OBJECT
-    inc P2
+    inc self
     sweep 1
     print "back from _inc\n"
-    returncc
+.end
 
-.pcc_sub __increment:
+.sub __increment method
     print "inc\n"
     sweep 1
-    returncc
+.end
 CODE
 init
 inc
@@ -224,8 +223,7 @@ output_is(<<'CODE', <<OUTPUT, "failing i
 
 .namespace ["Source"]
 .pcc_sub __get_string: # buffer
-.include "interpinfo.pasm"
-    interpinfo P2, .INTERPINFO_CURRENT_OBJECT
+    get_params "(0)", P2
     getprop P12, "buf", P2
     sweep 1
     typeof I12, P12
@@ -242,8 +240,8 @@ buffer_ok:
 
 .namespace ["Source::Buffer"]
 .pcc_sub __get_string:
+    get_params "(0)", P2
     sweep 1
-    interpinfo P2, .INTERPINFO_CURRENT_OBJECT
     getprop P12, "buf", P2
     set S16, P12
     set_returns "(0)", S16

Modified: branches/leo-ctx5/t/pmc/builtin.t
==============================================================================
--- branches/leo-ctx5/t/pmc/builtin.t   (original)
+++ branches/leo-ctx5/t/pmc/builtin.t   Tue Aug  9 04:25:39 2005
@@ -18,7 +18,7 @@ Tests builtin opcode-like methods.
 
 use Parrot::Test tests => 4;
 
-pir_output_is(<<'CODE', <<'OUT', "four ways to call a method");
+pir_output_is(<<'CODE', <<'OUT', "three ways to call a method");
 .sub main @MAIN
     .local pmc x, y, cl, m
     x = new Float
@@ -38,18 +38,11 @@ pir_output_is(<<'CODE', <<'OUT', "four w
     y = x."cos"()
     print y
     print "\n"
-    # bound object nethod
-    m = getattribute x, "cos"  # m = x.cos
-    print "bound obj met "
-    y = m()
-    print y
-    print "\n"
 .end
 CODE
 opcode        0.540302
 function      0.540302
 method        0.540302
-bound obj met 0.540302
 OUT
 
 SKIP: {
@@ -59,6 +52,12 @@ pir_output_is(<<'CODE', <<'OUT', "class 
     .local pmc x, y, cl, m
     x = new Float
     x = 1.0
+    # bound object nethod
+    m = getattribute x, "cos"  # m = x.cos
+    print "bound obj met "
+    y = m()
+    print y
+    print "\n"
     # same as class method
     cl = getclass "Float"
     print "class method  "
@@ -73,6 +72,7 @@ pir_output_is(<<'CODE', <<'OUT', "class 
     print "\n"
 .end
 CODE
+bound obj met 0.540302
 class method  0.540302
 bound class m 0.540302
 OUT

Modified: branches/leo-ctx5/t/pmc/delegate.t
==============================================================================
--- branches/leo-ctx5/t/pmc/delegate.t  (original)
+++ branches/leo-ctx5/t/pmc/delegate.t  Tue Aug  9 04:25:39 2005
@@ -27,7 +27,7 @@ output_is(<<'CODE', <<'OUTPUT', "delegat
     end
 .namespace ["delegate"]
 .pcc_sub __set_integer_native:
-    get_params "(0)", I5
+    get_params "(0,0)", P2, I5
     # need a private store to keep state - we dont have that yet
     # for now check param passing
     print I5
@@ -46,6 +46,7 @@ output_is(<<'CODE', <<'OUTPUT', "delegat
     end
 .namespace ["delegate"]
 .pcc_sub __get_integer:
+    get_params "(0)", P2
     set I5, 42
     set_returns "(0)", I5
     returncc
@@ -59,7 +60,7 @@ output_is(<<'CODE', <<'OUTPUT', "delegat
     end
 .namespace ["delegate"]
 .pcc_sub __set_string_native:
-    get_params "(0)", S5
+    get_params "(0,0)", P2, S5
     print S5
     print "\n"
     returncc
@@ -75,6 +76,7 @@ output_is(<<'CODE', <<'OUTPUT', "delegat
     end
 .namespace ["delegate"]
 .pcc_sub __get_string:
+    get_params "(0)", P2
     set S5, "fortytwo"
     set_returns "(0)", S5
     returncc
@@ -88,7 +90,7 @@ output_is(<<'CODE', <<'OUTPUT', "delegat
     end
 .namespace ["delegate"]
 .pcc_sub __set_number_native:
-    get_params "(0)", N5
+    get_params "(0,0)", P2,N5
     print N5
     print "\n"
     returncc
@@ -104,6 +106,7 @@ output_is(<<'CODE', <<'OUTPUT', "delegat
     end
 .namespace ["delegate"]
 .pcc_sub __get_number:
+    get_params "(0)", P2
     set N5, 47.11
     set_returns "(0)", N5
     returncc
@@ -119,7 +122,7 @@ output_is(<<'CODE', <<'OUTPUT', "delegat
     end
 .namespace ["delegate"]
 .pcc_sub __assign_pmc:
-    get_params "(0)", P5
+    get_params "(0,0)", P2, P5
     print P5
     print "\n"
     # just return
@@ -140,7 +143,7 @@ pir_output_is(<<'CODE', <<'OUTPUT', "del
     end
 .end
 .namespace ["delegate"]
-.sub __set_integer_native
+.sub __set_integer_native method
     .param int i
     # just return
     print i
@@ -178,7 +181,7 @@ pir_output_is(<<'CODE', <<'OUTPUT', "del
     end
 .end
 .namespace ["delegate"]
-.sub __set_integer_native
+.sub __set_integer_native method
     .param int i
     # cant keep state yet
     # just print arg and return
@@ -199,7 +202,7 @@ pir_output_is(<<'CODE', <<'OUTPUT', "del
     d = 3
     .return (d)
 .end
-.sub __get_string
+.sub __get_string method
     .return("one")
 .end
 CODE

Modified: branches/leo-ctx5/t/pmc/io.t
==============================================================================
--- branches/leo-ctx5/t/pmc/io.t        (original)
+++ branches/leo-ctx5/t/pmc/io.t        Tue Aug  9 04:25:39 2005
@@ -381,7 +381,7 @@ output_is(<<'CODE', <<'OUTPUT', 'puts me
        if I0, ok1
        print "not "
 ok1:   print "ok 1\n"
-       set_args "(0)", "ok 2\n"
+       set_args "(0,0)", P2, "ok 2\n"
        callmethod "puts"
        end
 CODE
@@ -413,10 +413,10 @@ output_is(<<'CODE', <<'OUTPUT', 'callmet
        set S0, "puts"  # method
        set P5, P2      # first param
        set S5, "ok 1\n"        # 2nd param
-       set_args "(0)", S5
+       set_args "(0,0)", P2, S5
        callmethod
        set S5, "ok 2\n"
-       set_args "(0)", S5
+       set_args "(0,0)", P2, S5
        callmethod
        end
 CODE

Modified: branches/leo-ctx5/t/pmc/object-meths.t
==============================================================================
--- branches/leo-ctx5/t/pmc/object-meths.t      (original)
+++ branches/leo-ctx5/t/pmc/object-meths.t      Tue Aug  9 04:25:39 2005
@@ -129,6 +129,7 @@ output_is(<<'CODE', <<'OUTPUT', "constru
     end
 .namespace ["Foo"]
 .pcc_sub __init:
+    get_params "(0)", P2
     print "ok 1\n"
     returncc
 CODE
@@ -193,17 +194,16 @@ output_is(<<'CODE', <<'OUTPUT', "constru
     end
 .namespace ["Foo"]
 .pcc_sub __init:
+    get_params "(0)", P2
     print "ok 1\n"
     new P10, .Integer
     set P10, 42
-.include "interpinfo.pasm"
-    interpinfo P2, .INTERPINFO_CURRENT_OBJECT
     classoffset I0, P2, "Foo"
     setattribute P2, I0, P10
     set_returns "()"
     returncc
 .pcc_sub __get_string:
-    interpinfo P2, .INTERPINFO_CURRENT_OBJECT
+    get_params "(0)", P2
     classoffset I0, P2, "Foo"
     getattribute P10, P2, I0
     set_returns "(0)", P10
@@ -229,9 +229,8 @@ output_is(<<'CODE', <<'OUTPUT', "constru
 
     .namespace ["Foo"]
 .pcc_sub __init:
+    get_params "(0)", P2
     print "foo_init\n"
-.include "interpinfo.pasm"
-    interpinfo P2, .INTERPINFO_CURRENT_OBJECT
     classname S0, P2
     print S0
     print "\n"
@@ -239,16 +238,19 @@ output_is(<<'CODE', <<'OUTPUT', "constru
 
     .namespace ["Bar"]
 .pcc_sub __init:
+    get_params "(0)", P2
     print "bar_init\n"
     returncc
 
     .namespace ["Baz"]
 .pcc_sub __init:
+    get_params "(0)", P2
     print "baz_init\n"
     returncc
 
     .namespace [""]    # main again
 .pcc_sub _sub:
+    get_params "(0)", P2
     print "in sub\n"
     returncc
 
@@ -599,26 +601,32 @@ _check_isa:
 
 .namespace ["A"]
 .pcc_sub __init:
+    get_params "(0)", P2
     print "A init\n"
     returncc
 .namespace ["B"]
 .pcc_sub __init:
+    get_params "(0)", P2
     print "B init\n"
     returncc
 .namespace ["C"]
 .pcc_sub __init:
+    get_params "(0)", P2
     print "C init\n"
     returncc
 .namespace ["D"]
 .pcc_sub __init:
+    get_params "(0)", P2
     print "D init\n"
     returncc
 .namespace ["E"]
 .pcc_sub __init:
+    get_params "(0)", P2
     print "E init\n"
     returncc
 .namespace ["F"]
 .pcc_sub __init:
+    get_params "(0)", P2
     print "F init\n"
     returncc
 CODE
@@ -667,9 +675,8 @@ output_is(<<'CODE', <<'OUTPUT', "constru
 
     .namespace ["Foo"]
 .pcc_sub _new:
+    get_params "(0)", P2
     print "foo_init\n"
-.include "interpinfo.pasm"
-    interpinfo P2, .INTERPINFO_CURRENT_OBJECT
     classname S0, P2
     print S0
     print "\n"
@@ -677,11 +684,13 @@ output_is(<<'CODE', <<'OUTPUT', "constru
 
     .namespace ["Bar"]
 .pcc_sub _new:
+    get_params "(0)", P2
     print "bar_init\n"
     returncc
 
     .namespace ["Baz"]
 .pcc_sub _new:
+    get_params "(0)", P2
     print "baz_init\n"
     returncc
 
@@ -772,7 +781,7 @@ pir_output_is(<<'CODE', <<'OUTPUT', "Bug
 
 .namespace ["Foo"]
 
-.sub __get_integer_keyed
+.sub __get_integer_keyed method
     .param pmc key
     print "Key = "
     print key
@@ -802,7 +811,7 @@ pir_output_is(<<'CODE', <<'OUTPUT', "Bug
 
 .namespace ["Foo"]
 
-.sub __get_integer_keyed
+.sub __get_integer_keyed method
     .param pmc key
     $S0 = "bar"
     print "Key = "
@@ -831,11 +840,11 @@ pir_output_is(<<'CODE', <<'OUTPUT', "met
     store_global "Bar", "__get_string", $P0
     print o
 .end
-.sub ok2
+.sub ok2 method
     .return("ok 2\n")
 .end
 .namespace [ "Foo" ]
-.sub __get_string
+.sub __get_string method
     .return("ok 1\n")
 .end
 CODE
@@ -867,6 +876,8 @@ meth
 back
 OUTPUT
 
+SKIP: {
+    skip("no bound NCI method", 1);
 pir_output_is(<<'CODE', <<'OUTPUT', "bound NCI method");
 .sub main @MAIN
     .local pmc s, l, f
@@ -883,6 +894,7 @@ CODE
 Bound_NCI
 abc
 OUTPUT
+}
 
 pir_output_is(<<'CODE', <<'OUTPUT', "tailcallmeth");
 .sub main @MAIN

Modified: branches/leo-ctx5/t/pmc/objects.t
==============================================================================
--- branches/leo-ctx5/t/pmc/objects.t   (original)
+++ branches/leo-ctx5/t/pmc/objects.t   Tue Aug  9 04:25:39 2005
@@ -941,9 +941,7 @@ output_is(<<'CODE', <<'OUTPUT', "overrid
     end
 
 .pcc_sub set_i:
-.include "interpinfo.pasm"
-    get_params "(0)", I5
-    interpinfo P2, .INTERPINFO_CURRENT_OBJECT
+    get_params "(0,0)", P2, I5
     print "in set_integer\n"
     classoffset I0, P2, "Foo"
     new P6, .Integer
@@ -963,7 +961,7 @@ output_is(<<'CODE', <<'OUTPUT', "overrid
     set_returns "(0)", P7
     returncc
 .pcc_sub get_s:
-    interpinfo P2, .INTERPINFO_CURRENT_OBJECT
+    get_params "(0)", P2
     print "in get_string\n"
     classoffset I0, P2, "Foo"
     getattribute P10, P2, I0
@@ -1797,7 +1795,7 @@ pir_output_is(<<'CODE', <<'OUTPUT', "nam
     print "ok 2\n"
 .end
 .namespace [ "Foo" ]
-.sub __get_string
+.sub __get_string method
     .return("ok 1\n")
 .end
 .sub Foo

Modified: branches/leo-ctx5/t/pmc/pmc.t
==============================================================================
--- branches/leo-ctx5/t/pmc/pmc.t       (original)
+++ branches/leo-ctx5/t/pmc/pmc.t       Tue Aug  9 04:25:39 2005
@@ -157,9 +157,11 @@ L_BadId:
 # delegate calls these 2 functions
 .namespace ["delegate"]
 .pcc_sub __name:
+   get_params '(0)', P2
    set_returns '(0)', "delegate"
    returncc
 .pcc_sub __type:
+   get_params '(0)', P2
    find_type I5, "delegate"
    set_returns '(0)', I5
    returncc

Reply via email to