[svn:parrot] r39543 - branches/pmc_pct/compilers/pmcc/src
bacek at svn.parrot.org
bacek at svn.parrot.org
Sun Jun 14 07:02:29 UTC 2009
Author: bacek
Date: Sun Jun 14 07:02:28 2009
New Revision: 39543
URL: https://trac.parrot.org/parrot/changeset/39543
Log:
[pmcc] Add Hash.keys into builtins
Modified:
branches/pmc_pct/compilers/pmcc/src/builtins.pir
Modified: branches/pmc_pct/compilers/pmcc/src/builtins.pir
==============================================================================
--- branches/pmc_pct/compilers/pmcc/src/builtins.pir Sun Jun 14 07:02:13 2009 (r39542)
+++ branches/pmc_pct/compilers/pmcc/src/builtins.pir Sun Jun 14 07:02:28 2009 (r39543)
@@ -51,6 +51,27 @@
.return ($S0)
.end
+
+# Extend various Parrot's PMCs to play nicely with NQP.
+.namespace ['Hash']
+
+.sub 'keys' :method
+ .local pmc res, it
+ res = new 'ResizableStringArray'
+ it = iter self
+ loop:
+ unless it goto done
+ $P0 = shift it
+ $S0 = $P0
+ say $S0
+ push res, $S0
+ goto loop
+ done:
+
+ .return(res)
+
+.end
+
# Local Variables:
# mode: pir
# fill-column: 100
More information about the parrot-commits
mailing list