From 1b75ff1958ff5b15761b798280e5e1410645054d Mon Sep 17 00:00:00 2001
From: Lukas Stadler <lukas.stadler@oracle.com>
Date: Mon, 12 Jun 2017 11:25:06 +0200
Subject: [PATCH] =?UTF-8?q?do=20not=20use=20=E2=80=9Cnull=E2=80=9D=20sourc?=
 =?UTF-8?q?e=20sections?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../src/com/oracle/truffle/r/engine/TruffleRLanguage.java  | 3 ++-
 .../r/engine/interop/RAbstractVectorAccessFactory.java     | 7 ++++---
 .../oracle/truffle/r/ffi/impl/nodes/FFIUpCallRootNode.java | 3 ++-
 .../r/nodes/builtin/base/printer/ValuePrinterNode.java     | 3 ++-
 .../src/com/oracle/truffle/r/nodes/test/TestUtilities.java | 3 ++-
 .../src/com/oracle/truffle/r/runtime/ffi/DLL.java          | 3 ++-
 .../src/com/oracle/truffle/r/runtime/ffi/RFFIRootNode.java | 4 ++--
 .../src/com/oracle/truffle/r/runtime/rng/user/UserRNG.java | 3 ++-
 8 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/TruffleRLanguage.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/TruffleRLanguage.java
index 321e133d8f..f338f48f21 100644
--- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/TruffleRLanguage.java
+++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/TruffleRLanguage.java
@@ -59,6 +59,7 @@ import com.oracle.truffle.r.runtime.data.RTypedValue;
 import com.oracle.truffle.r.runtime.env.RScope;
 import com.oracle.truffle.r.runtime.ffi.RFFIFactory;
 import com.oracle.truffle.r.runtime.nodes.RBaseNode;
