diff --git a/ci.hocon b/ci.hocon
index c159a9f44ea4fac96a7e2385cde990effc9cc0c8..7007030a80ffe1a6200d7ba0e5786c41e5a0bbb7 100644
--- a/ci.hocon
+++ b/ci.hocon
@@ -89,7 +89,7 @@ common : ${java8Downloads} ${packagesLinux}  {
 
 gateCmd : ["mx", "--strict-compliance", "rgate", "--strict-mode", "-t"]
 
-# currently disabled gate commands: FindBugs,Checkheaders,Distribution Overlap Check,BuildJavaWithEcj
+# currently disabled gate commands: FindBugs,Checkheaders,Distribution Overlap Check
 
 # The standard set of gate tasks: the actual executable tests are in the "UnitTests" task.
 
@@ -99,10 +99,10 @@ gateTestCommon : ${common} {
   ]
 }
 
-gateTestLinux : ${gateTestCommon} {
+gateTestLinux : ${gateTestCommon}  {
 }
 
-gateTestNoSpecialsLinux : ${common} {
+gateTestNoSpecialsLinux : ${common}  {
   run : [
     ${gateCmd} ["Versions,JDKReleaseInfo,BuildJavaWithJavac,UnitTests: no specials"]
   ]
@@ -118,11 +118,11 @@ darwinEnvironment : {
   }
 }
 
-gateTestDarwin : ${gateTestCommon} ${darwinEnvironment} {
+gateTestDarwin : ${gateTestCommon} ${darwinEnvironment}  {
   packages : ${packagesDarwin}
 }
 
-gateTestLinuxNFI : ${gateTestCommon} {
+gateTestLinuxNFI : ${gateTestCommon}  {
   environment :  {
       FASTR_RFFI : "nfi"
       TZDIR: "/usr/share/zoneinfo"
@@ -136,7 +136,7 @@ requireGCC: {
     }
 }
 
-gateTestLinuxLLVM : ${common} ${requireGCC} {
+gateTestLinuxLLVM : ${common} ${requireGCC}  {
 
   packages: {
       llvm: "==3.8"
@@ -172,7 +172,7 @@ gateTestJava9Linux : ${java9Downloads} ${gateTestCommon} {
   }
 }
 
-gateTestDarwinLLVM: ${common} ${darwinEnvironment} ${requireGCC} {
+gateTestDarwinLLVM: ${common} ${darwinEnvironment} ${requireGCC}  {
   packages : ${packagesDarwin} {
     llvm: "==4.0.1"
   }
@@ -225,6 +225,22 @@ gateStyle : ${common} {
   ]
 }
 
+gateBuildWithEcj : ${common} {
+  # need pyhocon fix
+  downloads : {
+    JAVA_HOME : ${java8Downloads.downloads.JAVA_HOME}
+    EXTRA_JAVA_HOMES : ${java8Downloads.downloads.EXTRA_JAVA_HOMES}
+    JDT : {name: ecj, version: "4.5.1", platformspecific: false}
+    ECLIPSE : {name: eclipse, version: "4.5.2", platformspecific: true}
+  }
+  environment : {
+    ECLIPSE_EXE : "$ECLIPSE/eclipse"
+  }
+  run : [
+    ["mx", "build"]
+  ]
+}
+
 # This check runs diagnostics on the implementation of the R "builtins" in FastR, e.g., that the argument processing is sound.
 
 rbcheck : ${common} {
@@ -257,6 +273,7 @@ builds = [
   ${gateTestNoSpecialsLinux}  {capabilities : [linux, amd64, fast],  targets : [gate], name: "gate-test-linux-amd64-nospecials"}
   ${gateTestDarwin}           {capabilities : [darwin_sierra, amd64], targets : [gate], name: "gate-test-darwin-amd64"}
   ${gateStyle}                {capabilities : [linux, amd64],  targets : [gate], name: "gate-style-linux-amd64"}
+  ${gateBuildWithEcj}         {capabilities : [linux, amd64],  targets : [gate], name: "gate-ecj-linux-amd64"}
   ${rbcheck}                  {capabilities : [linux, amd64],  targets : [gate], name: "gate-rbcheck-linux-amd64"}
   ${internalPkgtest}          {capabilities : [linux, amd64],  targets : [gate], name: "gate-internal-pkgtest-linux-amd64"}
   ${gateTestJava9Linux}       {capabilities : [linux, amd64, fast],  targets : [gate], name: "gate-test-java9-linux-amd64"}
diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/REngine.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/REngine.java
index 9ea740469f754190b491e7250c80116e363ab2b4..52dd4f23b3776d046974c127c0aeb4970376fb79 100644
--- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/REngine.java
+++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/REngine.java
@@ -36,8 +36,6 @@ import com.oracle.truffle.api.Truffle;
 import com.oracle.truffle.api.TruffleLanguage.ContextReference;
 import com.oracle.truffle.api.dsl.UnsupportedSpecializationException;
 import com.oracle.truffle.api.frame.Frame;
-import com.oracle.truffle.api.frame.FrameSlot;
-import com.oracle.truffle.api.frame.FrameSlotKind;
 import com.oracle.truffle.api.frame.MaterializedFrame;
 import com.oracle.truffle.api.frame.VirtualFrame;
 import com.oracle.truffle.api.interop.TruffleObject;
@@ -79,7 +77,6 @@ import com.oracle.truffle.r.runtime.RParserFactory;
 import com.oracle.truffle.r.runtime.RProfile;
 import com.oracle.truffle.r.runtime.RRuntime;
 import com.oracle.truffle.r.runtime.RSource;
-import com.oracle.truffle.r.runtime.RType;
 import com.oracle.truffle.r.runtime.ReturnException;
 import com.oracle.truffle.r.runtime.RootWithBody;
 import com.oracle.truffle.r.runtime.ThreadTimings;
@@ -102,14 +99,11 @@ import com.oracle.truffle.r.runtime.data.RSymbol;
 import com.oracle.truffle.r.runtime.data.RTypedValue;
 import com.oracle.truffle.r.runtime.data.model.RAbstractVector;
 import com.oracle.truffle.r.runtime.env.REnvironment;
-import com.oracle.truffle.r.runtime.env.frame.ActiveBinding;
-import com.oracle.truffle.r.runtime.env.frame.FrameSlotChangeMonitor;
 import com.oracle.truffle.r.runtime.interop.R2Foreign;
 import com.oracle.truffle.r.runtime.interop.R2ForeignNodeGen;
 import com.oracle.truffle.r.runtime.nodes.RNode;
 import com.oracle.truffle.r.runtime.nodes.RSyntaxElement;
 import com.oracle.truffle.r.runtime.nodes.RSyntaxNode;
-import com.oracle.truffle.r.runtime.rng.RRNG;
 
 /**
  * The engine for the FastR implementation. Handles parsing and evaluation. There is one instance of
diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/RRuntimeASTAccessImpl.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/RRuntimeASTAccessImpl.java
index bfd35372edc84a5a0a6c3e5fd96bdd7cf16a07eb..1e8fa828c18417547e78c25d7639c52e43615738 100644
--- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/RRuntimeASTAccessImpl.java
+++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/RRuntimeASTAccessImpl.java
@@ -67,7 +67,6 @@ import com.oracle.truffle.r.runtime.RArguments;
 import com.oracle.truffle.r.runtime.RCaller;
 import com.oracle.truffle.r.runtime.RDeparse;
 import com.oracle.truffle.r.runtime.RError;
-import com.oracle.truffle.r.runtime.RError.Message;
 import com.oracle.truffle.r.runtime.RInternalError;
 import com.oracle.truffle.r.runtime.RRuntimeASTAccess;
 import com.oracle.truffle.r.runtime.RSrcref;
@@ -85,7 +84,6 @@ import com.oracle.truffle.r.runtime.data.RFunction;
 import com.oracle.truffle.r.runtime.data.RLanguage;
 import com.oracle.truffle.r.runtime.data.RList;
 import com.oracle.truffle.r.runtime.data.RNull;
-import com.oracle.truffle.r.runtime.data.RPairList;
 import com.oracle.truffle.r.runtime.data.RPromise;
 import com.oracle.truffle.r.runtime.data.RStringVector;
 import com.oracle.truffle.r.runtime.data.RSymbol;
diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/TruffleRLanguageImpl.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/TruffleRLanguageImpl.java
index e47345b70469600ebcdec25fe2fafa178f3a8977..e84096fba53c49263117a1cf1e4ec25ff356c8b1 100644
--- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/TruffleRLanguageImpl.java
+++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/TruffleRLanguageImpl.java
@@ -217,12 +217,6 @@ public final class TruffleRLanguageImpl extends TruffleRLanguage {
         }
     }
 
-    @Override
-    protected Object getLanguageGlobal(RContext context) {
-        // TODO: what's the meaning of "language global" for R?
-        return null;
-    }
-
     public static RContext getCurrentContext() {
         return TruffleLanguage.getCurrentContext(TruffleRLanguage.class);
     }
diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ListMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ListMR.java
index 8110560bfac52c394462ba63cd59e850d0dc5aa3..17611a0c03a3d658dd229a03d5ae8dcd4802f329 100644
--- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ListMR.java
+++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/ListMR.java
@@ -29,7 +29,6 @@ import com.oracle.truffle.api.dsl.Specialization;
 import com.oracle.truffle.api.frame.VirtualFrame;
 import com.oracle.truffle.api.interop.CanResolve;
 import com.oracle.truffle.api.interop.KeyInfo;
-import com.oracle.truffle.api.interop.KeyInfo.Builder;
 import com.oracle.truffle.api.interop.MessageResolution;
 import com.oracle.truffle.api.interop.Resolve;
 import com.oracle.truffle.api.interop.TruffleObject;
@@ -476,9 +475,11 @@ public class ListMR {
         }
 
         private static int buildKeys(Object value) {
-            Builder builder = KeyInfo.newBuilder();
-            builder.setReadable(true).setWritable(true).setInvocable(value instanceof RFunction);
-            return builder.build();
+            int result = KeyInfo.READABLE | KeyInfo.MODIFIABLE;
+            if (value instanceof RFunction) {
+                result |= KeyInfo.INVOCABLE;
+            }
+            return result;
         }
 
         private void initExtractNode() {
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 71f967bff098ada7715caa6243e63e75a9ebe3b9..fec7058df22ad8468e976f936a6f47c9800735cf 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
@@ -280,9 +280,7 @@ public final class RAbstractVectorAccessFactory implements StandardFactory {
             if (unknownIdentifier.profile(idx < 0 || idx >= lengthNode.executeInteger(receiver))) {
                 return 0;
             }
-            KeyInfo.Builder builder = KeyInfo.newBuilder();
-            builder.setReadable(true).setWritable(true);
-            return builder.build();
+            return KeyInfo.READABLE | KeyInfo.MODIFIABLE;
         }
 
         @Fallback
diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RArgsValuesAndNamesMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RArgsValuesAndNamesMR.java
index 41d74de381bcf61c03a5c62e0c39dd70db9be2e3..70ef6ffa40537c3da3e8c414ec9d3bbf7fc9aa4d 100644
--- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RArgsValuesAndNamesMR.java
+++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RArgsValuesAndNamesMR.java
@@ -193,9 +193,8 @@ public class RArgsValuesAndNamesMR {
         }
 
         private static Object createKeyInfo(RArgsValuesAndNames receiver, int idx) {
-            KeyInfo.Builder builder = KeyInfo.newBuilder();
-            builder.setReadable(true).setInvocable(receiver.getArgument(idx) instanceof RFunction);
-            return builder.build();
+            int invocable = receiver.getArgument(idx) instanceof RFunction ? KeyInfo.INVOCABLE : 0;
+            return KeyInfo.READABLE | invocable;
         }
 
         @Fallback
diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/REnvironmentMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/REnvironmentMR.java
index 31246b547d4d2212875d1cba32709e9e2974ddd8..f53da4a554de3776f26857d0dbc47ace227c45ba 100644
--- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/REnvironmentMR.java
+++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/REnvironmentMR.java
@@ -29,7 +29,6 @@ import com.oracle.truffle.api.dsl.Specialization;
 import com.oracle.truffle.api.frame.VirtualFrame;
 import com.oracle.truffle.api.interop.CanResolve;
 import com.oracle.truffle.api.interop.KeyInfo;
-import com.oracle.truffle.api.interop.KeyInfo.Builder;
 import com.oracle.truffle.api.interop.Message;
 import com.oracle.truffle.api.interop.MessageResolution;
 import com.oracle.truffle.api.interop.Resolve;
@@ -212,13 +211,14 @@ public class REnvironmentMR {
             if (val == null) {
                 return 0;
             }
-            Builder builder = KeyInfo.newBuilder();
-            builder.setReadable(true);
+            int result = KeyInfo.READABLE;
             if (!receiver.isLocked() && !receiver.bindingIsLocked(identifier)) {
-                builder.setWritable(true);
+                result |= KeyInfo.MODIFIABLE;
             }
-            builder.setInvocable(val instanceof RFunction);
-            return builder.build();
+            if (val instanceof RFunction) {
+                result |= KeyInfo.INVOCABLE;
+            }
+            return result;
         }
 
         @Fallback
diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RLanguageMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RLanguageMR.java
index 5861a235f3f7bbd3fd09d4d03f0a6204d9238524..d6f5b6b3f83dffb8e9d5df41452b598bc5e9a25f 100644
--- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RLanguageMR.java
+++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RLanguageMR.java
@@ -155,11 +155,8 @@ public class RLanguageMR {
             if (unknownIdentifier.profile(idx < 0 || idx >= receiver.getLength())) {
                 return 0;
             }
-
-            KeyInfo.Builder builder = KeyInfo.newBuilder();
-            builder.setReadable(true);
             // TODO what about writeble/invocable/...
-            return builder.build();
+            return KeyInfo.READABLE;
         }
 
         @Fallback
diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RPromiseMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RPromiseMR.java
index 07fa19481efe5bd0ae7cd5977d436cb271a25ae3..9d5d4578293e1b7122d8786eb7d05ff8089f87b3 100644
--- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RPromiseMR.java
+++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RPromiseMR.java
@@ -172,9 +172,9 @@ public class RPromiseMR {
         @Specialization
         protected Object access(@SuppressWarnings("unused") RPromise receiver, String identifier) {
             if (PROP_EXPR.equals(identifier) || PROP_VALUE.equals(identifier)) {
-                return KeyInfo.newBuilder().setReadable(true).build();
+                return KeyInfo.READABLE;
             } else if (PROP_IS_EVALUATED.equals(identifier)) {
-                return KeyInfo.newBuilder().setReadable(true).setWritable(true).build();
+                return KeyInfo.READABLE | KeyInfo.MODIFIABLE;
             } else {
                 return 0;
             }
diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RRawMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RRawMR.java
index 80a7ab5992104117de1ac253f165b2f5c9e2e79c..c94a4bc9c7fa34a1a6117d8c99aafdd39347f2ea 100644
--- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RRawMR.java
+++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RRawMR.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -41,7 +41,7 @@ public class RRawMR {
 
     @Resolve(message = "UNBOX")
     public abstract static class RRawUnboxNode extends Node {
-        protected Object access(@SuppressWarnings("unused") RRaw receiver) {
+        protected Object access(RRaw receiver) {
             return receiver.getValue();
         }
     }
diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RS4ObjectMR.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RS4ObjectMR.java
index ff7122e0faae9b8585bc6caff38f9e84561ca89e..db48f8916a19b9ea45d0a58226ddf320ad34f638 100644
--- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RS4ObjectMR.java
+++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/interop/RS4ObjectMR.java
@@ -28,7 +28,6 @@ import com.oracle.truffle.api.dsl.Fallback;
 import com.oracle.truffle.api.dsl.Specialization;
 import com.oracle.truffle.api.interop.CanResolve;
 import com.oracle.truffle.api.interop.KeyInfo;
-import com.oracle.truffle.api.interop.KeyInfo.Builder;
 import com.oracle.truffle.api.interop.Message;
 import com.oracle.truffle.api.interop.MessageResolution;
 import com.oracle.truffle.api.interop.Resolve;
@@ -233,10 +232,9 @@ public class RS4ObjectMR {
                 CompilerDirectives.transferToInterpreterAndInvalidate();
                 getAttributeNode = insert(GetAttributeNode.create());
             }
-            Builder builder = KeyInfo.newBuilder();
-            builder.setReadable(true).setWritable(!identifier.equals("class"));
-            builder.setInvocable(getAttributeNode.execute(receiver, identifier) instanceof RFunction);
-            return builder.build();
+            int writeable = !identifier.equals("class") ? KeyInfo.MODIFIABLE : 0;
+            int executable = getAttributeNode.execute(receiver, identifier) instanceof RFunction ? KeyInfo.INVOCABLE : 0;
+            return KeyInfo.READABLE | writeable | executable;
         }
 
         protected static ArrayAttributeNode createArrayAttributeNode() {
diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/EmbeddedConsoleHandler.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/EmbeddedConsoleHandler.java
index e551bd71487c301541e4e1a2c9a3e800f11d7453..4af701bbecf95d302ed5f309cfbdb55e46575df1 100644
--- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/EmbeddedConsoleHandler.java
+++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/EmbeddedConsoleHandler.java
@@ -39,12 +39,10 @@ import com.oracle.truffle.api.nodes.RootNode;
 import com.oracle.truffle.r.launcher.ConsoleHandler;
 import com.oracle.truffle.r.launcher.DelegatingConsoleHandler;
 import com.oracle.truffle.r.runtime.RInterfaceCallbacks;
-import com.oracle.truffle.r.runtime.ffi.REmbedRFFI;
 import com.oracle.truffle.r.runtime.ffi.REmbedRFFI.ReadConsoleNode;
 import com.oracle.truffle.r.runtime.ffi.REmbedRFFI.WriteConsoleBaseNode;
 import com.oracle.truffle.r.runtime.ffi.REmbedRFFI.WriteConsoleNode;
 import com.oracle.truffle.r.runtime.ffi.REmbedRFFI.WriteErrConsoleNode;
-import com.oracle.truffle.r.runtime.ffi.RFFIFactory;
 
 /**
  * In embedded mode the console functions as defined in {@code Rinterface.h} can be overridden. This
@@ -138,11 +136,11 @@ public final class EmbeddedConsoleHandler extends DelegatingConsoleHandler {
         return createOutputSteam(this::getWriteErrCallTarget, defaultValue);
     }
 
-    private OutputStream createOutputSteam(Supplier<CallTarget> writeCallTarget, OutputStream defaultStream) {
-        return new BufferedOutputStream(new EmbeddedConsoleOutputSteam(writeCallTarget, defaultStream), 128);
+    private OutputStream createOutputSteam(Supplier<CallTarget> writeCallTargetSupplier, OutputStream defaultStream) {
+        return new BufferedOutputStream(new EmbeddedConsoleOutputSteam(writeCallTargetSupplier, defaultStream), 128);
     }
 
-    private boolean isOverridden(String name) {
+    private static boolean isOverridden(String name) {
         RInterfaceCallbacks clbk = RInterfaceCallbacks.valueOf(name);
         return clbk.isOverridden();
     }
@@ -223,7 +221,7 @@ public final class EmbeddedConsoleHandler extends DelegatingConsoleHandler {
         return writeErrCallTarget;
     }
 
-    private CallTarget createWriteCallTarget(WriteConsoleBaseNode writeConsoleNode) {
+    private static CallTarget createWriteCallTarget(WriteConsoleBaseNode writeConsoleNode) {
         return Truffle.getRuntime().createCallTarget(new WriteOutBaseRootNode(writeConsoleNode));
     }
 
diff --git a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/REmbedded.java b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/REmbedded.java
index e40dcb1c72c6843c17952ad2ae836baaf95c6f79..1ef67f1de646cdc804ccaf2c2c5f2e2c2d7672ca 100644
--- a/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/REmbedded.java
+++ b/com.oracle.truffle.r.engine/src/com/oracle/truffle/r/engine/shell/REmbedded.java
@@ -54,11 +54,9 @@ import com.oracle.truffle.r.runtime.context.RContext;
  * Rf_mainloop();
  * </pre>
  *
- * {@code Rf_initialize_R} invokes {@link #initializeR(String[], boolean)}, which creates new
+ * {@code Rf_initialize_R} invokes {@link #initializeR(String[],boolean)}, which creates new
  * polyglot {@link Context}. The call to {@code R_SetParams} adjusts the values stored in the
- * {@link RStartParams} object and then {@code Rf_mainloop}, which calls {@code #setupRmainloop()}
- * and then {@link #runRmainloop()}, which will complete the FastR initialization and enter the
- * read-eval-print loop.
+ * {@link RStartParams} object.
  */
 public class REmbedded {
 
diff --git a/com.oracle.truffle.r.ffi.codegen/src/com/oracle/truffle/r/ffi/codegen/FFITestsCodeGen.java b/com.oracle.truffle.r.ffi.codegen/src/com/oracle/truffle/r/ffi/codegen/FFITestsCodeGen.java
index 848b84ff8656779ca09cd617411ec907eb918559..c7186ca9b0249042e826e337638939259c995d18 100644
--- a/com.oracle.truffle.r.ffi.codegen/src/com/oracle/truffle/r/ffi/codegen/FFITestsCodeGen.java
+++ b/com.oracle.truffle.r.ffi.codegen/src/com/oracle/truffle/r/ffi/codegen/FFITestsCodeGen.java
@@ -32,7 +32,6 @@ import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
 import com.oracle.truffle.r.ffi.impl.upcalls.StdUpCallsRFFI;
-import com.oracle.truffle.r.ffi.impl.upcalls.VariableUpCallsRFFI;
 import com.oracle.truffle.r.ffi.processor.RFFICpointer;
 import com.oracle.truffle.r.ffi.processor.RFFICstring;
 
diff --git a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/common/RFFIUtils.java b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/common/RFFIUtils.java
index b7a447516e4f01e10ebea2f7f0271e49cbdd53a5..284ba2a630993eee5797469c2cdcb350a50e4e86 100644
--- a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/common/RFFIUtils.java
+++ b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/common/RFFIUtils.java
@@ -33,11 +33,9 @@ import com.oracle.truffle.api.interop.UnsupportedMessageException;
 import com.oracle.truffle.api.nodes.Node;
 import com.oracle.truffle.r.runtime.RInternalError;
 import com.oracle.truffle.r.runtime.context.RContext;
-import com.oracle.truffle.r.runtime.data.RLanguage;
 import com.oracle.truffle.r.runtime.data.RObject;
 import com.oracle.truffle.r.runtime.data.RPairList;
 import com.oracle.truffle.r.runtime.data.RSymbol;
-import com.oracle.truffle.r.runtime.data.RTypedValue;
 import com.oracle.truffle.r.runtime.data.model.RAbstractVector;
 import com.oracle.truffle.r.runtime.ffi.RFFIContext;
 import com.oracle.truffle.r.runtime.ffi.RFFILog;
diff --git a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/llvm/TruffleLLVM_Call.java b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/llvm/TruffleLLVM_Call.java
index 87103c060180052657726a1f72a0557451990ccb..0de1c6e8664360adc3a83459c9126bfc19b32298 100644
--- a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/llvm/TruffleLLVM_Call.java
+++ b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/llvm/TruffleLLVM_Call.java
@@ -34,7 +34,6 @@ import com.oracle.truffle.api.interop.TruffleObject;
 import com.oracle.truffle.api.interop.java.JavaInterop;
 import com.oracle.truffle.api.nodes.ExplodeLoop;
 import com.oracle.truffle.api.nodes.Node;
-import com.oracle.truffle.r.ffi.impl.common.RFFIUtils;
 import com.oracle.truffle.r.ffi.impl.llvm.TruffleLLVM_CallFactory.ToNativeNodeGen;
 import com.oracle.truffle.r.ffi.impl.llvm.TruffleLLVM_CallFactory.TruffleLLVM_InvokeCallNodeGen;
 import com.oracle.truffle.r.ffi.impl.llvm.upcalls.BytesToNativeCharArrayCall;
@@ -42,7 +41,6 @@ import com.oracle.truffle.r.ffi.impl.llvm.upcalls.CharSXPToNativeArrayCall;
 import com.oracle.truffle.r.ffi.impl.upcalls.Callbacks;
 import com.oracle.truffle.r.runtime.RError;
 import com.oracle.truffle.r.runtime.RInternalError;
-import com.oracle.truffle.r.runtime.RRuntime;
 import com.oracle.truffle.r.runtime.context.RContext;
 import com.oracle.truffle.r.runtime.context.RContext.ContextState;
 import com.oracle.truffle.r.runtime.data.RDataFactory;
diff --git a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/llvm/TruffleLLVM_DownCallNodeFactory.java b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/llvm/TruffleLLVM_DownCallNodeFactory.java
index 722f0a242cc963a2ee2a412ca4562e7c409ed212..8600debf0f56ffc56e005d085e839bc0343a2170 100644
--- a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/llvm/TruffleLLVM_DownCallNodeFactory.java
+++ b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/llvm/TruffleLLVM_DownCallNodeFactory.java
@@ -50,8 +50,8 @@ final class TruffleLLVM_DownCallNodeFactory extends DownCallNodeFactory {
     }
 
     @Override
-    public DownCallNode createDownCallNode(NativeFunction function) {
-        return new DownCallNode(function) {
+    public DownCallNode createDownCallNode(NativeFunction f) {
+        return new DownCallNode(f) {
             @Override
             protected TruffleObject getTarget(NativeFunction function) {
                 CompilerAsserts.neverPartOfCompilation();
diff --git a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/managed/Managed_DownCallNodeFactory.java b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/managed/Managed_DownCallNodeFactory.java
index 5276e0615970956356027f27cb8ec74fd383ecaf..5f952229b637ac62bd2a4ec1fb1a02db48bd5707 100644
--- a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/managed/Managed_DownCallNodeFactory.java
+++ b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/managed/Managed_DownCallNodeFactory.java
@@ -31,7 +31,6 @@ import java.nio.file.attribute.FileAttribute;
 import java.nio.file.attribute.PosixFilePermission;
 import java.nio.file.attribute.PosixFilePermissions;
 import java.util.EnumSet;
-import java.util.List;
 import java.util.Set;
 
 import com.oracle.truffle.api.CallTarget;
@@ -56,8 +55,8 @@ public final class Managed_DownCallNodeFactory extends DownCallNodeFactory {
     }
 
     @Override
-    public DownCallNode createDownCallNode(NativeFunction function) {
-        return new DownCallNode(function) {
+    public DownCallNode createDownCallNode(NativeFunction f) {
+        return new DownCallNode(f) {
             @Override
             protected TruffleObject getTarget(NativeFunction function) {
                 if (function == NativeFunction.getpid) {
diff --git a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nfi/TruffleNFI_Call.java b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nfi/TruffleNFI_Call.java
index eaeb8c8b05ff93e3a9e6b27eb7b730ed1e9d3734..ede11e852afc55a643e0a7d8279c4369306f58b8 100644
--- a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nfi/TruffleNFI_Call.java
+++ b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nfi/TruffleNFI_Call.java
@@ -27,7 +27,6 @@ import static com.oracle.truffle.r.ffi.impl.common.RFFIUtils.traceDownCallReturn
 import static com.oracle.truffle.r.ffi.impl.common.RFFIUtils.traceEnabled;
 
 import com.oracle.truffle.api.CompilerAsserts;
-import com.oracle.truffle.api.CompilerDirectives;
 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
 import com.oracle.truffle.api.dsl.Cached;
 import com.oracle.truffle.api.dsl.ImportStatic;
diff --git a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nfi/TruffleNFI_Context.java b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nfi/TruffleNFI_Context.java
index b002c4884753b040aa1f819f1f955610cafbc587..d1e3aba0258a5e33e5114be04706cb544ae85252 100644
--- a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nfi/TruffleNFI_Context.java
+++ b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nfi/TruffleNFI_Context.java
@@ -42,7 +42,6 @@ import com.oracle.truffle.api.interop.TruffleObject;
 import com.oracle.truffle.api.nodes.Node;
 import com.oracle.truffle.api.source.Source;
 import com.oracle.truffle.r.ffi.impl.common.LibPaths;
-import com.oracle.truffle.r.ffi.impl.common.RFFIUtils;
 import com.oracle.truffle.r.ffi.impl.nfi.TruffleNFI_DLL.NFIHandle;
 import com.oracle.truffle.r.ffi.impl.upcalls.Callbacks;
 import com.oracle.truffle.r.runtime.FastROptions;
@@ -203,7 +202,7 @@ final class TruffleNFI_Context extends RFFIContext {
     }
 
     @TruffleBoundary
-    private long initCallbacksAddress() {
+    private static long initCallbacksAddress() {
         // get the address of the native thread local
         try {
             Node bind = Message.createInvoke(1).createNode();
diff --git a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nfi/TruffleNFI_DownCallNodeFactory.java b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nfi/TruffleNFI_DownCallNodeFactory.java
index c54cca485f6a5db8e33ef0cbc90c815430c5c7c5..2481ed6657941b672b67d362ee2813b70fc1b41b 100644
--- a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nfi/TruffleNFI_DownCallNodeFactory.java
+++ b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nfi/TruffleNFI_DownCallNodeFactory.java
@@ -39,15 +39,14 @@ public final class TruffleNFI_DownCallNodeFactory extends DownCallNodeFactory {
     }
 
     @Override
-    public DownCallNode createDownCallNode(NativeFunction function) {
-        return new DownCallNode(function) {
+    public DownCallNode createDownCallNode(NativeFunction f) {
+        return new DownCallNode(f) {
             @Override
             protected TruffleObject getTarget(NativeFunction function) {
                 // TODO: this lookupNativeFunction function can exist in all FFI Contexts
                 return TruffleNFI_Context.getInstance().lookupNativeFunction(function);
             }
 
-            @SuppressWarnings("cast")
             @Override
             @ExplodeLoop
             protected long beforeCall(NativeFunction function, TruffleObject target, Object[] args) {
diff --git a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/AttributesAccessNodes.java b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/AttributesAccessNodes.java
index fe2516186b964aedba1c7f43c913dfc0f4da7993..a6d0515c5166861b7f7047f7142942b638e96445 100644
--- a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/AttributesAccessNodes.java
+++ b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/AttributesAccessNodes.java
@@ -153,7 +153,7 @@ public final class AttributesAccessNodes {
         }
 
         @TruffleBoundary
-        private Object getSymbol(String name) {
+        private static Object getSymbol(String name) {
             return RDataFactory.createSymbol(name);
         }
 
diff --git a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/CoerceNodes.java b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/CoerceNodes.java
index b3007b211c50f7552ebd8bfab8cf3bd583b09458..43df7a5efb42a8f754b79b15a2dbe7920b6f0e20 100644
--- a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/CoerceNodes.java
+++ b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/CoerceNodes.java
@@ -51,7 +51,6 @@ import com.oracle.truffle.r.runtime.data.RNull;
 import com.oracle.truffle.r.runtime.data.RPairList;
 import com.oracle.truffle.r.runtime.data.RShareable;
 import com.oracle.truffle.r.runtime.data.RStringVector;
-import com.oracle.truffle.r.runtime.data.RSymbol;
 import com.oracle.truffle.r.runtime.data.RTypedValue;
 import com.oracle.truffle.r.runtime.data.model.RAbstractIntVector;
 import com.oracle.truffle.r.runtime.data.model.RAbstractVector;
diff --git a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/FFIUpCallNode.java b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/FFIUpCallNode.java
index d18cd0bf6772a6887b4733d680781ea5b4613c3b..88ca9fb79a24f84331801d280a67f441396dfcbf 100644
--- a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/FFIUpCallNode.java
+++ b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/FFIUpCallNode.java
@@ -32,10 +32,10 @@ public abstract class FFIUpCallNode extends Node {
     protected abstract int numArgs();
 
     @TruffleBoundary
-    protected final RError unsupportedTypes(String name, Object... args) {
+    protected static final RError unsupportedTypes(String name, Object... args) {
         assert args.length > 0;
         StringBuilder sb = new StringBuilder(args.length * 15);
-        sb.append("wrong argument types provided to Rf_duplicated: ").append(Utils.getTypeName(args[0]));
+        sb.append("wrong argument types provided to ").append(name).append(": ").append(Utils.getTypeName(args[0]));
         for (int i = 1; i < args.length; i++) {
             sb.append(',').append(Utils.getTypeName(args[i]));
         }
diff --git a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/ListAccessNodes.java b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/ListAccessNodes.java
index 41cc4ea43f5faab05c0b2aae65c98427ec8a036f..f1e3036783898b9ad48b5e7ac6421db16af3fa00 100644
--- a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/ListAccessNodes.java
+++ b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/ListAccessNodes.java
@@ -132,7 +132,7 @@ public final class ListAccessNodes {
 
         @Specialization
         protected RNull handleNull(@SuppressWarnings("unused") RNull rNull) {
-            return rNull;
+            return RNull.instance;
         }
 
         @Fallback
diff --git a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/MiscNodes.java b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/MiscNodes.java
index 1b2b55205c58fd9e3de6a7f9463a2ea1a1d20cd1..c7259e65589b01a8b4b0b5d128386b69e8c5b6e2 100644
--- a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/MiscNodes.java
+++ b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/MiscNodes.java
@@ -52,7 +52,6 @@ import com.oracle.truffle.r.nodes.attributes.SpecialAttributesFunctionsFactory.S
 import com.oracle.truffle.r.nodes.builtin.EnvironmentNodes.GetFunctionEnvironmentNode;
 import com.oracle.truffle.r.nodes.builtin.casts.fluent.CastNodeBuilder;
 import com.oracle.truffle.r.nodes.function.FunctionDefinitionNode;
-import com.oracle.truffle.r.nodes.function.call.RExplicitCallNode;
 import com.oracle.truffle.r.nodes.objects.NewObject;
 import com.oracle.truffle.r.nodes.objects.NewObjectNodeGen;
 import com.oracle.truffle.r.nodes.unary.CastNode;
diff --git a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/RfEvalNode.java b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/RfEvalNode.java
index 4b795471d4427658e9c5ea5a0f73e1015fcdf12d..a3dd1b686b35e0e3b06c884c2855745ce61812df 100644
--- a/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/RfEvalNode.java
+++ b/com.oracle.truffle.r.ffi.impl/src/com/oracle/truffle/r/ffi/impl/nodes/RfEvalNode.java
@@ -26,8 +26,6 @@ import static com.oracle.truffle.r.runtime.RError.Message.ARGUMENT_NOT_ENVIRONME
 import static com.oracle.truffle.r.runtime.RError.Message.ARGUMENT_NOT_FUNCTION;
 import static com.oracle.truffle.r.runtime.RError.Message.UNKNOWN_OBJECT;
 
-import org.graalvm.polyglot.Value;
-
 import com.oracle.truffle.api.CompilerDirectives;
 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
 import com.oracle.truffle.api.dsl.Cached;
diff --git a/com.oracle.truffle.r.ffi.processor/src/com/oracle/truffle/r/ffi/processor/FFIProcessor.java b/com.oracle.truffle.r.ffi.processor/src/com/oracle/truffle/r/ffi/processor/FFIProcessor.java
index 4b8b98bf799f9bbabb0383b01ad6f3be6d10ecf7..d287d9866015a0f8784e0eea73d9026fb8b9f315 100644
--- a/com.oracle.truffle.r.ffi.processor/src/com/oracle/truffle/r/ffi/processor/FFIProcessor.java
+++ b/com.oracle.truffle.r.ffi.processor/src/com/oracle/truffle/r/ffi/processor/FFIProcessor.java
@@ -190,6 +190,7 @@ public final class FFIProcessor extends AbstractProcessor {
         List<? extends VariableElement> params = m.getParameters();
         StringBuilder arguments = new StringBuilder();
         StringBuilder unwrapNodes = new StringBuilder();
+        boolean needsUnwrapImport = false;
         for (int i = 0; i < params.size(); i++) {
             if (i != 0) {
                 arguments.append(", ");
@@ -209,6 +210,7 @@ public final class FFIProcessor extends AbstractProcessor {
             if (needCast) {
                 arguments.append('(').append(paramTypeName).append(") ");
             }
+            needsUnwrapImport |= needsUnwrap;
             if (needsUnwrap) {
                 arguments.append(paramName).append("Unwrap").append(".execute(");
                 unwrapNodes.append("                @Child private FFIUnwrapNode ").append(paramName).append("Unwrap").append(" = FFIUnwrapNode.create();\n");
@@ -253,8 +255,13 @@ public final class FFIProcessor extends AbstractProcessor {
         w.append("import com.oracle.truffle.r.ffi.impl.common.RFFIUtils;\n");
         w.append("import com.oracle.truffle.r.ffi.impl.upcalls.UpCallsRFFI;\n");
         w.append("import com.oracle.truffle.r.runtime.data.RTruffleObject;\n");
-        w.append("import com.oracle.truffle.r.runtime.ffi.FFIUnwrapNode;\n");
-        w.append("import com.oracle.truffle.r.runtime.ffi.FFIWrapNode;\n");
+
+        if (needsUnwrapImport) {
+            w.append("import com.oracle.truffle.r.runtime.ffi.FFIUnwrapNode;\n");
+        }
+        if (needsReturnWrap) {
+            w.append("import com.oracle.truffle.r.runtime.ffi.FFIWrapNode;\n");
+        }
         w.append("\n");
         w.append("// Checkstyle: stop method name check\n");
         w.append("\n");
diff --git a/com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/Launcher.java b/com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/Launcher.java
index 5cd71fdfe952d7807f23069e77acf9ce619957ca..6e73843f7b4bea548187d329a4859a74ef0979fc 100644
--- a/com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/Launcher.java
+++ b/com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/Launcher.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -453,7 +453,6 @@ public abstract class Launcher {
         }
     }
 
-    @SuppressWarnings("deprecation")
     protected static void printLanguages(Engine engine, boolean printWhenEmpty) {
         if (engine.getLanguages().isEmpty()) {
             if (printWhenEmpty) {
diff --git a/com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/RCmdOptions.java b/com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/RCmdOptions.java
index 54f4d5fa3367d07ad73599aae93d2a5d6e9c9620..f402d46bd91411a36d0dc25b14d08bc825acf36b 100644
--- a/com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/RCmdOptions.java
+++ b/com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/RCmdOptions.java
@@ -22,9 +22,6 @@
  */
 package com.oracle.truffle.r.launcher;
 
-import static com.oracle.truffle.r.launcher.RCmdOptions.RCmdOption.HELP;
-import static com.oracle.truffle.r.launcher.RCmdOptions.RCmdOption.VERSION;
-
 import java.util.ArrayList;
 import java.util.EnumMap;
 import java.util.List;
@@ -346,21 +343,9 @@ public final class RCmdOptions {
         System.out.println("\nFILE may contain spaces but not shell metacharacters.\n");
     }
 
-    private static RuntimeException printHelpAndExit(Client client) {
-        printHelp(client);
-        System.exit(0);
-        throw RCommand.fatal("should not reach here");
-    }
-
     static void printVersion() {
         System.out.print("FastR version ");
         System.out.println(RVersionNumber.FULL);
         System.out.println(RVersionNumber.LICENSE);
     }
-
-    private static RuntimeException printVersionAndExit() {
-        printVersion();
-        System.exit(0);
-        throw RCommand.fatal("should not reach here");
-    }
 }
diff --git a/com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/RStartParams.java b/com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/RStartParams.java
index 4548d0e625c3eca89033c5ad78fcb9d59413a531..3a3ac5765177fdb5a336ad9b9ee0c3ac136171d9 100644
--- a/com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/RStartParams.java
+++ b/com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/RStartParams.java
@@ -133,7 +133,7 @@ public class RStartParams {
      * Used for R embedding, allows to alter some of the values.
      */
     public void setParams(boolean quietA, boolean slaveA, boolean interactiveA, boolean verboseA, boolean loadSiteFileA,
-                    boolean loadInitFileA, boolean debugInitFileA, int restoreActionA, int saveActionA, boolean noRenvironA) {
+                    boolean loadInitFileA, boolean debugInitFileA, @SuppressWarnings("unused") int restoreActionA, @SuppressWarnings("unused") int saveActionA, boolean noRenvironA) {
         quiet = quietA;
         slave = slaveA;
         interactive = interactiveA;
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/GridColorUtils.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/GridColorUtils.java
index 77cd59a19da1778978cc5499701e667e8b651d98..1ac59d91f5c367e8593ba2aea1f043c045cdf8d0 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/GridColorUtils.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/GridColorUtils.java
@@ -130,7 +130,7 @@ public final class GridColorUtils {
         } else if (colorId instanceof String && !RRuntime.isNA((String) colorId)) {
             paletteIdx = paletteIdxFromString((String) colorId);
         } else if (colorId instanceof Byte && !RRuntime.isNA((byte) colorId)) {
-            paletteIdx = (int) (byte) colorId;
+            paletteIdx = (byte) colorId;
         }
         if (RRuntime.isNA(paletteIdx)) {
             return null;
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/Unit.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/Unit.java
index 23a7f92db67eb6c30eff8b842730e90b8bbf7ab7..6a49ad98346cdbddb0f6f7df3f6f76c33fdd2d57 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/Unit.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/Unit.java
@@ -5,7 +5,7 @@
  *
  * Copyright (C) 2001-3 Paul Murrell
  * Copyright (c) 1998-2013, The R Core Team
- * Copyright (c) 2017, Oracle and/or its affiliates
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates
  *
  * All rights reserved.
  */
@@ -379,27 +379,27 @@ public final class Unit {
             return visit(unit, null);
         }
 
-        protected T visitListUnit(RList unit) {
+        protected T visitListUnit(@SuppressWarnings("unused") RList unit) {
             throw RInternalError.shouldNotReachHere();
         }
 
-        protected T visitArithmeticUnit(ArithmeticUnit unit) {
+        protected T visitArithmeticUnit(@SuppressWarnings("unused") ArithmeticUnit unit) {
             throw RInternalError.shouldNotReachHere();
         }
 
-        protected T visitSimpleUnit(RAbstractVector unit) {
+        protected T visitSimpleUnit(@SuppressWarnings("unused") RAbstractVector unit) {
             throw RInternalError.shouldNotReachHere();
         }
 
-        protected T visitListUnit(RList unit, R arg) {
+        protected T visitListUnit(RList unit, @SuppressWarnings("unused") R arg) {
             return visitListUnit(unit);
         }
 
-        protected T visitArithmeticUnit(ArithmeticUnit unit, R arg) {
+        protected T visitArithmeticUnit(ArithmeticUnit unit, @SuppressWarnings("unused") R arg) {
             return visitArithmeticUnit(unit);
         }
 
-        protected T visitSimpleUnit(RAbstractVector unit, R arg) {
+        protected T visitSimpleUnit(RAbstractVector unit, @SuppressWarnings("unused") R arg) {
             return visitSimpleUnit(unit);
         }
     }
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/color/RGB.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/color/RGB.java
index 6cc23c226a396e2fb1db655a32f9065dec28bc82..bafb494bc00592f463fa79b6f74af58260837ae1 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/color/RGB.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/color/RGB.java
@@ -17,7 +17,6 @@ import com.oracle.truffle.api.dsl.Specialization;
 import com.oracle.truffle.api.dsl.TypeSystemReference;
 import com.oracle.truffle.r.library.fastrGrid.color.RGBNodeGen.DoubleRGBNodeGen;
 import com.oracle.truffle.r.library.fastrGrid.color.RGBNodeGen.IntegerRGBNodeGen;
-import com.oracle.truffle.r.library.fastrGrid.device.GridColor;
 import com.oracle.truffle.r.nodes.builtin.RExternalBuiltinNode;
 import com.oracle.truffle.r.nodes.builtin.CastBuilder.Predef;
 import com.oracle.truffle.r.nodes.unary.CastDoubleNode;
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/device/SVGDevice.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/device/SVGDevice.java
index 2aa4664219aa997fd89d5d1b6c14d45f4038ce85..413d1c638de09fd1196147c76afa752231cb8a39 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/device/SVGDevice.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/device/SVGDevice.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -119,11 +119,11 @@ public class SVGDevice implements GridDevice, FileGridDevice {
     }
 
     @Override
-    public void drawRaster(double leftX, double bottomY, double width, double height, int[] pixels, int pixelsColumnsCount, ImageInterpolation interpolation) {
+    public void drawRaster(double leftX, double bottomY, double w, double h, int[] pixels, int pixelsColumnsCount, ImageInterpolation interpolation) {
         byte[] bitmap = Bitmap.create(pixels, pixelsColumnsCount);
         String base64 = Base64.getEncoder().encodeToString(bitmap);
-        data.append("<image x='").append(round(leftX * COORD_FACTOR)).append("' y='").append(trRound(transY(bottomY + height)));
-        data.append("' width='").append(round(width * COORD_FACTOR)).append("' height='").append(trRound(height));
+        data.append("<image x='").append(round(leftX * COORD_FACTOR)).append("' y='").append(trRound(transY(bottomY + h)));
+        data.append("' width='").append(round(w * COORD_FACTOR)).append("' height='").append(trRound(h));
         data.append("' preserveAspectRatio='none' xlink:href='data:image/bmp;base64,").append(base64).append("'/>\n");
     }
 
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/device/awt/Graphics2DDevice.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/device/awt/Graphics2DDevice.java
index c334bab4857d693959a0820907d55b3a1f80ab7d..1a155c3c63e6f160e2b3ca42db5fc89515892153 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/device/awt/Graphics2DDevice.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/device/awt/Graphics2DDevice.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -161,12 +161,12 @@ public class Graphics2DDevice implements GridDevice {
     }
 
     @Override
-    public void drawRaster(double leftX, double bottomY, double width, double height, int[] pixels, int pixelsColumnsCount, ImageInterpolation interpolation) {
+    public void drawRaster(double leftX, double bottomY, double w, double h, int[] pixels, int pixelsColumnsCount, ImageInterpolation interpolation) {
         graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION, fromInterpolation(interpolation));
         Image image = Toolkit.getDefaultToolkit().createImage(new MemoryImageSource(pixelsColumnsCount, pixels.length / pixelsColumnsCount, pixels, 0, pixelsColumnsCount));
-        double yRel = transY(bottomY + height);
+        double yRel = transY(bottomY + h);
         double xRel = transX(leftX);
-        graphics.drawImage(image, iround(xRel), iround(yRel), transDim(width, xRel), transDim(height, yRel), null);
+        graphics.drawImage(image, iround(xRel), iround(yRel), transDim(w, xRel), transDim(h, yRel), null);
     }
 
     @Override
@@ -349,15 +349,15 @@ public class Graphics2DDevice implements GridDevice {
 
     private BasicStroke getStrokeFromCtx(DrawingContext ctx) {
         byte[] type = ctx.getLineType();
-        double width = ctx.getLineWidth();
+        double w = ctx.getLineWidth();
         int lineJoin = fromGridLineJoin(ctx.getLineJoin());
         float lineMitre = (float) ctx.getLineMitre();
         int endCap = fromGridLineEnd(ctx.getLineEnd());
         if (type == DrawingContext.GRID_LINE_BLANK) {
             return blankStroke;
         } else if (type == DrawingContext.GRID_LINE_SOLID) {
-            if (stokeCache == null || !areEqual(stokeCache, (float) width, endCap, lineJoin, lineMitre)) {
-                stokeCache = new BasicStroke((float) (width), endCap, lineJoin, lineMitre);
+            if (stokeCache == null || !areEqual(stokeCache, (float) w, endCap, lineJoin, lineMitre)) {
+                stokeCache = new BasicStroke((float) (w), endCap, lineJoin, lineMitre);
             }
             return stokeCache;
         }
@@ -365,7 +365,7 @@ public class Graphics2DDevice implements GridDevice {
         for (int i = 0; i < pattern.length; i++) {
             pattern[i] = type[i];
         }
-        return new BasicStroke((float) (width), endCap, lineJoin, lineMitre, pattern, 0f);
+        return new BasicStroke((float) (w), endCap, lineJoin, lineMitre, pattern, 0f);
     }
 
     private static int fromGridLineEnd(GridLineEnd lineEnd) {
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/device/awt/JFrameDevice.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/device/awt/JFrameDevice.java
index 2dd4e5a5b0a01889ea5e73e59f7b09826dd6ceef..06688ca961b4a77734e5f3b8b17ba0e26e7e9170 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/device/awt/JFrameDevice.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/device/awt/JFrameDevice.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -267,8 +267,7 @@ public final class JFrameDevice implements GridDevice, ImageSaver {
                 return;
             }
             synchronized (JFrameDevice.this) {
-                Graphics2D graphics = (Graphics2D) g;
-                graphics.drawImage(toDraw, 0, 0, null);
+                ((Graphics2D) g).drawImage(toDraw, 0, 0, null);
             }
         }
 
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/grDevices/OpenDefaultDevice.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/grDevices/OpenDefaultDevice.java
index 3307dd77efb932a6d360932c564a1757a1c31b0c..4fe0972db41404e79ef59ff3e595ae28c64f3814 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/grDevices/OpenDefaultDevice.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/grDevices/OpenDefaultDevice.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,7 @@ import com.oracle.truffle.r.library.fastrGrid.GridContext;
  * directly through .Call/.External interface.
  */
 public final class OpenDefaultDevice extends Node {
+    @SuppressWarnings("static-method")
     @TruffleBoundary
     public void execute() {
         // if no device has been opened yet, open the default one and make it current
diff --git a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/tools/C_ParseRd.java b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/tools/C_ParseRd.java
index b62147da84a016d7f4cd51f1ab5090db514cc0a9..2e54572883daa228cad7d64d447a8a1703bc5469 100644
--- a/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/tools/C_ParseRd.java
+++ b/com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/tools/C_ParseRd.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,10 @@ import com.oracle.truffle.r.runtime.data.RDataFactory;
 import com.oracle.truffle.r.runtime.data.model.RAbstractLogicalVector;
 import com.oracle.truffle.r.runtime.data.model.RAbstractStringVector;
 import com.oracle.truffle.r.runtime.env.REnvironment;
-import com.oracle.truffle.r.runtime.ffi.RFFIFactory;
 import com.oracle.truffle.r.runtime.ffi.ToolsRFFI;
 
 public abstract class C_ParseRd extends RExternalBuiltinNode.Arg9 {
-    @Child private ToolsRFFI.ParseRdNode parseRdNode = RFFIFactory.getToolsRFFI().createParseRdNode();
+    @Child private ToolsRFFI.ParseRdNode parseRdNode = ToolsRFFI.createParseRdNode();
 
     static {
         Casts casts = new Casts(C_ParseRd.class);
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/AsVector.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/AsVector.java
index 9f8a0e01094bf9ea30cbb00d05c7276aa1dee70b..b6747d6c4872dd37c96b7619bc22588fd4c2ac50 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/AsVector.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/AsVector.java
@@ -272,12 +272,12 @@ public abstract class AsVector extends RBuiltinNode.Arg2 {
             }
 
             @Specialization(guards = "o.getAttributes() != null")
-            protected static RSymbol drop(@SuppressWarnings("unused") Object original, RSymbol o) {
+            protected static RSymbol drop(Object original, RSymbol o) {
                 return original == o ? o : RDataFactory.createSymbol(o.getName());
             }
 
             @Specialization(guards = "pairList.getAttributes() != null")
-            protected Object drop(Object original, RPairList pairList) {
+            protected Object drop(@SuppressWarnings("unused") Object original, RPairList pairList) {
                 // dropping already done in the cast node CastPairListNode below
                 return pairList;
             }
@@ -296,7 +296,7 @@ public abstract class AsVector extends RBuiltinNode.Arg2 {
             }
 
             @Fallback
-            protected Object drop(Object original, Object o) {
+            protected Object drop(@SuppressWarnings("unused") Object original, Object o) {
                 // includes RExpression, RSymbol
                 return o;
             }
@@ -352,7 +352,7 @@ public abstract class AsVector extends RBuiltinNode.Arg2 {
             }
 
             @TruffleBoundary
-            private Object fromVectorWithAttributes(RAbstractContainer x, RemoveNamesAttributeNode removeNamesAttributeNode) {
+            private static Object fromVectorWithAttributes(RAbstractContainer x, RemoveNamesAttributeNode removeNamesAttributeNode) {
                 if (x.getLength() == 0) {
                     return RNull.instance;
                 } else {
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/BetaFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/BetaFunctions.java
index c67e53a67541901595fcd9967e20eeb2a8d6804b..1aec1a232ca6b819777c2b14d0b1f94f354a960f 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/BetaFunctions.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/BetaFunctions.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -87,7 +87,7 @@ public class BetaFunctions {
             return doVectors(a, b, a.slowPathAccess(), b.slowPathAccess(), factory);
         }
 
-        private double lbeta(double a, double b) {
+        private static double lbeta(double a, double b) {
             if (RRuntime.isNA(a) || RRuntime.isNA(b)) {
                 return RRuntime.DOUBLE_NA;
             }
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Bind.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Bind.java
index dd35239badd6926d5752e2991c11e175a68fd6f6..f165604b379ef0e8da159970c8d0e9dfa643a9de 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Bind.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Bind.java
@@ -65,7 +65,6 @@ import com.oracle.truffle.r.runtime.ArgumentsSignature;
 import com.oracle.truffle.r.runtime.RArguments;
 import com.oracle.truffle.r.runtime.RError;
 import com.oracle.truffle.r.runtime.RError.Message;
-import com.oracle.truffle.r.runtime.RInternalError;
 import com.oracle.truffle.r.runtime.RRuntime;
 import com.oracle.truffle.r.runtime.Utils;
 import com.oracle.truffle.r.runtime.builtins.RBuiltin;
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Call.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Call.java
index c60c75338c8c594cd5a1a4aab0abf79b5fba1ed9..466d405fd046abc956319982b7ce2e2b0a8b77ca 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Call.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Call.java
@@ -26,9 +26,6 @@ import static com.oracle.truffle.r.nodes.builtin.CastBuilder.Predef.stringValue;
 import static com.oracle.truffle.r.runtime.builtins.RBehavior.PURE;
 import static com.oracle.truffle.r.runtime.builtins.RBuiltinKind.PRIMITIVE;
 
-import java.util.ArrayList;
-
-import com.oracle.truffle.api.CompilerAsserts;
 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
 import com.oracle.truffle.api.dsl.Specialization;
 import com.oracle.truffle.r.nodes.RASTUtils;
@@ -37,7 +34,6 @@ import com.oracle.truffle.r.nodes.builtin.base.infix.FunctionBuiltin;
 import com.oracle.truffle.r.nodes.function.FunctionExpressionNode;
 import com.oracle.truffle.r.runtime.ArgumentsSignature;
 import com.oracle.truffle.r.runtime.RError;
-import com.oracle.truffle.r.runtime.RError.Message;
 import com.oracle.truffle.r.runtime.builtins.RBuiltin;
 import com.oracle.truffle.r.runtime.context.RContext;
 import com.oracle.truffle.r.runtime.context.TruffleRLanguage;
@@ -46,9 +42,6 @@ import com.oracle.truffle.r.runtime.data.RArgsValuesAndNames;
 import com.oracle.truffle.r.runtime.data.RDataFactory;
 import com.oracle.truffle.r.runtime.data.RLanguage;
 import com.oracle.truffle.r.runtime.data.RMissing;
-import com.oracle.truffle.r.runtime.data.RNull;
-import com.oracle.truffle.r.runtime.data.RPairList;
-import com.oracle.truffle.r.runtime.data.RSymbol;
 import com.oracle.truffle.r.runtime.nodes.RCodeBuilder;
 import com.oracle.truffle.r.runtime.nodes.RNode;
 import com.oracle.truffle.r.runtime.nodes.RSyntaxLookup;
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/CharTr.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/CharTr.java
index 9ac6720898a184d9d292d66af8368b24546e12d1..428abc7bdb996d1257d01ecee3d3ab2a4451f6d2 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/CharTr.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/CharTr.java
@@ -32,12 +32,9 @@ import com.oracle.truffle.api.dsl.Cached;
 import com.oracle.truffle.api.dsl.Specialization;
 import com.oracle.truffle.r.nodes.attributes.RemoveRegAttributesNode;
 import com.oracle.truffle.r.nodes.builtin.RBuiltinNode;
-import com.oracle.truffle.r.nodes.function.opt.ReuseTemporaryNode;
 import com.oracle.truffle.r.runtime.RError.Message;
 import com.oracle.truffle.r.runtime.RRuntime;
 import com.oracle.truffle.r.runtime.builtins.RBuiltin;
-import com.oracle.truffle.r.runtime.data.RDataFactory.VectorFactory;
-import com.oracle.truffle.r.runtime.data.RStringVector;
 import com.oracle.truffle.r.runtime.data.model.RAbstractStringVector;
 import com.oracle.truffle.r.runtime.data.nodes.VectorAccess;
 import com.oracle.truffle.r.runtime.data.nodes.VectorAccess.SequentialIterator;
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Combine.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Combine.java
index 4cbfd06eec2158522d899cf2380d7c8792dfa3c0..c67f195568f87887e16278c1827f7472ef09b915 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Combine.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Combine.java
@@ -70,7 +70,6 @@ import com.oracle.truffle.r.runtime.builtins.RBuiltin;
 import com.oracle.truffle.r.runtime.data.RArgsValuesAndNames;
 import com.oracle.truffle.r.runtime.data.RAttributesLayout;
 import com.oracle.truffle.r.runtime.data.RDataFactory;
-import com.oracle.truffle.r.runtime.data.RExpression;
 import com.oracle.truffle.r.runtime.data.RFunction;
 import com.oracle.truffle.r.runtime.data.RLanguage;
 import com.oracle.truffle.r.runtime.data.RList;
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/DoCall.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/DoCall.java
index b84f42df004c7122f61848ed0beb534b3eddaa38..289fadac02fa12812e51ce2975fe7fcd3d1c499d 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/DoCall.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/DoCall.java
@@ -23,7 +23,6 @@
 package com.oracle.truffle.r.nodes.builtin.base;
 
 import static com.oracle.truffle.r.nodes.builtin.CastBuilder.Predef.instanceOf;
-import static com.oracle.truffle.r.nodes.builtin.CastBuilder.Predef.returnIf;
 import static com.oracle.truffle.r.nodes.builtin.CastBuilder.Predef.stringValue;
 import static com.oracle.truffle.r.nodes.builtin.CastBuilder.Predef.toBoolean;
 import static com.oracle.truffle.r.runtime.RVisibility.CUSTOM;
@@ -66,9 +65,7 @@ import com.oracle.truffle.r.runtime.RType;
 import com.oracle.truffle.r.runtime.VirtualEvalFrame;
 import com.oracle.truffle.r.runtime.builtins.RBuiltin;
 import com.oracle.truffle.r.runtime.builtins.RBuiltinKind;
-import com.oracle.truffle.r.runtime.context.RContext;
 import com.oracle.truffle.r.runtime.data.Closure;
-import com.oracle.truffle.r.runtime.data.ClosureCache;
 import com.oracle.truffle.r.runtime.data.ClosureCache.RNodeClosureCache;
 import com.oracle.truffle.r.runtime.data.ClosureCache.SymbolClosureCache;
 import com.oracle.truffle.r.runtime.data.RArgsValuesAndNames;
@@ -87,7 +84,6 @@ import com.oracle.truffle.r.runtime.env.frame.FrameSlotChangeMonitor;
 import com.oracle.truffle.r.runtime.env.frame.RFrameSlot;
 import com.oracle.truffle.r.runtime.nodes.InternalRSyntaxNodeChildren;
 import com.oracle.truffle.r.runtime.nodes.RSyntaxElement;
-import com.oracle.truffle.r.runtime.nodes.RSyntaxNode;
 
 @RBuiltin(name = ".fastr.do.call", visibility = CUSTOM, kind = RBuiltinKind.INTERNAL, parameterNames = {"what", "args", "quote", "envir"}, behavior = COMPLEX, splitCaller = true)
 public abstract class DoCall extends RBuiltinNode.Arg4 implements InternalRSyntaxNodeChildren {
@@ -191,7 +187,7 @@ public abstract class DoCall extends RBuiltinNode.Arg4 implements InternalRSynta
          * we create a frame the fakes caller, but otherwise delegates to the frame backing the
          * explicitly given environment.
          */
-        private MaterializedFrame getEvalFrame(VirtualFrame virtualFrame, MaterializedFrame envFrame) {
+        private static MaterializedFrame getEvalFrame(VirtualFrame virtualFrame, MaterializedFrame envFrame) {
             return VirtualEvalFrame.create(envFrame, RArguments.getFunction(virtualFrame), RArguments.getCall(virtualFrame));
         }
 
@@ -206,7 +202,7 @@ public abstract class DoCall extends RBuiltinNode.Arg4 implements InternalRSynta
          * @see RCaller
          * @see RArguments
          */
-        private RCaller getExplicitCaller(VirtualFrame virtualFrame, MaterializedFrame envFrame, String funcName, RFunction func, RArgsValuesAndNames args) {
+        private static RCaller getExplicitCaller(VirtualFrame virtualFrame, MaterializedFrame envFrame, String funcName, RFunction func, RArgsValuesAndNames args) {
             Supplier<RSyntaxElement> callerSyntax;
             if (funcName != null) {
                 callerSyntax = RCallerHelper.createFromArguments(funcName, args);
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FileFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FileFunctions.java
index 45461997df5e49761b91fe8ffce544761b4cac25..997d7590dafc7a474c8ff05d6608e850117faf32 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FileFunctions.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FileFunctions.java
@@ -633,7 +633,7 @@ public class FileFunctions {
             return doListFilesBody(vec, pattern, allFiles, fullNames, recursive, ignoreCase, includeDirs, noDotDot);
         }
 
-        private RStringVector doListFilesBody(RAbstractStringVector vec, String patternString, boolean allFiles, boolean fullNames, boolean recursive,
+        private static RStringVector doListFilesBody(RAbstractStringVector vec, String patternString, boolean allFiles, boolean fullNames, boolean recursive,
                         boolean ignoreCase, boolean includeDirsIn, boolean noDotDot) {
             boolean includeDirs = !recursive || includeDirsIn;
             int flags = ignoreCase ? Pattern.CASE_INSENSITIVE : 0;
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FindInterval.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FindInterval.java
index 149ee82320863105c60f82dc564a567295d27202..a5029b6c6cc93b94070765d5785bcd3d18431f03 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FindInterval.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FindInterval.java
@@ -4,7 +4,7 @@
  * http://www.gnu.org/licenses/gpl-2.0.html
  *
  * Copyright (c) 2002--2016, The R Core Team
- * Copyright (c) 2017, Oracle and/or its affiliates
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates
  *
  * All rights reserved.
  */
@@ -81,7 +81,7 @@ public abstract class FindInterval extends RBuiltinNode.Arg5 {
 
     // transcribed from appl/interv.c
 
-    private int findInterval2(VectorAccess xtAccess, RandomIterator xtIter, double x, boolean right, boolean inside, boolean leftOpen, int iloIn) {
+    private static int findInterval2(VectorAccess xtAccess, RandomIterator xtIter, double x, boolean right, boolean inside, boolean leftOpen, int iloIn) {
         int n = xtAccess.getLength(xtIter);
         if (n == 0) {
             return 0;
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Format.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Format.java
index 16c660c1a74169513f5eeca3b40ffac3335466c2..cf1d6a731da2e7806d2c7effba057ddeec4eed87 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Format.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Format.java
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1995-2012, The R Core Team
  * Copyright (c) 2003, The R Foundation
- * Copyright (c) 2014, 2017, Oracle and/or its affiliates
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates
  *
  * All rights reserved.
  */
@@ -17,7 +17,6 @@ import static com.oracle.truffle.r.nodes.builtin.CastBuilder.Predef.intNA;
 import static com.oracle.truffle.r.nodes.builtin.CastBuilder.Predef.lte;
 import static com.oracle.truffle.r.nodes.builtin.CastBuilder.Predef.toBoolean;
 import static com.oracle.truffle.r.nodes.builtin.CastBuilder.Predef.logicalValue;
-import static com.oracle.truffle.r.nodes.builtin.CastBuilder.Predef.integerValue;
 import static com.oracle.truffle.r.nodes.builtin.CastBuilder.Predef.asIntegerVector;
 import static com.oracle.truffle.r.nodes.builtin.CastBuilder.Predef.asLogicalVector;
 import static com.oracle.truffle.r.nodes.builtin.CastBuilder.Predef.findFirst;
@@ -38,8 +37,6 @@ import static com.oracle.truffle.r.runtime.builtins.RBuiltinKind.INTERNAL;
 import com.oracle.truffle.api.CompilerDirectives;
 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
 import com.oracle.truffle.api.dsl.Specialization;
-import com.oracle.truffle.api.object.Shape.Pred;
-import com.oracle.truffle.r.nodes.builtin.CastBuilder.Predef;
 import com.oracle.truffle.r.nodes.builtin.RBuiltinNode;
 import com.oracle.truffle.r.nodes.builtin.base.printer.ComplexVectorPrinter;
 import com.oracle.truffle.r.nodes.builtin.base.printer.DoubleVectorPrinter;
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FormatInfo.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FormatInfo.java
index 89c5c092bf28c170e140c0bd228d38b14e200906..471046352716407535eac2d8d2435d0bc16026b1 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FormatInfo.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FormatInfo.java
@@ -61,13 +61,12 @@ public abstract class FormatInfo extends RBuiltinNode.Arg3 {
     }
 
     @Specialization
-    protected int doInt(int n, @SuppressWarnings("unused") int digits, @SuppressWarnings("unused") int nsmall,
-                    @Cached("create()") VectorFactory factory) {
+    protected int doInt(int n, @SuppressWarnings("unused") int digits, @SuppressWarnings("unused") int nsmall) {
         return (n == RRuntime.INT_NA) ? 2 : intLength(n);
     }
 
     @Specialization
-    protected int doString(String s, int digits, int nsmall) {
+    protected int doString(String s, @SuppressWarnings("unused") int digits, @SuppressWarnings("unused") int nsmall) {
         return s.length();
     }
 
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FrameFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FrameFunctions.java
index 6e2f7dda034d4056c45c345461a5f00d5ab29686..3ec9be5ccfee7e492d9ce5d8f13779eb1488f683 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FrameFunctions.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/FrameFunctions.java
@@ -203,7 +203,7 @@ public class FrameFunctions {
         }
 
         @TruffleBoundary
-        private Object createCall(RCaller call) {
+        private static Object createCall(RCaller call) {
             assert call == null || !call.isPromise();
             if (call == null || !call.isValidCaller()) {
                 return RNull.instance;
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/LaFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/LaFunctions.java
index 88be8006f564bec1b90e79cc09baa2c0d40963b2..1a19c3ea05b608473fc20e9527a1d358eb5ba4a1 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/LaFunctions.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/LaFunctions.java
@@ -56,7 +56,6 @@ import com.oracle.truffle.r.nodes.attributes.SpecialAttributesFunctions.SetNames
 import com.oracle.truffle.r.nodes.attributes.UnaryCopyAttributesNode;
 import com.oracle.truffle.r.nodes.builtin.NodeWithArgumentCasts.Casts;
 import com.oracle.truffle.r.nodes.builtin.RBuiltinNode;
-import com.oracle.truffle.r.nodes.unary.CastComplexNode;
 import com.oracle.truffle.r.nodes.unary.CastDoubleNode;
 import com.oracle.truffle.r.nodes.unary.CastDoubleNodeGen;
 import com.oracle.truffle.r.runtime.RAccuracyInfo;
@@ -399,7 +398,6 @@ public class LaFunctions {
                         @Cached("create()") ExtractListElement extractTauElement,
                         @Cached("create()") GetDimAttributeNode getQDimAttribute,
                         @Cached("create()") GetDimAttributeNode getBDimAttribute,
-                        @Cached("create()") CastComplexNode bAsComplex,
                         @Cached("create()") VectorFactory resultVectorFactory) {
             RAbstractComplexVector qr = (RAbstractComplexVector) extractQrElement.execute(q, 0);
             RAbstractComplexVector tau = (RAbstractComplexVector) extractTauElement.execute(q, 2);
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Match.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Match.java
index 4b7a5d24b23c20640083835a003cd38c255a7448..e890e3144ff0c462ea8529265ad33ea62f698ada 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Match.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Match.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -684,12 +684,12 @@ public abstract class Match extends RBuiltinNode.Arg4 {
         }
 
         @Specialization
-        protected RIntVector match(RAbstractRawVector x, RAbstractLogicalVector table, int nomatch) {
+        protected RIntVector match(RAbstractRawVector x, @SuppressWarnings("unused") RAbstractLogicalVector table, @SuppressWarnings("unused") int nomatch) {
             return RDataFactory.createIntVector(x.getLength(), true);
         }
 
         @Specialization
-        protected RIntVector match(RAbstractRawVector x, RAbstractComplexVector table, int nomatch) {
+        protected RIntVector match(RAbstractRawVector x, @SuppressWarnings("unused") RAbstractComplexVector table, @SuppressWarnings("unused") int nomatch) {
             return RDataFactory.createIntVector(x.getLength(), true);
         }
 
@@ -712,12 +712,12 @@ public abstract class Match extends RBuiltinNode.Arg4 {
         }
 
         @Specialization
-        protected RIntVector match(RAbstractLogicalVector x, RAbstractRawVector table, int nomatch) {
+        protected RIntVector match(RAbstractLogicalVector x, @SuppressWarnings("unused") RAbstractRawVector table, @SuppressWarnings("unused") int nomatch) {
             return RDataFactory.createIntVector(x.getLength(), true);
         }
 
         @Specialization
-        protected RIntVector match(RAbstractComplexVector x, RAbstractRawVector table, int nomatch) {
+        protected RIntVector match(RAbstractComplexVector x, @SuppressWarnings("unused") RAbstractRawVector table, @SuppressWarnings("unused") int nomatch) {
             return RDataFactory.createIntVector(x.getLength(), true);
         }
 
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/OptionsFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/OptionsFunctions.java
index 1e1194bbfc6eafdce215b24b087809cd5aaf806d..84d9a738cc8c07146c222e5a1194fa904bd57c97 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/OptionsFunctions.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/OptionsFunctions.java
@@ -30,7 +30,7 @@ import static com.oracle.truffle.r.runtime.builtins.RBuiltinKind.INTERNAL;
 
 import java.text.Collator;
 import java.util.ArrayList;
-import java.util.Arrays;
+import java.util.Collections;
 import java.util.Comparator;
 import java.util.Locale;
 import java.util.Map;
@@ -80,11 +80,10 @@ public class OptionsFunctions {
             Object[] data = new Object[optionSettings.size()];
             String[] names = new String[data.length];
 
-            @SuppressWarnings({"unchecked", "rawtypes"})
-            Map.Entry<String, Object>[] entries = optionSettings.toArray(new Map.Entry[optionSettings.size()]);
+            ArrayList<Map.Entry<String, Object>> entries = new ArrayList<>(optionSettings);
             Locale locale = RContext.getInstance().stateRLocale.getLocale(RLocale.COLLATE);
             Collator collator = locale == Locale.ROOT || locale == null ? null : RLocale.getOrderCollator(locale);
-            Arrays.sort(entries, new Comparator<Map.Entry<String, Object>>() {
+            Collections.sort(entries, new Comparator<Map.Entry<String, Object>>() {
                 @Override
                 public int compare(Map.Entry<String, Object> o1, Map.Entry<String, Object> o2) {
                     return RLocale.compare(collator, o1.getKey(), o2.getKey());
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SerializeFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SerializeFunctions.java
index a560f8f4a05a57ff7a664ac4c59e5f3c68d12f05..03a083f18a546b2e990648693ac6580bae5a8d45 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SerializeFunctions.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/SerializeFunctions.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -179,7 +179,7 @@ public class SerializeFunctions {
         }
 
         @Specialization
-        protected Object serialize(Object object, RNull conn, int type, @SuppressWarnings("unused") Object version, @SuppressWarnings("unused") RNull refhook) {
+        protected Object serialize(Object object, @SuppressWarnings("unused") RNull conn, int type, @SuppressWarnings("unused") Object version, @SuppressWarnings("unused") RNull refhook) {
             byte[] data = RSerialize.serialize(object, type, RSerialize.DEFAULT_VERSION, null);
             return RDataFactory.createRawVector(data);
         }
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Substitute.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Substitute.java
index 8251eb1da6de0ef5e3fb352da5b2eba3d5f72bb2..b36d37b4337ef084bfe0f07a1def52c089b4e6e9 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Substitute.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Substitute.java
@@ -58,7 +58,7 @@ public abstract class Substitute extends RBuiltinNode.Arg2 {
     }
 
     @Specialization
-    protected Object doSubstitute(VirtualFrame frame, @SuppressWarnings("unused") RMissing exprMissing, @SuppressWarnings("unused") RMissing envMissing) {
+    protected Object doSubstitute(@SuppressWarnings("unused") RMissing exprMissing, @SuppressWarnings("unused") RMissing envMissing) {
         return RSymbol.MISSING;
     }
 
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Typeof.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Typeof.java
index 0393807fe66776526f373373691c8a26c274be1f..2aedfac0707be8acaf0258d75038cc5142210fd5 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Typeof.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Typeof.java
@@ -28,7 +28,6 @@ import static com.oracle.truffle.r.runtime.builtins.RBuiltinKind.INTERNAL;
 import com.oracle.truffle.api.dsl.Specialization;
 import com.oracle.truffle.r.nodes.builtin.RBuiltinNode;
 import com.oracle.truffle.r.nodes.unary.TypeofNode;
-import com.oracle.truffle.r.nodes.unary.TypeofNodeGen;
 import com.oracle.truffle.r.runtime.builtins.RBuiltin;
 
 @RBuiltin(name = "typeof", kind = INTERNAL, parameterNames = {"x"}, behavior = PURE)
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UpdateClass.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UpdateClass.java
index 31d531ca96fd11ebe9e77cba68acd28bde24924a..3b2cbe97dc1ad6eb6b99afce4f63d2769476a244 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UpdateClass.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UpdateClass.java
@@ -65,7 +65,7 @@ public abstract class UpdateClass extends RBuiltinNode.Arg2 {
     }
 
     @Specialization
-    protected Object setClass(@SuppressWarnings("unused") RNull arg, @SuppressWarnings("unused") Object className) {
+    protected Object setClass(@SuppressWarnings("unused") RNull arg, Object className) {
         if (className != RNull.instance) {
             throw error(RError.Message.SET_ATTRIBUTES_ON_NULL);
         }
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UpdateNames.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UpdateNames.java
index a7879e7a0c3589ecca41ff7087dca78b32b651c8..4f8eccbddde2caddc2f6253a6aa9040d31cc7016 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UpdateNames.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/UpdateNames.java
@@ -95,6 +95,7 @@ public abstract class UpdateNames extends RBuiltinNode.Arg2 {
         return result;
     }
 
+    @SuppressWarnings("unused")
     @Fallback
     protected Object doOthers(Object target, Object names) {
         throw error(Message.NAMES_NONVECTOR);
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/FortranAndCFunctions.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/FortranAndCFunctions.java
index 5dfa769de92240a73b209a8f19fcbf87b315a4da..7a3f15189cdaa1292cc8b7f73dbeb4aaadf92087 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/FortranAndCFunctions.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/foreign/FortranAndCFunctions.java
@@ -37,7 +37,6 @@ import com.oracle.truffle.r.runtime.data.RDataFactory;
 import com.oracle.truffle.r.runtime.data.RList;
 import com.oracle.truffle.r.runtime.data.RMissing;
 import com.oracle.truffle.r.runtime.data.model.RAbstractStringVector;
-import com.oracle.truffle.r.runtime.ffi.CRFFI;
 import com.oracle.truffle.r.runtime.ffi.DLL;
 import com.oracle.truffle.r.runtime.ffi.InvokeCNode;
 import com.oracle.truffle.r.runtime.ffi.NativeCallInfo;
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/infix/FunctionBuiltin.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/infix/FunctionBuiltin.java
index 4f885fac2fe13fa5909fa370a48596f4509b096d..fab8b552c9b22c8eb4dd2a3ee455bba79b48cd47 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/infix/FunctionBuiltin.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/infix/FunctionBuiltin.java
@@ -22,41 +22,22 @@
  */
 package com.oracle.truffle.r.nodes.builtin.base.infix;
 
-import static com.oracle.truffle.r.nodes.builtin.CastBuilder.Predef.toBoolean;
 import static com.oracle.truffle.r.runtime.builtins.RBehavior.COMPLEX;
-import static com.oracle.truffle.r.runtime.builtins.RBehavior.READS_FRAME;
 import static com.oracle.truffle.r.runtime.builtins.RBuiltinKind.PRIMITIVE;
 
-import java.util.ArrayList;
 import java.util.List;
 
-import com.oracle.truffle.api.CompilerAsserts;
 import com.oracle.truffle.api.CompilerDirectives;
 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
-import com.oracle.truffle.api.dsl.Cached;
-import com.oracle.truffle.api.dsl.Fallback;
-import com.oracle.truffle.api.dsl.Specialization;
 import com.oracle.truffle.api.frame.MaterializedFrame;
 import com.oracle.truffle.api.frame.VirtualFrame;
 import com.oracle.truffle.r.nodes.RASTUtils;
 import com.oracle.truffle.r.nodes.builtin.RBuiltinNode;
 import com.oracle.truffle.r.nodes.function.FunctionExpressionNode;
 import com.oracle.truffle.r.nodes.profile.TruffleBoundaryNode;
-import com.oracle.truffle.r.runtime.RError;
-import com.oracle.truffle.r.runtime.RError.Message;
-import com.oracle.truffle.r.runtime.RInternalError;
-import com.oracle.truffle.r.runtime.RRuntime;
 import com.oracle.truffle.r.runtime.builtins.RBuiltin;
 import com.oracle.truffle.r.runtime.context.RContext;
 import com.oracle.truffle.r.runtime.context.TruffleRLanguage;
-import com.oracle.truffle.r.runtime.data.Closure;
-import com.oracle.truffle.r.runtime.data.RDataFactory;
-import com.oracle.truffle.r.runtime.data.RExpression;
-import com.oracle.truffle.r.runtime.data.RNull;
-import com.oracle.truffle.r.runtime.data.RPairList;
-import com.oracle.truffle.r.runtime.data.RPromise;
-import com.oracle.truffle.r.runtime.data.RSymbol;
-import com.oracle.truffle.r.runtime.nodes.RCodeBuilder;
 import com.oracle.truffle.r.runtime.nodes.RCodeBuilder.Argument;
 import com.oracle.truffle.r.runtime.nodes.RSyntaxNode;
 
@@ -87,7 +68,7 @@ public final class FunctionBuiltin extends RBuiltinNode.Arg2 {
 
         @TruffleBoundary
         public Object execute(MaterializedFrame frame, TruffleRLanguage language, Object args, Object body) {
-            funExprNode = insert(createFunctionExpressionNode(getRLanguage(), args, body));
+            funExprNode = insert(createFunctionExpressionNode(language, args, body));
             return funExprNode.execute(frame);
         }
     }
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/infix/SpecialsUtils.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/infix/SpecialsUtils.java
index 22c41124aa124dc10b49b36ad21dc9561b0ba7e7..6b2a39bafc38b684e9f4fb0e21b0ede586215e6f 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/infix/SpecialsUtils.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/infix/SpecialsUtils.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -183,8 +183,8 @@ class SpecialsUtils {
 
         @Specialization(replaces = "convertIntVector", guards = {"value.getLength() == 1", "hierarchyNode.execute(value) == null", "hasAttrsNode.execute(value)"})
         protected static int convertIntVectorGeneric(RAbstractIntVector value,
-                        @Cached("create()") @SuppressWarnings("unused") ClassHierarchyNode hierarchyNode,
-                        @Cached("create()") @SuppressWarnings("unused") HasAttributesNode hasAttrsNode) {
+                        @Cached("create()") ClassHierarchyNode hierarchyNode,
+                        @Cached("create()") HasAttributesNode hasAttrsNode) {
             return convertIntVector(value, hierarchyNode, hasAttrsNode, value.slowPathAccess());
         }
 
@@ -200,8 +200,8 @@ class SpecialsUtils {
 
         @Specialization(replaces = "convertDoubleVector", guards = {"value.getLength() == 1", "hierarchyNode.execute(value) == null", "hasAttrsNode.execute(value)"})
         protected static double convertDoubleVectorGeneric(RAbstractDoubleVector value,
-                        @Cached("create()") @SuppressWarnings("unused") ClassHierarchyNode hierarchyNode,
-                        @Cached("create()") @SuppressWarnings("unused") HasAttributesNode hasAttrsNode) {
+                        @Cached("create()") ClassHierarchyNode hierarchyNode,
+                        @Cached("create()") HasAttributesNode hasAttrsNode) {
             return convertDoubleVector(value, hierarchyNode, hasAttrsNode, value.slowPathAccess());
         }
 
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/infix/Subscript.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/infix/Subscript.java
index 1e5a320d89dcebbaaa0b5174eb2dd3b9e6e3c1af..1739039806a89df95b8a87788ce695ce498f29dd 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/infix/Subscript.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/infix/Subscript.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -195,7 +195,7 @@ abstract class SubscriptSpecial extends SubscriptSpecialBase {
     }
 
     @Specialization(guards = {"simpleVector(vector)", "!inReplacement"})
-    protected static Object access(RAbstractVector vector, Object index,
+    protected static Object accessObject(RAbstractVector vector, Object index,
                     @Cached("createAccess()") ExtractVectorNode extract) {
         return extract.apply(vector, new Object[]{index}, RRuntime.LOGICAL_TRUE, RLogical.TRUE);
     }
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/infix/Subset.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/infix/Subset.java
index 107b02ea74c06e5f4d067ab9738cbe24d8cf4225..0c51ea27ed2d91ed93cb2f1b86aee8fa3662940a 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/infix/Subset.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/infix/Subset.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -77,7 +77,7 @@ abstract class SubsetSpecial extends SubscriptSpecialBase {
     }
 
     @Specialization(guards = {"simpleVector(vector)", "!inReplacement"})
-    protected Object access(RAbstractVector vector, Object index,
+    protected Object accessObject(RAbstractVector vector, Object index,
                     @Cached("createAccess()") ExtractVectorNode extract) {
         return extract.apply(vector, new Object[]{index}, RRuntime.LOGICAL_TRUE, RLogical.TRUE);
     }
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRInterop.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRInterop.java
index 8da59509fff8f7523de4d3ad3a3ff33a0de82738..adc76dc605830af8f794d21d417b2936c10c2aa2 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRInterop.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRInterop.java
@@ -855,7 +855,7 @@ public class FastRInterop {
                 String msg = isTesting ? "error during Java object instantiation" : "error during Java object instantiation: " + e.getMessage();
                 throw error(RError.Message.GENERIC, msg);
             } catch (RuntimeException e) {
-                throw RError.handleInteropException(this, e, clazz);
+                throw RError.handleInteropException(this, e);
             }
         }
 
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRTrace.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRTrace.java
index c12826198a44eddd1ba0ed230626252cfc04815b..437fa5d89b4e6599a42719f10aed54d698d520ca 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRTrace.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/FastRTrace.java
@@ -181,7 +181,7 @@ public class FastRTrace {
             } else {
                 throw error(RError.Message.GENERIC, "tracer is unexpected type");
             }
-            TraceHandling.enableStatementTrace(func, tracer, exit, at, print);
+            TraceHandling.enableStatementTrace(func, tracer, at, print);
         }
     }
 
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/memprof/FastRprofmem.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/memprof/FastRprofmem.java
index 802b049011e4aa701e472058bccfd5a4b60ffa30..831dfe285317a27219cef509331f2852c94a3476 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/memprof/FastRprofmem.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/memprof/FastRprofmem.java
@@ -35,7 +35,6 @@ import com.oracle.truffle.api.interop.TruffleObject;
 import com.oracle.truffle.r.nodes.builtin.RBuiltinNode;
 import com.oracle.truffle.r.runtime.RError.Message;
 import com.oracle.truffle.r.runtime.builtins.RBuiltin;
-import com.oracle.truffle.r.runtime.data.RNull;
 
 @RBuiltin(name = ".fastr.profmem", visibility = OFF, kind = PRIMITIVE, parameterNames = {"on"}, behavior = IO)
 public abstract class FastRprofmem extends RBuiltinNode.Arg1 {
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/memprof/FastRprofmemShow.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/memprof/FastRprofmemShow.java
index 9179838da5c2224a0844e393344184772dbe981c..23e5fc3eab363ef41a8369335f9ea23e0a75e1ef 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/memprof/FastRprofmemShow.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/memprof/FastRprofmemShow.java
@@ -31,7 +31,6 @@ import static com.oracle.truffle.r.runtime.RVisibility.OFF;
 import static com.oracle.truffle.r.runtime.builtins.RBehavior.IO;
 import static com.oracle.truffle.r.runtime.builtins.RBuiltinKind.PRIMITIVE;
 
-import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
 import com.oracle.truffle.api.dsl.Specialization;
 import com.oracle.truffle.api.interop.TruffleObject;
 import com.oracle.truffle.r.nodes.builtin.RBuiltinNode;
@@ -39,7 +38,6 @@ import com.oracle.truffle.r.runtime.RError.Message;
 import com.oracle.truffle.r.runtime.RRuntime;
 import com.oracle.truffle.r.runtime.builtins.RBuiltin;
 import com.oracle.truffle.r.runtime.data.RNull;
-import com.oracle.truffle.r.runtime.instrument.memprof.MemAllocProfilerPaths;
 
 @RBuiltin(name = ".fastr.profmem.show", visibility = OFF, kind = PRIMITIVE, parameterNames = {"levels", "desc", "id", "printParents", "view", "snapshot"}, behavior = IO)
 public abstract class FastRprofmemShow extends RBuiltinNode.Arg6 {
@@ -61,7 +59,7 @@ public abstract class FastRprofmemShow extends RBuiltinNode.Arg6 {
 
     @Specialization
     @SuppressWarnings("unused")
-    public Object doProfMem(int levels, boolean desc, @SuppressWarnings("unused") RNull n, boolean printParents, String view, TruffleObject snapshot) {
+    public Object doProfMem(int levels, boolean desc, RNull n, boolean printParents, String view, TruffleObject snapshot) {
         // TODO: port to new instrumentation API, original code can be found in git history
         throw error(Message.GENERIC, ".fastr.profmem.show is not available.");
     }
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/memprof/FastRprofmemSource.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/memprof/FastRprofmemSource.java
index 5e3eac7f322bee7d3c639aea2071363f519d7639..b52c435d98a4270d1ab274a864877cb04eeb6a96 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/memprof/FastRprofmemSource.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/fastr/memprof/FastRprofmemSource.java
@@ -37,7 +37,6 @@ import com.oracle.truffle.r.runtime.RError.Message;
 import com.oracle.truffle.r.runtime.RRuntime;
 import com.oracle.truffle.r.runtime.builtins.RBuiltin;
 import com.oracle.truffle.r.runtime.data.RNull;
-import com.oracle.truffle.r.runtime.instrument.memprof.MemAllocProfilerPaths;
 
 @RBuiltin(name = ".fastr.profmem.source", visibility = OFF, kind = PRIMITIVE, parameterNames = {"id", "view", "snapshot"}, behavior = IO)
 public abstract class FastRprofmemSource extends RBuiltinNode.Arg3 {
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/helpers/TraceHandling.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/helpers/TraceHandling.java
index 2d2ff936bc88918e43e503817ddc5e9a77538703..bdf06d0ff098aa05d5d622e729821934a8df48c3 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/helpers/TraceHandling.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/helpers/TraceHandling.java
@@ -95,7 +95,7 @@ public class TraceHandling {
         }
     }
 
-    public static boolean enableStatementTrace(RFunction func, RLanguage tracer, @SuppressWarnings("unused") Object exit, Object at, boolean print) {
+    public static boolean enableStatementTrace(RFunction func, RLanguage tracer, Object at, boolean print) {
         @SuppressWarnings("unchecked")
         EventBinding<TraceEventListener> binding = (EventBinding<TraceEventListener>) RContext.getInstance().stateInstrumentation.getTraceBinding(RInstrumentation.getSourceSection(func));
         if (binding != null) {
diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/access/vector/VectorManipulationTest.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/access/vector/VectorManipulationTest.java
index 8dc15dad451a705e1337dc30982b7f5e121ccd0e..5239122f775597c40faa204e46a803e2b5b54107 100644
--- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/access/vector/VectorManipulationTest.java
+++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/access/vector/VectorManipulationTest.java
@@ -141,7 +141,7 @@ public class VectorManipulationTest extends TestBase {
         });
     }
 
-    private <ArrayT> void assertDataContents(RVector<ArrayT> vec, ArrayT arr) {
+    private static <ArrayT> void assertDataContents(RVector<ArrayT> vec, ArrayT arr) {
         int len = vec.getLength();
         RType type = vec.getRType();
         for (int i = 0; i < len; i++) {
diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/CastUtils.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/CastUtils.java
index fda59988b92dd86d2a049a7d8f417642bbde717b..953535858fce50d42021defe253daedfc1c8cb05 100644
--- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/CastUtils.java
+++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/CastUtils.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -564,23 +564,22 @@ public class CastUtils {
         }
     }
 
-    @SuppressWarnings("rawtypes")
     public static Class<?>[] rTypeToClasses(RType type) {
         switch (type) {
             case Integer:
-                return new Class[]{Integer.class, RAbstractIntVector.class};
+                return new Class<?>[]{Integer.class, RAbstractIntVector.class};
             case Double:
-                return new Class[]{Double.class, RAbstractDoubleVector.class};
+                return new Class<?>[]{Double.class, RAbstractDoubleVector.class};
             case Logical:
-                return new Class[]{Byte.class, RAbstractLogicalVector.class};
+                return new Class<?>[]{Byte.class, RAbstractLogicalVector.class};
             case Character:
-                return new Class[]{String.class, RAbstractStringVector.class};
+                return new Class<?>[]{String.class, RAbstractStringVector.class};
             case Complex:
-                return new Class[]{RAbstractComplexVector.class};
+                return new Class<?>[]{RAbstractComplexVector.class};
             case Raw:
-                return new Class[]{RAbstractRawVector.class};
+                return new Class<?>[]{RAbstractRawVector.class};
             case Any:
-                return new Class[]{Object.class};
+                return new Class<?>[]{Object.class};
         }
         return null;
     }
@@ -773,9 +772,8 @@ public class CastUtils {
         return Arrays.stream(classes).flatMap(t -> CastUtils.sampleValuesForType(t).stream()).collect(Collectors.toSet());
     }
 
-    @SuppressWarnings("rawtypes")
     public static Set<?> sampleValuesForClass(Class<?> cls) {
-        return sampleValuesForClasses(new Class[]{cls});
+        return sampleValuesForClasses(new Class<?>[]{cls});
     }
 
     public static Set<?> sampleValuesForType(Type t) {
diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/SamplesCollector.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/SamplesCollector.java
index 7318fc93e76a730860ec878c60f210eab449b95e..76938d51b4e3cd93ed6f0d8d835fa3d9f0f8b0c3 100644
--- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/SamplesCollector.java
+++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/SamplesCollector.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -222,9 +222,8 @@ public class SamplesCollector extends ExecutionPathVisitor<Consumer<Object>>
     // Filter visitor
 
     @Override
-    @SuppressWarnings("rawtypes")
     public Consumer<Object> visit(TypeFilter<?, ?> filter, Consumer<Object> previous) {
-        Class<?>[] filterTypes = new Class[]{filter.getType1(), filter.getType2()};
+        Class<?>[] filterTypes = new Class<?>[]{filter.getType1(), filter.getType2()};
         Set<?> samples = CastUtils.sampleValuesForClasses(filterTypes);
         for (Object s : samples) {
             previous.accept(s);
diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/UpperBoundsConjunction.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/UpperBoundsConjunction.java
index e4c03aa42f6a7a6c94816f336c0e7d94b12512c3..0bc5eb6c0824aee060531e0f3a5e1bef6e8889af 100644
--- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/UpperBoundsConjunction.java
+++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/casts/UpperBoundsConjunction.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -79,7 +79,7 @@ public final class UpperBoundsConjunction implements WildcardType, TypeAndInstan
 
     public static UpperBoundsConjunction create(Stream<? extends Type> typeStream) {
         Set<Type> upperBounds = typeStream.flatMap(t -> ((t instanceof UpperBoundsConjunction && !((UpperBoundsConjunction) t).isWildcard()) ? ((UpperBoundsConjunction) t).upperBounds
-                        : Collections.singleton(t)).stream()).collect(Collectors.toSet());
+                        : Collections.singleton((Type) t)).stream()).collect(Collectors.toSet());
         return new UpperBoundsConjunction(upperBounds, false, null);
     }
 
diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/ChimneySweeping.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/ChimneySweeping.java
index 10f273d4c701eebe429a74fcd142323a33abc6e5..86b4bf422bc7cf74cc1e1d5730a9b93245269742 100644
--- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/ChimneySweeping.java
+++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/ChimneySweeping.java
@@ -265,7 +265,6 @@ class ChimneySweeping extends SingleBuiltinDiagnostics {
         return true;
     }
 
-    @SuppressWarnings({"rawtypes", "unchecked"})
     private List<Samples<?>> createSamples() {
         DefaultArgsExtractor defArgExt = new DefaultArgsExtractor(diagSuite.fastRSession, msg -> print(1, msg));
         Map<String, Samples<?>> defaultArgs = defArgExt.extractDefaultArgs(builtinName);
@@ -274,7 +273,7 @@ class ChimneySweeping extends SingleBuiltinDiagnostics {
 
         List<Samples<?>> as = new ArrayList<>();
         for (int i = 0; i < argLength; i++) {
-            Samples samples;
+            Samples<?> samples;
 
             if (diagSuite.diagConfig.missingAndNullSamplesOnly) {
                 samples = Samples.anything(RNull.instance).or(Samples.anything(RMissing.instance));
@@ -296,7 +295,7 @@ class ChimneySweeping extends SingleBuiltinDiagnostics {
                     throw new RuntimeException("Error in sample generation from argument " + i, e);
                 }
 
-                Samples defArgSamples = defaultArgs.get(parameterNames[i]);
+                Samples<?> defArgSamples = defaultArgs.get(parameterNames[i]);
                 samples = defArgSamples == null ? samples : samples.and(defArgSamples);
             }
 
diff --git a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/ExtBuiltinsList.java b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/ExtBuiltinsList.java
index 22db6fbbd0270e95d101efb26d08047f158e2ba1..9b6a77256bb1aa1a8f8a46a25cb73c9a4e4028d4 100644
--- a/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/ExtBuiltinsList.java
+++ b/com.oracle.truffle.r.nodes.test/src/com/oracle/truffle/r/nodes/test/ExtBuiltinsList.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,7 @@ import com.oracle.truffle.r.nodes.builtin.RExternalBuiltinNode;
  */
 public class ExtBuiltinsList {
 
-    @SuppressWarnings("rawtypes") private static final Class[] builtins = {
+    private static final List<Class<? extends RExternalBuiltinNode>> builtins = Arrays.asList(
                     com.oracle.truffle.r.nodes.builtin.RInternalCodeBuiltinNode.class,
                     com.oracle.truffle.r.nodes.objects.NewObjectNodeGen.class,
                     com.oracle.truffle.r.nodes.objects.GetPrimNameNodeGen.class,
@@ -90,11 +90,9 @@ public class ExtBuiltinsList {
                     com.oracle.truffle.r.library.methods.MethodsListDispatchFactory.R_getGenericNodeGen.class,
                     com.oracle.truffle.r.library.methods.MethodsListDispatchFactory.R_nextMethodCallNodeGen.class,
                     com.oracle.truffle.r.library.methods.MethodsListDispatchFactory.R_externalPtrPrototypeObjectNodeGen.class,
-                    com.oracle.truffle.r.library.stats.deriv.DerivNodeGen.class,
-    };
+                    com.oracle.truffle.r.library.stats.deriv.DerivNodeGen.class);
 
-    @SuppressWarnings("unchecked")
     public static List<Class<? extends RExternalBuiltinNode>> getBuiltins() {
-        return Arrays.asList(builtins);
+        return builtins;
     }
 }
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/AccessArgumentNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/AccessArgumentNode.java
index 1010da72fc1e83aaf3baa3dff5bacc0eb630d277..3003dad63a279fa7273b797013f8bab56d874feb 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/AccessArgumentNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/AccessArgumentNode.java
@@ -35,7 +35,6 @@ import com.oracle.truffle.r.nodes.RASTUtils;
 import com.oracle.truffle.r.nodes.builtin.RBuiltinRootNode;
 import com.oracle.truffle.r.nodes.function.ArgumentStatePush;
 import com.oracle.truffle.r.nodes.function.FormalArguments;
-import com.oracle.truffle.r.nodes.function.PromiseHelperNode;
 import com.oracle.truffle.r.nodes.function.opt.EagerEvalHelper;
 import com.oracle.truffle.r.nodes.function.opt.OptConstantPromiseNode;
 import com.oracle.truffle.r.nodes.function.opt.OptVariablePromiseBaseNode;
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCheckNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCheckNode.java
index 3c4af86bd295b172d3a136aa00d3805762b258f8..0b4a296297a4d83a7ec0e04e779b54102b41d504 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCheckNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/access/vector/PositionCheckNode.java
@@ -30,7 +30,6 @@ import com.oracle.truffle.api.profiles.ValueProfile;
 import com.oracle.truffle.r.nodes.access.vector.PositionCheckNodeFactory.Mat2indsubNodeGen;
 import com.oracle.truffle.r.nodes.access.vector.PositionsCheckNode.PositionProfile;
 import com.oracle.truffle.r.nodes.attributes.SpecialAttributesFunctions.GetDimAttributeNode;
-import com.oracle.truffle.r.nodes.control.RLengthNode;
 import com.oracle.truffle.r.nodes.profile.VectorLengthProfile;
 import com.oracle.truffle.r.runtime.RError;
 import com.oracle.truffle.r.runtime.RRuntime;
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/GetAttributesNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/GetAttributesNode.java
index 18892d089c7ab135eae636fb4987866448547f93..2adbdc699b35da9b5e02328daa83978848b89403 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/GetAttributesNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/GetAttributesNode.java
@@ -42,7 +42,6 @@ import com.oracle.truffle.r.runtime.data.RLanguage;
 import com.oracle.truffle.r.runtime.data.RList;
 import com.oracle.truffle.r.runtime.data.RNull;
 import com.oracle.truffle.r.runtime.data.RPairList;
-import com.oracle.truffle.r.runtime.data.RRaw;
 import com.oracle.truffle.r.runtime.data.RStringVector;
 import com.oracle.truffle.r.runtime.data.model.RAbstractContainer;
 import com.oracle.truffle.r.runtime.data.model.RAbstractIntVector;
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SetFixedAttributeNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SetFixedAttributeNode.java
index 14bd617b1b75f74da392ed22cf4cf50f1c1469ca..e5112aec298186eea4ff941e82ada0a89fd1a3ed 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SetFixedAttributeNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SetFixedAttributeNode.java
@@ -34,7 +34,6 @@ import com.oracle.truffle.api.object.Shape;
 import com.oracle.truffle.api.profiles.BranchProfile;
 import com.oracle.truffle.api.profiles.ConditionProfile;
 import com.oracle.truffle.api.profiles.ValueProfile;
-import com.oracle.truffle.r.nodes.attributes.SpecialAttributesFunctions.SetSpecialAttributeNode;
 import com.oracle.truffle.r.nodes.function.opt.ShareObjectNode;
 import com.oracle.truffle.r.runtime.RInternalError;
 import com.oracle.truffle.r.runtime.data.RAttributable;
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SpecialAttributesFunctions.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SpecialAttributesFunctions.java
index c912a44eec2ccaefed18d5abbbeb099ed57300ee..d14aeadf41029b784ae396b003383ab6f2b8771b 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SpecialAttributesFunctions.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/attributes/SpecialAttributesFunctions.java
@@ -990,8 +990,10 @@ public final class SpecialAttributesFunctions {
         public abstract void execute(RAbstractContainer x, int[] dimensions, RStringVector names, RList dimNames);
 
         @Specialization
-        protected void initContainerAttributes(RAbstractContainer x, int[] dimensions, RStringVector names, RList dimNames,
+        protected void initContainerAttributes(RAbstractContainer x, int[] dimensions, RStringVector initialNames, RList initialDimNames,
                         @Cached("create()") ShareObjectNode shareObjectNode) {
+            RStringVector names = initialNames;
+            RList dimNames = initialDimNames;
             assert names != x;
             assert dimNames != x;
             DynamicObject attrs = x.getAttributes();
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/EnvironmentNodes.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/EnvironmentNodes.java
index ef47ee3c2416d3e4aa7988a97c554a6ec26c3a41..83c3fa54eb7bfd1b8d5169b65ecae031d265b556 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/EnvironmentNodes.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/EnvironmentNodes.java
@@ -68,7 +68,7 @@ public final class EnvironmentNodes {
         }
 
         @TruffleBoundary
-        private REnvironment createNewEnv(String envName, REnvironment parentEnv) {
+        private static REnvironment createNewEnv(String envName, REnvironment parentEnv) {
             REnvironment createNewEnv = RDataFactory.createNewEnv(envName);
             RArguments.initializeEnclosingFrame(createNewEnv.getFrame(), parentEnv.getFrame());
             createNewEnv.setParent(parentEnv);
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/CastForeignNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/CastForeignNode.java
index e19e652678ef3909ff9129e9dec30b32fc186e1f..d52436f13ffcd2a8cfbc91a5a16d5ed68538cb99 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/CastForeignNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/CastForeignNode.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,28 +22,22 @@
  */
 package com.oracle.truffle.r.nodes.builtin.casts;
 
-import com.oracle.truffle.api.dsl.Cached;
-import com.oracle.truffle.api.dsl.ImportStatic;
-import com.oracle.truffle.api.dsl.Specialization;
-import com.oracle.truffle.api.interop.TruffleObject;
+import com.oracle.truffle.api.profiles.ConditionProfile;
 import com.oracle.truffle.r.nodes.unary.CastNode;
 import com.oracle.truffle.r.runtime.interop.ForeignArray2R;
 
-@ImportStatic({ForeignArray2R.class})
-public abstract class CastForeignNode extends CastNode {
+public final class CastForeignNode extends CastNode {
 
-    protected CastForeignNode() {
-    }
+    @Child private ForeignArray2R foreignArray2R = ForeignArray2R.create();
 
-    @Specialization(guards = {"foreignArray2R.isForeignVector(obj)"})
-    protected Object castForeign(TruffleObject obj,
-                    @Cached("create()") ForeignArray2R foreignArray2R) {
-        return foreignArray2R.convert(obj);
-    }
+    private final ConditionProfile isForeign = ConditionProfile.createBinaryProfile();
 
-    @Specialization(guards = {"!foreignArray2R.isForeignVector(obj)"})
-    protected Object passThrough(Object obj,
-                    @Cached("create()") ForeignArray2R foreignArray2R) {
-        return obj;
+    @Override
+    protected Object execute(Object obj) {
+        if (isForeign.profile(foreignArray2R.isForeignVector(obj))) {
+            return foreignArray2R.convert(obj);
+        } else {
+            return obj;
+        }
     }
 }
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/Filter.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/Filter.java
index 4a644f967f71829869af582ee5f85017766acb47..302e3828077ae599ea2b0b433df1bd97719968e6 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/Filter.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/Filter.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -92,7 +92,6 @@ public abstract class Filter<T, R extends T> {
         private final Class<?> type2;
         private final Predicate<R> extraCondition;
 
-        @SuppressWarnings("rawtypes")
         public TypeFilter(Class<R> type) {
             assert type != null;
             this.type1 = type;
@@ -100,7 +99,6 @@ public abstract class Filter<T, R extends T> {
             this.extraCondition = null;
         }
 
-        @SuppressWarnings({"unchecked", "rawtypes"})
         public TypeFilter(Class<R> type, Predicate<R> extraCondition) {
             assert type != null;
             this.type1 = type;
@@ -108,7 +106,6 @@ public abstract class Filter<T, R extends T> {
             this.extraCondition = extraCondition;
         }
 
-        @SuppressWarnings("rawtypes")
         public TypeFilter(Class<?> type1, Class<?> type2) {
             assert type1 != null && type2 != null;
             assert type1 != Object.class && type2 != Object.class;
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/PipelineToCastNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/PipelineToCastNode.java
index 037b7b409d29b3cb39e93ba4cd6dba9da5156f9f..c368d4016558b688491779716f26e2f346d63b46 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/PipelineToCastNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/builtin/casts/PipelineToCastNode.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -116,7 +116,7 @@ public final class PipelineToCastNode {
         boolean singleMapStep = firstStepIn.getNext() == null && firstStepIn instanceof MapIfStep;
         PipelineStep<?, ?> firstStep = singleMapStep ? ((MapIfStep<?, ?>) firstStepIn).withoutReturns() : firstStepIn;
 
-        CastNode firstCastNode = config.getCastForeign() ? CastForeignNodeGen.create() : null;
+        CastNode firstCastNode = config.getCastForeign() ? new CastForeignNode() : null;
         Supplier<CastNode> originalPipelineFactory = () -> convert(firstCastNode, firstStep,
                         new CastNodeFactory(config.getDefaultError(), config.getDefaultWarning(), config.getDefaultDefaultMessage()));
 
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/AbstractLoopNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/AbstractLoopNode.java
index f6a7f0db7d59992d0a2e306febecd6b53d6d05b5..3708337af763822520b3be20f3ca3409f81e0b3a 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/AbstractLoopNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/AbstractLoopNode.java
@@ -23,7 +23,6 @@
 package com.oracle.truffle.r.nodes.control;
 
 import com.oracle.truffle.api.CompilerAsserts;
-import com.oracle.truffle.api.instrumentation.InstrumentableNode.WrapperNode;
 import com.oracle.truffle.api.nodes.Node;
 import com.oracle.truffle.api.nodes.RepeatingNode;
 import com.oracle.truffle.api.nodes.RootNode;
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/ForNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/ForNode.java
index 7a3866e37c07060d7d91c0874338fefd8e6f67b0..9a2f65bb077817edefc2137ce4eb1550ac4b9f05 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/ForNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/control/ForNode.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -80,9 +80,9 @@ public abstract class ForNode extends AbstractLoopNode implements RSyntaxNode, R
 
     @Specialization(guards = "!isForeignObject(range)")
     protected Object iterate(VirtualFrame frame, Object range,
-                    @Cached("createIndexName()") String indexName,
-                    @Cached("createRangeName()") String rangeName,
-                    @Cached("createLengthName()") String lengthName,
+                    @Cached("createIndexName()") @SuppressWarnings("unused") String indexName,
+                    @Cached("createRangeName()") @SuppressWarnings("unused") String rangeName,
+                    @Cached("createLengthName()") @SuppressWarnings("unused") String lengthName,
                     @Cached("createWriteVariable(indexName)") WriteVariableNode writeIndexNode,
                     @Cached("createWriteVariable(rangeName)") WriteVariableNode writeRangeNode,
                     @Cached("createWriteVariable(lengthName)") WriteVariableNode writeLengthNode,
@@ -107,13 +107,13 @@ public abstract class ForNode extends AbstractLoopNode implements RSyntaxNode, R
                     @Cached("createWriteVariable(lengthName)") WriteVariableNode writeLengthNode,
                     @Cached("create()") RLengthNode length,
                     @Cached("createForIndexLoopNode(indexName, lengthName, rangeName)") LoopNode l,
-                    @Cached("HAS_SIZE.createNode()") Node hasSize) {
+                    @Cached("HAS_SIZE.createNode()") @SuppressWarnings("unused") Node hasSize) {
         return iterate(frame, range, indexName, rangeName, lengthName, writeIndexNode, writeRangeNode, writeLengthNode, length, l);
     }
 
     @Specialization(guards = "isJavaIterable(range)")
     protected Object iterateForeignArray(VirtualFrame frame, Object range,
-                    @Cached("createIteratorName()") String iteratorName,
+                    @Cached("createIteratorName()") @SuppressWarnings("unused") String iteratorName,
                     @Cached("createWriteVariable(iteratorName)") WriteVariableNode writeIteratorNode,
                     @Cached("createForIterableLoopNode(iteratorName)") LoopNode l,
                     @Cached("READ.createNode()") Node readNode,
@@ -129,18 +129,18 @@ public abstract class ForNode extends AbstractLoopNode implements RSyntaxNode, R
 
     @Specialization(guards = {"isForeignObject(range)", "!isForeignArray(range, hasSizeNode)", "!isJavaIterable(range)"})
     protected Object iterateKeys(VirtualFrame frame, Object range,
-                    @Cached("createIndexName()") String indexName,
-                    @Cached("createPositionName()") String positionName,
-                    @Cached("createRangeName()") String rangeName,
-                    @Cached("createKeysName()") String keysName,
-                    @Cached("createLengthName()") String lengthName,
+                    @Cached("createIndexName()") @SuppressWarnings("unused") String indexName,
+                    @Cached("createPositionName()") @SuppressWarnings("unused") String positionName,
+                    @Cached("createRangeName()") @SuppressWarnings("unused") String rangeName,
+                    @Cached("createKeysName()") @SuppressWarnings("unused") String keysName,
+                    @Cached("createLengthName()") @SuppressWarnings("unused") String lengthName,
                     @Cached("createWriteVariable(indexName)") WriteVariableNode writeIndexNode,
                     @Cached("createWriteVariable(rangeName)") WriteVariableNode writeRangeNode,
                     @Cached("createWriteVariable(keysName)") WriteVariableNode writeKeysNode,
                     @Cached("createWriteVariable(lengthName)") WriteVariableNode writeLengthNode,
                     @Cached("createForKeysLoopNode(indexName, positionName, lengthName, rangeName, keysName)") LoopNode l,
                     @Cached("KEYS.createNode()") Node keysNode,
-                    @Cached("HAS_SIZE.createNode()") Node hasSizeNode,
+                    @Cached("HAS_SIZE.createNode()") @SuppressWarnings("unused") Node hasSizeNode,
                     @Cached("GET_SIZE.createNode()") Node sizeNode) {
         try {
             TruffleObject keys = ForeignAccess.sendKeys(keysNode, (TruffleObject) range);
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/FunctionDefinitionNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/FunctionDefinitionNode.java
index ce7183dbc7947c5153657234906ea74a71055fe7..fbb1754702a62025866fb7a5f843c0f22ddce9ef 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/FunctionDefinitionNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/FunctionDefinitionNode.java
@@ -23,7 +23,6 @@
 package com.oracle.truffle.r.nodes.function;
 
 import java.util.ArrayList;
-import java.util.IdentityHashMap;
 import java.util.List;
 
 import com.oracle.truffle.api.Assumption;
@@ -70,8 +69,6 @@ import com.oracle.truffle.r.runtime.Utils.DebugExitException;
 import com.oracle.truffle.r.runtime.builtins.RBuiltinDescriptor;
 import com.oracle.truffle.r.runtime.context.RContext;
 import com.oracle.truffle.r.runtime.context.TruffleRLanguage;
-import com.oracle.truffle.r.runtime.data.Closure;
-import com.oracle.truffle.r.runtime.data.ClosureCache;
 import com.oracle.truffle.r.runtime.data.ClosureCache.RNodeClosureCache;
 import com.oracle.truffle.r.runtime.data.RNull;
 import com.oracle.truffle.r.runtime.data.RPairList;
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/FunctionExpressionNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/FunctionExpressionNode.java
index b42898c63e0cb8070e1c27b4dc41ae07c29cae56..f677a2ecfd1eafa8d83508c7a005c345d7ae131d 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/FunctionExpressionNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/FunctionExpressionNode.java
@@ -35,7 +35,6 @@ import com.oracle.truffle.r.nodes.function.opt.EagerEvalHelper;
 import com.oracle.truffle.r.nodes.function.visibility.SetVisibilityNode;
 import com.oracle.truffle.r.nodes.instrumentation.RInstrumentation;
 import com.oracle.truffle.r.runtime.ArgumentsSignature;
-import com.oracle.truffle.r.runtime.builtins.FastPathFactory;
 import com.oracle.truffle.r.runtime.data.RDataFactory;
 import com.oracle.truffle.r.runtime.data.RFunction;
 import com.oracle.truffle.r.runtime.env.frame.FrameSlotChangeMonitor;
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/RCallNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/RCallNode.java
index 16ba409614756338d6683f0af586e408ccc5eff2..18abff07e0105d05e2ffa2ce5536b1abcbec6238 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/RCallNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/RCallNode.java
@@ -667,7 +667,7 @@ public abstract class RCallNode extends RCallBaseNode implements RSyntaxNode, RS
                 RInternalError.reportError(e);
                 throw RError.interopError(RError.findParentRBase(this), e, function);
             } catch (RuntimeException e) {
-                throw RError.handleInteropException(this, e, function);
+                throw RError.handleInteropException(this, e);
             }
         }
 
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastComplexNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastComplexNode.java
index 7d56657deccb7d9132450e7ce132c4dc33eea7aa..34dbaafbe58523b337c5df400c84910fa3ec88cc 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastComplexNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastComplexNode.java
@@ -36,7 +36,6 @@ import com.oracle.truffle.r.runtime.data.RComplex;
 import com.oracle.truffle.r.runtime.data.RComplexVector;
 import com.oracle.truffle.r.runtime.data.RDataFactory;
 import com.oracle.truffle.r.runtime.data.RList;
-import com.oracle.truffle.r.runtime.data.RLogicalVector;
 import com.oracle.truffle.r.runtime.data.RMissing;
 import com.oracle.truffle.r.runtime.data.RNull;
 import com.oracle.truffle.r.runtime.data.RPairList;
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastIntegerNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastIntegerNode.java
index ca459c41a3a4019e2475eff38382941e03f6a3ce..1ede1d748c1ee6ecb03f1fb779e3d8ae87756721 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastIntegerNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastIntegerNode.java
@@ -36,7 +36,6 @@ import com.oracle.truffle.r.runtime.data.RArgsValuesAndNames;
 import com.oracle.truffle.r.runtime.data.RComplex;
 import com.oracle.truffle.r.runtime.data.RDataFactory;
 import com.oracle.truffle.r.runtime.data.RDoubleSequence;
-import com.oracle.truffle.r.runtime.data.RDoubleVector;
 import com.oracle.truffle.r.runtime.data.RIntSequence;
 import com.oracle.truffle.r.runtime.data.RIntVector;
 import com.oracle.truffle.r.runtime.data.RList;
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastLogicalNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastLogicalNode.java
index b198081c7e6f0dec794ce242905b1fe067247140..8df91e8627608a45b6875e452dd81e057981c25e 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastLogicalNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastLogicalNode.java
@@ -33,7 +33,6 @@ import com.oracle.truffle.r.nodes.helpers.InheritsCheckNode;
 import com.oracle.truffle.r.runtime.RError;
 import com.oracle.truffle.r.runtime.RRuntime;
 import com.oracle.truffle.r.runtime.data.RDataFactory;
-import com.oracle.truffle.r.runtime.data.RIntVector;
 import com.oracle.truffle.r.runtime.data.RList;
 import com.oracle.truffle.r.runtime.data.RLogicalVector;
 import com.oracle.truffle.r.runtime.data.RMissing;
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastRawNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastRawNode.java
index d2702020918fe1a8aa6d4f610efa86cabc123339..361383031470940faba47fde77d7cd07f19587c7 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastRawNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/CastRawNode.java
@@ -32,7 +32,6 @@ import com.oracle.truffle.r.runtime.RRuntime;
 import com.oracle.truffle.r.runtime.RType;
 import com.oracle.truffle.r.runtime.data.RComplex;
 import com.oracle.truffle.r.runtime.data.RDataFactory;
-import com.oracle.truffle.r.runtime.data.RLogicalVector;
 import com.oracle.truffle.r.runtime.data.RMissing;
 import com.oracle.truffle.r.runtime.data.RNull;
 import com.oracle.truffle.r.runtime.data.RPairList;
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/PrecedenceNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/PrecedenceNode.java
index d3cb285c7c354f12e3781ece0f1f997b6213e1f9..8515ffef861c03f83bd5e7e310f4c4d91dbc5a81 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/PrecedenceNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/unary/PrecedenceNode.java
@@ -168,7 +168,7 @@ public abstract class PrecedenceNode extends RBaseNode {
         return doListRecursiveInternal(val, precedenceNode, recursive);
     }
 
-    private int doListRecursiveInternal(RAbstractListVector val, PrecedenceNode precedenceNode, boolean recursive) {
+    private static int doListRecursiveInternal(RAbstractListVector val, PrecedenceNode precedenceNode, boolean recursive) {
         int precedence = -1;
         for (int i = 0; i < val.getLength(); i++) {
             precedence = Math.max(precedence, precedenceNode.executeInteger(val.getDataAt(i), recursive));
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/FileSystemUtils.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/FileSystemUtils.java
index 8d9a196593dcbc57fbbe798bdc4323ab6d62daaf..b5a050a2d94f23b09e944be192d65a7bed8d3615 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/FileSystemUtils.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/FileSystemUtils.java
@@ -23,11 +23,8 @@
 package com.oracle.truffle.r.runtime;
 
 import java.io.IOException;
-import java.nio.file.FileAlreadyExistsException;
 import java.nio.file.Files;
-import java.nio.file.Path;
 import java.nio.file.Paths;
-import java.nio.file.attribute.FileAttribute;
 import java.nio.file.attribute.PosixFilePermission;
 import java.nio.file.attribute.PosixFilePermissions;
 import java.util.EnumSet;
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/LazyResourceHandlerFactory.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/LazyResourceHandlerFactory.java
index aa6ee73ec427c41d2fc45fa5a705419b78c25421..9615cb547d255838334d69655597c652df347a61 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/LazyResourceHandlerFactory.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/LazyResourceHandlerFactory.java
@@ -106,8 +106,7 @@ class LazyResourceHandlerFactory extends ResourceHandlerFactory implements Handl
             }
             return result;
         } catch (Exception ex) {
-            RSuicide.rSuicide(RContext.getInstance(), ex, "Could not load R files from resources. Details: " + ex.getMessage());
-            return null;
+            throw RSuicide.rSuicide(RContext.getInstance(), ex, "Could not load R files from resources. Details: " + ex.getMessage());
         }
     }
 }
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RCleanUp.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RCleanUp.java
index 61ddc58a29f36f818353ceb8ad4264d102d68ce8..17b2a0cdd2e1b679f46aae2fa69f3507767c365b 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RCleanUp.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RCleanUp.java
@@ -13,7 +13,6 @@ package com.oracle.truffle.r.runtime;
 
 import java.util.ArrayList;
 
-import com.oracle.truffle.api.CompilerDirectives;
 import com.oracle.truffle.api.RootCallTarget;
 import com.oracle.truffle.api.Truffle;
 import com.oracle.truffle.api.frame.VirtualFrame;
@@ -21,13 +20,6 @@ import com.oracle.truffle.api.nodes.RootNode;
 import com.oracle.truffle.r.launcher.RStartParams;
 import com.oracle.truffle.r.runtime.context.RContext;
 import com.oracle.truffle.r.runtime.context.RContext.ConsoleIO;
-import com.oracle.truffle.r.runtime.data.RDataFactory;
-import com.oracle.truffle.r.runtime.data.RIntVector;
-import com.oracle.truffle.r.runtime.ffi.CallRFFI.InvokeCallNode;
-import com.oracle.truffle.r.runtime.ffi.DLL.RFindSymbolNode;
-import com.oracle.truffle.r.runtime.ffi.DLL.SymbolHandle;
-import com.oracle.truffle.r.runtime.ffi.NativeCallInfo;
-import com.oracle.truffle.r.runtime.ffi.REmbedRFFI;
 import com.oracle.truffle.r.runtime.ffi.REmbedRFFI.EmbeddedCleanUpNode;
 import com.oracle.truffle.r.runtime.gnur.SA_TYPE;
 import com.oracle.truffle.r.runtime.instrument.InstrumentationState;
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RDeparse.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RDeparse.java
index 0b5398bfaacc456437a3fac92200f5b5920f1502..8138ab7f7a1f538e2f3af7a126b2ee2b72386296 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RDeparse.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RDeparse.java
@@ -69,7 +69,6 @@ import com.oracle.truffle.r.runtime.data.model.RAbstractVector;
 import com.oracle.truffle.r.runtime.env.REnvironment;
 import com.oracle.truffle.r.runtime.ffi.DLL.SymbolHandle;
 import com.oracle.truffle.r.runtime.interop.TruffleObjectConverter;
-import com.oracle.truffle.r.runtime.nodes.RCodeBuilder;
 import com.oracle.truffle.r.runtime.nodes.RCodeBuilder.Argument;
 import com.oracle.truffle.r.runtime.nodes.RSyntaxCall;
 import com.oracle.truffle.r.runtime.nodes.RSyntaxConstant;
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RError.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RError.java
index 9c04e55fe45ece31a5d914e6c135a75f40f65b4d..a4cc7250eb6f3bc3bf9fd94fa9592e862351bd29 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RError.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RError.java
@@ -192,7 +192,7 @@ public final class RError extends RuntimeException implements TruffleException {
     }
 
     @TruffleBoundary
-    public static RError handleInteropException(Node node, RuntimeException e, TruffleObject o) {
+    public static RError handleInteropException(Node node, RuntimeException e) {
         if (e instanceof TruffleException) {
             if (RContext.getInstance().stateInteropTry.isInTry()) {
                 // will be catched and handled in .fastr.interop.try builtin
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSerialize.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSerialize.java
index ee28563e943c83ab9b5e032585bd83a8d8988f83..7289839a040ab3c413fa47aa2ae85ec5e8ad6f5e 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSerialize.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSerialize.java
@@ -299,8 +299,10 @@ public class RSerialize {
     /**
      * Supports the saving of deparsed lazily loaded package functions for instrumentation access.
      */
-    public static void setSaveDeparse(boolean status) {
+    public static void setSaveDeparse(@SuppressWarnings("unused") boolean status) {
+        @SuppressWarnings("unused")
         ContextStateImpl serializeContextState = getContextState();
+        // TODO: reenable this functionality
     }
 
     @TruffleBoundary
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSuicide.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSuicide.java
index 18e74dc486654fc7ec677b7bf7906ea82c453c5e..66eb80b63abe747f0816b60b3f6c1883106940aa 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSuicide.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/RSuicide.java
@@ -22,20 +22,12 @@
  */
 package com.oracle.truffle.r.runtime;
 
-import com.oracle.truffle.api.CompilerDirectives;
 import com.oracle.truffle.api.RootCallTarget;
 import com.oracle.truffle.api.Truffle;
 import com.oracle.truffle.api.frame.VirtualFrame;
 import com.oracle.truffle.api.nodes.RootNode;
 import com.oracle.truffle.r.runtime.context.RContext;
-import com.oracle.truffle.r.runtime.data.RDataFactory;
-import com.oracle.truffle.r.runtime.data.RStringVector;
-import com.oracle.truffle.r.runtime.ffi.CallRFFI.InvokeCallNode;
-import com.oracle.truffle.r.runtime.ffi.DLL.RFindSymbolNode;
-import com.oracle.truffle.r.runtime.ffi.DLL.SymbolHandle;
-import com.oracle.truffle.r.runtime.ffi.NativeCallInfo;
 import com.oracle.truffle.r.runtime.ffi.REmbedRFFI.EmbeddedSuicideNode;
-import com.oracle.truffle.r.runtime.ffi.RFFIFactory;
 
 public abstract class RSuicide {
     private RSuicide() {
@@ -58,7 +50,8 @@ public abstract class RSuicide {
         throw rSuicideDefault(msg);
     }
 
-    public static RuntimeException rSuicide(RContext ctx, Throwable cause, String msg) {
+    public static RuntimeException rSuicide(RContext ctx, @SuppressWarnings("unused") Throwable cause, String msg) {
+        // TODO: output "cause"
         invokeUserDefinedSuicide(ctx, msg);
         throw rSuicideDefault(msg);
     }
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/Utils.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/Utils.java
index aad7079a8101d62d73865029366576cf63a7a6ac..35a969fc4628dbc0ebe423b0838fa8d59734bde8 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/Utils.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/Utils.java
@@ -37,7 +37,6 @@ import java.util.function.Function;
 
 import com.oracle.truffle.api.CallTarget;
 import com.oracle.truffle.api.CompilerAsserts;
-import com.oracle.truffle.api.CompilerDirectives;
 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
 import com.oracle.truffle.api.Truffle;
 import com.oracle.truffle.api.TruffleRuntime;
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/EvalThread.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/EvalThread.java
index 002526c7f6f1e4ece87216d1f3bdfb0ff1062417..ef11fec1bc08ab328e32ad98c4aa3be631767192 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/EvalThread.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/EvalThread.java
@@ -103,7 +103,7 @@ public class EvalThread extends Thread {
             Engine rEngine = RContext.getEngine();
             // Object eval = rEngine.eval(rEngine.parse(source), rEngine.getGlobalFrame());
             Object evalResult = rEngine.parseAndEval(source, rEngine.getGlobalFrame(), false);
-            result = createEvalResult(evalResult == null ? RNull.instance : evalResult, false);
+            result = RDataFactory.createList(new Object[]{evalResult == null ? RNull.instance : evalResult});
         } catch (ParseException e) {
             e.report(info.getStdout());
             result = createErrorResult(e.getMessage());
@@ -124,16 +124,6 @@ public class EvalThread extends Thread {
         return result;
     }
 
-    /**
-     * The result is an {@link RList} contain the value, plus an "error" attribute if the evaluation
-     * resulted in an error.
-     */
-    @TruffleBoundary
-    private static RList createEvalResult(Object result, boolean usePolyglot) {
-        assert result != null;
-        return RDataFactory.createList(new Object[]{result});
-    }
-
     @TruffleBoundary
     public static RList createErrorResult(String errorMsg) {
         RList list = RDataFactory.createList(new Object[]{RRuntime.LOGICAL_NA});
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/env/RScope.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/env/RScope.java
index cb2d3141e1525acdea87c27561bcf6c0a0b3ff56..6f7f5c8e225d06648bc00b9ce41cbb411be430db 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/env/RScope.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/env/RScope.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,6 @@ import com.oracle.truffle.api.frame.Frame;
 import com.oracle.truffle.api.frame.MaterializedFrame;
 import com.oracle.truffle.api.interop.ForeignAccess;
 import com.oracle.truffle.api.interop.KeyInfo;
-import com.oracle.truffle.api.interop.KeyInfo.Builder;
 import com.oracle.truffle.api.interop.Message;
 import com.oracle.truffle.api.interop.MessageResolution;
 import com.oracle.truffle.api.interop.Resolve;
@@ -236,16 +235,14 @@ public final class RScope {
             public abstract static class VarMapsKeyInfoNode extends Node {
 
                 protected Object access(VariablesObject receiver, String identifier) {
-                    Builder builder = KeyInfo.newBuilder();
-                    builder.setReadable(true);
-
+                    int result = KeyInfo.READABLE;
                     if (!receiver.frameAccess.bindingIsLocked(identifier)) {
-                        builder.setWritable(true);
+                        result |= KeyInfo.MODIFIABLE;
                     }
                     if (receiver.frameAccess.get(identifier) instanceof RFunction) {
-                        builder.setInvocable(true);
+                        result |= KeyInfo.INVOCABLE;
                     }
-                    return builder.build();
+                    return result;
                 }
             }
 
@@ -356,8 +353,7 @@ public final class RScope {
             @Resolve(message = "HAS_SIZE")
             abstract static class ArgNamesHasSizeNode extends Node {
 
-                @SuppressWarnings("unused")
-                public Object access(ArgumentNamesObject varNames) {
+                public Object access(@SuppressWarnings("unused") ArgumentNamesObject varNames) {
                     return true;
                 }
             }
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/BaseRFFI.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/BaseRFFI.java
index a6589707125cfd506561878dc0a2874844a8c0db..42ad63917c2df2737a102a5318d53a5367d38956 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/BaseRFFI.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/BaseRFFI.java
@@ -28,7 +28,6 @@ import java.util.Map;
 
 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
 import com.oracle.truffle.api.frame.VirtualFrame;
-import com.oracle.truffle.api.interop.java.JavaInterop;
 import com.oracle.truffle.r.runtime.ffi.base.ESoftVersionResult;
 import com.oracle.truffle.r.runtime.ffi.base.GlobResult;
 import com.oracle.truffle.r.runtime.ffi.base.ReadlinkResult;
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 95d5d02e8e52d7108a7ccc57ec03344c69df2c94..5a2514b0f0fc968a7e03f976a11a4c0cbde76c45 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
@@ -39,7 +39,6 @@ import com.oracle.truffle.r.runtime.context.RContext;
 import com.oracle.truffle.r.runtime.context.RContext.ContextKind;
 import com.oracle.truffle.r.runtime.context.RContext.ContextState;
 import com.oracle.truffle.r.runtime.data.CharSXPWrapper;
-import com.oracle.truffle.r.runtime.data.NativeDataAccess;
 import com.oracle.truffle.r.runtime.data.NativeDataAccess.CustomNativeMirror;
 import com.oracle.truffle.r.runtime.data.RDataFactory;
 import com.oracle.truffle.r.runtime.data.RExternalPtr;
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/DownCallNodeFactory.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/DownCallNodeFactory.java
index af484e9aeee40bfe2225c722bcae3ca0569b6dfd..c6907f7bd3e719f603ded3380f9efb233074361a 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/DownCallNodeFactory.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/DownCallNodeFactory.java
@@ -88,13 +88,13 @@ public abstract class DownCallNodeFactory {
          * Should return a {@link TruffleObject} that will invoke the given function upon the
          * {@code EXECUTE} message.
          */
-        protected abstract TruffleObject getTarget(NativeFunction function);
+        protected abstract TruffleObject getTarget(NativeFunction f);
 
         /**
          * Allows to transform the arguments before the execute message is sent to the result of
          * {@link #getTarget(NativeFunction)}.
          */
-        protected abstract long beforeCall(NativeFunction nativeFunction, TruffleObject function, Object[] args);
+        protected abstract long beforeCall(NativeFunction nativeFunction, TruffleObject f, Object[] args);
 
         /**
          * Allows to post-process the arguments after the execute message was sent to the result of
@@ -102,6 +102,6 @@ public abstract class DownCallNodeFactory {
          * {@link #beforeCall(NativeFunction, TruffleObject, Object[])} was not successfull, the
          * {@code before} parameter will have value {@code -1}.
          */
-        protected abstract void afterCall(long before, NativeFunction function, TruffleObject target, Object[] args);
+        protected abstract void afterCall(long before, NativeFunction f, TruffleObject t, Object[] args);
     }
 }
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/LapackRFFI.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/LapackRFFI.java
index ff82db0fafbdbdfb456ba01b51c91b66a6835652..9c4beb34f0d7d3bced838a607c7e9c9d770bb6ae 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/LapackRFFI.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/LapackRFFI.java
@@ -26,7 +26,7 @@ package com.oracle.truffle.r.runtime.ffi;
  * Collection of statically typed Lapack methods that are used in the {@code base} package. The
  * signatures match the Fortran definition with the exception that the "info" value is returned as
  * the result of the call.
- * 
+ *
  * The documentation for individual functions can be found in the
  * <a href="http://www.netlib.org/lapack/explore-html">spec</a>.
  */
@@ -47,7 +47,7 @@ public final class LapackRFFI {
         }
 
         public void execute(int[] version) {
-            call((Object) version);
+            call(version);
         }
     }
 
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/PCRERFFI.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/PCRERFFI.java
index 4bc7d2fc40c411c98f1ecbfd3bdc405ed638fdeb..ce118468cb4ea2576ae5a289c4854197483fa60d 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/PCRERFFI.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/PCRERFFI.java
@@ -153,7 +153,8 @@ public final class PCRERFFI {
             super(factory.createDownCallNode(NativeFunction.study));
         }
 
-        public Result execute(long code, int options) {
+        @SuppressWarnings("unused")
+        public static Result execute(long code, int options) {
             throw RInternalError.shouldNotReachHere("The factory method should throw unimplemented already");
         }
 
@@ -199,6 +200,7 @@ public final class PCRERFFI {
         return new GetCaptureNamesNode(downCallNodeFactory);
     }
 
+    @SuppressWarnings("static-method")
     public StudyNode createStudyNode() {
         throw RInternalError.unimplemented("study function in PCRE");
     }
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/RFFIContext.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/RFFIContext.java
index c5de3d2ae536710aa313255f05c5a950ddef56d7..cd0f4118da5b656f164fd6d4fc5964f557d1d22e 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/RFFIContext.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/RFFIContext.java
@@ -88,6 +88,7 @@ public abstract class RFFIContext extends RFFI {
      *            the list of preserved objects.
      */
     public void beforeUpcall(boolean canRunGc) {
+        // empty by default
     }
 
     public void afterUpcall(boolean canRunGc) {
@@ -99,7 +100,8 @@ public abstract class RFFIContext extends RFFI {
     /**
      * Invoked during RContext initialization, but after the global environment is set up.
      */
-    public void initializeVariables(RContext context) {
+    public void initializeVariables(@SuppressWarnings("unused") RContext context) {
+        // empty by default
     }
 
     /**
@@ -109,7 +111,7 @@ public abstract class RFFIContext extends RFFI {
      * threaded and always creates exactly one context. This method shall be invoked after
      * {@link #initialize(RContext)} and {@link #initializeVariables(RContext)}.
      */
-    public void initializeEmbedded(RContext context) {
+    public void initializeEmbedded(@SuppressWarnings("unused") RContext context) {
         throw RInternalError.unimplemented("R Embedding not supported with " + this.getClass().getSimpleName() + " RFFI backend.");
     }
 
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/ToolsRFFI.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/ToolsRFFI.java
index 34ef4a966a9d902205ce7a03b932b5fe1b5d8b69..2c49b3677a6c3a457a8f50eac8cf388bb1aeccd8 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/ToolsRFFI.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/ToolsRFFI.java
@@ -24,7 +24,6 @@ package com.oracle.truffle.r.runtime.ffi;
 
 import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
 import com.oracle.truffle.api.nodes.Node;
-import com.oracle.truffle.api.nodes.NodeInterface;
 import com.oracle.truffle.r.runtime.RInternalError;
 import com.oracle.truffle.r.runtime.conn.RConnection;
 import com.oracle.truffle.r.runtime.data.RLogicalVector;
@@ -75,7 +74,7 @@ public final class ToolsRFFI {
         }
     }
 
-    public ParseRdNode createParseRdNode() {
+    public static ParseRdNode createParseRdNode() {
         return new ParseRdNode();
     }
 }
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/interop/NativePointer.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/interop/NativePointer.java
index a42e1133dc9f28558d8e186774bf7c0e3586fdc1..0b113e2711af7b0cae6a9c4c3c5d4e61e1e784df 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/interop/NativePointer.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/ffi/interop/NativePointer.java
@@ -54,7 +54,8 @@ public class NativePointer implements TruffleObject {
     private static int tableHwm;
 
     private static class Table {
-        private final RTruffleObject object;
+        // TODO: is this reference to object needed?
+        @SuppressWarnings("unused") private final RTruffleObject object;
         private final long nativePointer;
 
         Table(RTruffleObject object, long nativePointer) {
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/interop/FastrInteropTryContextState.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/interop/FastrInteropTryContextState.java
index 4505048c89b3039cbbe79f65fc6d91ed7fff5648..c8cd0dfc9798d81dcc5e2f8be1e6a3b51461d942 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/interop/FastrInteropTryContextState.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/interop/FastrInteropTryContextState.java
@@ -27,7 +27,6 @@ import com.oracle.truffle.r.runtime.context.RContext;
 /**
  * Context-specific state relevant to the .fastr.interop.try builtins.
  */
-@SuppressWarnings("serial")
 public class FastrInteropTryContextState implements RContext.ContextState {
     /**
      * Values is either NULL or an RPairList, for {@code restarts}.
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/interop/ForeignArray2R.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/interop/ForeignArray2R.java
index 16ace45dfb338c7f2bf2d049c5699ccd91c0209e..2cd826b8689a3a24251aa967c053f58ca022fa80 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/interop/ForeignArray2R.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/interop/ForeignArray2R.java
@@ -152,11 +152,11 @@ public abstract class ForeignArray2R extends RBaseNode {
 
     @Specialization(guards = "isJavaIterable(obj)")
     @TruffleBoundary
-    protected ForeignArrayData doJavaIterable(TruffleObject obj, @SuppressWarnings("unused") boolean recursive, ForeignArrayData arrayData, int depth,
+    protected ForeignArrayData doJavaIterable(TruffleObject obj, @SuppressWarnings("unused") boolean recursive, ForeignArrayData arrayData, @SuppressWarnings("unused") int depth,
                     @Cached("createExecute(0).createNode()") Node execute) {
 
         try {
-            return getIterableElements(arrayData == null ? new ForeignArrayData() : arrayData, obj, execute, depth);
+            return getIterableElements(arrayData == null ? new ForeignArrayData() : arrayData, obj, execute);
         } catch (UnsupportedMessageException | UnknownIdentifierException | UnsupportedTypeException | ArityException e) {
             throw error(RError.Message.GENERIC, "error while casting external object to list: " + e.getMessage());
         }
@@ -197,7 +197,7 @@ public abstract class ForeignArray2R extends RBaseNode {
         return arrayData;
     }
 
-    private ForeignArrayData getIterableElements(ForeignArrayData arrayData, TruffleObject obj, Node execute, int depth)
+    private ForeignArrayData getIterableElements(ForeignArrayData arrayData, TruffleObject obj, Node execute)
                     throws UnknownIdentifierException, ArityException, UnsupportedMessageException, UnsupportedTypeException {
         if (read == null) {
             CompilerDirectives.transferToInterpreterAndInvalidate();
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nodes/RBaseNode.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nodes/RBaseNode.java
index c42a6dbd1eece79cc3d085fc7fbb8901d62a8ed8..694a5de17e9537f7086c2f69b57c029243c7d1c3 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nodes/RBaseNode.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nodes/RBaseNode.java
@@ -185,7 +185,7 @@ public abstract class RBaseNode extends Node {
         return getRSyntaxNode().getSourceSection();
     }
 
-    public boolean hasTag(Class<? extends Tag> tag) {
+    public boolean hasTag(@SuppressWarnings("unused") Class<? extends Tag> tag) {
         // RNode, which is instrumentable, overrides this to actually check if the node has the tag
         return false;
     }
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nodes/RInstrumentableNode.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nodes/RInstrumentableNode.java
index 333fbe9f21a37cc6b34b24ee6b7d8d5bce7b3fa2..1e3ad2a9a8fc5ef2c047639410de6cfd086b3c64 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nodes/RInstrumentableNode.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nodes/RInstrumentableNode.java
@@ -22,12 +22,8 @@
  */
 package com.oracle.truffle.r.runtime.nodes;
 
-import com.oracle.truffle.api.instrumentation.InstrumentableNode.WrapperNode;
 import com.oracle.truffle.api.instrumentation.InstrumentableNode;
-import com.oracle.truffle.api.instrumentation.Tag;
 import com.oracle.truffle.api.nodes.Node;
-import com.oracle.truffle.r.runtime.RRuntimeASTAccess;
-import com.oracle.truffle.r.runtime.context.RContext;
 
 /**
  * Some additional support for instrumentable nodes.
diff --git a/com.oracle.truffle.r.test.packages.analyzer/src/com/oracle/truffle/r/test/packages/analyzer/detectors/Detector.java b/com.oracle.truffle.r.test.packages.analyzer/src/com/oracle/truffle/r/test/packages/analyzer/detectors/Detector.java
index f1e22de6a12f4e0b06fa4dd04b0af61fa424561a..d3ee4bee211f419dcaa80b8311db3208b6e19ce9 100644
--- a/com.oracle.truffle.r.test.packages.analyzer/src/com/oracle/truffle/r/test/packages/analyzer/detectors/Detector.java
+++ b/com.oracle.truffle.r.test.packages.analyzer/src/com/oracle/truffle/r/test/packages/analyzer/detectors/Detector.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,6 @@
  */
 package com.oracle.truffle.r.test.packages.analyzer.detectors;
 
-import java.io.IOException;
 import java.util.Collection;
 import java.util.LinkedList;
 
diff --git a/com.oracle.truffle.r.test.packages.analyzer/src/com/oracle/truffle/r/test/packages/analyzer/parser/LogFileParser.java b/com.oracle.truffle.r.test.packages.analyzer/src/com/oracle/truffle/r/test/packages/analyzer/parser/LogFileParser.java
index b3086af21da01dbc08a57c41c4511f8da919dfe8..f4899c97b67070fccc86c15e47850a30babfceae 100644
--- a/com.oracle.truffle.r.test.packages.analyzer/src/com/oracle/truffle/r/test/packages/analyzer/parser/LogFileParser.java
+++ b/com.oracle.truffle.r.test.packages.analyzer/src/com/oracle/truffle/r/test/packages/analyzer/parser/LogFileParser.java
@@ -80,7 +80,7 @@ public class LogFileParser {
 
     public void addDetector(Token hook, LineDetector detector) {
         Objects.requireNonNull(detector);
-        Collection<LineDetector> registered = this.detectorsTable.get(hook);
+        Collection<LineDetector> registered = this.detectorsTable.get(hook.name());
         if (registered == null) {
             registered = new LinkedList<>();
             this.detectorsTable.put(hook.name(), registered);
diff --git a/com.oracle.truffle.r.test.tck/src/com/oracle/truffle/r/test/tck/RTCKLanguageProvider.java b/com.oracle.truffle.r.test.tck/src/com/oracle/truffle/r/test/tck/RTCKLanguageProvider.java
index c410a607c8e5616faa23cc4206ecf2b9b05c60e5..82d35b82752d20ce4c7a8912276db15eb2eb4f6c 100644
--- a/com.oracle.truffle.r.test.tck/src/com/oracle/truffle/r/test/tck/RTCKLanguageProvider.java
+++ b/com.oracle.truffle.r.test.tck/src/com/oracle/truffle/r/test/tck/RTCKLanguageProvider.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -262,14 +262,14 @@ public final class RTCKLanguageProvider implements LanguageProvider {
         }
     }
 
-    private Snippet createValueConstructor(
+    private static Snippet createValueConstructor(
                     Context context,
                     String value,
                     TypeDescriptor type) {
         return Snippet.newBuilder(value, eval(context, String.format(PATTERN_VALUE_FNC, value)), type).build();
     }
 
-    private Snippet createBinaryOperator(
+    private static Snippet createBinaryOperator(
                     Context context,
                     String operator,
                     TypeDescriptor type,
@@ -281,7 +281,7 @@ public final class RTCKLanguageProvider implements LanguageProvider {
         return opb.build();
     }
 
-    private Snippet createPrefixOperator(
+    private static Snippet createPrefixOperator(
                     Context context,
                     String operator,
                     TypeDescriptor type,
@@ -292,7 +292,7 @@ public final class RTCKLanguageProvider implements LanguageProvider {
         return opb.build();
     }
 
-    private Snippet createStatement(
+    private static Snippet createStatement(
                     Context context,
                     String name,
                     String expression,
@@ -301,7 +301,7 @@ public final class RTCKLanguageProvider implements LanguageProvider {
         return createStatement(context, name, expression, null, type, paramTypes);
     }
 
-    private Snippet createStatement(
+    private static Snippet createStatement(
                     Context context,
                     String name,
                     String expression,
@@ -320,7 +320,7 @@ public final class RTCKLanguageProvider implements LanguageProvider {
         return opb.build();
     }
 
-    private Snippet loadScript(
+    private static Snippet loadScript(
                     Context context,
                     String resourceName,
                     TypeDescriptor type,
@@ -340,7 +340,7 @@ public final class RTCKLanguageProvider implements LanguageProvider {
         return Source.newBuilder(ID, in, scriptName).build();
     }
 
-    private Value eval(Context context, String statement) {
+    private static Value eval(Context context, String statement) {
         return context.eval(ID, statement);
     }
 
@@ -388,7 +388,7 @@ public final class RTCKLanguageProvider implements LanguageProvider {
             /**
              * Enables result verifier to handle empty arrays. Use this for R expressions,
              * statements which accept array but not an empty array
-             * 
+             *
              * @return the Builder
              */
             Builder emptyArrayCheck() {
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_asvector.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_asvector.java
index 3e46568e4f5c12099da298eb3c7af44c23ce9764..cf1870d917f8e864e10595f84d29df46ad3d391a 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_asvector.java
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_asvector.java
@@ -12,7 +12,6 @@ package com.oracle.truffle.r.test.builtins;
 
 import org.junit.Test;
 
-import com.oracle.truffle.r.test.TestBase;
 import com.oracle.truffle.r.test.TestRBase;
 
 // Checkstyle: stop line length check
@@ -484,7 +483,7 @@ public class TestBuiltin_asvector extends TestRBase {
                     "as.environment(list(a=3,b=4,x=5))",
     };
 
-    private final String[] otherValues = new String[]{
+    @SuppressWarnings("unused") private final String[] otherValues = new String[]{
                     "NULL",
     };
 
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/engine/interop/AbstractMRTest.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/engine/interop/AbstractMRTest.java
index db917705ada773c565d14e55c4db64f311641347..9fcf40ab9e89f21c660e35e441c8bafffc5b9d14 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/engine/interop/AbstractMRTest.java
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/engine/interop/AbstractMRTest.java
@@ -253,7 +253,7 @@ public abstract class AbstractMRTest {
         });
     }
 
-    private void testKeys(TruffleObject obj) throws UnknownIdentifierException, UnsupportedMessageException {
+    private void testKeys(TruffleObject obj) throws UnknownIdentifierException {
         try {
             TruffleObject keysObj = ForeignAccess.sendKeys(Message.KEYS.createNode(), obj);
 
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/engine/interop/ListMRTest.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/engine/interop/ListMRTest.java
index fa4893330d078656cb9cba1f07c66baf7d0bd45b..29d48191b221e2143876dce368f6e3935e2f09af 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/engine/interop/ListMRTest.java
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/engine/interop/ListMRTest.java
@@ -55,12 +55,12 @@ public class ListMRTest extends AbstractMRTest {
     }
 
     @Test
-    public void testKeysReadWrite() throws UnsupportedMessageException, UnknownIdentifierException, UnsupportedTypeException {
+    public void testKeysReadWrite() {
         testKeysReadWrite("list");
         testKeysReadWrite("pairlist");
     }
 
-    private void testKeysReadWrite(String createFun) throws UnsupportedMessageException, UnknownIdentifierException, UnsupportedTypeException {
+    private void testKeysReadWrite(String createFun) {
         execInContext(() -> {
             RAbstractContainer l = create(createFun, testValues);
 
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/engine/interop/RFunctionMRTest.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/engine/interop/RFunctionMRTest.java
index deb0bbd2029a62e31d00f9343828b91749f772fd..a6ce7ce890d7fa8de67873e722c4fea74942cefc 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/engine/interop/RFunctionMRTest.java
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/engine/interop/RFunctionMRTest.java
@@ -25,23 +25,20 @@ package com.oracle.truffle.r.test.engine.interop;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
+import org.graalvm.polyglot.Source;
+import org.graalvm.polyglot.Value;
 import org.junit.Test;
 
-import com.oracle.truffle.api.interop.ArityException;
 import com.oracle.truffle.api.interop.ForeignAccess;
 import com.oracle.truffle.api.interop.Message;
 import com.oracle.truffle.api.interop.TruffleObject;
-import com.oracle.truffle.api.interop.UnsupportedMessageException;
-import com.oracle.truffle.api.interop.UnsupportedTypeException;
 import com.oracle.truffle.r.runtime.data.RFunction;
 import com.oracle.truffle.r.test.generate.FastRSession;
-import org.graalvm.polyglot.Source;
-import org.graalvm.polyglot.Value;
 
 public class RFunctionMRTest extends AbstractMRTest {
 
     @Test
-    public void testExecute() throws UnsupportedTypeException, ArityException, UnsupportedMessageException {
+    public void testExecute() {
         execInContext(() -> {
             RFunction f = create("function() {}");
             assertTrue(ForeignAccess.sendIsExecutable(Message.IS_EXECUTABLE.createNode(), f));
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/generate/FastRSession.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/generate/FastRSession.java
index e37ea7538097fd365f84645c4c9845dbbe46919e..a08bb5bcb29dee37e8d069f979b2041abbff924c 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/generate/FastRSession.java
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/generate/FastRSession.java
@@ -364,6 +364,8 @@ public final class FastRSession implements RSession {
         execInContext(context, c, (Class<?>) null);
     }
 
+    // TODO: export/importSymbol
+    @SuppressWarnings("deprecation")
     public static <E extends Exception> void execInContext(Context context, Callable<Object> c, Class<?>... acceptExceptions) {
         context.eval(FastRSession.GET_CONTEXT); // ping creation of TruffleRLanguage
         context.exportSymbol("testSymbol", (ProxyExecutable) (Value... args) -> {
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/fastr/TestInterop.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/fastr/TestInterop.java
index 59975e1a8e6300a6c12d5e9ae4356dc9a616dcba..5860aa69cc7370683d3268eaf189ffa6ff91a1c9 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/fastr/TestInterop.java
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/fastr/TestInterop.java
@@ -148,6 +148,8 @@ public class TestInterop extends TestBase {
     private static final TestJavaObject[] testJavaObjects = new TestJavaObject[]{new TestJavaObject("testPOJO", new POJO()), new TestJavaObject("testIntArray", new int[]{1, -5, 199}),
                     new TestJavaObject("testStringArray", new String[]{"a", "", "foo"})};
 
+    // TODO: export/importSymbol
+    @SuppressWarnings("deprecation")
     @Override
     public void addPolyglotSymbols(org.graalvm.polyglot.Context context) {
         for (TestJavaObject t : TestInterop.testJavaObjects) {
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/fastr/TestJavaInterop.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/fastr/TestJavaInterop.java
index d232a891eb95bd3ecd01371eaadc88e6dd457806..a48f99ef1321e44a58d58491625b9420d9f1818e 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/fastr/TestJavaInterop.java
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/fastr/TestJavaInterop.java
@@ -1558,18 +1558,6 @@ public class TestJavaInterop extends TestBase {
         return sb.toString();
     }
 
-    private String getRValuesAsString(Object... values) {
-        StringBuilder sb = new StringBuilder();
-        for (int i = 0; i < values.length; i++) {
-            Object v = values[i];
-            sb.append(getRValue(v));
-            if (i < values.length - 1) {
-                sb.append(",");
-            }
-        }
-        return sb.toString();
-    }
-
     private static String getBooleanPrefix(Object array, int i) {
         Object element = Array.get(array, i);
         if (element == null) {
diff --git a/mx.fastr/suite.py b/mx.fastr/suite.py
index be8f7caa5085c47cb5556c2aa680994831eb3acc..191682f6b95ccb2a9c5a6af7a1ef1551fc65c8f6 100644
--- a/mx.fastr/suite.py
+++ b/mx.fastr/suite.py
@@ -7,7 +7,7 @@ suite = {
             {
                "name" : "truffle",
                "subdir" : True,
-               "version" : "440d89a72cdeb7bc7951e37462cd30bf12fa3ae6",
+               "version" : "e5a96fc63e69bed9a93e812936c9961a69d8d25e",
                "urls" : [
                     {"url" : "https://github.com/graalvm/graal", "kind" : "git"},
                     {"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind" : "binary"},