Author: pmichaud
Date: Thu Feb 23 14:40:04 2006
New Revision: 11720
Modified:
trunk/compilers/pge/PGE/Exp.pir
trunk/compilers/pge/PGE/OPTable.pir
trunk/runtime/parrot/library/PGE/Dumper.pir
Log:
Converted use of PerlArray to ResizablePMCArray.
Modified: trunk/compilers/pge/PGE/Exp.pir
==============================================================================
--- trunk/compilers/pge/PGE/Exp.pir (original)
+++ trunk/compilers/pge/PGE/Exp.pir Thu Feb 23 14:40:04 2006
@@ -285,7 +285,7 @@ register.
if $I0 goto end
emit(code, " $I0 = defined captscope[%s]", cname)
emit(code, " if $I0 goto %s_c1", label)
- emit(code, " $P0 = new .PerlArray")
+ emit(code, " $P0 = new .ResizablePMCArray")
emit(code, " captscope[%s] = $P0", cname)
emit(code, " save captscope")
emit(code, " bsr %s_c1", label)
@@ -375,7 +375,7 @@ register.
emit(code, " $P0 = interpinfo %s", .INTERPINFO_CURRENT_SUB)
emit(code, " setattribute mob, \"PGE::Match\\x0&:corou\", $P0")
emit(code, " lastpos = length target")
- emit(code, " gpad = new .PerlArray")
+ emit(code, " gpad = new .ResizablePMCArray")
emit(code, " rcache = new .PerlHash")
emit(code, " captscope = mob")
emit(code, " pos = mfrom")
@@ -518,7 +518,7 @@ register.
cname = self["cname"]
emit(code, "\n %s: # scalar %s %s ##", label, cname, $S0)
emit(code, " $P0 = mob[%s]", cname)
- emit(code, " $I0 = isa $P0, \"Array\"")
+ emit(code, " $I0 = does $P0, \"array\"")
emit(code, " if $I0 == 0 goto %s_0", label)
emit(code, " $P0 = $P0[-1]")
emit(code, " %s_0:", label)
Modified: trunk/compilers/pge/PGE/OPTable.pir
==============================================================================
--- trunk/compilers/pge/PGE/OPTable.pir (original)
+++ trunk/compilers/pge/PGE/OPTable.pir Thu Feb 23 14:40:04 2006
@@ -269,9 +269,9 @@ representing the result of the parse.
opertable = getattribute self, "PGE::OPTable\x0%:opertable"
wstermtable = getattribute self, "PGE::OPTable\x0%:wstermtable"
wsopertable = getattribute self, "PGE::OPTable\x0%:wsopertable"
- termstack = new .PerlArray
- operstack = new .PerlArray
- tokstack = new .PerlArray
+ termstack = new .ResizablePMCArray
+ operstack = new .ResizablePMCArray
+ tokstack = new .ResizablePMCArray
termempty = termtable[""]
operempty = opertable[""]
Modified: trunk/runtime/parrot/library/PGE/Dumper.pir
==============================================================================
--- trunk/runtime/parrot/library/PGE/Dumper.pir (original)
+++ trunk/runtime/parrot/library/PGE/Dumper.pir Thu Feb 23 14:40:04 2006
@@ -158,13 +158,13 @@ An alternate dump output for a Match obj
goto subrules_1
dumper:
- $I0 = isa $P0, "Array"
- if $I0 goto dumper_0
$I0 = isa $P0, "PGE::Match"
- unless $I0 goto dumper_3
+ unless $I0 goto dumper_0
$P0."dump"(prefix1, b1, b2)
ret
dumper_0:
+ $I0 = does $P0, "array"
+ unless $I0 goto dumper_3
$I0 = 0
$I1 = elements $P0
dumper_1: