Author: autrijus
Date: Sat Mar 11 14:01:15 2006
New Revision: 11869

Added:
   trunk/languages/pugs/pmc/pugscode.pmc   (contents, props changed)
   trunk/languages/pugs/pmc/pugsmapping.pmc   (contents, props changed)
   trunk/languages/pugs/pmc/pugsmodule.pmc   (contents, props changed)
   trunk/languages/pugs/pmc/pugstuple.pmc   (contents, props changed)
   trunk/languages/pugs/pmc/pugsundef.pmc   (contents, props changed)
   trunk/languages/pugs/t/pmc.pm   (contents, props changed)
   trunk/languages/pugs/t/pmc/any.t   (contents, props changed)
   trunk/languages/pugs/t/pmc/bool.t   (contents, props changed)
   trunk/languages/pugs/t/pmc/code.t   (contents, props changed)
   trunk/languages/pugs/t/pmc/int.t   (contents, props changed)
   trunk/languages/pugs/t/pmc/mapping.t   (contents, props changed)
   trunk/languages/pugs/t/pmc/module.t   (contents, props changed)
   trunk/languages/pugs/t/pmc/num.t   (contents, props changed)
   trunk/languages/pugs/t/pmc/str.t   (contents, props changed)
   trunk/languages/pugs/t/pmc/tuple.t   (contents, props changed)
Modified:
   trunk/MANIFEST
   trunk/languages/pugs/config/makefiles/root.in
   trunk/languages/pugs/pmc/pugsany.pmc   (props changed)
   trunk/languages/pugs/pmc/pugsbit.pmc   (contents, props changed)
   trunk/languages/pugs/pmc/pugsbool.pmc   (contents, props changed)
   trunk/languages/pugs/pmc/pugsint.pmc   (contents, props changed)
   trunk/languages/pugs/pmc/pugsnum.pmc   (contents, props changed)
   trunk/languages/pugs/pmc/pugsstr.pmc   (contents, props changed)
   trunk/languages/pugs/t/harness
   trunk/languages/pugs/t/pmc/bit.t   (contents, props changed)

Log:
* Pugs: scaffolding for basic types involved in bootstrapping:
    Any, Bit, Bool, int, Num, Str, Code, Mapping, Module, Tuple, Undef
  only the "Mapping" is non-canonical -- it's referred variously as
  ArgList, Sigs, List, NamedPairs, etc.

Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST      (original)
+++ trunk/MANIFEST      Sat Mar 11 14:01:15 2006
@@ -1009,11 +1009,25 @@
 languages/pugs/pmc/pugsany.pmc                    [pugs]
 languages/pugs/pmc/pugsbit.pmc                    [pugs]
 languages/pugs/pmc/pugsbool.pmc                   [pugs]
+languages/pugs/pmc/pugscode.pmc                   [pugs]
 languages/pugs/pmc/pugsint.pmc                    [pugs]
+languages/pugs/pmc/pugsmapping.pmc                [pugs]
+languages/pugs/pmc/pugsmodule.pmc                 [pugs]
 languages/pugs/pmc/pugsnum.pmc                    [pugs]
 languages/pugs/pmc/pugsstr.pmc                    [pugs]
+languages/pugs/pmc/pugstuple.pmc                  [pugs]
+languages/pugs/pmc/pugsundef.pmc                  [pugs]
 languages/pugs/t/harness                          [pugs]
 languages/pugs/t/pmc/bit.t                        [pugs]
+languages/pugs/t/pmc/bool.t                       [pugs]
+languages/pugs/t/pmc/code.t                       [pugs]
+languages/pugs/t/pmc/int.t                        [pugs]
+languages/pugs/t/pmc/mapping.t                    [pugs]
+languages/pugs/t/pmc/num.t                        [pugs]
+languages/pugs/t/pmc/package.t                    [pugs]
+languages/pugs/t/pmc/str.t                        [pugs]
+languages/pugs/t/pmc/tuple.t                      [pugs]
+languages/pugs/t/pmc/undef.t                      [pugs]
 languages/m4/BUGS                                 [m4]
 languages/m4/ChangeLog                            [m4]
 languages/m4/INSTALL                              [m4]

