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

fix merge problem

parent 438cafea
Branches
No related tags found
No related merge requests found
......@@ -61,6 +61,8 @@ import com.oracle.truffle.r.runtime.data.RPromise;
import com.oracle.truffle.r.runtime.data.RTypedValue;
import com.oracle.truffle.r.runtime.env.RScope;
import com.oracle.truffle.r.runtime.ffi.RFFIFactory;
import com.oracle.truffle.r.runtime.interop.R2Foreign;
import com.oracle.truffle.r.runtime.interop.R2ForeignNodeGen;
import com.oracle.truffle.r.runtime.nodes.RBaseNode;
import com.oracle.truffle.r.runtime.nodes.RSyntaxNode;
......@@ -71,7 +73,7 @@ public final class TruffleRLanguageImpl extends TruffleRLanguage implements Scop
private final HashMap<String, RFunction> builtinFunctionCache = new HashMap<>();
@Override
public final HashMap<String, RFunction> getBuiltinFunctionCache() {
public HashMap<String, RFunction> getBuiltinFunctionCache() {
return builtinFunctionCache;
}
......@@ -235,13 +237,15 @@ public final class TruffleRLanguageImpl extends TruffleRLanguage implements Scop
}
}
private static final R2Foreign r2foreign = R2ForeignNodeGen.create();
@Override
protected Object lookupSymbol(RContext context, String symbolName) {
Object value = context.stateREnvironment.getGlobalEnv().get(symbolName);
if (value instanceof RPromise) {
value = PromiseHelperNode.evaluateSlowPath((RPromise) value);
}
return value != null ? RRuntime.r2Java(value) : null;
return value != null ? r2foreign.execute(value) : null;
}
@Override
......
......@@ -711,7 +711,7 @@ public class FastRInterop {
private final ConditionProfile isArrayProfile = ConditionProfile.createBinaryProfile();
protected ForeignArray2R createForeignArray2R(TruffleObject obj) {
protected ForeignArray2R createForeignArray2R() {
return ForeignArray2RNodeGen.create();
}
......@@ -719,7 +719,7 @@ public class FastRInterop {
@TruffleBoundary
public Object fromArray(TruffleObject obj,
@Cached("HAS_SIZE.createNode()") Node hasSize,
@Cached("createForeignArray2R(obj)") ForeignArray2R array2R) {
@Cached("createForeignArray2R()") ForeignArray2R array2R) {
if (isArrayProfile.profile(ForeignAccess.sendHasSize(hasSize, obj))) {
return array2R.execute(obj);
} else {
......@@ -728,7 +728,7 @@ public class FastRInterop {
}
@Fallback
public Object fromObject(Object obj) {
public Object fromObject(@SuppressWarnings("unused") Object obj) {
throw error(RError.Message.GENERIC, "not a java array");
}
}
......
......@@ -127,7 +127,7 @@ public abstract class R2Foreign extends RBaseNode {
}
@Specialization
public TruffleObject doNull(RNull obj) {
public TruffleObject doNull(@SuppressWarnings("unused") RNull obj) {
// TODO this is java interop specific
return JavaInterop.asTruffleObject(null);
}
......@@ -136,5 +136,4 @@ public abstract class R2Foreign extends RBaseNode {
public static Object doObject(Object obj) {
return obj;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment