From f807186eb6aa79eaa9d1b7118609d438b18dfff9 Mon Sep 17 00:00:00 2001 From: Elizabeth Mattijsen Date: Sun, 13 Feb 2022 12:50:25 +0100 Subject: [PATCH] uintify Sequence.EXISTS/AT-POS For future performance --- src/core.c/Sequence.pm6 | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/core.c/Sequence.pm6 b/src/core.c/Sequence.pm6 index 1db72b313b1..06376211d2f 100644 --- a/src/core.c/Sequence.pm6 +++ b/src/core.c/Sequence.pm6 @@ -43,29 +43,21 @@ my role Sequence does PositionalBindFailover { multi method List(::?CLASS:D:) { self.list.List } multi method Slip(::?CLASS:D:) { self.list.Slip } - multi method Str(::?CLASS:D:) { - self.cache.Str - } - - multi method Stringy(::?CLASS:D:) { - self.cache.Stringy - } - + multi method Str(::?CLASS:D:) { self.cache.Str } + multi method Stringy(::?CLASS:D:) { self.cache.Stringy } method Numeric(::?CLASS:D:) { self.cache.elems } - multi method AT-POS(::?CLASS:D: Int:D $idx) is raw { + multi method AT-POS(::?CLASS:D: uint $idx) is raw { self.cache.AT-POS($idx) } - - multi method AT-POS(::?CLASS:D: int $idx) is raw { + multi method AT-POS(::?CLASS:D: Int:D $idx) is raw { self.cache.AT-POS($idx) } - multi method EXISTS-POS(::?CLASS:D: Int:D $idx) { + multi method EXISTS-POS(::?CLASS:D: uint $idx) { self.cache.EXISTS-POS($idx) } - - multi method EXISTS-POS(::?CLASS:D: int $idx) { + multi method EXISTS-POS(::?CLASS:D: Int:D $idx) { self.cache.EXISTS-POS($idx) }