Modified: trunk/languages/pugs/config/makefiles/root.in
==============================================================================
--- trunk/languages/pugs/config/makefiles/root.in       (original)
+++ trunk/languages/pugs/config/makefiles/root.in       Sat Mar 11 14:01:15 2006
@@ -11,12 +11,17 @@
 LOAD_EXT = @load_ext@
 
 PMCS = \
- pugsany \
- pugsbit \
- pugsbool \
- pugsint \
- pugsnum \
- pugsstr
+    pugsany \
+    pugsbit \
+    pugsbool \
+    pugscode \
+    pugsint \
+    pugsmapping \
+    pugsnum \
+    pugsmodule \
+    pugsstr \
+    pugstuple \
+    pugsundef
 
 PBCS =
 

Modified: trunk/languages/pugs/pmc/pugsbit.pmc
==============================================================================
--- trunk/languages/pugs/pmc/pugsbit.pmc        (original)
+++ trunk/languages/pugs/pmc/pugsbit.pmc        Sat Mar 11 14:01:15 2006
@@ -22,7 +22,6 @@
 
 pmclass PugsBit extends PugsAny
     extends Boolean
-    does scalar
     does boolean
     does integer
     dynpmc

Modified: trunk/languages/pugs/pmc/pugsbool.pmc
==============================================================================
--- trunk/languages/pugs/pmc/pugsbool.pmc       (original)
+++ trunk/languages/pugs/pmc/pugsbool.pmc       Sat Mar 11 14:01:15 2006
@@ -29,7 +29,6 @@
 
 pmclass PugsBool extends PugsAny
     extends Boolean
-    does scalar
     does boolean
     does integer
     dynpmc

Added: trunk/languages/pugs/pmc/pugscode.pmc
==============================================================================
--- (empty file)
+++ trunk/languages/pugs/pmc/pugscode.pmc       Sat Mar 11 14:01:15 2006
@@ -0,0 +1,50 @@
+/*
+Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
+$Id: /mirror/trunk/languages/pugs/pmc/pugssub.pmc 11867 
2006-03-11T19:12:31.078449Z autrijus  $
+
+=head1 NAME
+
+pugscode.pmc - Pugs Code
+
+=head1 DESCRIPTION
+
+C<PugsCode> extends C<Closure> to provide a Perl 6 C<Code>.
+
+=head2 Methods
+
+=over 4
+
+=cut
+
+*/
+
+#include "parrot/parrot.h"
+
+pmclass PugsCode extends PugsAny
+    extends Closure
+    does sub
+    dynpmc
+    group pugs_group
+    hll Perl6
+    maps Closure
+{
+    /* zero lines of code! whee! */
+}
+
+/*
+
+=back
+
+=cut
+
+*/
+
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vim: expandtab shiftwidth=4:
+*/

Modified: trunk/languages/pugs/pmc/pugsint.pmc
==============================================================================
--- trunk/languages/pugs/pmc/pugsint.pmc        (original)
+++ trunk/languages/pugs/pmc/pugsint.pmc        Sat Mar 11 14:01:15 2006
@@ -22,7 +22,6 @@
 
 pmclass PugsInt extends PugsAny
     extends Integer
-    does scalar
     does integer
     dynpmc
     group pugs_group

Added: trunk/languages/pugs/pmc/pugsmapping.pmc
==============================================================================
--- (empty file)
+++ trunk/languages/pugs/pmc/pugsmapping.pmc    Sat Mar 11 14:01:15 2006
@@ -0,0 +1,51 @@
+/*
+Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
+$Id: /mirror/trunk/languages/pugs/pmc/pugsstr.pmc 11867 
2006-03-11T19:12:31.078449Z autrijus  $
+
+=head1 NAME
+
+pugsmapping.pmc - Pugs Record
+
+=head1 DESCRIPTION
+
+C<PugsMapping> extends C<OrderedHash> to provide a Perl 6 C<Mapping>.
+
+=head2 Methods
+
+=over 4
+
+=cut
+
+*/
+
+#include "parrot/parrot.h"
+
+pmclass PugsMapping extends PugsAny need_ext 
+    extends OrderedHash
+    does array
+    does hash
+    dynpmc
+    group pugs_group
+    hll Perl6
+    maps OrderedHash
+{
+    /* zero lines of code! whee! */
+}
+
+/*
+
+=back
+
+=cut
+
+*/
+
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vim: expandtab shiftwidth=4:
+*/

