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

Merge pull request #536 in G/fastr from...

Merge pull request #536 in G/fastr from ~LUKAS.STADLER_ORACLE.COM/fastr:feature/no_context_in_S4 to master

* commit 'ee0ad739':
  no context needed in internal S4 calls
parents 60c00209 ee0ad739
No related branches found
No related tags found
No related merge requests found
......@@ -81,7 +81,7 @@ public abstract class AccessSlotNode extends RNode {
// TODO: any way to cache it or use a mechanism similar to overrides?
REnvironment methodsNamespace = REnvironment.getRegisteredNamespace("methods");
RFunction dataPart = getDataPartFunction(methodsNamespace);
return RContext.getEngine().evalFunction(dataPart, methodsNamespace.getFrame(), RCaller.create(Utils.getActualCurrentFrame(), RASTUtils.getOriginalCall(this)), null, object);
return RContext.getEngine().evalFunction(dataPart, methodsNamespace.getFrame(), RCaller.create(null, RASTUtils.getOriginalCall(this)), null, object);
} else if (name == RRuntime.NAMES_ATTR_KEY && object instanceof RAbstractVector) {
assert false; // RS4Object can never be a vector?
return RNull.instance;
......@@ -134,7 +134,7 @@ public abstract class AccessSlotNode extends RNode {
// TODO: any way to cache it or use a mechanism similar to overrides?
REnvironment methodsNamespace = REnvironment.getRegisteredNamespace("methods");
RFunction dataPart = getDataPartFunction(methodsNamespace);
return RContext.getEngine().evalFunction(dataPart, methodsNamespace.getFrame(), RCaller.create(Utils.getActualCurrentFrame(), RASTUtils.getOriginalCall(this)), null, object);
return RContext.getEngine().evalFunction(dataPart, methodsNamespace.getFrame(), RCaller.create(null, RASTUtils.getOriginalCall(this)), null, object);
}
// this is really a fallback specialization but @Fallback does not work here (because of the
......
......@@ -62,7 +62,7 @@ public abstract class UpdateSlotNode extends RNode {
String identifier = "setDataPart";
Object f = methodsNamespace.findFunction(identifier);
RFunction dataPart = (RFunction) RContext.getRRuntimeASTAccess().forcePromise(identifier, f);
return RContext.getEngine().evalFunction(dataPart, methodsNamespace.getFrame(), RCaller.create(Utils.getActualCurrentFrame(), RASTUtils.getOriginalCall(this)), null, object,
return RContext.getEngine().evalFunction(dataPart, methodsNamespace.getFrame(), RCaller.create(null, RASTUtils.getOriginalCall(this)), null, object,
prepareValue(value),
RRuntime.LOGICAL_TRUE);
}
......
......@@ -40,7 +40,6 @@ import com.oracle.truffle.r.nodes.unary.CastToVectorNode;
import com.oracle.truffle.r.nodes.unary.UnaryNode;
import com.oracle.truffle.r.runtime.RCaller;
import com.oracle.truffle.r.runtime.RInternalError;
import com.oracle.truffle.r.runtime.Utils;
import com.oracle.truffle.r.runtime.context.RContext;
import com.oracle.truffle.r.runtime.data.RArgsValuesAndNames;
import com.oracle.truffle.r.runtime.data.RAttributable;
......@@ -188,8 +187,7 @@ abstract class S4Class extends RBaseNode {
// the assumption here is that the R function can only return either a String or
// RStringVector
s4Extends = (RStringVector) castToVector.execute(
RContext.getEngine().evalFunction(sExtendsForS3Function, methodsEnv.getFrame(), RCaller.create(Utils.getActualCurrentFrame(), RASTUtils.getOriginalCall(this)), null,
classAttr));
RContext.getEngine().evalFunction(sExtendsForS3Function, methodsEnv.getFrame(), RCaller.create(null, RASTUtils.getOriginalCall(this)), null, classAttr));
RContext.getInstance().putS4Extends(classAttr, s4Extends);
}
return s4Extends;
......
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