Skip to content
Permalink
Browse files

We should always .STORE unless it's a List itself

Simplify the check for that
  • Loading branch information...
lizmat committed Nov 10, 2018
1 parent 1a2b39d commit 307a98bdb6d824c893127bdb8d64b4b9577f8835
Showing with 2 additions and 4 deletions.
  1. +2 −4 src/core/Hyper.pm6
@@ -95,8 +95,7 @@ class Hyper {
nqp::create(List), List, '$!reified', values
);
nqp::bind(result,nqp::clone(left).STORE(result))
if nqp::istype(left.WHAT,List) # a subtype of List
&& nqp::not_i(nqp::eqaddr(left.WHAT,List));
unless nqp::eqaddr(left.WHAT,List); # don't need to .STORE
nqp::iscont(left) ?? result.item !! result
}

@@ -125,8 +124,7 @@ class Hyper {
nqp::create(List), List, '$!reified', values
);
nqp::bind(result,nqp::clone(right).STORE(result))
if nqp::istype(right.WHAT,List) # a subtype of List
&& nqp::not_i(nqp::eqaddr(right.WHAT,List));
unless nqp::eqaddr(right.WHAT,List); # don't need to .STORE
nqp::iscont(right) ?? result.item !! result
}

0 comments on commit 307a98b

Please sign in to comment.
You can’t perform that action at this time.