Skip to content

Commit

Permalink
Update tools/build/makeNATIVE_SHAPED_ARRAY.pl6
Browse files Browse the repository at this point in the history
Make it stop emitting the lack of multidimref_* ops workaround
  • Loading branch information
pmurias committed Oct 26, 2017
1 parent 580a232 commit f434e34
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions tools/build/makeNATIVE_SHAPED_ARRAY.pl6
Expand Up @@ -56,12 +56,7 @@ for $*IN.lines -> $line {
nqp::isge_i(($numdims = nqp::sub_i($numdims,1)),0),
nqp::push_i($idxs,nqp::shift($indices))
),
#?if moar
nqp::multidimref_#postfix#(self,$idxs)
#?endif
#?if !moar
nqp::atposnd_#postfix#(self,$idxs)
#?endif
),
nqp::if(
nqp::isgt_i($numind,$numdims),
Expand Down Expand Up @@ -121,12 +116,7 @@ for $*IN.lines -> $line {
}
method result(--> Nil) {
nqp::bindposnd_#postfix#($!list,$!indices,
#?if moar
nqp::multidimref_#postfix#($!from,$!indices))
#?endif
#?if !moar
nqp::atposnd_#postfix#($!from,$!indices))
#?endif
}
}.new(to,from).sink-all;
to
Expand Down Expand Up @@ -259,12 +249,7 @@ for $*IN.lines -> $line {
method iterator(::?CLASS:D:) {
class :: does Rakudo::Iterator::ShapeLeaf {
method result() is raw {
#?if moar
nqp::multidimref_#postfix#($!list,nqp::clone($!indices))
#?endif
#?if !moar
nqp::atposnd_#postfix#($!list,nqp::clone($!indices))
#?endif
}
}.new(self)
}
Expand All @@ -280,12 +265,7 @@ for $*IN.lines -> $line {
nqp::sub_i(nqp::atpos_i($!indices,$!maxdim),1))),
$result
),
#?if moar
nqp::multidimref_#postfix#($!list,nqp::clone($!indices))
#?endif
#?if !moar
nqp::atposnd_#postfix#($!list,nqp::clone($!indices))
#?endif
)
}
# needs its own push-all since it fiddles with $!indices
Expand All @@ -302,12 +282,7 @@ for $*IN.lines -> $line {
method result() {
Pair.new(
self.indices,
#?if moar
nqp::multidimref_#postfix#($!list,nqp::clone($!indices))
#?endif
#?if !moar
nqp::atposnd_#postfix#($!list,nqp::clone($!indices))
#?endif
)
}
}.new(self))
Expand Down Expand Up @@ -498,20 +473,10 @@ for $*IN.lines -> $line {
role shaped2#type#array does shaped#type#array {
multi method AT-POS(::?CLASS:D: int \one, int \two) is raw {
#?if moar
nqp::multidimref_#postfix#(self,nqp::list_i(one, two))
#?endif
#?if !moar
nqp::atpos2d_#postfix#(self,one,two)
#?endif
}
multi method AT-POS(::?CLASS:D: Int:D \one, Int:D \two) is raw {
#?if moar
nqp::multidimref_#postfix#(self,nqp::list_i(one, two))
#?endif
#?if !moar
nqp::atpos2d_#postfix#(self,one,two)
#?endif
}
multi method ASSIGN-POS(::?CLASS:D: int \one, int \two, #Type#:D \value) {
Expand Down Expand Up @@ -541,20 +506,10 @@ for $*IN.lines -> $line {
role shaped3#type#array does shaped#type#array {
multi method AT-POS(::?CLASS:D: int \one, int \two, int \three) is raw {
#?if moar
nqp::multidimref_#postfix#(self,nqp::list_i(one, two, three))
#?endif
#?if !moar
nqp::atpos3d_#postfix#(self,one,two,three)
#?endif
}
multi method AT-POS(::?CLASS:D: Int:D \one, Int:D \two, Int:D \three) is raw {
#?if moar
nqp::multidimref_#postfix#(self,nqp::list_i(one, two, three))
#?endif
#?if !moar
nqp::atpos3d_#postfix#(self,one,two,three)
#?endif
}
multi method ASSIGN-POS(::?CLASS:D: int \one, int \two, int \three, #Type#:D \value) {
Expand Down

0 comments on commit f434e34

Please sign in to comment.