Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Optimize lexical out of hot loop in "uniq"

And I've now given up on using grep{} in uniq(), the tests succeeed, but strange
unrelated things change, like giving the wrong error message:
$ perl6 -e 'Module.new'
===SORRY!===
Cannot assign a non-Perl 6 value to a Perl 6 container
  • Loading branch information...
commit f60a2c111efe9a647d73ca641fcedea874e0f79d 1 parent ce8b5f6
lizmat lizmat authored

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. +2 1  src/core/List.pm
3  src/core/List.pm
@@ -326,8 +326,9 @@ my class List does Positional {
326 326 # specifier, but AFAIK nothing has been spec'd yet.
327 327 method uniq() {
328 328 my $seen := nqp::hash();
  329 + my str $which;
329 330 gather sink for @.list {
330   - my str $which = nqp::unbox_s($_.WHICH);
  331 + $which = nqp::unbox_s($_.WHICH);
331 332 unless nqp::existskey($seen, $which) {
332 333 take $_;
333 334 nqp::bindkey($seen, $which, 1);

0 comments on commit f60a2c1

Please sign in to comment.
Something went wrong with that request. Please try again.