[svn:parrot] r40220 - in branches/bsr_jsr_ret: compilers/pct/src/PAST runtime/parrot/library/PGE
whiteknight at svn.parrot.org
whiteknight at svn.parrot.org
Wed Jul 22 23:26:10 UTC 2009
Author: whiteknight
Date: Wed Jul 22 23:26:10 2009
New Revision: 40220
URL: https://trac.parrot.org/parrot/changeset/40220
Log:
[bsr_jsr_ret] undo my previous commit on suggestion from pmichaud++. Will resolve these issues a different way
Modified:
branches/bsr_jsr_ret/compilers/pct/src/PAST/Compiler.pir
branches/bsr_jsr_ret/runtime/parrot/library/PGE/Dumper.pir
Modified: branches/bsr_jsr_ret/compilers/pct/src/PAST/Compiler.pir
==============================================================================
--- branches/bsr_jsr_ret/compilers/pct/src/PAST/Compiler.pir Wed Jul 22 23:14:41 2009 (r40219)
+++ branches/bsr_jsr_ret/compilers/pct/src/PAST/Compiler.pir Wed Jul 22 23:26:10 2009 (r40220)
@@ -1188,10 +1188,10 @@
exprpost = self.'as_post'(exprpast, 'rtype'=>exprrtype)
childpast = thenpast
- childpost = self.'make_childpost'(childpast, exprpost, childrtype, opsclass, rtype, result)
+ bsr make_childpost
thenpost = childpost
childpast = elsepast
- childpost = self.'make_childpost'(childpast, exprpost, childrtype, opsclass, rtype, result)
+ bsr make_childpost
elsepost = childpost
if null elsepost goto no_elsepost
@@ -1221,18 +1221,8 @@
no_elsepost_2:
ops.'push'(endlabel)
.return (ops)
-.end
-
-.sub 'make_childpost' :method
- .param pmc childpast
- .param pmc exprpost
- .param pmc childrtype
- .param pmc opsclass
- .param string rtype
- .param string result
-
- .local pmc childpost
+ make_childpost:
null childpost
$I0 = defined childpast
unless $I0 goto no_childpast
@@ -1251,7 +1241,7 @@
unless result goto ret_childpost
childpost = self.'coerce'(childpost, result)
ret_childpost:
- .return(childpost)
+ ret
.end
.sub 'unless' :method :multi(_, ['PAST';'Op'])
Modified: branches/bsr_jsr_ret/runtime/parrot/library/PGE/Dumper.pir
==============================================================================
--- branches/bsr_jsr_ret/runtime/parrot/library/PGE/Dumper.pir Wed Jul 22 23:14:41 2009 (r40219)
+++ branches/bsr_jsr_ret/runtime/parrot/library/PGE/Dumper.pir Wed Jul 22 23:26:10 2009 (r40220)
@@ -139,7 +139,7 @@
$I0 = defined capt[spi]
unless $I0 goto subpats_2
$P0 = capt[spi]
- (out, prefix1, prefix2, b1, b2) = _do_the_dump($P0, out, prefix1, prefix2, b1, b2)
+ bsr dumper
subpats_2:
inc spi
goto subpats_1
@@ -157,27 +157,15 @@
$I0 = defined capt[$S0]
unless $I0 goto subrules_1
$P0 = capt[$S0]
- (out, prefix1, prefix2, b1, b2) = _do_the_dump($P0, out, prefix1, prefix2, b1, b2)
+ bsr dumper
goto subrules_1
- end:
- .return (out)
-.end
-
-.sub _do_the_dump
- .param pmc matchobj
- .param string out
- .param string prefix1
- .param string prefix2
- .param string b1
- .param string b2
- $P0 = matchobj
dumper:
$I0 = isa $P0, ['PGE';'Match']
unless $I0 goto dumper_0
$S0 = $P0.'dump_str'(prefix1, b1, b2)
out .= $S0
- .return(out, prefix1, prefix2, b1, b2)
+ ret
dumper_0:
$I0 = does $P0, 'array'
unless $I0 goto dumper_3
@@ -195,16 +183,20 @@
inc $I0
goto dumper_1
dumper_2:
- .return(out, prefix1, prefix2, b1, b2)
+ ret
dumper_3:
out .= prefix1
out .= ': '
$S0 = $P0
out .= $S0
out .= "\n"
- .return(out)
+ ret
+
+ end:
+ .return (out)
.end
+
=item C<dump()>
An alternate dump output for a Match object and all of its subcaptures.
More information about the parrot-commits
mailing list