+import com.oracle.truffle.r.runtime.nodes.RSyntaxNode;
 
 /**
  * Only does the minimum for running under the debugger. It is not completely clear how to correctly
@@ -203,7 +204,7 @@ public final class TruffleRLanguage extends TruffleLanguage<RContext> implements
             } catch (IncompleteSourceException e) {
                 throw new com.oracle.truffle.api.vm.IncompleteSourceException(e);
             } catch (ParseException e) {
-                return Truffle.getRuntime().createCallTarget(new RootNode(TruffleRLanguage.class, null, new FrameDescriptor()) {
+                return Truffle.getRuntime().createCallTarget(new RootNode(TruffleRLanguage.class, RSyntaxNode.INTERNAL, new FrameDescriptor()) {
                     @Override
                     public Object execute(VirtualFrame frame) {
                         try {
diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RAbstractVectorAccessFactory.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RAbstractVectorAccessFactory.java
index 599364a700..f8ccccd8b6 100644
--- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RAbstractVectorAccessFactory.java
+++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RAbstractVectorAccessFactory.java
@@ -42,6 +42,7 @@ import com.oracle.truffle.r.runtime.context.RContext;
 import com.oracle.truffle.r.runtime.context.RContext.RCloseable;
 import com.oracle.truffle.r.runtime.data.RLogical;
 import com.oracle.truffle.r.runtime.data.model.RAbstractVector;
+import com.oracle.truffle.r.runtime.nodes.RSyntaxNode;
 
 public final class RAbstractVectorAccessFactory implements Factory26 {
 
@@ -51,7 +52,7 @@ public final class RAbstractVectorAccessFactory implements Factory26 {
 
         @SuppressWarnings("deprecation")
         VectorSizeNode() {
-            super(TruffleRLanguage.class, null, null);
+            super(TruffleRLanguage.class, RSyntaxNode.INTERNAL, null);
         }
 
         @Override
@@ -69,7 +70,7 @@ public final class RAbstractVectorAccessFactory implements Factory26 {
 
         @SuppressWarnings("deprecation")
         VectorReadNode() {
-            super(TruffleRLanguage.class, null, null);
+            super(TruffleRLanguage.class, RSyntaxNode.INTERNAL, null);
             this.lengthAccess = false;
         }
 
@@ -99,7 +100,7 @@ public final class RAbstractVectorAccessFactory implements Factory26 {
     private abstract class InteropRootNode extends RootNode {
         @SuppressWarnings("deprecation")
         InteropRootNode() {
-            super(TruffleRLanguage.class, null, null);
+            super(TruffleRLanguage.class, RSyntaxNode.INTERNAL, null);
         }
     }
 
diff --git a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/FFIUpCallRootNode.java b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/FFIUpCallRootNode.java
index 09da32ca1c..46a70b614e 100644
--- a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/FFIUpCallRootNode.java
+++ b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/FFIUpCallRootNode.java
@@ -41,6 +41,7 @@ import com.oracle.truffle.r.ffi.impl.nodes.MiscNodesFactory.RDoSlotAssignNodeGen
 import com.oracle.truffle.r.ffi.impl.nodes.MiscNodesFactory.RDoSlotNodeGen;
 import com.oracle.truffle.r.runtime.RInternalError;
 import com.oracle.truffle.r.runtime.context.RContext;
+import com.oracle.truffle.r.runtime.nodes.RSyntaxNode;
 
 public final class FFIUpCallRootNode extends RootNode {
     private static final RootCallTarget[] rootCallTargets = new RootCallTarget[RFFIUpCallTable.values().length];
@@ -50,7 +51,7 @@ public final class FFIUpCallRootNode extends RootNode {
 
     @SuppressWarnings("deprecation")
     private FFIUpCallRootNode(FFIUpCallNode child) {
-        super(RContext.getRRuntimeASTAccess().getTruffleRLanguage(), null, new FrameDescriptor());
+        super(RContext.getRRuntimeASTAccess().getTruffleRLanguage(), RSyntaxNode.INTERNAL, new FrameDescriptor());
         theFFIUpCallNode = child;
         this.numArgs = child.numArgs();
     }
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ValuePrinterNode.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ValuePrinterNode.java
index 662a227111..1b5f7e99db 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ValuePrinterNode.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/printer/ValuePrinterNode.java
@@ -74,6 +74,7 @@ import com.oracle.truffle.r.runtime.data.model.RAbstractLogicalVector;
 import com.oracle.truffle.r.runtime.data.model.RAbstractStringVector;
 import com.oracle.truffle.r.runtime.data.model.RAbstractVector;
 import com.oracle.truffle.r.runtime.nodes.RBaseNode;
+import com.oracle.truffle.r.runtime.nodes.RSyntaxNode;
 
 public final class ValuePrinterNode extends RBaseNode {
 
@@ -563,7 +564,7 @@ public final class ValuePrinterNode extends RBaseNode {
 
     @SuppressWarnings("deprecation")
     public static String prettyPrint(final Object value) {
-        return (String) Truffle.getRuntime().createCallTarget(new RootNode(TruffleLanguage.class, null, null) {
+        return (String) Truffle.getRuntime().createCallTarget(new RootNode(TruffleLanguage.class, RSyntaxNode.INTERNAL, null) {
 
             @Child ValuePrinterNode valuePrinterNode = new ValuePrinterNode();
 
diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/TestUtilities.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/TestUtilities.java
index 819cf8c85c..6cafcae015 100644
--- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/TestUtilities.java
+++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/TestUtilities.java
@@ -42,6 +42,7 @@ import com.oracle.truffle.r.runtime.data.RNull;
 import com.oracle.truffle.r.runtime.data.model.RAbstractDoubleVector;
 import com.oracle.truffle.r.runtime.data.model.RAbstractIntVector;
 import com.oracle.truffle.r.runtime.data.model.RAbstractVector;
+import com.oracle.truffle.r.runtime.nodes.RSyntaxNode;
 
 public class TestUtilities {
 
@@ -211,7 +212,7 @@ public class TestUtilities {
 
         @SuppressWarnings("deprecation")
         TestRoot(T node, NodeAdapter<T> invoke) {
-            super(TruffleLanguage.class, null, null);
+            super(TruffleLanguage.class, RSyntaxNode.INTERNAL, null);
             this.node = node;
             this.invoke = invoke;
         }
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/DLL.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/DLL.java
index c83d750b9c..5acaef8401 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/DLL.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/DLL.java
@@ -40,6 +40,7 @@ import com.oracle.truffle.r.runtime.data.RStringVector;
 import com.oracle.truffle.r.runtime.data.RSymbol;
 import com.oracle.truffle.r.runtime.data.RTruffleObject;
 import com.oracle.truffle.r.runtime.ffi.CallRFFI.InvokeVoidCallNode;
+import com.oracle.truffle.r.runtime.nodes.RSyntaxNode;
 import com.oracle.truffle.r.runtime.rng.user.UserRNG;
 
 /**
@@ -616,7 +617,7 @@ public class DLL {
 
         @SuppressWarnings("deprecation")
         private RFindSymbolRootNode() {
-            super(RContext.getRRuntimeASTAccess().getTruffleRLanguage(), null, new FrameDescriptor());
+            super(RContext.getRRuntimeASTAccess().getTruffleRLanguage(), RSyntaxNode.INTERNAL, new FrameDescriptor());
         }
 
         @Override
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/RFFIRootNode.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/RFFIRootNode.java
index 932634dd13..a790fbdd58 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/RFFIRootNode.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/RFFIRootNode.java
@@ -27,15 +27,15 @@ import com.oracle.truffle.api.frame.FrameDescriptor;
 import com.oracle.truffle.api.nodes.RootNode;
 import com.oracle.truffle.api.nodes.Node;
 import com.oracle.truffle.r.runtime.context.RContext;
+import com.oracle.truffle.r.runtime.nodes.RSyntaxNode;
 
 public abstract class RFFIRootNode<T extends Node> extends RootNode {
     @Child protected T rffiNode;
 
     @SuppressWarnings("deprecation")
     protected RFFIRootNode(T baseRFFINode) {
-        super(RContext.getRRuntimeASTAccess().getTruffleRLanguage(), null, new FrameDescriptor());
+        super(RContext.getRRuntimeASTAccess().getTruffleRLanguage(), RSyntaxNode.INTERNAL, new FrameDescriptor());
         this.rffiNode = baseRFFINode;
         Truffle.getRuntime().createCallTarget(this);
     }
-
 }
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/rng/user/UserRNG.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/rng/user/UserRNG.java
index 27203104d2..cdc9c097d2 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/rng/user/UserRNG.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/rng/user/UserRNG.java
@@ -34,6 +34,7 @@ import com.oracle.truffle.r.runtime.context.RContext;
 import com.oracle.truffle.r.runtime.data.RNull;
 import com.oracle.truffle.r.runtime.ffi.DLL;
 import com.oracle.truffle.r.runtime.ffi.DLL.DLLInfo;
+import com.oracle.truffle.r.runtime.nodes.RSyntaxNode;
 import com.oracle.truffle.r.runtime.ffi.RFFIFactory;
 import com.oracle.truffle.r.runtime.ffi.UserRngRFFI;
 import com.oracle.truffle.r.runtime.rng.RRNG.Kind;
@@ -80,7 +81,7 @@ public final class UserRNG implements RandomNumberGenerator {
 
         @SuppressWarnings("deprecation")
         protected UserRNGRootNodeAdapter() {
-            super(RContext.getRRuntimeASTAccess().getTruffleRLanguage(), null, new FrameDescriptor());
+            super(RContext.getRRuntimeASTAccess().getTruffleRLanguage(), RSyntaxNode.INTERNAL, new FrameDescriptor());
         }
     }
 
-- 
GitLab