[svn:parrot] r43764 - in trunk: . config/gen/makefiles src/dynpmc src/pmc t/codingstd t/dynpmc t/pmc

plobsing at svn.parrot.org plobsing at svn.parrot.org
Sun Feb 7 22:10:57 UTC 2010


Author: plobsing
Date: Sun Feb  7 22:10:56 2010
New Revision: 43764
URL: https://trac.parrot.org/parrot/changeset/43764

Log:
convert PCCMETHOD_Test to dynpmc

Added:
   trunk/src/dynpmc/pccmethod_test.pmc   (contents, props changed)
   trunk/t/dynpmc/pccmethod_test.t   (contents, props changed)
Deleted:
   trunk/src/pmc/pccmethod_test.pmc
   trunk/t/pmc/pccmethod_test.t
Modified:
   trunk/MANIFEST
   trunk/config/gen/makefiles/dynpmc.in
   trunk/t/codingstd/pccmethod_deps.t

Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST	Sun Feb  7 20:56:37 2010	(r43763)
+++ trunk/MANIFEST	Sun Feb  7 22:10:56 2010	(r43764)
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Tue Feb  2 19:27:59 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sun Feb  7 21:29:31 2010 UT
 #
 # See below for documentation on the format of this file.
 #
@@ -1324,6 +1324,7 @@
 src/dynpmc/foo2.pmc                                         [devel]src
 src/dynpmc/gdbmhash.pmc                                     [devel]src
 src/dynpmc/main.pasm                                        []
+src/dynpmc/pccmethod_test.pmc                               [devel]src
 src/dynpmc/rational.pmc                                     [devel]src
 src/dynpmc/rotest.pmc                                       [devel]src
 src/dynpmc/subproxy.pmc                                     [devel]src
@@ -1456,7 +1457,6 @@
 src/pmc/parrotlibrary.pmc                                   [devel]src
 src/pmc/parrotrunningthread.pmc                             [devel]src
 src/pmc/parrotthread.pmc                                    [devel]src
-src/pmc/pccmethod_test.pmc                                  [devel]src
 src/pmc/pmc.num                                             []
 src/pmc/pmcproxy.pmc                                        [devel]src
 src/pmc/pointer.pmc                                         [devel]src
@@ -1695,6 +1695,7 @@
 t/dynpmc/foo.t                                              [test]
 t/dynpmc/foo2.t                                             [test]
 t/dynpmc/gdbmhash.t                                         [test]
+t/dynpmc/pccmethod_test.t                                   [test]
 t/dynpmc/rational.t                                         [test]
 t/dynpmc/rotest.t                                           [test]
 t/dynpmc/subclass_with_pir_method.t                         [test]
@@ -1934,7 +1935,6 @@
 t/pmc/parrotobject.t                                        [test]
 t/pmc/parrotrunningthread.t                                 [test]
 t/pmc/parrotthread.t                                        [test]
-t/pmc/pccmethod_test.t                                      [test]
 t/pmc/pmc.t                                                 [test]
 t/pmc/pmcproxy.t                                            [test]
 t/pmc/pointer.t                                             [test]

Modified: trunk/config/gen/makefiles/dynpmc.in
==============================================================================
--- trunk/config/gen/makefiles/dynpmc.in	Sun Feb  7 20:56:37 2010	(r43763)
+++ trunk/config/gen/makefiles/dynpmc.in	Sun Feb  7 22:10:56 2010	(r43764)
@@ -30,6 +30,7 @@
 PMC_TARGETS = \
   dynlexpad$(LOAD_EXT) \
   foo_group$(LOAD_EXT) \
+  pccmethod_test$(LOAD_EXT) \
   rotest$(LOAD_EXT) \
 #IF(has_gdbm):  gdbmhash$(LOAD_EXT) \
   rational$(LOAD_EXT) \
@@ -138,6 +139,19 @@
 foo2.dump: foo2.pmc foo.dump
 	$(PMC2CD) foo2.pmc
 
+pccmethod_test$(LOAD_EXT): pccmethod_test$(O)
+	$(LD) @ld_out at pccmethod_test$(LOAD_EXT) pccmethod_test$(O) $(LINKARGS)
+#IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2
+
+pccmethod_test$(O): pccmethod_test.c
+	$(CC) -c @cc_o_out at pccmethod_test$(O) $(INCLUDES) $(CFLAGS) pccmethod_test.c
+
+pccmethod_test.c: pccmethod_test.dump
+	$(PMC2CC) pccmethod_test.pmc
+
+pccmethod_test.dump: pccmethod_test.pmc
+	$(PMC2CD) pccmethod_test.pmc
+
 rotest$(LOAD_EXT): rotest$(O)
 	$(LD) @ld_out at rotest$(LOAD_EXT) rotest$(O) $(LINKARGS)
 #IF(win32):	if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2

Added: trunk/src/dynpmc/pccmethod_test.pmc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/src/dynpmc/pccmethod_test.pmc	Sun Feb  7 22:10:56 2010	(r43764)
@@ -0,0 +1,77 @@
+/*
+Copyright (C) 2001-2008, Parrot Foundation.
+$Id$
+
+=head1 NAME
+
+src/pmc/pmethod_test.pmc
+
+=head1 DESCRIPTION
+
+METHOD_Test PMC
+
+=cut
+
+*/
+
+pmclass PCCMETHOD_Test dynpmc provides hash {
+
+
+    METHOD test_method()
+    {
+        UNUSED(SELF);
+        Parrot_io_printf(interp, "test_method\n");
+    }
+
+    METHOD test_method0(int a1)
+    {
+        UNUSED(SELF);
+        Parrot_io_printf(interp, "test_method0\n");
+        Parrot_io_printf(interp, "%d\n", a1);
+    }
+
+    METHOD test_method1(int a1, int a2, int a3, int a4, int a5, int a6)
+    {
+        UNUSED(SELF);
+        Parrot_io_printf(interp, "test_method1\n");
+        Parrot_io_printf(interp, "%d,%d,%d,%d,%d,%d\n", a1, a2, a3, a4, a5, a6);
+    }
+
+    METHOD test_method2(int a1 :optional, int a1o :opt_flag,
+                           PMC *slurpy_pos :slurpy)
+    {
+        STRING *kevin = CONST_STRING(interp, "KEVIN");
+        UNUSED(SELF);
+        Parrot_io_printf(interp, "test_method2\n");
+        Parrot_io_printf(interp, "%d, %d, %Ss %Ss\n", a1, a1o,
+            VTABLE_name(interp, slurpy_pos),
+            VTABLE_get_repr(interp, slurpy_pos));
+
+        RETURN(int 1000, STRING *kevin);
+    }
+
+    METHOD test_method3(PMC *a1 :named("a1name"), PMC *a2  :named("a2name"))
+    {
+        UNUSED(SELF);
+        Parrot_io_printf(interp, "test_method3\n");
+        Parrot_io_printf(interp, "%Ps, %Ps\n", a1, a2);
+    }
+
+    METHOD test_method4(int george :optional, int g_f :opt_flag,
+            PMC *slurpy_pos :slurpy, PMC *slurpy_named :slurpy :named)
+    {
+        UNUSED(SELF);
+        UNUSED(george);
+        UNUSED(g_f);
+        UNUSED(slurpy_pos);
+        UNUSED(slurpy_named);
+        Parrot_io_printf(interp, "test_method4\n");
+    }
+}
+
+/*
+ * Local variables:
+ *   c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */

