Hi,

On Tuesday 30 March 2004 18:57, Dan Sugalski wrote:
> I just checked in stub code for the PMCArray and StringArray classes.
I've attached a patch for the data dumper.

> Ultimately they should be auto-resizeable, PMC or String only arrays,
> though right now they aren't. (They wrap PerlArray right now, so
> they're far from efficient, but at least they're in to be used)
> Integer and Float arrays should probably go in, and we should add in
> the non-auto-resizing versions as well.
>
> Abusing these so they aren't just virtual wrappers, and are actually
> efficient (as they can all be done as a plain C array of pointers or
> values--they don't have to be, and probably shouldn't be, sparse)
> would certainly be a Good Thing.
The EBNF Parser is now using PMCArrays.

jens
Index: library/Data/Dumper/Default.imc
===================================================================
RCS file: /cvs/public/parrot/library/Data/Dumper/Default.imc,v
retrieving revision 1.1
diff -u -w -r1.1 Default.imc
--- library/Data/Dumper/Default.imc	14 Mar 2004 17:52:30 -0000	1.1
+++ library/Data/Dumper/Default.imc	30 Mar 2004 17:59:12 -0000
@@ -248,9 +248,31 @@
     .pcc_end_return
 .end
 
+=item style."pmcPMCArray"( name, array )
+
+Dumps an (PMC) Array.
+
+=cut
+
+.sub pmcPMCArray
+    S0 = "pmcPerlArray"
+    callmethod
+.end
+
+=item style."pmcStringArray"( name, array )
+
+Dumps an (string) Array.
+
+=cut
+
+.sub pmcStringArray
+    S0 = "pmcPerlArray"
+    callmethod
+.end
+
 =item style."pmcPerlArray"( name, array )
 
-Dumps an Array PMC.
+Dumps an (Perl) Array.
 
 =cut
 
@@ -267,7 +289,9 @@
 
     (subindent, indent) = self."newIndent"()
 
-    print "PerlArray (size:"
+    typeof name2, array
+    print name2
+    print " (size:"
     print array
     print ") ["
 

Reply via email to