Author: coke
Date: Tue Mar 25 20:38:06 2008
New Revision: 26553

Modified:
   trunk/DEPRECATED.pod
   trunk/languages/perl6/src/classes/Object.pir
   trunk/lib/Parrot/Pmc2c/PMCEmitter.pm
   trunk/src/mmd.c
   trunk/src/oo.c
   trunk/src/ops/experimental.ops
   trunk/src/pmc/class.pmc
   trunk/src/pmc/default.pmc
   trunk/src/pmc/deleg_pmc.pmc
   trunk/src/pmc/delegate.pmc
   trunk/src/pmc/pmcproxy.pmc
   trunk/src/pmc/role.pmc
   trunk/src/vtable.tbl
   trunk/t/pmc/class.t
   trunk/t/pmc/pmcproxy.t
   trunk/tools/dev/gen_class.pl
   trunk/tools/dev/vtablize.pl

Changes in other areas also in this revision:
Modified:
   trunk/docs/pdds/pdd17_pmc.pod

Log:
[DEPRECATED]

The pmc_namespace vtable was deprecated, the get_namespace vtable was
its replacement: Here's a rename which resolves both tickets
(now merged into RT#48144). 


Modified: trunk/DEPRECATED.pod
==============================================================================
--- trunk/DEPRECATED.pod        (original)
+++ trunk/DEPRECATED.pod        Tue Mar 25 20:38:06 2008
@@ -54,10 +54,6 @@
 
 See RT #47011.
 
-=item * C<pmc_namespace>  [post 0.5.1]
-
-See RT# 48144. Replaced by C<get_namespace>.
-
 =back
 
 =head1 opcodes

Modified: trunk/languages/perl6/src/classes/Object.pir
==============================================================================
--- trunk/languages/perl6/src/classes/Object.pir        (original)
+++ trunk/languages/perl6/src/classes/Object.pir        Tue Mar 25 20:38:06 2008
@@ -85,7 +85,7 @@
     ##  directly as subs into the class' namespace.
     ##  get the class' namespace object
     .local pmc ns
-    ns = class.'pmc_namespace'()
+    ns = class.'get_namespace'()
     ##  iterate over Perl6Object's methods, adding them to the namespace
     .local pmc methods, iter
     $P0 = get_class 'Perl6Object'

Modified: trunk/lib/Parrot/Pmc2c/PMCEmitter.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PMCEmitter.pm        (original)
+++ trunk/lib/Parrot/Pmc2c/PMCEmitter.pm        Tue Mar 25 20:38:06 2008
@@ -189,8 +189,8 @@
     # Note that this trick won't work if the singleton inherits from something
     # else (because the MRO will still be shared).
 
-    unless ( $self->implements_vtable('pmc_namespace')
-        or $self->super_method('pmc_namespace') ne 'default' )
+    unless ( $self->implements_vtable('get_namespace')
+        or $self->super_method('get_namespace') ne 'default' )
     {
         my $body =
             Parrot::Pmc2c::Emitter->text(
@@ -198,7 +198,7 @@
         $self->add_method(
             Parrot::Pmc2c::Method->new(
                 {
-                    name        => 'pmc_namespace',
+                    name        => 'get_namespace',
                     parent_name => $self->name,
                     parameters  => '',
                     body        => $body,

Modified: trunk/src/mmd.c
==============================================================================
--- trunk/src/mmd.c     (original)
+++ trunk/src/mmd.c     Tue Mar 25 20:38:06 2008
@@ -1360,7 +1360,7 @@
             if (PObj_is_class_TEST(_class))
                 ns = Parrot_oo_get_namespace(interp, _class);
             else
-                ns = VTABLE_pmc_namespace(interp, _class);
+                ns = VTABLE_get_namespace(interp, _class);
             methodobj = VTABLE_get_pmc_keyed_str(interp, ns, meth);
             if (!PMC_IS_NULL(methodobj)) {
                 /*

Modified: trunk/src/oo.c
==============================================================================
--- trunk/src/oo.c      (original)
+++ trunk/src/oo.c      Tue Mar 25 20:38:06 2008
@@ -485,7 +485,7 @@
         PMC *ns;
 
         _class = VTABLE_get_pmc_keyed_int(interp, mro, i);
-        ns     = VTABLE_pmc_namespace(interp, _class);
+        ns     = VTABLE_get_namespace(interp, _class);
 
         if (!PMC_IS_NULL(ns)) {
             PMC * const res = find_vtable_meth_ns(interp, ns, vtable_index);
@@ -1142,7 +1142,7 @@
 #endif
 
     *meth_str = meth;
-    ns        = VTABLE_pmc_namespace(interp, _class);
+    ns        = VTABLE_get_namespace(interp, _class);
     method    = VTABLE_get_pmc_keyed_str(interp, ns, meth);
 
     return method;
@@ -1233,7 +1233,7 @@
             else
                 meth_str = CONST_STRING(interp, "init");
 
-            ns   = VTABLE_pmc_namespace(interp, parent_class);
+            ns   = VTABLE_get_namespace(interp, parent_class);
 
             /* can't use find_method, it walks mro */
             vtable_index = Parrot_get_vtable_index(interp, meth_str);
@@ -1738,7 +1738,7 @@
         PMC* method, *ns;
 
         _class = VTABLE_get_pmc_keyed_int(interp, mro, i);
-        ns = VTABLE_pmc_namespace(interp, _class);
+        ns = VTABLE_get_namespace(interp, _class);
         method = VTABLE_get_pmc_keyed_str(interp, ns, method_name);
         TRACE_FM(interp, _class, method_name, method);
         if (!PMC_IS_NULL(method)) {

Modified: trunk/src/ops/experimental.ops
==============================================================================
--- trunk/src/ops/experimental.ops      (original)
+++ trunk/src/ops/experimental.ops      Tue Mar 25 20:38:06 2008
@@ -227,7 +227,7 @@
 
 op classname(out PMC, invar PMC) :object_base {
     PMC *ns = Parrot_ns_get_name(interp,
-                                    VTABLE_pmc_namespace(interp, $2));
+                                    VTABLE_get_namespace(interp, $2));
     if (PMC_IS_NULL(ns) || VTABLE_elements(interp, ns) < 2)
     {
         real_exception(interp, NULL, NO_CLASS,

Modified: trunk/src/pmc/class.pmc
==============================================================================
--- trunk/src/pmc/class.pmc     (original)
+++ trunk/src/pmc/class.pmc     Tue Mar 25 20:38:06 2008
@@ -1467,14 +1467,14 @@
 
 /*
 
-=item C<void pmc_namespace()>
+=item C<void get_namespace()>
 
 Gets the namespace that this class is attached to.
 
 =cut
 
 */
-    METHOD pmc_namespace(PMC *_namespace :optional, int has_name :opt_flag) {
+    METHOD get_namespace(PMC *_namespace :optional, int has_name :opt_flag) {
         Parrot_Class * const _class        = PARROT_CLASS(SELF);
         PMC          * const ret_namespace = _class->_namespace;
         UNUSED(_namespace);

Modified: trunk/src/pmc/default.pmc
==============================================================================
--- trunk/src/pmc/default.pmc   (original)
+++ trunk/src/pmc/default.pmc   Tue Mar 25 20:38:06 2008
@@ -470,7 +470,7 @@
 
 /*
 
-=item C<PMC *pmc_namespace>
+=item C<PMC *get_namespace>
 
 Return the namespace for this PMC.
 
@@ -487,7 +487,7 @@
 
 */
 
-    VTABLE PMC *pmc_namespace() {
+    VTABLE PMC *get_namespace() {
         return SELF->vtable->_namespace;
     }
 

Modified: trunk/src/pmc/deleg_pmc.pmc
==============================================================================
--- trunk/src/pmc/deleg_pmc.pmc (original)
+++ trunk/src/pmc/deleg_pmc.pmc Tue Mar 25 20:38:06 2008
@@ -80,7 +80,7 @@
         return SUPER(method_name);
     }
 
-    VTABLE PMC *pmc_namespace() {
+    VTABLE PMC *get_namespace() {
         return SELF->vtable->_namespace;
     }
 

Modified: trunk/src/pmc/delegate.pmc
==============================================================================
--- trunk/src/pmc/delegate.pmc  (original)
+++ trunk/src/pmc/delegate.pmc  Tue Mar 25 20:38:06 2008
@@ -121,7 +121,7 @@
         return SELF->vtable->whoami;
     }
 
-    VTABLE PMC *pmc_namespace() {
+    VTABLE PMC *get_namespace() {
         return SELF->vtable->_namespace;
     }
 

Modified: trunk/src/pmc/pmcproxy.pmc
==============================================================================
--- trunk/src/pmc/pmcproxy.pmc  (original)
+++ trunk/src/pmc/pmcproxy.pmc  Tue Mar 25 20:38:06 2008
@@ -352,14 +352,14 @@
 
 /*
 
-=item C<void pmc_namespace()>
+=item C<void get_namespace()>
 
 Gets the namespace that this class is attached to.
 
 =cut
 
 */
-    METHOD pmc_namespace() {
+    METHOD get_namespace() {
         Parrot_Class * const _pmc          = PARROT_CLASS(SELF);
         PMC          * const ret_namespace = _pmc->_namespace;
         RETURN(PMC *ret_namespace);

Modified: trunk/src/pmc/role.pmc
==============================================================================
--- trunk/src/pmc/role.pmc      (original)
+++ trunk/src/pmc/role.pmc      Tue Mar 25 20:38:06 2008
@@ -583,7 +583,7 @@
 /*
 
 =item C<METHOD
-    pmc_namespace()>
+    get_namespace()>
 
 Gets the namespace associated with this role, if any.
 
@@ -591,7 +591,7 @@
 
 */
 
-    METHOD pmc_namespace() {
+    METHOD get_namespace() {
         Parrot_Role *role          = PARROT_ROLE(SELF);
         PMC         *ret_namespace = role->_namespace;
         RETURN(PMC *ret_namespace);

Modified: trunk/src/vtable.tbl
==============================================================================
--- trunk/src/vtable.tbl        (original)
+++ trunk/src/vtable.tbl        Tue Mar 25 20:38:06 2008
@@ -14,7 +14,7 @@
 void morph(INTVAL type) :write
 void mark()
 void destroy()
-PMC* pmc_namespace()
+PMC* get_namespace()
 
 # XXX FIXME should this be marked as writing?
 PMC* getprop(STRING* key)

Modified: trunk/t/pmc/class.t
==============================================================================
--- trunk/t/pmc/class.t (original)
+++ trunk/t/pmc/class.t Tue Mar 25 20:38:06 2008
@@ -95,7 +95,7 @@
   t_too_many_args:
     ok($I0, 'name() with too many args fails')
 
-    result = class.'pmc_namespace'()
+    result = class.'get_namespace'()
     is(result, 'Alex', 'name() with args sets namespace too')
 .end
 

Modified: trunk/t/pmc/pmcproxy.t
==============================================================================
--- trunk/t/pmc/pmcproxy.t      (original)
+++ trunk/t/pmc/pmcproxy.t      Tue Mar 25 20:38:06 2008
@@ -76,7 +76,7 @@
     print "\n"
     print "ok 2 - got name\n"
 
-    $P1 = $P0.'pmc_namespace'()
+    $P1 = $P0.'get_namespace'()
     $S1 = $P1
     print $S1
     print "\n"

Modified: trunk/tools/dev/gen_class.pl
==============================================================================
--- trunk/tools/dev/gen_class.pl        (original)
+++ trunk/tools/dev/gen_class.pl        Tue Mar 25 20:38:06 2008
@@ -63,7 +63,7 @@
 
 EOF
 
-my %skip_bodies = map { $_ => 1 } qw( type name pmc_namespace );
+my %skip_bodies = map { $_ => 1 } qw( type name get_namespace );
 
 ## emit method bodies
 for (@$vtbl) {

Modified: trunk/tools/dev/vtablize.pl
==============================================================================
--- trunk/tools/dev/vtablize.pl (original)
+++ trunk/tools/dev/vtablize.pl Tue Mar 25 20:38:06 2008
@@ -35,7 +35,7 @@
 s/^(\s*)(void\s+morph\(INTVAL\s+\w*\)\s+{)/$1VTABLE $2/;
 s/^(\s*)(void\s+mark\(\)\s+{)/$1VTABLE $2/;
 s/^(\s*)(void\s+destroy\(\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*pmc_namespace\(\)\s+{)/$1VTABLE $2/;
+s/^(\s*)(PMC\s+\*get_namespace\(\)\s+{)/$1VTABLE $2/;
 s/^(\s*)(PMC\s+\*getprop\(STRING\s+\*\w*\)\s+{)/$1VTABLE $2/;
 s/^(\s*)(void\s+setprop\(STRING\s+\*\w*,\s+PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
 s/^(\s*)(void\s+delprop\(STRING\s+\*\w*\)\s+{)/$1VTABLE $2/;

Reply via email to