Skip to content
Snippets Groups Projects
Commit 60dabb9b authored by Lukas Stadler's avatar Lukas Stadler
Browse files

[GR-5607] Clear last.warning during base package loading.

PullRequest: fastr/1112
parents e609287e f2503533
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,7 @@ import com.oracle.truffle.api.CompilerAsserts;
import com.oracle.truffle.api.RootCallTarget;
import com.oracle.truffle.api.Truffle;
import com.oracle.truffle.api.frame.FrameDescriptor;
import com.oracle.truffle.api.frame.FrameSlot;
import com.oracle.truffle.api.frame.MaterializedFrame;
import com.oracle.truffle.api.source.Source;
import com.oracle.truffle.r.nodes.builtin.base.BasePackage;
......@@ -116,6 +117,11 @@ public final class RBuiltinPackages implements RBuiltinLookup {
} catch (ParseException e) {
throw new RInternalError(e, "error while parsing base source from %s", baseSource.getName());
}
// forcibly clear last.warnings during startup:
FrameSlot slot = baseFrame.getFrameDescriptor().findFrameSlot("last.warning");
if (slot != null) {
FrameSlotChangeMonitor.setObject(baseFrame, slot, null);
}
} finally {
RContext.getInstance().setLoadingBase(false);
}
......
......@@ -91,14 +91,14 @@ public class BitwiseFunctions {
v = aVal ^ bVal;
break;
case SHIFTR:
if (bVal > 31) {
if (bVal > 31 || bVal < 0) {
v = RRuntime.INT_NA;
} else {
v = aVal >>> bVal;
}
break;
case SHIFTL:
if (bVal > 31) {
if (bVal > 31 || bVal < 0) {
v = RRuntime.INT_NA;
} else {
v = aVal << bVal;
......
......@@ -22,7 +22,6 @@
*/
package com.oracle.truffle.r.nodes.builtin.base;
import com.oracle.truffle.api.CompilerDirectives;
import static com.oracle.truffle.r.runtime.RDispatch.INTERNAL_GENERIC;
import static com.oracle.truffle.r.runtime.builtins.RBehavior.PURE;
import static com.oracle.truffle.r.runtime.builtins.RBuiltinKind.PRIMITIVE;
......@@ -31,8 +30,9 @@ import java.util.Arrays;
import java.util.function.DoublePredicate;
import java.util.function.IntPredicate;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.dsl.Fallback;
import com.oracle.truffle.api.dsl.ImportStatic;
import com.oracle.truffle.api.dsl.Specialization;
......@@ -112,7 +112,7 @@ public class IsFiniteFunctions {
protected RLogicalVector doFunConstant(RAbstractVector x, byte value) {
byte[] b = new byte[x.getLength()];
Arrays.fill(b, value);
return RDataFactory.createLogicalVector(b, RDataFactory.COMPLETE_VECTOR, getDims.getDimensions(x), getNames.getNames(x));
return transferDimNames(RDataFactory.createLogicalVector(b, RDataFactory.COMPLETE_VECTOR, getDims.getDimensions(x), getNames.getNames(x)), x);
}
protected RLogicalVector doFunDouble(RAbstractDoubleVector x, DoublePredicate fun) {
......
......@@ -94,3 +94,4 @@ FastR's grid implementation does not yet support:
FastR does not plan to implement the R graphics engine display list
and related functions. However, the grid display list is implemented.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment