Skip to content
Snippets Groups Projects
Commit 728bce52 authored by Tomas Stupka's avatar Tomas Stupka
Browse files

fixed incorrect return in CopyMostAttrib, LockBinding and UnlockBinding nodes

parent 683831c3
No related branches found
No related tags found
No related merge requests found
......@@ -124,13 +124,13 @@ public final class AttributesAccessNodes {
@Child protected CopyOfRegAttributesNode copyRegAttributes;
@Specialization
public Object doList(RAttributeStorage x, RAttributeStorage y) {
public int doRAttributeStorage(RAttributeStorage x, RAttributeStorage y) {
if (copyRegAttributes == null) {
CompilerDirectives.transferToInterpreterAndInvalidate();
copyRegAttributes = CopyOfRegAttributesNode.create();
}
copyRegAttributes.execute(x, y);
return RNull.instance;
return 0;
}
@Fallback
......
......@@ -27,7 +27,6 @@ import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.dsl.TypeSystemReference;
import static com.oracle.truffle.r.ffi.impl.common.RFFIUtils.guaranteeInstanceOf;
import com.oracle.truffle.r.runtime.RInternalError;
import com.oracle.truffle.r.runtime.data.RNull;
import com.oracle.truffle.r.runtime.data.RSymbol;
import com.oracle.truffle.r.runtime.data.RTypes;
import com.oracle.truffle.r.runtime.env.REnvironment;
......@@ -38,14 +37,14 @@ public class EnvNodes {
public abstract static class LockBindingNode extends FFIUpCallNode.Arg2 {
@Specialization
Object lock(RSymbol sym, REnvironment env) {
int lock(RSymbol sym, REnvironment env) {
// TODO copied from EnvFunctions.LockBinding
env.lockBinding(sym.getName());
return RNull.instance;
return 0;
}
@Fallback
Object lock(Object sym, Object env) {
int lock(Object sym, Object env) {
guaranteeInstanceOf(sym, RSymbol.class);
guaranteeInstanceOf(env, REnvironment.class);
throw RInternalError.shouldNotReachHere();
......@@ -60,14 +59,14 @@ public class EnvNodes {
public abstract static class UnlockBindingNode extends FFIUpCallNode.Arg2 {
@Specialization
Object unlock(RSymbol sym, REnvironment env) {
int unlock(RSymbol sym, REnvironment env) {
// TODO copied from EnvFunctions.LockBinding
env.unlockBinding(sym.getName());
return RNull.instance;
return 0;
}
@Fallback
Object unlock(Object sym, Object env) {
int unlock(Object sym, Object env) {
guaranteeInstanceOf(sym, RSymbol.class);
guaranteeInstanceOf(env, REnvironment.class);
throw RInternalError.shouldNotReachHere();
......
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