Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
remove various GLR transitional XXX comments
  • Loading branch information
TimToady committed Sep 28, 2015
1 parent cd8ce4e commit 815eb48
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 100 deletions.
21 changes: 0 additions & 21 deletions src/core/Array.pm
Expand Up @@ -580,27 +580,6 @@ my class Array { # declared in BOOTSTRAP
!! fail X::Cannot::Empty.new(:action<shift>, :what(self.^name));
}

# XXX GLR
#method plan(Array:D: |args) is nodal {
# nqp::p6listitems(self);
# my $elems = self.gimme(*);
# fail X::Cannot::Lazy.new(:action('.plan to')) if $!nextiter.defined;
#
# # # need type checks?
# # my $of := self.of;
# #
# # unless $of =:= Mu {
# # X::TypeCheck.new(
# # operation => '.push',
# # expected => $of,
# # got => $_,
# # ).throw unless nqp::istype($_, $of) for @values;
# # }
#
# nqp::bindattr(self, List, '$!nextiter', nqp::p6listiter(nqp::list(args.list), self));
# Nil;
#}

proto method splice(|) is nodal { * }
multi method splice(Array:D \SELF: :$SINK) {
if $SINK {
Expand Down
15 changes: 0 additions & 15 deletions src/core/List.pm
Expand Up @@ -577,21 +577,6 @@ my class List does Iterable does Positional { # declared in BOOTSTRAP
$result;
}

# XXX GLR
#multi method DUMP(List:D: :$indent-step = 4, :%ctx?) {
# return DUMP(self, :$indent-step) unless %ctx;
#
# my $flags := ("\x221e" if self.infinite);
# my Mu $attrs := nqp::list();
# nqp::push($attrs, '$!flattens');
# nqp::push($attrs, $!flattens );
# nqp::push($attrs, '$!items' );
# nqp::push($attrs, $!items );
# nqp::push($attrs, '$!nextiter');
# nqp::push($attrs, $!nextiter );
# self.DUMP-OBJECT-ATTRS($attrs, :$indent-step, :%ctx, :$flags);
#}

multi method List(List:D:) { self }

multi method Slip(List:D:) {
Expand Down
21 changes: 0 additions & 21 deletions src/core/Nil.pm
Expand Up @@ -19,25 +19,4 @@ my class Nil is Cool { # declared in BOOTSTRAP
method FALLBACK(*@) { Nil }
}

# Like Nil, but allows a failsoft to nothingness when used as list.
#
# (Please avoid overusing Empty as a synonym for (). If the degenerate
# case of a list operation is naturally (), use () as a normal defined
# value. Empty is primarily intended for use in list comprehensions,
# which need to weed out unselected values with an implicit "else".)
# XXX GLR can we just have Empty as an empty Slip? Must it be a kind of
# Nil too?
#my class Empty is Nil {
# # class Empty is Iterator
# method new(*@) { Empty }
# multi method Bool() { False }
# multi method Int() { 0 }
# multi method end() { -1 }
# multi method Numeric() { 0 }
# method Str() { '' }
# method gist(*@) { 'Empty' }
# method iterator(*@) { self }
# method reify($n) { () }
#}

# vim: ft=perl6 expandtab sw=4
40 changes: 0 additions & 40 deletions src/core/Range.pm
Expand Up @@ -86,46 +86,6 @@ my class Range is Cool does Iterable does Positional {
nextsame;
}

# XXX GLR steal this logic into the (to be written) iterator for ranges.
#method reify($n) {
# my $count;
# my $cmpstop = $!excludes-max ?? 0 !! 1;
# my $realmax = nqp::istype($!min, Numeric) && !nqp::istype($!max, Callable) && !nqp::istype($!max, Whatever)
# ?? $!max.Numeric
# !! $!max;
#
# if nqp::istype($value, Num) {
# # optimized for num ranges
# $value = $value.Num;
# my $max = $!max.Num;
# my $box_int = nqp::p6bool(nqp::istype($!min, Int));
# my num $nvalue = $value;
# my num $ncount = $count;
# my num $nmax = $max;
# my int $icmpstop = $cmpstop;
# my int $ibox_int = $box_int;
# nqp::while(
# (nqp::isgt_n($ncount, 0e0) && nqp::islt_i(nqp::cmp_n($nvalue, $nmax), $icmpstop)),
# nqp::stmts(
# nqp::push($rpa, $ibox_int
# ?? nqp::p6box_i($nvalue)
# !! nqp::p6box_n($nvalue)),
# ($nvalue = nqp::add_n($nvalue, 1e0)),
# ($ncount = nqp::sub_n($ncount, 1e0))
# ));
# $value = nqp::p6box_i($nvalue);
# }
# else {
# SEQ(nqp::push($rpa, $value++); $count--)
# while $count > 0 && ($value cmp $realmax) < $cmpstop;
# }
# if ($value cmp $!max) < $cmpstop {
# nqp::push($rpa,
# ($value.succ cmp $!max < $cmpstop)
# ?? nqp::create(self).BUILD($value, $!max, 0, $!excludes-max)
# !! $value);
# }
#}
method iterator() {
# Obtain starting value.
my $value = $!excludes-min ?? $!min.succ !! $!min;
Expand Down
3 changes: 0 additions & 3 deletions src/core/asyncops.pm
Expand Up @@ -73,7 +73,6 @@ sub EARLIEST(@earliest,*@other,:$wild_done,:$wild_more,:$wait,:$wait_time) {

for @contestant {
%channels-by-kind{$kind}{$_.WHICH} = $_;
# XXX GLR .item necessary ??
@todo.push: [ +@todo, $kind, $_, &block ].item;
}
}
Expand All @@ -89,14 +88,12 @@ sub EARLIEST(@earliest,*@other,:$wild_done,:$wild_more,:$wait,:$wait_time) {

if $wild_more.defined {
if not %channels-by-kind{$EARLIEST_KIND_MORE}{$n}:exists {
# XXX GLR .item necessary ??
@todo.push: [ +@todo, $EARLIEST_KIND_MORE, $_, $wild_more ].item;
%distinct-channels{$n} = $_;
}
}
if $wild_done.defined {
if not %channels-by-kind{$EARLIEST_KIND_DONE}{$n}:exists {
# XXX GLR .item necessary ??
@todo.push: [ +@todo, $EARLIEST_KIND_DONE, $_, $wild_done ].item;
%distinct-channels{$n} = $_;
}
Expand Down

0 comments on commit 815eb48

Please sign in to comment.