* This is the general case that performs all the computations at once. In the slowpath makes a copy of the lhs
* and determines if a copy of the rhs should be made and then runs the update of arrays for non-const rhs
* values (this will work for the const values too, of course).
*/
@Override public RAny execute(Frame frame, RAny lhsParam, RAny rhsParam) {
RAny lhs = lhsParam;
RAny rhs = rhsParam;
// 1. copy the rhs
ValueCopy.Impl rhsImpl = CopyRhs.determineCopyImplementation(lhs, rhs, selectorExprs.length, ast); // can be null if no copy is needed
if (rhsImpl != null) {
try {
rhs = rhsImpl.copy(rhs);
} catch (SpecializationException e) {
assert (false) : "unreachable";
}
}
// now the type of lhs <= type of rhs
ValueCopy.Impl lhsImpl = CopyLhs.determineCopyImplementation(lhs, rhs, selectorExprs.length, !subset, ast); // will not be null, will be an upcast or a duplicate
if (!(lhsImpl instanceof ValueCopy.Duplicate) || lhs.isShared() || rhs.dependsOn(lhs)) {
try {
lhs = lhsImpl.copy(lhs);
} catch (SpecializationException e) {
assert (false) : "unreachable";
}