Added: trunk/languages/pugs/pmc/pugsmodule.pmc
==============================================================================
--- (empty file)
+++ trunk/languages/pugs/pmc/pugsmodule.pmc     Sat Mar 11 14:01:15 2006
@@ -0,0 +1,50 @@
+/*
+Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
+$Id: /mirror/trunk/languages/pugs/pmc/pugsstr.pmc 11867 
2006-03-11T19:12:31.078449Z autrijus  $
+
+=head1 NAME
+
+pugsmodule.pmc - Pugs Module
+
+=head1 DESCRIPTION
+
+C<PugsModule> extends C<NameSpace> to provide a Perl 6 C<Module>.
+
+=head2 Methods
+
+=over 4
+
+=cut
+
+*/
+
+#include "parrot/parrot.h"
+
+pmclass PugsModule extends PugsAny need_ext 
+    extends NameSpace
+    does hash
+    dynpmc
+    group pugs_group
+    hll Perl6
+    maps NameSpace
+{
+    /* zero lines of code! whee! */
+}
+
+/*
+
+=back
+
+=cut
+
+*/
+
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vim: expandtab shiftwidth=4:
+*/

Modified: trunk/languages/pugs/pmc/pugsnum.pmc
==============================================================================
--- trunk/languages/pugs/pmc/pugsnum.pmc        (original)
+++ trunk/languages/pugs/pmc/pugsnum.pmc        Sat Mar 11 14:01:15 2006
@@ -22,7 +22,6 @@
 
 pmclass PugsNum extends PugsAny
     extends Float
-    does scalar
     does float
     dynpmc
     group pugs_group

Modified: trunk/languages/pugs/pmc/pugsstr.pmc
==============================================================================
--- trunk/languages/pugs/pmc/pugsstr.pmc        (original)
+++ trunk/languages/pugs/pmc/pugsstr.pmc        Sat Mar 11 14:01:15 2006
@@ -22,7 +22,6 @@
 
 pmclass PugsStr extends PugsAny
     extends String
-    does scalar
     does string
     dynpmc
     group pugs_group

Added: trunk/languages/pugs/pmc/pugstuple.pmc
==============================================================================
--- (empty file)
+++ trunk/languages/pugs/pmc/pugstuple.pmc      Sat Mar 11 14:01:15 2006
@@ -0,0 +1,50 @@
+/*
+Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
+$Id: /mirror/trunk/languages/pugs/pmc/pugsstr.pmc 11867 
2006-03-11T19:12:31.078449Z autrijus  $
+
+=head1 NAME
+
+pugstuple.pmc - Pugs Tuple
+
+=head1 DESCRIPTION
+
+C<PugsTuple> extends C<FixedPMCArray> to provide a Perl 6 C<Tuple>.
+
+=head2 Methods
+
+=over 4
+
+=cut
+
+*/
+
+#include "parrot/parrot.h"
+
+pmclass PugsTuple extends PugsAny need_ext 
+    extends FixedPMCArray
+    does array
+    dynpmc
+    group pugs_group
+    hll Perl6
+    maps FixedPMCArray
+{
+    /* zero lines of code! whee! */
+}
+
+/*
+
+=back
+
+=cut
+
+*/
+
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vim: expandtab shiftwidth=4:
+*/

Added: trunk/languages/pugs/pmc/pugsundef.pmc
==============================================================================
--- (empty file)
+++ trunk/languages/pugs/pmc/pugsundef.pmc      Sat Mar 11 14:01:15 2006
@@ -0,0 +1,54 @@
+/*
+Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
+$Id: /mirror/trunk/languages/pugs/pmc/pugsstr.pmc 11867 
2006-03-11T19:12:31.078449Z autrijus  $
+
+=head1 NAME
+
+pugsundef.pmc - Pugs Undef
+
+=head1 DESCRIPTION
+
+C<PugsUndef> extends C<Exception> and C<PerlUndef> to provide a Perl 6 
C<Undef>.
+
+=head2 Methods
+
+=over 4
+
+=cut
+
+*/
+
+#include "parrot/parrot.h"
+
+pmclass PugsUndef extends PugsAny need_ext
+    extends Exception
+    extends PerlUndef
+    does string
+    does boolean
+    does integer
+    does float
+    dynpmc
+    group pugs_group
+    hll Perl6
+    maps Exception
+{
+    /* zero lines of code! whee! */
+}
+
+/*
+
+=back
+
+=cut
+
+*/
+
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vim: expandtab shiftwidth=4:
+*/

