Skip to content
Snippets Groups Projects
Commit c103cec1 authored by Mick Jordan's avatar Mick Jordan
Browse files

start fix for internal error tracing startup

parent a00233f8
No related branches found
No related tags found
No related merge requests found
...@@ -69,6 +69,7 @@ import com.oracle.truffle.r.runtime.data.model.RAbstractStringVector; ...@@ -69,6 +69,7 @@ import com.oracle.truffle.r.runtime.data.model.RAbstractStringVector;
import com.oracle.truffle.r.runtime.env.REnvironment; import com.oracle.truffle.r.runtime.env.REnvironment;
import com.oracle.truffle.r.runtime.env.REnvironment.PutException; import com.oracle.truffle.r.runtime.env.REnvironment.PutException;
import com.oracle.truffle.r.runtime.ffi.DLL; import com.oracle.truffle.r.runtime.ffi.DLL;
import com.oracle.truffle.r.runtime.nodes.RSyntaxNode;
/** /**
* Private, undocumented, {@code .Internal} and {@code .Primitive} functions transcribed from GnuR, * Private, undocumented, {@code .Internal} and {@code .Primitive} functions transcribed from GnuR,
...@@ -178,8 +179,6 @@ public class HiddenInternalFunctions { ...@@ -178,8 +179,6 @@ public class HiddenInternalFunctions {
@Child private CallInlineCacheNode callCache = CallInlineCacheNodeGen.create(); @Child private CallInlineCacheNode callCache = CallInlineCacheNodeGen.create();
@Child private CastIntegerNode castIntNode; @Child private CastIntegerNode castIntNode;
private final RCaller caller = RCallerHelper.InvalidRepresentation.instance;
private void initCast() { private void initCast() {
if (castIntNode == null) { if (castIntNode == null) {
CompilerDirectives.transferToInterpreterAndInvalidate(); CompilerDirectives.transferToInterpreterAndInvalidate();
...@@ -260,7 +259,8 @@ public class HiddenInternalFunctions { ...@@ -260,7 +259,8 @@ public class HiddenInternalFunctions {
RSerialize.CallHook callHook = new RSerialize.CallHook() { RSerialize.CallHook callHook = new RSerialize.CallHook() {
@Override @Override
public Object eval(Object arg) { public Object eval(Object arg) {
Object[] callArgs = RArguments.create(envhook, caller, null, RArguments.getDepth(frame) + 1, RArguments.getPromiseFrame(frame), new Object[]{arg}, SIGNATURE, null); Object[] callArgs = RArguments.create(envhook, (RCaller) getOriginalCall(), null, RArguments.getDepth(frame) + 1, RArguments.getPromiseFrame(frame), new Object[]{arg},
SIGNATURE, null);
return callCache.execute(SubstituteVirtualFrame.create(frame), envhook.getTarget(), callArgs); return callCache.execute(SubstituteVirtualFrame.create(frame), envhook.getTarget(), callArgs);
} }
}; };
...@@ -365,8 +365,6 @@ public class HiddenInternalFunctions { ...@@ -365,8 +365,6 @@ public class HiddenInternalFunctions {
private static final ArgumentsSignature SIGNATURE = ArgumentsSignature.get("e"); private static final ArgumentsSignature SIGNATURE = ArgumentsSignature.get("e");
@Child private CallInlineCacheNode callCache = CallInlineCacheNodeGen.create(); @Child private CallInlineCacheNode callCache = CallInlineCacheNodeGen.create();
private final RCaller caller = RCallerHelper.InvalidRepresentation.instance;
@Override @Override
protected void createCasts(CastBuilder casts) { protected void createCasts(CastBuilder casts) {
casts.toInteger(2).toInteger(3); casts.toInteger(2).toInteger(3);
...@@ -386,7 +384,8 @@ public class HiddenInternalFunctions { ...@@ -386,7 +384,8 @@ public class HiddenInternalFunctions {
RSerialize.CallHook callHook = new RSerialize.CallHook() { RSerialize.CallHook callHook = new RSerialize.CallHook() {
@Override @Override
public Object eval(Object arg) { public Object eval(Object arg) {
Object[] callArgs = RArguments.create(hook, caller, null, RArguments.getDepth(frame) + 1, RArguments.getPromiseFrame(frame), new Object[]{arg}, SIGNATURE, null); Object[] callArgs = RArguments.create(hook, (RCaller) getOriginalCall(), null, RArguments.getDepth(frame) + 1, RArguments.getPromiseFrame(frame), new Object[]{arg}, SIGNATURE,
null);
return callCache.execute(SubstituteVirtualFrame.create(frame), hook.getTarget(), callArgs); return callCache.execute(SubstituteVirtualFrame.create(frame), hook.getTarget(), callArgs);
} }
}; };
......
...@@ -1006,7 +1006,9 @@ public abstract class RCallNode extends RNode implements RSyntaxNode, RSyntaxCal ...@@ -1006,7 +1006,9 @@ public abstract class RCallNode extends RNode implements RSyntaxNode, RSyntaxCal
@Override @Override
public RSyntaxElement getSyntaxLHS() { public RSyntaxElement getSyntaxLHS() {
return getFunction() == null ? RSyntaxLookup.createDummyLookup(RSyntaxNode.LAZY_DEPARSE, "FUN", true) : getFunctionNode().asRSyntaxNode(); ForcePromiseNode func = getFunction();
RNode fn = getFunctionNode();
return getFunction() == null || getFunction().getValueNode() == null ? RSyntaxLookup.createDummyLookup(RSyntaxNode.LAZY_DEPARSE, "FUN", true) : getFunctionNode().asRSyntaxNode();
} }
@Override @Override
......
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