Author: tewk
Date: Thu Mar 22 15:36:17 2007
New Revision: 17697

Added:
   trunk/lib/Parrot/Pmc2c/PCCMETHOD.pm
      - copied, changed from r17695, /trunk/lib/Parrot/Pmc2c/PMETHODs.pm
   trunk/src/pmc/pccmethod_test.pmc
      - copied, changed from r17695, /trunk/src/pmc/pmethod_test.pmc
   trunk/t/pmc/pccmethod_test.t
      - copied, changed from r17695, /trunk/t/pmc/pmethod_test.t
Removed:
   trunk/lib/Parrot/Pmc2c/PMETHODs.pm
   trunk/src/pmc/pmethod_test.pmc
   trunk/t/pmc/pmethod_test.t
Modified:
   trunk/MANIFEST
   trunk/MANIFEST.SKIP
   trunk/compilers/pge/PGE/pmc/codestring.pmc
   trunk/config/inter/pmc.pm
   trunk/lib/Parrot/Pmc2c.pm
   trunk/lib/Parrot/Pmc2c/Utils.pm
   trunk/src/pmc/metaattribute.pmc
   trunk/src/pmc/metaclass.pmc
   trunk/src/pmc/object.pmc
   trunk/src/pmc/role.pmc
   trunk/src/pmc/smop_attribute.pmc
   trunk/src/pmc/smop_class.pmc

Log:
[PCCMETHOD]  PMETHOD -> PCCMETHOD
             PMINVOKE -> PCCINVOKE


Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST      (original)
+++ trunk/MANIFEST      Thu Mar 22 15:36:17 2007
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Tue Mar 20 23:55:36 2007 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Thu Mar 22 22:29:02 2007 UT
 #
 # See tools/dev/install_files.pl for documentation on the
 # format of this file.
@@ -2246,6 +2246,7 @@
 lib/Parrot/Pmc2c.pm                                         [devel]
 lib/Parrot/Pmc2c/Library.pm                                 [devel]
 lib/Parrot/Pmc2c/Null.pm                                    [devel]
+lib/Parrot/Pmc2c/PCCMETHOD.pm                               [devel]
 lib/Parrot/Pmc2c/PMETHODs.pm                                [devel]
 lib/Parrot/Pmc2c/Ref.pm                                     [devel]
 lib/Parrot/Pmc2c/SharedRef.pm                               [devel]
@@ -2595,6 +2596,7 @@
 src/pmc/parrotobject.pmc                                    []
 src/pmc/parrotrunningthread.pmc                             []
 src/pmc/parrotthread.pmc                                    []
+src/pmc/pccmethod_test.pmc                                  []
 src/pmc/pmc.num                                             []
 src/pmc/pmethod_test.pmc                                    []
 src/pmc/pointer.pmc                                         []
@@ -2905,6 +2907,7 @@
 t/pmc/parrotobject.t                                        []
 t/pmc/parrotrunningthread.t                                 []
 t/pmc/parrotthread.t                                        []
+t/pmc/pccmethod_test.t                                      []
 t/pmc/pmc.t                                                 []
 t/pmc/pmethod_test.t                                        []
 t/pmc/pointer.t                                             []

Modified: trunk/MANIFEST.SKIP
==============================================================================
--- trunk/MANIFEST.SKIP (original)
+++ trunk/MANIFEST.SKIP Thu Mar 22 15:36:17 2007
@@ -1,6 +1,6 @@
 # ex: set ro:
 # $Id$
-# generated by tools/dev/mk_manifest_and_skip.pl Tue Mar 20 23:55:36 2007 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Thu Mar 22 22:29:02 2007 UT
 #
 # This file should contain a transcript of the svn:ignore properties
 # of the directories in the Parrot subversion repository. (Needed for
@@ -264,6 +264,8 @@
 ^ext/Makefile$
 ^ext/Makefile/
 # generated from svn:ignore of 'ext/Parrot-Embed/'
+^ext/Parrot-Embed/.*\.bs$
+^ext/Parrot-Embed/.*\.bs/
 ^ext/Parrot-Embed/.*\.bundle$
 ^ext/Parrot-Embed/.*\.bundle/
 ^ext/Parrot-Embed/.*\.c$
@@ -292,6 +294,8 @@
 ^ext/Parrot-Embed/.*\.o/
 ^ext/Parrot-Embed/.*\.obj$
 ^ext/Parrot-Embed/.*\.obj/
+^ext/Parrot-Embed/.*\.old$
+^ext/Parrot-Embed/.*\.old/
 ^ext/Parrot-Embed/.*\.pdb$
 ^ext/Parrot-Embed/.*\.pdb/
 ^ext/Parrot-Embed/.*\.pdb$
@@ -300,6 +304,8 @@
 ^ext/Parrot-Embed/.*\.so/
 ^ext/Parrot-Embed/.*\.tmp$
 ^ext/Parrot-Embed/.*\.tmp/
+^ext/Parrot-Embed/.*\.xs$
+^ext/Parrot-Embed/.*\.xs/
 ^ext/Parrot-Embed/Build$
 ^ext/Parrot-Embed/Build/
 ^ext/Parrot-Embed/Build\.bat$
@@ -312,6 +318,8 @@
 ^ext/Parrot-Embed/_build/
 ^ext/Parrot-Embed/blib$
 ^ext/Parrot-Embed/blib/
+^ext/Parrot-Embed/pm_to_blib$
+^ext/Parrot-Embed/pm_to_blib/
 # generated from svn:ignore of 'ext/Parrot-Embed/lib/Parrot/'
 ^ext/Parrot-Embed/lib/Parrot/.*\.c$
 ^ext/Parrot-Embed/lib/Parrot/.*\.c/

Modified: trunk/compilers/pge/PGE/pmc/codestring.pmc
==============================================================================
--- trunk/compilers/pge/PGE/pmc/codestring.pmc  (original)
+++ trunk/compilers/pge/PGE/pmc/codestring.pmc  Thu Mar 22 15:36:17 2007
@@ -102,7 +102,7 @@
 =cut
 
 */
-    PMETHOD void emit(STRING *orig_format, PMC *args :slurpy, PMC *named_args 
:slurpy :named) {
+    PCCMETHOD void emit(STRING *orig_format, PMC *args :slurpy, PMC 
*named_args :slurpy :named) {
         INTVAL position = 0;
         INTVAL repl_len = 0;
         STRING *format;
@@ -171,7 +171,7 @@
 
 */
 
-    PMETHOD void unique(STRING *format :optional , INTVAL has_format 
:opt_flag) {
+    PCCMETHOD void unique(STRING *format :optional , INTVAL has_format 
:opt_flag) {
         static INTVAL serno = 10;
         STRING *id;
 

Modified: trunk/config/inter/pmc.pm
==============================================================================
--- trunk/config/inter/pmc.pm   (original)
+++ trunk/config/inter/pmc.pm   Thu Mar 22 15:36:17 2007
@@ -153,7 +153,7 @@
 \t\tlib/Parrot/Pmc2c/Standard.pm    lib/Parrot/Pmc2c/UtilFunctions.pm \\
 \t\tlib/Parrot/Pmc2c/delegate.pm    lib/Parrot/Pmc2c/Null.pm \\
 \t\tlib/Parrot/Pmc2c/StandardRO.pm  lib/Parrot/Pmc2c/Utils.pm \\
-\t\tlib/Parrot/Pmc2c/deleg_pmc.pm   lib/Parrot/Pmc2c/PMETHODs.pm  \\
+\t\tlib/Parrot/Pmc2c/deleg_pmc.pm   lib/Parrot/Pmc2c/PCCMETHOD.pm  \\
 \t\tlib/Parrot/Pmc2c/StandardConst.pm
 \t\$(PMC2CD) src/pmc/$pmc.pmc 
 

Modified: trunk/lib/Parrot/Pmc2c.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c.pm   (original)
+++ trunk/lib/Parrot/Pmc2c.pm   Thu Mar 22 15:36:17 2007
@@ -26,7 +26,7 @@
 use Parrot::Pmc2c::UtilFunctions
     qw( gen_ret dont_edit count_newlines dynext_load_code c_code_coda );
 use Text::Balanced 'extract_bracketed';
-use Parrot::Pmc2c::PMETHODs;
+use Parrot::Pmc2c::PCCMETHOD;
 
 =back
 
@@ -527,7 +527,7 @@
     else {
         $total_body = rewrite_nci_method( $classname, $meth, $body );
     }
-    Parrot::Pmc2c::PMETHODs::rewrite_pminvoke( $method, \$total_body );
+    Parrot::Pmc2c::PCCMETHOD::rewrite_pccinvoke( $method, \$total_body );
 
     # now split into MMD if necessary:
     my $additional_bodies = '';

Copied: trunk/lib/Parrot/Pmc2c/PCCMETHOD.pm (from r17695, 
/trunk/lib/Parrot/Pmc2c/PMETHODs.pm)
==============================================================================
--- /trunk/lib/Parrot/Pmc2c/PMETHODs.pm (original)
+++ trunk/lib/Parrot/Pmc2c/PCCMETHOD.pm Thu Mar 22 15:36:17 2007
@@ -1,32 +1,33 @@
 # Copyright (C) 2004-2006, The Perl Foundation.
 # $Id$
 
-package Parrot::Pmc2c::PMETHODs;
+package Parrot::Pmc2c::PCCMETHOD;
 use strict;
 use warnings;
 use Data::Dumper;
 use Carp qw(longmess croak);
 
 
+=pod
+
 $SIG{__WARN__} = sub {
     print longmess;
 };
 
-=pod
 =cut
 
 =head1 NAME
 
-Parrot::Pmc2c::Utils::PMETHODs - Parses and preps PMC PMETHODS
+Parrot::Pmc2c::Utils::PCCMETHOD - Parses and preps PMC PCCMETHOD
   called from F<Parrot:Pmc2c::Utils>
 
 =head1 SYNOPSIS
 
-    use Parrot::Pmc2c::PMETHODs;
+    use Parrot::Pmc2c::PCCMETHOD;
 
 =head1 DESCRIPTION
 
-Parrot::Pmc2c::PMETHODs - Parses and preps PMC PMETHODS called from 
F<Parrot:Pmc2c::Utils>
+Parrot::Pmc2c::PCCMETHOD - Parses and preps PMC PCCMETHOD called from 
F<Parrot:Pmc2c::Utils>
 
 =cut
 
@@ -34,9 +35,9 @@
 
 =head2 Publicly Available Methods
 
-=head3 C<rewrite_pmethod($self, $method, $body)>
+=head3 C<rewrite_pccmethod($self, $method, $body)>
 
-B<Purpose:>  Parse and Build PMC PMETHODS.
+B<Purpose:>  Parse and Build PMC PCCMETHODS.
 
 B<Arguments:>
 
@@ -54,7 +55,7 @@
 
 =back
 
-=head3 C<rewrite_pminvoke($self, $method, $body)>
+=head3 C<rewrite_pccinvoke($self, $method, $body)>
 
 B<Purpose:>  Parse and Build a PINVOKE Call.
 
@@ -222,14 +223,14 @@
     }sx;
 
     if ( $body and $body =~ m/\breturn\b/ ) {
-        croak "return not allowed in pmethods, use preturn instead";
+        croak "return not allowed in pccmethods, use preturn instead";
     }
 
     while ( $$body and $$body =~ m/$signature_re/ ) {
         my ($match, $returns) = ( $1, $2 );
         my $goto_string = "goto ${method_name}_returns;";
         my ( $returns_n_regs_used, $returns_indexes, $returns_flags, 
$returns_accessors ) =
-            process_pmethod_args( parse_p_args_string( $returns ), 'return' );
+            process_pccmethod_args( parse_p_args_string( $returns ), 'return' 
);
 
         push @$regs_used, $returns_n_regs_used;
         my $file        = '"' . __FILE__ . '"';
@@ -282,7 +283,7 @@
     return ( 0, '' );
 }
 
-sub process_pmethod_args {
+sub process_pccmethod_args {
     my ( $linear_args, $arg_type ) = @_;
     my $n_regs_used_a  = [ 0, 0, 0, 0 ];       # INT, FLOAT, STRING, PMC
     my $args           = [ [], [], [], [] ];   # actual INT, FLOAT, STRING, 
PMC arg stuctures
@@ -332,17 +333,17 @@
     return join( ", ", @$n_regs_used );
 }
 
-=head3 C<rewrite_pmethod()>
+=head3 C<rewrite_pccmethod()>
 
-    rewrite_pmethod($method_hash);
+    rewrite_pccmethod($method_hash);
 
 =cut
 
-sub rewrite_pmethod {
+sub rewrite_pccmethod {
     my ($self) = @_;
-    croak "return method of PMETHOD must be void, not $self->{type}" if 
$self->{type} ne 'void';
+    croak "return method of PCCMETHOD must be void, not $self->{type}" if 
$self->{type} ne 'void';
 
-    # parse pmethod parameters, then unshift the a PMC arg for the invocant
+    # parse pccmethod parameters, then unshift the a PMC arg for the invocant
     my $linear_args = parse_p_args_string( $self->{parameters} );
     unshift @$linear_args, 
     {
@@ -352,10 +353,10 @@
     };
 
     my ( $params_n_regs_used, $params_indexes, $params_flags, 
$params_accessors, $named_names ) =
-    process_pmethod_args( $linear_args, 'arg' );
+    process_pccmethod_args( $linear_args, 'arg' );
 
     my $n_regs  = rewrite_preturns( $self, \$self->{body} );
-    rewrite_pminvoke( $self->{meth}, \$self->{body} );
+    rewrite_pccinvoke( $self->{meth}, \$self->{body} );
     unshift @$n_regs, $params_n_regs_used;
     my $n_regs_used = find_max_regs($n_regs);
 
@@ -443,17 +444,17 @@
     1;
 }
 
-sub rewrite_pminvoke {
+sub rewrite_pccinvoke {
     my ( $method, $body ) = @_;
     my $signature_re = qr{
       (
       (
       \( ([^\(]*) \)   #results
       \s*              #optional whitespace
-      =                #results equals PMINVOKE invocation
+      =                #results equals PCCONVOKE invocation
       )?               #results are optional
       \s*              #optional whitespace
-      PMINVOKE         #method name
+      PCCINVOKE         #method name
       \s*              #optional whitespace
       \( ([^\(]*) \)   #parameters
       ;?               #optional semicolon
@@ -464,17 +465,17 @@
     while ( $$body and $$body =~ m/$signature_re/ ) {
         my ($match, $result_clause, $results, $parameters) = ( $1, $2, $3, $4 
);
         
-        #optional results portion of pminvoke statement
+        #optional results portion of pccinvoke statement
         my ( $result_n_regs_used, $result_indexes, $result_flags, 
$result_accessors )
-            = ( defined $results) ? process_pmethod_args( parse_p_args_string( 
$results ), 'result')
+            = ( defined $results) ? process_pccmethod_args( 
parse_p_args_string( $results ), 'result')
             : ( [ 0, 0, 0, 0 ], "0", "\"\"", "" );
 
-        #parameters portion of pminvoke statement
+        #parameters portion of pccinvoke statement
         my ($interp, $invocant, $method_name, $arguments) 
             = map { $_ = trim($_) } split( /,/, $parameters, 4 );
         $arguments = "PMC* $invocant" . ( $arguments ? ", $arguments" : "" );
         my ( $args_n_regs_used, $arg_indexes, $arg_flags, $arg_accessors, 
$named_names ) =
-           process_pmethod_args( parse_p_args_string( $arguments ), 'param' );
+           process_pccmethod_args( parse_p_args_string( $arguments ), 'param' 
);
 
         my $n_regs_used = find_max_regs( [$result_n_regs_used, 
$args_n_regs_used ] );
 
@@ -486,7 +487,7 @@
         my $replacement .= 
 <<END;
 
-    /*BEGIN PMINVOKE $invocant */
+    /*BEGIN PCCONVOKE $invocant */
 #line $lineno $file
     {
       INTVAL n_regs_used[] = { $n_regs_used };
@@ -499,7 +500,7 @@
           string_from_const_cstring(interp, $result_flags, 0), 
PObj_constant_FLAG);
       PMC* ret_cont = new_ret_continuation_pmc(interp, NULL);
       parrot_context_t *ctx = Parrot_push_context(interp, n_regs_used);
-      PMC* pminvoke_meth;
+      PMC* pccinvoke_meth;
 
       opcode_t* save_current_args = interp->current_args;
       PMC* save_args_signature = interp->args_signature;
@@ -517,12 +518,12 @@
       interp->current_object = $invocant;
       interp->current_cont = NEED_CONTINUATION;
       ctx->current_cont = ret_cont;
-      pminvoke_meth = VTABLE_find_method(interp, $invocant, $method_name);
-      if (!pminvoke_meth) {
+      pccinvoke_meth = VTABLE_find_method(interp, $invocant, $method_name);
+      if (!pccinvoke_meth) {
           real_exception(interp, NULL, METH_NOT_FOUND, "Method '%Ss' not 
found", $method_name);
       } 
       else {
-          VTABLE_invoke(interp, pminvoke_meth, NULL);
+          VTABLE_invoke(interp, pccinvoke_meth, NULL);
       }
 
 $result_accessors
@@ -535,7 +536,7 @@
       interp->args_signature = save_args_signature;
       interp->current_object = save_current_object;
     }
-    /*END PMINVOKE $method_name */
+    /*END PCCONVOKE $method_name */
 END
     
         $$body =~ s/\Q$match\E/$replacement/;

Modified: trunk/lib/Parrot/Pmc2c/Utils.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/Utils.pm     (original)
+++ trunk/lib/Parrot/Pmc2c/Utils.pm     Thu Mar 22 15:36:17 2007
@@ -8,7 +8,7 @@
 use Parrot::Vtable;
 use Parrot::Pmc2c::Library;
 use Parrot::Pmc2c::UtilFunctions qw(count_newlines);
-use Parrot::Pmc2c::PMETHODs;
+use Parrot::Pmc2c::PCCMETHOD;
 use Cwd qw(cwd realpath);
 use File::Basename;
 use Carp;
@@ -653,7 +653,7 @@
       (?:/\*.*?\*/)?    # C-like comments
     )*
 
-    (P?METHOD\s+)?        #method flag
+    ((?:PCC)?METHOD\s+)?        #method flag
 
     (\w+\**)            #type
       \s+
@@ -681,12 +681,12 @@
             attrs      => $attrs,
         };
 
-        if ( $flag and $flag =~ /PMETHOD/ ) {
-            Parrot::Pmc2c::PMETHODs::rewrite_pmethod($method_hash);
+        if ( $flag and $flag =~ /PCCMETHOD/ ) {
+            Parrot::Pmc2c::PCCMETHOD::rewrite_pccmethod($method_hash);
             $flags_ref->{need_fia_header} = 1;
         }
 
-        if ( $methodblock and $methodblock =~ /PMINVOKE/ ) {
+        if ( $methodblock and $methodblock =~ /PCCINVOKE/ ) {
             $flags_ref->{need_fia_header} = 1;
         }
 

Modified: trunk/src/pmc/metaattribute.pmc
==============================================================================
--- trunk/src/pmc/metaattribute.pmc     (original)
+++ trunk/src/pmc/metaattribute.pmc     Thu Mar 22 15:36:17 2007
@@ -117,7 +117,7 @@
 =cut
 
 */
-    PMETHOD void name(STRING *name :optional, int got_name :opt_flag) {
+    PCCMETHOD void name(STRING *name :optional, int got_name :opt_flag) {
         Parrot_MetaAttribute *attr = PARROT_METAATTRIBUTE(SELF);
         STRING *name_attr = NULL;
 
@@ -138,7 +138,7 @@
 =cut
 
 */
-    PMETHOD void type(STRING *type :optional, int got_type :opt_flag) {
+    PCCMETHOD void type(STRING *type :optional, int got_type :opt_flag) {
         Parrot_MetaAttribute *attr = PARROT_METAATTRIBUTE(SELF);
         STRING *type_string = NULL;
 

Modified: trunk/src/pmc/metaclass.pmc
==============================================================================
--- trunk/src/pmc/metaclass.pmc (original)
+++ trunk/src/pmc/metaclass.pmc Thu Mar 22 15:36:17 2007
@@ -68,7 +68,7 @@
 pmclass MetaClass need_ext {
     /* This function builds the attribute index (table to map class name and
      * attribute name to an index) for the current class. Note: we have to
-     * make this a method so we can use PMINVOKE for now. XXX Fix that. */
+     * make this a method so we can use PCCINVOKE for now. XXX Fix that. */
     METHOD void build_attrib_index() {
         Parrot_MetaClass *class = PARROT_METACLASS(SELF);
         int num_classes = VTABLE_elements(interp, class->all_parents);
@@ -96,7 +96,7 @@
                 STRING *full_key = string_copy(interp, fq_class);
 
                 /* Get attribute name and append it to the key. */
-                (STRING *attrib_name) = PMINVOKE(interp, cur_attrib, "name");
+                (STRING *attrib_name) = PCCINVOKE(interp, cur_attrib, "name");
                 full_key = string_append(interp, full_key, attrib_name);
 
                 /* Insert into hash, along with index. */
@@ -224,7 +224,7 @@
 =cut
 
 */
-    PMETHOD void attributes() {
+    PCCMETHOD void attributes() {
         Parrot_MetaClass *class = PARROT_METACLASS(SELF);
         PMC *ret_attrib_metadata = VTABLE_clone(interp, 
class->attrib_metadata);
         preturn(PMC *ret_attrib_metadata);
@@ -240,7 +240,7 @@
 =cut
 
 */
-    PMETHOD void add_attribute(STRING *attribute_name, STRING* attribute_type 
:optional, int got_type :opt_flag) {
+    PCCMETHOD void add_attribute(STRING *attribute_name, STRING* 
attribute_type :optional, int got_type :opt_flag) {
         Parrot_MetaClass *class = PARROT_METACLASS(SELF);
         PMC *new_attribute = pmc_new(interp, enum_class_MetaAttribute);
 
@@ -259,9 +259,9 @@
         }
 
         /* Set name and type. */
-        PMINVOKE(interp, new_attribute, "name", STRING* attribute_name);
+        PCCINVOKE(interp, new_attribute, "name", STRING* attribute_name);
         if (got_type) {
-            PMINVOKE(interp, new_attribute, "type", STRING* attribute_type);
+            PCCINVOKE(interp, new_attribute, "type", STRING* attribute_type);
         }
 
         /* Enter the attribute in the attributes array. */
@@ -277,7 +277,7 @@
 =cut
 
 */
-    PMETHOD void name(STRING *name :optional, int got_name :opt_flag) {
+    PCCMETHOD void name(STRING *name :optional, int got_name :opt_flag) {
         Parrot_MetaClass *class = PARROT_METACLASS(SELF);
         STRING *ret_name = NULL;
 
@@ -302,7 +302,7 @@
 =cut
 
 */
-    PMETHOD void namespace(PMC *namespace :optional, int got_name :opt_flag) {
+    PCCMETHOD void namespace(PMC *namespace :optional, int got_name :opt_flag) 
{
         Parrot_MetaClass *class = PARROT_METACLASS(SELF);
         PMC *ret_namespace = NULL;
 
@@ -341,7 +341,7 @@
 =cut
 
 */
-    PMETHOD void new(PMC *args :slurpy :named) {
+    PCCMETHOD void new(PMC *args :slurpy :named) {
         Parrot_MetaClass *class = PARROT_METACLASS(SELF);
         PMC *obj;
 
@@ -384,7 +384,7 @@
 =cut
 
 */
-    PMETHOD void parents() {
+    PCCMETHOD void parents() {
         Parrot_MetaClass *class = PARROT_METACLASS(SELF);
         PMC *ret_parents = VTABLE_clone(interp, class->parents);
         preturn(PMC *ret_parents);
@@ -399,7 +399,7 @@
 =cut
 
 */
-    PMETHOD void add_parent(PMC *parent) {
+    PCCMETHOD void add_parent(PMC *parent) {
         Parrot_MetaClass *class = PARROT_METACLASS(SELF);
 
         /* If we've been instantiated already, need a new class. */
@@ -430,7 +430,7 @@
 =cut
 
 */
-    PMETHOD void add_method(STRING *name, PMC *sub)
+    PCCMETHOD void add_method(STRING *name, PMC *sub)
     {
         Parrot_MetaClass *class = PARROT_METACLASS(SELF);
 
@@ -455,7 +455,7 @@
 =cut
 
 */
-    PMETHOD void roles() {
+    PCCMETHOD void roles() {
         Parrot_MetaClass *class = PARROT_METACLASS(SELF);
         PMC *ret_roles = VTABLE_clone(interp, class->roles);
         preturn(PMC *ret_roles);
@@ -473,7 +473,7 @@
 =cut
 
 */
-    PMETHOD void _get_attrib_index(STRING *name) {
+    PCCMETHOD void _get_attrib_index(STRING *name) {
         Parrot_MetaClass *class = PARROT_METACLASS(SELF);
 
         /* If we can't find the attribute, we hand back -1. */
@@ -522,7 +522,7 @@
 =cut
 
 */
-    PMETHOD void _get_method_pmc(STRING *name) {
+    PCCMETHOD void _get_method_pmc(STRING *name) {
         Parrot_MetaClass *class = PARROT_METACLASS(SELF);
 
         /* Walk and search. */

Modified: trunk/src/pmc/object.pmc
==============================================================================
--- trunk/src/pmc/object.pmc    (original)
+++ trunk/src/pmc/object.pmc    Thu Mar 22 15:36:17 2007
@@ -98,7 +98,7 @@
         Parrot_Object *obj = PARROT_OBJECT(SELF);
         PMC *class = obj->class;
         INTVAL index;
-        (INTVAL index) = PMINVOKE(interp, class, "_get_attrib_index", STRING* 
name);
+        (INTVAL index) = PCCINVOKE(interp, class, "_get_attrib_index", STRING* 
name);
 
         /* If lookup failed, exception. */
         if (index == -1) {
@@ -125,7 +125,7 @@
         Parrot_Object *obj = PARROT_OBJECT(SELF);
         PMC *class = obj->class;
         INTVAL index;
-        (INTVAL index) = PMINVOKE(interp, class, "_get_attrib_index", STRING* 
name);
+        (INTVAL index) = PCCINVOKE(interp, class, "_get_attrib_index", STRING* 
name);
 
         /* If lookup failed, exception. */
         if (index == -1) {
@@ -151,7 +151,7 @@
         Parrot_Object *obj = PARROT_OBJECT(SELF);
         PMC *class = obj->class;
         PMC *method = NULL;
-        (PMC *method) = PMINVOKE(interp, class, "_get_method_pmc", STRING* 
method_name);
+        (PMC *method) = PCCINVOKE(interp, class, "_get_method_pmc", STRING* 
method_name);
         return method;
     }
 

Copied: trunk/src/pmc/pccmethod_test.pmc (from r17695, 
/trunk/src/pmc/pmethod_test.pmc)
==============================================================================
--- /trunk/src/pmc/pmethod_test.pmc     (original)
+++ trunk/src/pmc/pccmethod_test.pmc    Thu Mar 22 15:36:17 2007
@@ -4,7 +4,7 @@
 
 =head1 NAME
 
-src/pmc/pmethod_test.pmc - PMETHOD_Test PMC
+src/pmc/pmethod_test.pmc - PCCMETHOD_Test PMC
 
 =head1 DESCRIPTION
 
@@ -24,7 +24,7 @@
 /* Albeit the Hash PMC doesn't use PMC_data, it needs the next_for_GC pointer
  * We would get recursive marking of a deeply nested HoHoH...
  */
-pmclass PMETHOD_Test need_ext does hash {
+pmclass PCCMETHOD_Test need_ext does hash {
 
 /*
 
@@ -50,17 +50,17 @@
     {
         PIO_printf(interp, "test_method\n");
     }
-    PMETHOD void test_method0( int a1 )
+    PCCMETHOD void test_method0( int a1 )
     {
         PIO_printf(interp, "test_method0\n");
         PIO_printf(interp, "%d\n", a1);
     }
-    PMETHOD void test_method1( int a1, int a2, int a3, int a4, int a5, int a6)
+    PCCMETHOD void test_method1( int a1, int a2, int a3, int a4, int a5, int 
a6)
     {
         PIO_printf(interp, "test_method1\n");
         PIO_printf(interp, "%d,%d,%d,%d,%d,%d\n", a1, a2, a3, a4, a5, a6);
     }
-    PMETHOD void test_method2( int a1 :optional, int a1o :opt_flag, PMC 
*slurpy_pos :slurpy)
+    PCCMETHOD void test_method2( int a1 :optional, int a1o :opt_flag, PMC 
*slurpy_pos :slurpy)
     {
         STRING* kevin = string_from_cstring(interp, "KEVIN", 0);
         PIO_printf(interp, "test_method2\n");
@@ -68,12 +68,12 @@
 
         preturn(int 1000, STRING* kevin);
     }
-    PMETHOD void test_method3(PMC* a1 :named["a1name"], PMC* a2  
:named["a2name"])
+    PCCMETHOD void test_method3(PMC* a1 :named["a1name"], PMC* a2  
:named["a2name"])
     {
         PIO_printf(interp, "test_method3\n");
         PIO_printf(interp, "%Ps, %Ps\n", a1, a2);
     }
-    PMETHOD void test_method4( int george :optional, int g_f :opt_flag, PMC 
*slurpy_pos :slurpy, PMC *slurpy_named :slurpy :named )
+    PCCMETHOD void test_method4( int george :optional, int g_f :opt_flag, PMC 
*slurpy_pos :slurpy, PMC *slurpy_named :slurpy :named )
     {
         PIO_printf(interp, "test_method4\n");
     }

Modified: trunk/src/pmc/role.pmc
==============================================================================
--- trunk/src/pmc/role.pmc      (original)
+++ trunk/src/pmc/role.pmc      Thu Mar 22 15:36:17 2007
@@ -126,7 +126,7 @@
 =cut
 
 */
-    PMETHOD void attributes() {
+    PCCMETHOD void attributes() {
         Parrot_Role *role = PARROT_ROLE(SELF);
         PMC *ret_attrib_metadata = VTABLE_clone(interp, role->attrib_metadata);
         preturn(PMC *ret_attrib_metadata);
@@ -142,14 +142,14 @@
 =cut
 
 */
-    PMETHOD void add_attribute(STRING *attribute_name, STRING* attribute_type 
:optional, int got_type :opt_flag) {
+    PCCMETHOD void add_attribute(STRING *attribute_name, STRING* 
attribute_type :optional, int got_type :opt_flag) {
         Parrot_Role *role = PARROT_ROLE(SELF);
         PMC *new_attribute = pmc_new(interp, enum_class_MetaAttribute);
 
         /* Set name and type. */
-        PMINVOKE(interp, new_attribute, "name", STRING* attribute_name);
+        PCCINVOKE(interp, new_attribute, "name", STRING* attribute_name);
         if (got_type) {
-            PMINVOKE(interp, new_attribute, "type", STRING* attribute_type);
+            PCCINVOKE(interp, new_attribute, "type", STRING* attribute_type);
         }
 
         /* Enter the attribute in the attributes array. */
@@ -165,7 +165,7 @@
 =cut
 
 */
-    PMETHOD void name(STRING *name :optional, int got_name :opt_flag) {
+    PCCMETHOD void name(STRING *name :optional, int got_name :opt_flag) {
         Parrot_Role *role = PARROT_ROLE(SELF);
         STRING *ret_name = NULL;
 
@@ -190,7 +190,7 @@
 =cut
 
 */
-    PMETHOD void namespace(PMC *namespace :optional, int got_name :opt_flag) {
+    PCCMETHOD void namespace(PMC *namespace :optional, int got_name :opt_flag) 
{
         Parrot_Role *role = PARROT_ROLE(SELF);
         PMC *ret_namespace = NULL;
 
@@ -229,7 +229,7 @@
 =cut
 
 */
-    PMETHOD void roles() {
+    PCCMETHOD void roles() {
         Parrot_Role *role = PARROT_ROLE(SELF);
         PMC *ret_roles = VTABLE_clone(interp, role->roles);
         preturn(PMC *ret_roles);
@@ -244,7 +244,7 @@
 =cut
 
 */
-    PMETHOD void add_method(STRING *name, PMC *sub)
+    PCCMETHOD void add_method(STRING *name, PMC *sub)
     {
         Parrot_Role *role = PARROT_ROLE(SELF);
 

Modified: trunk/src/pmc/smop_attribute.pmc
==============================================================================
--- trunk/src/pmc/smop_attribute.pmc    (original)
+++ trunk/src/pmc/smop_attribute.pmc    Thu Mar 22 15:36:17 2007
@@ -88,7 +88,7 @@
 =cut
 
 */
-    PMETHOD void name(PMC *name :optional, int got_name :opt_flag) {
+    PCCMETHOD void name(PMC *name :optional, int got_name :opt_flag) {
         STRING *name_attr = NULL;
         if ( got_name ) {
             SMOP_attr(SELF)->name = VTABLE_get_string(interp, name);
@@ -105,7 +105,7 @@
 =cut
 
 */
-    PMETHOD void class(PMC *class :optional, int got_class :opt_flag) {
+    PCCMETHOD void class(PMC *class :optional, int got_class :opt_flag) {
         PMC *class_attr = NULL;
         if ( got_class ) {
             SMOP_attr(SELF)->class_ = class;
@@ -122,7 +122,7 @@
 =cut
 
 */
-    PMETHOD void type(PMC *type :optional, int got_type :opt_flag) {
+    PCCMETHOD void type(PMC *type :optional, int got_type :opt_flag) {
         STRING *type_string = NULL;
         if ( got_type ) {
             SMOP_attr(SELF)->type_ = VTABLE_get_string(interp, type);

Modified: trunk/src/pmc/smop_class.pmc
==============================================================================
--- trunk/src/pmc/smop_class.pmc        (original)
+++ trunk/src/pmc/smop_class.pmc        Thu Mar 22 15:36:17 2007
@@ -69,14 +69,14 @@
             for (i=0; i<6; i++) {
                 PMC* attribute = pmc_new(interp, enum_class_SMOP_Attribute);
                 STRING *attrib_name = string_from_const_cstring(interp, 
attribute_names[i], 0);
-                PMINVOKE(interp, attribute, "name", STRING* attrib_name);
-                PMINVOKE(interp, attribute, "class", PMC* class);
+                PCCINVOKE(interp, attribute, "name", STRING* attrib_name);
+                PCCINVOKE(interp, attribute, "class", PMC* class);
                 VTABLE_push_pmc(interp, attributes, attribute);
             }
 
             /* we sidestep the MetaModel bootstrap problem by building the 
MetaClass manually */
 
-            (PMC* class_meta) = PMINVOKE(interp, class, "new");
+            (PMC* class_meta) = PCCINVOKE(interp, class, "new");
             class_string = pmc_new(interp, enum_class_String);
             VTABLE_set_string_native(interp, class_string, 
string_from_const_cstring(interp, "Class", 0));
             VTABLE_set_attr_str(interp, class_meta, 
string_from_const_cstring(interp, attribute_names[0], 0), class_string);
@@ -130,25 +130,25 @@
         mem_sys_free(PMC_data(SELF));
     }
 
-    PMETHOD void name(PMC *name :optional, int got_name :opt_flag) {
+    PCCMETHOD void name(PMC *name :optional, int got_name :opt_flag) {
         if (got_name) {
             Parrot_store_global_n(interp, interp->root_namespace, 
string_from_const_cstring(interp, "class_object", 0), name);
             VTABLE_set_attr_str(interp, SELF, 
string_from_const_cstring(interp, "namespace",0), 
CONTEXT(interp->ctx)->current_namespace);
         }
     }
 
-    PMETHOD void new(PMC *args :slurpy :named) {
+    PCCMETHOD void new(PMC *args :slurpy :named) {
         PMC *obj;
         STRING* name;
         INTVAL type_id;
 
-        (STRING* name) = PMINVOKE(interp, SELF, "name");
+        (STRING* name) = PCCINVOKE(interp, SELF, "name");
         type_id = pmc_type(interp, name);
         obj = pmc_new_init(interp,type_id, args);
         preturn(PMC *obj)
     }
 
-    PMETHOD void attributes(PMC *attribs :optional, int got_attribs :opt_flag) 
{
+    PCCMETHOD void attributes(PMC *attribs :optional, int got_attribs 
:opt_flag) {
         PMC *rv;
         STRING *method_name = string_from_const_cstring(interp, 
"add_attribute", 0);
         STRING *attributes_string = string_from_const_cstring(interp, 
"add_attribute", 0);
@@ -159,22 +159,22 @@
             for (i=0; i<n; i++); {
                 PMC *key = VTABLE_get_pmc_keyed_int(interp, attribs, i);
                 PMC *value = VTABLE_get_pmc_keyed(interp, attribs, key);
-                PMINVOKE(interp, pmc, method_name, PMC* key, PMC* value);
+                PCCINVOKE(interp, pmc, method_name, PMC* key, PMC* value);
             }
         }
         rv = VTABLE_get_attr_str(interp, pmc, attributes_string);
         preturn(PMC *rv)
     }
 
-    PMETHOD void add_attribute(STRING *attribute_name, STRING* attribute_type 
:optional, int got_type :opt_flag) {
+    PCCMETHOD void add_attribute(STRING *attribute_name, STRING* 
attribute_type :optional, int got_type :opt_flag) {
         PMC *attributes;
         PMC *new_attribute = pmc_new(interp, pmc_type(interp, 
string_from_const_cstring(interp, "SMOP_Attribute", 0)));
 
-        PMINVOKE(interp, pmc, "name", STRING* attribute_name);
-        PMINVOKE(interp, SELF, "class", PMC* SELF);
+        PCCINVOKE(interp, pmc, "name", STRING* attribute_name);
+        PCCINVOKE(interp, SELF, "class", PMC* SELF);
 
         if (got_type) {
-            PMINVOKE(interp, SELF, "type", STRING* attribute_type);
+            PCCINVOKE(interp, SELF, "type", STRING* attribute_type);
         }
 
         /* SELF.set_meta_attribute(attribute_name, new_attribute); */

Copied: trunk/t/pmc/pccmethod_test.t (from r17695, /trunk/t/pmc/pmethod_test.t)
==============================================================================
--- /trunk/t/pmc/pmethod_test.t (original)
+++ trunk/t/pmc/pccmethod_test.t        Thu Mar 22 15:36:17 2007
@@ -10,7 +10,7 @@
 
 =head1 NAME
 
-t/pmc/pmethod_test.t - test the PMETHOD_Test PMC
+t/pmc/pmethod_test.t - test the PCCMETHOD_Test PMC
 
 
 =head1 SYNOPSIS
@@ -19,13 +19,13 @@
 
 =head1 DESCRIPTION
 
-Tests the PMETHOD_Test PMC.
+Tests the PCCMETHOD_Test PMC.
 
 =cut
 
 pir_output_is( <<'CODE', <<'OUT', 'named args' );
 .sub main :main
-  $P0 = new 'PMETHOD_Test'
+  $P0 = new 'PCCMETHOD_Test'
   $P0.'test_method3'( 'a1name' => 10, 'a2name' => 20 )
 .end
 CODE
@@ -36,7 +36,7 @@
 pir_output_is(
     <<'CODE', <<'OUT', 'optional args and multiple returns' );
 .sub main :main
-  $P0 = new 'PMETHOD_Test'
+  $P0 = new 'PCCMETHOD_Test'
   $P0.'test_method0'(1)
   $P0.'test_method1'(1, 2, 3, 4, 5, 6)
   $P0.'test_method2'()

Reply via email to