Modified: trunk/languages/pugs/t/harness
==============================================================================
--- trunk/languages/pugs/t/harness      (original)
+++ trunk/languages/pugs/t/harness      Sat Mar 11 14:01:15 2006
@@ -26,7 +26,7 @@
 =cut
 
 use strict;
-use lib '..';
+use lib '.';
 
 use Cwd();
 use Data::Dumper;
@@ -34,6 +34,7 @@
 use Test::Harness();
 
 my $language = 'pugs';
+lib->import($language);
 
 if ( grep { m/^--files$/ } @ARGV ) {
     # Only the Makefile in 'parrot/languages' uses --files

Added: trunk/languages/pugs/t/pmc.pm
==============================================================================
--- (empty file)
+++ trunk/languages/pugs/t/pmc.pm       Sat Mar 11 14:01:15 2006
@@ -0,0 +1,45 @@
+# Pugs-specific PMC testing
+# Copyright: 2005-2006 The Perl Foundation.  All Rights Reserved.
+# $Id: /mirror/trunk/languages/lua/t/pmc/boolean.t 11586 
2006-02-16T17:44:54.559622Z fperrad  $
+
+package t::pmc;
+use Parrot::Test 'no_plan';
+use Test::More;
+
+sub import {
+    my $class = shift;
+
+    my (undef, $file, undef) = caller();
+    $file =~ /(\w+)\.t$/ or die "malformed file: $file";
+    my $type = "Pugs\u$1";
+
+    main::pir_output_is(<< 'CODE', << 'OUTPUT', "check sanity for pugs_group");
+.sub _main
+    loadlib $P1, "pugs_group"
+    $I0 = defined $P1 
+    if $I0 goto ok
+    print "not "
+ok:
+    print "ok\n"
+.end
+CODE
+ok
+OUTPUT
+
+main::pir_output_is(<< "CODE", << "OUTPUT", "check sanity for creation");
+.HLL "Perl6", "pugs_group"
+.sub _main
+    .local pmc pmc1
+    .local string typ
+    pmc1 = new .$type
+    typ = typeof pmc1
+    print typ
+    print "\\n"
+.end
+CODE
+$type
+OUTPUT
+
+}
+
+1;

Added: trunk/languages/pugs/t/pmc/any.t
==============================================================================
--- (empty file)
+++ trunk/languages/pugs/t/pmc/any.t    Sat Mar 11 14:01:15 2006
@@ -0,0 +1,5 @@
+#! perl -w
+# Copyright: 2005-2006 The Perl Foundation.  All Rights Reserved.
+# $Id: /mirror/trunk/languages/lua/t/pmc/boolean.t 11586 
2006-02-16T17:44:54.559622Z fperrad  $
+
+use t::pmc;

Modified: trunk/languages/pugs/t/pmc/bit.t
==============================================================================
--- trunk/languages/pugs/t/pmc/bit.t    (original)
+++ trunk/languages/pugs/t/pmc/bit.t    Sat Mar 11 14:01:15 2006
@@ -2,40 +2,4 @@
 # Copyright: 2005-2006 The Perl Foundation.  All Rights Reserved.
 # $Id: /mirror/trunk/languages/lua/t/pmc/boolean.t 11586 
2006-02-16T17:44:54.559622Z fperrad  $
 
-=head1 NAME
-
-t/pmc/bit.t - PugsBit
-
-=head1 SYNOPSIS
-
-    % perl -I../../lib t/pmc/bit.t
-
-=cut
-
-use Parrot::Test 'no_plan';
-use Test::More;
-
-pir_output_is(<< 'CODE', << 'OUTPUT', "check sanity");
-.sub _main
-    loadlib $P1, "pugs_group"
-    $I0 = defined $P1 
-    if $I0 goto ok
-    print "not "
-ok:
-    print "ok\n"
-.end
-CODE
-ok
-OUTPUT
-
-pir_output_is(<< 'CODE', << 'OUTPUT', "check sanity");
-.HLL "Perl6", "pugs_group"
-.sub _main
-    .local pmc pmc1
-    pmc1 = new .PugsBit
-    print "ok\n"
-.end
-CODE
-ok
-OUTPUT
-
+use t::pmc;

Added: trunk/languages/pugs/t/pmc/bool.t
==============================================================================
--- (empty file)
+++ trunk/languages/pugs/t/pmc/bool.t   Sat Mar 11 14:01:15 2006
@@ -0,0 +1,5 @@
+#! perl -w
+# Copyright: 2005-2006 The Perl Foundation.  All Rights Reserved.
+# $Id: /mirror/trunk/languages/lua/t/pmc/boolean.t 11586 
2006-02-16T17:44:54.559622Z fperrad  $
+
+use t::pmc;

Added: trunk/languages/pugs/t/pmc/code.t
==============================================================================
--- (empty file)
+++ trunk/languages/pugs/t/pmc/code.t   Sat Mar 11 14:01:15 2006
@@ -0,0 +1,5 @@
+#! perl -w
+# Copyright: 2005-2006 The Perl Foundation.  All Rights Reserved.
+# $Id: /mirror/trunk/languages/lua/t/pmc/boolean.t 11586 
2006-02-16T17:44:54.559622Z fperrad  $
+
+use t::pmc;

Added: trunk/languages/pugs/t/pmc/int.t
==============================================================================
--- (empty file)
+++ trunk/languages/pugs/t/pmc/int.t    Sat Mar 11 14:01:15 2006
@@ -0,0 +1,5 @@
+#! perl -w
+# Copyright: 2005-2006 The Perl Foundation.  All Rights Reserved.
+# $Id: /mirror/trunk/languages/lua/t/pmc/boolean.t 11586 
2006-02-16T17:44:54.559622Z fperrad  $
+
+use t::pmc;

Added: trunk/languages/pugs/t/pmc/mapping.t
==============================================================================
--- (empty file)
+++ trunk/languages/pugs/t/pmc/mapping.t        Sat Mar 11 14:01:15 2006
@@ -0,0 +1,5 @@
+#! perl -w
+# Copyright: 2005-2006 The Perl Foundation.  All Rights Reserved.
+# $Id: /mirror/trunk/languages/lua/t/pmc/boolean.t 11586 
2006-02-16T17:44:54.559622Z fperrad  $
+
+use t::pmc;

Added: trunk/languages/pugs/t/pmc/module.t
==============================================================================
--- (empty file)
+++ trunk/languages/pugs/t/pmc/module.t Sat Mar 11 14:01:15 2006
@@ -0,0 +1,5 @@
+#! perl -w
+# Copyright: 2005-2006 The Perl Foundation.  All Rights Reserved.
+# $Id: /mirror/trunk/languages/lua/t/pmc/boolean.t 11586 
2006-02-16T17:44:54.559622Z fperrad  $
+
+use t::pmc;

Added: trunk/languages/pugs/t/pmc/num.t
==============================================================================
--- (empty file)
+++ trunk/languages/pugs/t/pmc/num.t    Sat Mar 11 14:01:15 2006
@@ -0,0 +1,5 @@
+#! perl -w
+# Copyright: 2005-2006 The Perl Foundation.  All Rights Reserved.
+# $Id: /mirror/trunk/languages/lua/t/pmc/boolean.t 11586 
2006-02-16T17:44:54.559622Z fperrad  $
+
+use t::pmc;

Added: trunk/languages/pugs/t/pmc/str.t
==============================================================================
--- (empty file)
+++ trunk/languages/pugs/t/pmc/str.t    Sat Mar 11 14:01:15 2006
@@ -0,0 +1,5 @@
+#! perl -w
+# Copyright: 2005-2006 The Perl Foundation.  All Rights Reserved.
+# $Id: /mirror/trunk/languages/lua/t/pmc/boolean.t 11586 
2006-02-16T17:44:54.559622Z fperrad  $
+
+use t::pmc;

Added: trunk/languages/pugs/t/pmc/tuple.t
==============================================================================
--- (empty file)
+++ trunk/languages/pugs/t/pmc/tuple.t  Sat Mar 11 14:01:15 2006
@@ -0,0 +1,5 @@
+#! perl -w
+# Copyright: 2005-2006 The Perl Foundation.  All Rights Reserved.
+# $Id: /mirror/trunk/languages/lua/t/pmc/boolean.t 11586 
2006-02-16T17:44:54.559622Z fperrad  $
+
+use t::pmc;

Reply via email to