Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove bandaid for JVM #898

Merged
merged 1 commit into from Oct 7, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
40 changes: 0 additions & 40 deletions src/core/metaops.pm
Expand Up @@ -109,9 +109,6 @@ proto sub METAOP_REDUCE_LEFT(|) { * }
multi sub METAOP_REDUCE_LEFT(\op, \triangle) {
if op.count > 2 and op.count < Inf {
my $count = op.count;
#?if jvm
my $ :=
#?endif
sub (+values) {
my \source = values.iterator;

Expand All @@ -134,9 +131,6 @@ multi sub METAOP_REDUCE_LEFT(\op, \triangle) {
}
}
else {
#?if jvm
my $ :=
#?endif
sub (+values) {
my \source = values.iterator;

Expand All @@ -157,9 +151,6 @@ multi sub METAOP_REDUCE_LEFT(\op, \triangle) {
multi sub METAOP_REDUCE_LEFT(\op) {
if op.count > 2 and op.count < Inf {
my $count = op.count;
#?if jvm
my $ :=
#?endif
sub (+values) {
my \iter = values.iterator;
my \first = iter.pull-one;
Expand All @@ -180,10 +171,6 @@ multi sub METAOP_REDUCE_LEFT(\op) {
}
}
else {
#?if jvm
my $ :=
#?endif

nqp::eqaddr(op,&infix:<+>)
?? &sum
!! sub (+values) {
Expand Down Expand Up @@ -218,9 +205,6 @@ proto sub METAOP_REDUCE_RIGHT(|) { * }
multi sub METAOP_REDUCE_RIGHT(\op, \triangle) {
if op.count > 2 and op.count < Inf {
my $count = op.count;
#?if jvm
my $ :=
#?endif
sub (+values) {
my \source = values.reverse.iterator;
my \first = source.pull-one;
Expand Down Expand Up @@ -259,9 +243,6 @@ multi sub METAOP_REDUCE_RIGHT(\op, \triangle) {
multi sub METAOP_REDUCE_RIGHT(\op) {
if op.count > 2 and op.count < Inf {
my $count = op.count;
#?if jvm
my $ :=
#?endif
sub (+values) {
my \iter = values.reverse.iterator;
my \first = iter.pull-one;
Expand All @@ -282,9 +263,6 @@ multi sub METAOP_REDUCE_RIGHT(\op) {
}
}
else {
#?if jvm
my $ :=
#?endif
sub (+values) {
my \iter = values.reverse.iterator;
my \first = iter.pull-one;
Expand All @@ -304,9 +282,6 @@ multi sub METAOP_REDUCE_RIGHT(\op) {

proto sub METAOP_REDUCE_LIST(|) { * }
multi sub METAOP_REDUCE_LIST(\op, \triangle) {
#?if jvm
my $ :=
#?endif
sub (+values) {
GATHER({
my @list;
Expand All @@ -318,17 +293,11 @@ multi sub METAOP_REDUCE_LIST(\op, \triangle) {
}
}
multi sub METAOP_REDUCE_LIST(\op) {
#?if jvm
my $ :=
#?endif
sub (+values) { op.(|values) }
}

proto sub METAOP_REDUCE_LISTINFIX(|) { * }
multi sub METAOP_REDUCE_LISTINFIX(\op, \triangle) {
#?if jvm
my $ :=
#?endif
sub (|values) {
my \p = values[0];
return () unless p.elems;
Expand All @@ -345,19 +314,13 @@ multi sub METAOP_REDUCE_LISTINFIX(\op, \triangle) {
}
}
multi sub METAOP_REDUCE_LISTINFIX(\op) {
#?if jvm
my $ :=
#?endif
sub (+values) {
op.(|values.map({nqp::decont($_)}));
}
}

proto sub METAOP_REDUCE_CHAIN(|) { * }
multi sub METAOP_REDUCE_CHAIN(\op, \triangle) {
#?if jvm
my $ :=
#?endif
sub (+values) {
my $state = True;
my \iter = values.iterator;
Expand All @@ -376,9 +339,6 @@ multi sub METAOP_REDUCE_CHAIN(\op, \triangle) {
}
}
multi sub METAOP_REDUCE_CHAIN(\op) {
#?if jvm
my $ :=
#?endif
sub (+values) {
my $state := True;
my \iter = values.iterator;
Expand Down