[svn:parrot] r37750 - trunk/tools/util

coke at svn.parrot.org coke at svn.parrot.org
Thu Mar 26 19:56:39 UTC 2009


Author: coke
Date: Thu Mar 26 19:56:38 2009
New Revision: 37750
URL: https://trac.parrot.org/parrot/changeset/37750

Log:
[parrot_config] - use 'iter' opcode; add usage.

Modified:
   trunk/tools/util/parrot-config.pir

Modified: trunk/tools/util/parrot-config.pir
==============================================================================
--- trunk/tools/util/parrot-config.pir	Thu Mar 26 18:50:06 2009	(r37749)
+++ trunk/tools/util/parrot-config.pir	Thu Mar 26 19:56:38 2009	(r37750)
@@ -25,7 +25,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2006, Parrot Foundation.
+Copyright (C) 2004-2009, Parrot Foundation.
 
 =cut
 
@@ -58,25 +58,23 @@
     print "\n"
     end
 dump:
-   .local pmc iter
-    .include 'iterator.pasm'
-    new iter, 'Iterator', conf_hash
-    iter = .ITERATE_FROM_START
+   .local pmc iterator
+    iterator = iter conf_hash
 iter_loop:
-    unless iter goto iter_end
-    shift $S0, iter
+    unless iterator goto iter_end
+    shift $S0, iterator
     print $S0
     print " => '"
     $S1 = conf_hash[$S0]
     print $S1
-    print "'\n"
+    say "'"
     goto iter_loop
 iter_end:
     end
 usage:
     $S0 = argv[0]
     printerr $S0
-    printerr ": config-key\n"
+    printerr " [ <config-key> | --dump ]\n"
     exit 1
 .end
 


More information about the parrot-commits mailing list