Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
bump NQP and do P6 level sawcaps opt as well
  • Loading branch information
TimToady committed Apr 8, 2015
1 parent 260e3cd commit 14bb68b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
32 changes: 15 additions & 17 deletions src/core/Cursor.pm
Expand Up @@ -24,7 +24,6 @@ my class Cursor does NQPCursorRole {
# For captures with lists, initialize the lists.
my $caplist := $NO_CAPS;
my $rxsub := nqp::getattr(self, Cursor, '$!regexsub');
my int $sawcaps = 1;
if !nqp::isnull($rxsub) && nqp::defined($rxsub) {
$caplist := nqp::can($rxsub, 'CAPS') ?? nqp::findmethod($rxsub, 'CAPS')($rxsub) !! nqp::null();
if !nqp::isnull($caplist) && nqp::istrue($caplist) {
Expand All @@ -33,32 +32,31 @@ my class Cursor does NQPCursorRole {
my $curcap := nqp::shift($iter);
#?if jvm
my Mu $curval := nqp::iterval($curcap);
if (nqp::isint($curval) && nqp::isge_i($curval, 1))
|| (nqp::isnum($curval) && nqp::p6box_n($curval) >= 1) {
$sawcaps = 1;
if (nqp::isint($curval) && nqp::isge_i($curval, 2))
|| (nqp::isnum($curval) && nqp::p6box_n($curval) >= 2) {
if (nqp::isint($curval) && nqp::isge_i($curval, 2))
|| (nqp::isnum($curval) && nqp::p6box_n($curval) >= 2) {
#?endif
#?if !jvm
if nqp::iterval($curcap) >= 1 {
$sawcaps = 1;
if nqp::iterval($curcap) >= 2 {
if nqp::iterval($curcap) >= 2 {
#?endif
my str $name = nqp::iterkey_s($curcap);
nqp::iscclass(nqp::const::CCLASS_NUMERIC, $name, 0)
?? nqp::bindpos(
nqp::if(nqp::isconcrete($list), $list, ($list := nqp::list())),
nqp::fromstr_I($name, Int), [])
!! nqp::bindkey($hash, $name, []);
}
my str $name = nqp::iterkey_s($curcap);
nqp::iscclass(nqp::const::CCLASS_NUMERIC, $name, 0)
?? nqp::bindpos(
nqp::if(nqp::isconcrete($list), $list, ($list := nqp::list())),
nqp::fromstr_I($name, Int), [])
!! nqp::bindkey($hash, $name, []);
}
}
}
}

# Walk the Cursor stack and populate the Cursor.
my Mu $cs := nqp::getattr(self, Cursor, '$!cstack');
if $sawcaps && !nqp::isnull($cs) && nqp::istrue($cs) {
#?if jvm
if !nqp::isnull($cs) && nqp::istrue($cs) {
#?endif
#?if !jvm
if $caplist && !nqp::isnull($cs) && nqp::istrue($cs) {
#?endif
my int $cselems = nqp::elems($cs);
my int $csi = 0;
while $csi < $cselems {
Expand Down
2 changes: 1 addition & 1 deletion tools/build/NQP_REVISION
@@ -1 +1 @@
2015.03-86-gbbb164e
2015.03-88-ga997d3d

0 comments on commit 14bb68b

Please sign in to comment.