Deleted: trunk/src/pmc/pccmethod_test.pmc
==============================================================================
--- trunk/src/pmc/pccmethod_test.pmc	Sun Feb  7 22:10:56 2010	(r43763)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,77 +0,0 @@
-/*
-Copyright (C) 2001-2008, Parrot Foundation.
-$Id$
-
-=head1 NAME
-
-src/pmc/pmethod_test.pmc
-
-=head1 DESCRIPTION
-
-METHOD_Test PMC
-
-=cut
-
-*/
-
-pmclass PCCMETHOD_Test provides hash {
-
-
-    METHOD test_method()
-    {
-        UNUSED(SELF);
-        Parrot_io_printf(interp, "test_method\n");
-    }
-
-    METHOD test_method0(int a1)
-    {
-        UNUSED(SELF);
-        Parrot_io_printf(interp, "test_method0\n");
-        Parrot_io_printf(interp, "%d\n", a1);
-    }
-
-    METHOD test_method1(int a1, int a2, int a3, int a4, int a5, int a6)
-    {
-        UNUSED(SELF);
-        Parrot_io_printf(interp, "test_method1\n");
-        Parrot_io_printf(interp, "%d,%d,%d,%d,%d,%d\n", a1, a2, a3, a4, a5, a6);
-    }
-
-    METHOD test_method2(int a1 :optional, int a1o :opt_flag,
-                           PMC *slurpy_pos :slurpy)
-    {
-        STRING *kevin = CONST_STRING(interp, "KEVIN");
-        UNUSED(SELF);
-        Parrot_io_printf(interp, "test_method2\n");
-        Parrot_io_printf(interp, "%d, %d, %Ss %Ss\n", a1, a1o,
-            VTABLE_name(interp, slurpy_pos),
-            VTABLE_get_repr(interp, slurpy_pos));
-
-        RETURN(int 1000, STRING *kevin);
-    }
-
-    METHOD test_method3(PMC *a1 :named("a1name"), PMC *a2  :named("a2name"))
-    {
-        UNUSED(SELF);
-        Parrot_io_printf(interp, "test_method3\n");
-        Parrot_io_printf(interp, "%Ps, %Ps\n", a1, a2);
-    }
-
-    METHOD test_method4(int george :optional, int g_f :opt_flag,
-            PMC *slurpy_pos :slurpy, PMC *slurpy_named :slurpy :named)
-    {
-        UNUSED(SELF);
-        UNUSED(george);
-        UNUSED(g_f);
-        UNUSED(slurpy_pos);
-        UNUSED(slurpy_named);
-        Parrot_io_printf(interp, "test_method4\n");
-    }
-}
-
-/*
- * Local variables:
- *   c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */

Modified: trunk/t/codingstd/pccmethod_deps.t
==============================================================================
--- trunk/t/codingstd/pccmethod_deps.t	Sun Feb  7 20:56:37 2010	(r43763)
+++ trunk/t/codingstd/pccmethod_deps.t	Sun Feb  7 22:10:56 2010	(r43764)
@@ -33,7 +33,7 @@
 
     local $_;
     while (<$fh>) {
-        next unless /PCCMETHOD/;
+        next unless /METHOD/;
         return 1;
     }
 

Added: trunk/t/dynpmc/pccmethod_test.t
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/t/dynpmc/pccmethod_test.t	Sun Feb  7 22:10:56 2010	(r43764)
@@ -0,0 +1,77 @@
+#!perl
+# Copyright (C) 2006-2007, Parrot Foundation.
+# $Id$
+
+use strict;
+use warnings;
+use lib qw( . lib ../lib ../../lib );
+use Test::More;
+use Parrot::Test tests => 2;
+
+=head1 NAME
+
+t/dynpmc/pmethod_test.t - test the PCCMETHOD_Test PMC
+
+
+=head1 SYNOPSIS
+
+    % prove t/dynpmc/pccmethod_test.t
+
+=head1 DESCRIPTION
+
+Tests the PCCMETHOD_Test PMC.
+
+=cut
+
+pir_output_is( <<'CODE', <<'OUT', 'named args' );
+.sub main :main
+  $P0 = loadlib 'pccmethod_test'
+  $P1 = new 'PCCMETHOD_Test'
+  $P1.'test_method3'( 'a1name' => 10, 'a2name' => 20 )
+.end
+CODE
+test_method3
+10, 20
+OUT
+
+pir_output_is( <<'CODE', <<'OUT', 'optional args and multiple returns' );
+.sub main :main
+  $P0 = loadlib 'pccmethod_test'
+  $P1 = new 'PCCMETHOD_Test'
+  $P1.'test_method0'(1)
+  $P1.'test_method1'(1, 2, 3, 4, 5, 6)
+  $P1.'test_method2'()
+  $P1.'test_method2'(1)
+  $P1.'test_method2'(1,2)
+  $P1.'test_method2'(1,2,3)
+  ($P2,$P3) = $P1.'test_method2'(101)
+  print "BACK - "
+  print $P2
+  print " - "
+  print $P3
+  print " -\n"
+.end
+CODE
+test_method0
+1
+test_method1
+1,2,3,4,5,6
+test_method2
+0, 0, ResizablePMCArray [  ]
+test_method2
+1, 1, ResizablePMCArray [  ]
+test_method2
+1, 1, ResizablePMCArray [ 2 ]
+test_method2
+1, 1, ResizablePMCArray [ 2, 3 ]
+test_method2
+101, 1, ResizablePMCArray [  ]
+BACK - 1000 - KEVIN -
+OUT
+
+# Local Variables:
+#   mode: cperl
+#   cperl-indent-level: 4
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:

Deleted: trunk/t/pmc/pccmethod_test.t
==============================================================================
--- trunk/t/pmc/pccmethod_test.t	Sun Feb  7 22:10:56 2010	(r43763)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,75 +0,0 @@
-#!perl
-# Copyright (C) 2006-2007, Parrot Foundation.
-# $Id$
-
-use strict;
-use warnings;
-use lib qw( . lib ../lib ../../lib );
-use Test::More;
-use Parrot::Test tests => 2;
-
-=head1 NAME
-
-t/pmc/pmethod_test.t - test the PCCMETHOD_Test PMC
-
-
-=head1 SYNOPSIS
-
-    % prove t/pmc/pccmethod_test.t
-
-=head1 DESCRIPTION
-
-Tests the PCCMETHOD_Test PMC.
-
-=cut
-
-pir_output_is( <<'CODE', <<'OUT', 'named args' );
-.sub main :main
-  $P0 = new 'PCCMETHOD_Test'
-  $P0.'test_method3'( 'a1name' => 10, 'a2name' => 20 )
-.end
-CODE
-test_method3
-10, 20
-OUT
-
-pir_output_is( <<'CODE', <<'OUT', 'optional args and multiple returns' );
-.sub main :main
-  $P0 = new 'PCCMETHOD_Test'
-  $P0.'test_method0'(1)
-  $P0.'test_method1'(1, 2, 3, 4, 5, 6)
-  $P0.'test_method2'()
-  $P0.'test_method2'(1)
-  $P0.'test_method2'(1,2)
-  $P0.'test_method2'(1,2,3)
-  ($P1,$P2) = $P0.'test_method2'(101)
-  print "BACK - "
-  print $P1
-  print " - "
-  print $P2
-  print " -\n"
-.end
-CODE
-test_method0
-1
-test_method1
-1,2,3,4,5,6
-test_method2
-0, 0, ResizablePMCArray [  ]
-test_method2
-1, 1, ResizablePMCArray [  ]
-test_method2
-1, 1, ResizablePMCArray [ 2 ]
-test_method2
-1, 1, ResizablePMCArray [ 2, 3 ]
-test_method2
-101, 1, ResizablePMCArray [  ]
-BACK - 1000 - KEVIN -
-OUT
-
-# Local Variables:
-#   mode: cperl
-#   cperl-indent-level: 4
-#   fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:


More information about the parrot-commits mailing list