From 85cb339f88293640bd9bf7d2d7cd93969de8d916 Mon Sep 17 00:00:00 2001
From: Florian Angerer <florian.angerer@oracle.com>
Date: Wed, 13 Dec 2017 13:41:34 +0100
Subject: [PATCH] Using 'asAbstractVector' instead of 'BoxPrimitiveNode'.

---
 .../nodes/access/vector/CachedExtractVectorNode.java  | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/CachedExtractVectorNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/CachedExtractVectorNode.java
index 5101c995fa..157f94597a 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/CachedExtractVectorNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/CachedExtractVectorNode.java
@@ -39,7 +39,6 @@ import com.oracle.truffle.r.nodes.attributes.SpecialAttributesFunctions.GetDimNa
 import com.oracle.truffle.r.nodes.attributes.SpecialAttributesFunctions.GetNamesAttributeNode;
 import com.oracle.truffle.r.nodes.attributes.SpecialAttributesFunctions.SetDimAttributeNode;
 import com.oracle.truffle.r.nodes.attributes.SpecialAttributesFunctions.SetDimNamesAttributeNode;
-import com.oracle.truffle.r.nodes.binary.BoxPrimitiveNode;
 import com.oracle.truffle.r.nodes.profile.AlwaysOnBranchProfile;
 import com.oracle.truffle.r.nodes.profile.VectorLengthProfile;
 import com.oracle.truffle.r.runtime.RRuntime;
@@ -81,8 +80,6 @@ final class CachedExtractVectorNode extends CachedVectorNode {
     @Child private GetDimNamesAttributeNode getDimNamesNode;
     @Child private GetNamesAttributeNode getNamesNode;
     @Child private GetNamesAttributeNode getNamesFromDimNamesNode;
-    @Child private BoxPrimitiveNode boxOldDimNames;
-    @Child private BoxPrimitiveNode boxNewDimName;
     @Children private final CachedExtractVectorNode[] extractNames;
     @Children private final CachedExtractVectorNode[] extractNamesAlternative;
 
@@ -283,13 +280,7 @@ final class CachedExtractVectorNode extends CachedVectorNode {
                     } else if (positionsCheckNode.isEmptyPosition(i, positions[i])) {
                         result = RNull.instance;
                     } else {
-                        if (boxOldDimNames == null) {
-                            boxOldDimNames = insert(BoxPrimitiveNode.create());
-                        }
-                        if (boxNewDimName == null) {
-                            boxNewDimName = insert(BoxPrimitiveNode.create());
-                        }
-                        result = boxNewDimName.execute(extract(i, (RAbstractStringVector) boxOldDimNames.execute(dataAt), positions[i], positionProfile[i]));
+                        result = RRuntime.asAbstractVector(extract(i, (RAbstractStringVector) RRuntime.asAbstractVector(dataAt), positions[i], positionProfile[i]));
                     }
                     newDimNames[dimIndex] = result;
                     if (newDimNamesNames != null) {
-- 
GitLab