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

remove unused fields in DispatchedCallNode

parent c6900fac
No related branches found
No related tags found
No related merge requests found
......@@ -22,11 +22,9 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
public abstract class DispatchedCallNode extends RNode {
private static final int INLINE_CACHE_SIZE = 4;
protected Object[] args;
protected RNode[] argNodes;
public static DispatchedCallNode create(final String genericName, final String dispatchType, String[] suppliedArgsNames) {
return new UninitializedDispatchedCallNode(genericName, dispatchType, suppliedArgsNames);
return new UninitializedDispatchedCallNode(genericName, dispatchType, null, suppliedArgsNames);
}
public static DispatchedCallNode create(final String genericName, final String dispatchType, final Object[] args, String[] suppliedArgsNames) {
......@@ -48,30 +46,28 @@ public abstract class DispatchedCallNode extends RNode {
public abstract Object execute(VirtualFrame frame, RStringVector type);
public abstract Object executeInternal(VirtualFrame frame, RStringVector type, @SuppressWarnings("hiding") Object[] args);
public abstract Object executeInternal(VirtualFrame frame, RStringVector type, Object[] args);
private static final class UninitializedDispatchedCallNode extends DispatchedCallNode {
protected final int depth;
protected final String genericName;
protected final String dispatchType;
protected final String[] suppliedArgsNames;
protected final Object[] args;
public UninitializedDispatchedCallNode(final String genericName, final String dispatchType, String[] suppliedArgsNames) {
this.genericName = genericName;
this.depth = 0;
this.dispatchType = dispatchType;
this.suppliedArgsNames = suppliedArgsNames;
}
private UninitializedDispatchedCallNode(final UninitializedDispatchedCallNode copy, final int depth) {
private UninitializedDispatchedCallNode(UninitializedDispatchedCallNode copy, int depth) {
this.genericName = copy.genericName;
this.dispatchType = copy.dispatchType;
this.depth = depth;
this.suppliedArgsNames = copy.suppliedArgsNames;
this.args = null;
}
public UninitializedDispatchedCallNode(final String genericName, final String dispatchType, final Object[] args, String[] suppliedArgsNames) {
this(genericName, dispatchType, suppliedArgsNames);
public UninitializedDispatchedCallNode(String genericName, String dispatchType, Object[] args, String[] suppliedArgsNames) {
this.depth = 0;
this.genericName = genericName;
this.dispatchType = dispatchType;
this.suppliedArgsNames = suppliedArgsNames;
this.args = args;
}
......
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