Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove unneccesary unboxing
  • Loading branch information
lizmat committed Apr 24, 2015
1 parent de40075 commit b34241d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/List.pm
Expand Up @@ -202,10 +202,9 @@ my class List does Positional { # declared in BOOTSTRAP
$i = nqp::rand_I(nqp::decont($elems), Int);
$elems = $elems - 1;
$n = $n - 1;
$v := nqp::atpos($rpa, nqp::unbox_i($i));
$v := nqp::atpos($rpa,$i);
# replace selected element with last unpicked one
nqp::bindpos($rpa, nqp::unbox_i($i),
nqp::atpos($rpa, nqp::unbox_i($elems)));
nqp::bindpos($rpa,$i,nqp::atpos($rpa,nqp::unbox_i($elems)));
take-rw $v;
}
}
Expand Down

0 comments on commit b34241d

Please sign in to comment.