Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add a comment to hotpath checks added in c10792f (RT #111848).

  • Loading branch information...
commit e2ebf3993ce46b33145d78784e83517127ca9aff 1 parent c2f008d
@pmichaud pmichaud authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  src/core/Array.pm
View
2  src/core/Array.pm
@@ -12,6 +12,7 @@ class Array {
my Mu $items := nqp::getattr(self, List, '$!items');
nqp::islist($items) or
$items := nqp::bindattr(self, List, '$!items', nqp::list());
+ # hotpath check for element existence (RT #111848)
nqp::existspos($items, $p)
|| nqp::getattr(self, List, '$!nextiter').defined
&& self.exists($p)
@@ -23,6 +24,7 @@ class Array {
my Mu $items := nqp::getattr(self, List, '$!items');
nqp::islist($items) or
$items := nqp::bindattr(self, List, '$!items', nqp::list());
+ # hotpath check for element existence (RT #111848)
nqp::existspos($items, $pos)
|| nqp::getattr(self, List, '$!nextiter').defined
&& self.exists($pos)
Please sign in to comment.
Something went wrong with that request. Please try again.