Skip to content
Snippets Groups Projects
Commit cbc61dd7 authored by Adam Welc's avatar Adam Welc
Browse files

Handling both types of call nodes when creating a call.

parent da4cf0a0
Branches
No related tags found
No related merge requests found
...@@ -33,6 +33,7 @@ import com.oracle.truffle.r.nodes.access.ReadVariadicComponentNode; ...@@ -33,6 +33,7 @@ import com.oracle.truffle.r.nodes.access.ReadVariadicComponentNode;
import com.oracle.truffle.r.nodes.access.variables.ReadVariableNode; import com.oracle.truffle.r.nodes.access.variables.ReadVariableNode;
import com.oracle.truffle.r.nodes.builtin.RBuiltinNode; import com.oracle.truffle.r.nodes.builtin.RBuiltinNode;
import com.oracle.truffle.r.nodes.function.PromiseNode.VarArgNode; import com.oracle.truffle.r.nodes.function.PromiseNode.VarArgNode;
import com.oracle.truffle.r.nodes.function.RCallBaseNode;
import com.oracle.truffle.r.nodes.function.RCallNode; import com.oracle.truffle.r.nodes.function.RCallNode;
import com.oracle.truffle.r.nodes.function.WrapArgumentBaseNode; import com.oracle.truffle.r.nodes.function.WrapArgumentBaseNode;
import com.oracle.truffle.r.nodes.function.WrapArgumentNode; import com.oracle.truffle.r.nodes.function.WrapArgumentNode;
...@@ -237,8 +238,8 @@ public class RASTUtils { ...@@ -237,8 +238,8 @@ public class RASTUtils {
SourceSection sourceSection = sourceUnavailable ? RSyntaxNode.SOURCE_UNAVAILABLE : RSyntaxNode.EAGER_DEPARSE; SourceSection sourceSection = sourceUnavailable ? RSyntaxNode.SOURCE_UNAVAILABLE : RSyntaxNode.EAGER_DEPARSE;
if (fn instanceof ReadVariableNode) { if (fn instanceof ReadVariableNode) {
return RCallNode.createCall(sourceSection, (ReadVariableNode) fn, signature, arguments); return RCallNode.createCall(sourceSection, (ReadVariableNode) fn, signature, arguments);
} else if (fn instanceof RCallNode) { } else if (fn instanceof RCallBaseNode) {
return RCallNode.createCall(sourceSection, (RCallNode) fn, signature, arguments); return RCallNode.createCall(sourceSection, (RCallBaseNode) fn, signature, arguments);
} else { } else {
// apart from RFunction, this of course would not make much sense if trying to evaluate // apart from RFunction, this of course would not make much sense if trying to evaluate
// this call, yet it's syntactically possible, for example as a result of: // this call, yet it's syntactically possible, for example as a result of:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment