[svn:parrot] r44540 - in trunk: . runtime/parrot/library/Parrot t/library

coke at svn.parrot.org coke at svn.parrot.org
Sun Feb 28 03:16:05 UTC 2010


Author: coke
Date: Sun Feb 28 03:15:48 2010
New Revision: 44540
URL: https://trac.parrot.org/parrot/changeset/44540

Log:
move Parrot::Coroutine to Parrot;Coroutine

Listed in deprecated.pod for a previous release, but no ticket listed.

Modified:
   trunk/DEPRECATED.pod
   trunk/runtime/parrot/library/Parrot/Coroutine.pir
   trunk/t/library/coroutine.t

Modified: trunk/DEPRECATED.pod
==============================================================================
--- trunk/DEPRECATED.pod	Sun Feb 28 02:58:59 2010	(r44539)
+++ trunk/DEPRECATED.pod	Sun Feb 28 03:15:48 2010	(r44540)
@@ -310,8 +310,8 @@
 
 The use of C<::> a namespace separator is deprecated.  Core libraries will
 change to use multi-level keys instead.  For example, C<YAML::Dumper> will
-change to C<YAML; Dumper>.  Affected libraries also include:
-C<Parrot::Coroutine>, C<SDL>, C<Test::Builder>, and C<PCRE::NCI>.
+change to C<YAML; Dumper>.  Affected libraries also include: C<SDL>,
+C<Test::Builder>, and C<PCRE::NCI>.
 
 =back
 

Modified: trunk/runtime/parrot/library/Parrot/Coroutine.pir
==============================================================================
--- trunk/runtime/parrot/library/Parrot/Coroutine.pir	Sun Feb 28 02:58:59 2010	(r44539)
+++ trunk/runtime/parrot/library/Parrot/Coroutine.pir	Sun Feb 28 03:15:48 2010	(r44540)
@@ -59,7 +59,7 @@
         .local int coro_class, idx
         .local pmc coro
         .const 'Sub' coro_sub = "enumerate_tree"
-        coro = new 'Parrot::Coroutine', coro_sub
+        coro = new ['Parrot'; 'Coroutine'], coro_sub
         ($P0 :optional, $I0 :opt_flag) = coro.'resume'(coro, tree)
         idx = 0
 
@@ -83,9 +83,9 @@
 =cut
 
 .sub onload_create_class :load
-    $P0 = get_class "Parrot::Coroutine"
+    $P0 = get_class ['Parrot'; 'Coroutine']
     unless null $P0 goto END
-    $P0 = newclass "Parrot::Coroutine"
+    $P0 = newclass ['Parrot'; 'Coroutine']
     addattribute $P0, "state"       ## State:  1 is new/valid, 0 is dead.
     addattribute $P0, "initial_sub" ## Initial sub.
     addattribute $P0, "yield_cont"  ## Continuation to for yielding.
@@ -94,7 +94,7 @@
     .return ()
 .end
 
-.namespace ["Parrot::Coroutine"]
+.namespace ['Parrot'; 'Coroutine']
 
 .include "interpinfo.pasm"
 
@@ -106,7 +106,7 @@
 
     .local pmc coro
     .const 'Sub' coro_sub = "enumerate_tree"
-    coro_class = get_class 'Parrot::Coroutine'
+    coro_class = get_class ['Parrot'; 'Coroutine']
     coro = coro_class.'new'('initial_sub' => coro_sub)
 
 Given a sub, it initializes a new C<Parrot::Coroutine> object.
@@ -125,8 +125,7 @@
 
 ## [it would be nice to include a pointer value.  -- rgr, 8-Oct-06.]
 .sub get_string :vtable :method
-    $S0 = '<Parrot::Coroutine ?>'
-    .return ($S0)
+    .return ('<Parrot::Coroutine ?>')
 .end
 
 =head3 B<coro.resume(args...)>

Modified: trunk/t/library/coroutine.t
==============================================================================
--- trunk/t/library/coroutine.t	Sun Feb 28 02:58:59 2010	(r44539)
+++ trunk/t/library/coroutine.t	Sun Feb 28 03:15:48 2010	(r44540)
@@ -145,9 +145,9 @@
 	.param pmc tree2
 
 	.local pmc coro_class
-    coro_class = get_class 'Parrot::Coroutine'
+    coro_class = get_class ['Parrot'; 'Coroutine']
     unless null coro_class goto found
-	printerr "Bug:  Can't find 'Parrot::Coroutine' class.\n"
+	printerr "Bug:  Can't find ['Parrot'; 'Coroutine'] class.\n"
 	die 5, 1
 found:
 	.local pmc coro1, coro2


More information about the parrot-commits mailing list