From f3901a2b80b82c9835e65b41d69d140625924b75 Mon Sep 17 00:00:00 2001
From: Lukas Stadler <lukas.stadler@oracle.com>
Date: Tue, 19 Aug 2014 13:48:37 +0200
Subject: [PATCH] remove unused fields in DispatchedCallNode

---
 .../r/nodes/function/DispatchedCallNode.java  | 24 ++++++++-----------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/DispatchedCallNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/DispatchedCallNode.java
index b25c2d628e..166760001d 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/DispatchedCallNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/DispatchedCallNode.java
@@ -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;
         }
 
-- 
GitLab