Skip to content

Commit fd53616

Browse files
committed
Eradicated pir::does(...,'array'), replaced by nqp::islist
1 parent 8681f37 commit fd53616

File tree

5 files changed

+7
-11
lines changed

5 files changed

+7
-11
lines changed

docs/pir2nqp.todo

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,11 @@ pir::const::INTERPINFO_TOTAL_MEM_ALLOC
2525
pir::const::INTERPINFO_TOTAL_MEM_USED
2626
pir::const::INTERPINFO_TOTAL_PMCS
2727

28-
can be done now by lizmat
29-
pir::get_who__PP -> nqp::who
30-
pir::does
31-
2nd = array then nqp::islist
32-
2nd=hash then nqp::ishash
33-
3428
after jnthn's toqast branch is merged
3529
nqp::defined -> nqp::isconcrete
3630
pir::defined__IP -> nqp::isconcrete
31+
pir::get_who__PP -> nqp::who
32+
pir::does -> 2nd=hash then nqp::ishash
3733
pir::isa
3834
2nd arg = ResizablePMCArray, then nqp::islist
3935
2nd arg = hash then nqp::ishash

src/HLL/Actions.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class HLL::Actions {
77
}
88

99
method ints_to_string($ints) {
10-
if pir::does($ints, 'array') {
10+
if nqp::islist($ints) {
1111
my $result := '';
1212
for $ints {
1313
$result := $result ~ nqp::chr($_.ast);

src/HLL/CommandLine.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class HLL::CommandLine::Result {
109109
# how I miss p6's Hash.push
110110

111111
if nqp::existskey(%!options, $name) {
112-
if pir::does(%!options{$name}, 'array') {
112+
if nqp::islist(%!options{$name}) {
113113
nqp::push(%!options{$name}, $value);
114114
} else {
115115
%!options{$name} := [ %!options{$name}, $value ];

src/HLL/Compiler.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ class HLL::Compiler {
383383
method evalfiles($files, *@args, *%adverbs) {
384384
my $target := nqp::lc(%adverbs<target>);
385385
my $encoding := %adverbs<encoding>;
386-
my @files := pir::does($files, 'array') ?? $files !! [$files];
386+
my @files := nqp::islist($files) ?? $files !! [$files];
387387
$!user_progname := nqp::join(',', @files);
388388
my @codes;
389389
for @files {

src/QRegex/Cursor.nqp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ class NQPCursor does NQPCursorRole {
532532
}
533533

534534
method !INTERPOLATE($var) {
535-
if pir::does($var, 'array') {
535+
if nqp::islist($var) {
536536
my $maxlen := -1;
537537
my $cur := self.'!cursor_start'();
538538
my $pos := nqp::getattr_i($cur, $?CLASS, '$!from');
@@ -573,7 +573,7 @@ class NQPCursor does NQPCursorRole {
573573
method !INTERPOLATE_REGEX($var) {
574574
unless pir::is_invokable__IP($var) {
575575
my $rxcompiler := pir::compreg__Ps('QRegex::P6Regex');
576-
if pir::does($var, 'array') {
576+
if nqp::islist($var) {
577577
my $res := [];
578578
for $var {
579579
my $elem := $_;

0 commit comments

Comments
 (0)