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

rename sourceSectionR to sourceSection where appropriate

parent 02753a4d
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,6 @@ import com.oracle.truffle.api.frame.FrameDescriptor;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.RootNode;
import com.oracle.truffle.api.profiles.ConditionProfile;
import com.oracle.truffle.api.source.SourceSection;
import com.oracle.truffle.r.nodes.builtin.RBuiltinFactory;
import com.oracle.truffle.r.nodes.builtin.RBuiltinNode;
import com.oracle.truffle.r.nodes.function.FormalArguments;
......@@ -54,20 +53,12 @@ public abstract class RRootNode extends RootNode implements HasSignature {
private FastPathFactory fastPath;
protected RRootNode(SourceSection src, FormalArguments formalArguments, FrameDescriptor frameDescriptor, FastPathFactory fastPath) {
super(RContext.getRForeignAccessFactory().getTruffleLanguage(), checkSourceSection(src), frameDescriptor);
protected RRootNode(FormalArguments formalArguments, FrameDescriptor frameDescriptor, FastPathFactory fastPath) {
super(RContext.getRForeignAccessFactory().getTruffleLanguage(), RSyntaxNode.SOURCE_UNAVAILABLE, frameDescriptor);
this.formalArguments = formalArguments;
this.fastPath = fastPath;
}
private static SourceSection checkSourceSection(SourceSection src) {
if (src == null) {
return RSyntaxNode.SOURCE_UNAVAILABLE;
} else {
return src;
}
}
@Override
public abstract RootCallTarget duplicateWithNewFrameDescriptor();
......
......@@ -48,7 +48,7 @@ public final class RBuiltinRootNode extends RRootNode {
private final RBuiltinFactory factory;
RBuiltinRootNode(RBuiltinFactory factory, RBuiltinNode builtin, FormalArguments formalArguments, FrameDescriptor frameDescriptor, FastPathFactory fastPath) {
super(null, formalArguments, frameDescriptor, fastPath);
super(formalArguments, frameDescriptor, fastPath);
this.factory = factory;
this.builtin = builtin;
this.args = new AccessArgumentNode[factory.getSignature().getLength()];
......
......@@ -135,7 +135,7 @@ public final class FunctionDefinitionNode extends RRootNode implements RSyntaxNo
private FunctionDefinitionNode(SourceSection src, FrameDescriptor frameDesc, SourceSection[] argSourceSections, RNode saveArguments, RSyntaxNode body, FormalArguments formals,
String name, PostProcessArgumentsNode argPostProcess) {
super(null, formals, frameDesc, RASTBuilder.createFunctionFastPath(body, formals.getSignature()));
super(formals, frameDesc, RASTBuilder.createFunctionFastPath(body, formals.getSignature()));
this.argSourceSections = argSourceSections;
assert FrameSlotChangeMonitor.isValidFrameDescriptor(frameDesc);
assert src != null;
......
......@@ -112,23 +112,23 @@ public abstract class RCallNode extends RCallBaseNode implements RSyntaxNode, RS
// currently cannot be RSourceSectionNode because of TruffleDSL restrictions
@CompilationFinal private SourceSection sourceSectionR;
@CompilationFinal private SourceSection sourceSection;
@Override
public final void setSourceSection(SourceSection sourceSection) {
assert sourceSection != null;
this.sourceSectionR = sourceSection;
this.sourceSection = sourceSection;
}
@Override
public final SourceSection getLazySourceSection() {
return sourceSectionR;
return sourceSection;
}
@Override
public final SourceSection getSourceSection() {
RDeparse.ensureSourceSection(this);
return sourceSectionR;
return sourceSection;
}
protected abstract ForcePromiseNode getFunction();
......@@ -164,7 +164,7 @@ public abstract class RCallNode extends RCallBaseNode implements RSyntaxNode, RS
protected RCallNode(SourceSection sourceSection, RSyntaxNode[] arguments, ArgumentsSignature signature) {
assert sourceSection != null;
this.sourceSectionR = sourceSection;
this.sourceSection = sourceSection;
this.arguments = arguments;
this.explicitArgs = null;
this.varArgIndexes = getVarArgIndexes(arguments);
......@@ -184,7 +184,7 @@ public abstract class RCallNode extends RCallBaseNode implements RSyntaxNode, RS
protected RCallNode(SourceSection sourceSection, Object explicitArgsIdentifier) {
assert sourceSection != null;
this.sourceSectionR = sourceSection;
this.sourceSection = sourceSection;
this.arguments = null;
this.explicitArgs = LocalReadVariableNode.create(explicitArgsIdentifier, false);
this.varArgIndexes = null;
......
......@@ -98,23 +98,23 @@ public final class RCallSpecialNode extends RCallBaseNode implements RSyntaxNode
private static final boolean useSpecials = FastROptions.UseSpecials.getBooleanValue();
// currently cannot be RSourceSectionNode because of TruffleDSL restrictions
@CompilationFinal private SourceSection sourceSectionR;
@CompilationFinal private SourceSection sourceSection;
@Override
public void setSourceSection(SourceSection sourceSection) {
assert sourceSection != null;
this.sourceSectionR = sourceSection;
this.sourceSection = sourceSection;
}
@Override
public SourceSection getLazySourceSection() {
return sourceSectionR;
return sourceSection;
}
@Override
public SourceSection getSourceSection() {
RDeparse.ensureSourceSection(this);
return sourceSectionR;
return sourceSection;
}
@Child private ForcePromiseNode functionNode;
......@@ -136,7 +136,7 @@ public final class RCallSpecialNode extends RCallBaseNode implements RSyntaxNode
private RCallSpecialNode callSpecialParent;
private RCallSpecialNode(SourceSection sourceSection, RNode functionNode, RFunction expectedFunction, RSyntaxNode[] arguments, ArgumentsSignature signature, RNode special) {
this.sourceSectionR = sourceSection;
this.sourceSection = sourceSection;
this.expectedFunction = expectedFunction;
this.special = special;
this.functionNode = new ForcePromiseNode(functionNode);
......@@ -272,7 +272,7 @@ public final class RCallSpecialNode extends RCallBaseNode implements RSyntaxNode
}
private RCallNode getRCallNode(RSyntaxNode[] newArguments) {
return RCallNode.createCall(sourceSectionR, functionNode == null ? null : functionNode.getValueNode(), signature, newArguments);
return RCallNode.createCall(sourceSection, functionNode == null ? null : functionNode.getValueNode(), signature, newArguments);
}
private RCallNode getRCallNode() {
......
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