diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Expression.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Expression.java
index aa20ab830cb4c4a1ef9ff37b5afc90c34a03b4d4..c58f3020137ad9a68eaede21ba87a484355e5688 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Expression.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Expression.java
@@ -70,6 +70,7 @@ public abstract class Expression extends RBuiltinNode.Arg1 {
     }
 
     @Specialization
+    @TruffleBoundary
     protected Object doExpression(RPromise language) {
         return RDataFactory.createExpression(new Object[]{convert(language)});
     }
diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Round.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Round.java
index 407ce9faac3f31777368b02558b5ce92eb6a1b82..a3450d32ad3725485fdf7d5f1578e8245b392bcb 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Round.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Round.java
@@ -31,6 +31,7 @@ import static com.oracle.truffle.r.runtime.builtins.RBuiltinKind.PRIMITIVE;
 import com.oracle.truffle.api.CompilerDirectives;
 import com.oracle.truffle.api.dsl.Specialization;
 import com.oracle.truffle.api.nodes.Node;
+import com.oracle.truffle.api.profiles.ConditionProfile;
 import com.oracle.truffle.r.nodes.builtin.RBuiltinNode;
 import com.oracle.truffle.r.runtime.RError;
 import com.oracle.truffle.r.runtime.RRuntime;
@@ -52,6 +53,8 @@ public abstract class Round extends RBuiltinNode.Arg2 {
 
     @Child private RoundArithmetic roundOp = new RoundArithmetic();
 
+    private final ConditionProfile zeroDigitProfile = ConditionProfile.createBinaryProfile();
+
     private final NACheck check = NACheck.create();
 
     @Override
@@ -83,6 +86,13 @@ public abstract class Round extends RBuiltinNode.Arg2 {
         return check.check(x) ? RRuntime.DOUBLE_NA : x;
     }
 
+    @Specialization
+    protected double roundDigits(double x, double digits) {
+        check.enable(x);
+        int digitsInt = (int) Math.round(digits);
+        return check.check(x) ? RRuntime.DOUBLE_NA : zeroDigitProfile.profile(digitsInt == 0) ? roundOp.op(x) : roundOp.opd(x, digitsInt);
+    }
+
     @Specialization
     protected RDoubleVector round(RAbstractLogicalVector x, @SuppressWarnings("unused") double digits) {
         double[] data = new double[x.getLength()];
@@ -105,43 +115,18 @@ public abstract class Round extends RBuiltinNode.Arg2 {
         return RDataFactory.createDoubleVector(data, check.neverSeenNA());
     }
 
-    @Specialization(guards = "isZero(digits)")
-    protected double round(double x, @SuppressWarnings("unused") double digits) {
-        check.enable(x);
-        return check.check(x) ? RRuntime.DOUBLE_NA : roundOp.op(x);
-    }
-
     protected double roundDigits(double x, int digits) {
-        check.enable(x);
-        return check.check(x) ? RRuntime.DOUBLE_NA : roundOp.opd(x, digits);
-    }
-
-    @Specialization(guards = "!isZero(digits)")
-    protected double roundDigits(double x, double digits) {
-        return roundDigits(x, (int) Math.round(digits));
+        return check.check(x) ? RRuntime.DOUBLE_NA : zeroDigitProfile.profile(digits == 0) ? roundOp.op(x) : roundOp.opd(x, digits);
     }
 
-    @Specialization(guards = "isZero(digits)")
+    @Specialization
     protected RDoubleVector round(RAbstractDoubleVector x, double digits) {
         double[] result = new double[x.getLength()];
         check.enable(x);
+        int digitsInt = (int) Math.round(digits);
         for (int i = 0; i < x.getLength(); i++) {
             double value = x.getDataAt(i);
-            result[i] = check.check(value) ? RRuntime.DOUBLE_NA : round(value, digits);
-        }
-        RDoubleVector ret = RDataFactory.createDoubleVector(result, check.neverSeenNA());
-        ret.copyAttributesFrom(x);
-        return ret;
-    }
-
-    @Specialization(guards = "!isZero(dDigits)")
-    protected RDoubleVector roundDigits(RAbstractDoubleVector x, double dDigits) {
-        double[] result = new double[x.getLength()];
-        int digits = (int) Math.round(dDigits);
-        check.enable(x);
-        for (int i = 0; i < x.getLength(); i++) {
-            double value = x.getDataAt(i);
-            result[i] = check.check(value) ? RRuntime.DOUBLE_NA : roundDigits(value, digits);
+            result[i] = check.check(value) ? RRuntime.DOUBLE_NA : zeroDigitProfile.profile(digitsInt == 0) ? roundOp.op(value) : roundOp.opd(value, digitsInt);
         }
         RDoubleVector ret = RDataFactory.createDoubleVector(result, check.neverSeenNA());
         ret.copyAttributesFrom(x);
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/RASTBuilder.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/RASTBuilder.java
index 1b211974b3c9f8ab72cb4d8711e76a132876cfe3..9f6f6652e1d19533b225ea5e3afe6c2943211587 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/RASTBuilder.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/RASTBuilder.java
@@ -258,15 +258,14 @@ public final class RASTBuilder implements RCodeBuilder<RSyntaxNode> {
     public RSyntaxNode constant(SourceSection source, Object value) {
         if (value instanceof String && !RRuntime.isNA((String) value)) {
             return ConstantNode.create(source, Utils.intern((String) value));
-        } else {
-            if (value instanceof RShareable) {
-                RShareable shareable = (RShareable) value;
-                if (!shareable.isSharedPermanent()) {
-                    return ConstantNode.create(source, shareable.makeSharedPermanent());
-                }
+        }
+        if (value instanceof RShareable) {
+            RShareable shareable = (RShareable) value;
+            if (!shareable.isSharedPermanent()) {
+                return ConstantNode.create(source, shareable.makeSharedPermanent());
             }
-            return ConstantNode.create(source, value);
         }
+        return ConstantNode.create(source, value);
     }
 
     @Override
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 e0c252dfd5387ebc560c2f338682add035352804..037b7b409d29b3cb39e93ba4cd6dba9da5156f9f 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
@@ -299,48 +299,49 @@ public final class PipelineToCastNode {
 
         @Override
         public ArgumentFilter<?, ?> visit(RTypeFilter<?> filter, ArgumentFilter<?, ?> previous) {
-            if (filter.getType() == RType.Integer) {
-                return new ArgumentFilter<Object, Object>() {
-                    private final ConditionProfile profile = ConditionProfile.createBinaryProfile();
-
-                    @Override
-                    public boolean test(Object x) {
-                        return profile.profile(x instanceof Integer) || x instanceof RAbstractIntVector;
-                    }
-                };
-            } else if (filter.getType() == RType.Double) {
-                return new ArgumentFilter<Object, Object>() {
-                    private final ConditionProfile profile = ConditionProfile.createBinaryProfile();
-
-                    @Override
-                    public boolean test(Object x) {
-                        return profile.profile(x instanceof Double) || x instanceof RAbstractDoubleVector;
-                    }
-                };
-            } else if (filter.getType() == RType.Logical) {
-                return new ArgumentFilter<Object, Object>() {
-                    private final ConditionProfile profile = ConditionProfile.createBinaryProfile();
-
-                    @Override
-                    public boolean test(Object x) {
-                        return profile.profile(x instanceof Byte) || x instanceof RAbstractLogicalVector;
-                    }
-                };
-            } else if (filter.getType() == RType.Complex) {
-                return x -> x instanceof RAbstractComplexVector;
-            } else if (filter.getType() == RType.Character) {
-                return new ArgumentFilter<Object, Object>() {
-                    private final ConditionProfile profile = ConditionProfile.createBinaryProfile();
-
-                    @Override
-                    public boolean test(Object x) {
-                        return profile.profile(x instanceof String) || x instanceof RAbstractStringVector;
-                    }
-                };
-            } else if (filter.getType() == RType.Raw) {
-                return x -> x instanceof RAbstractRawVector;
-            } else {
-                throw RInternalError.unimplemented("TODO: more types here");
+            switch (filter.getType()) {
+                case Integer:
+                    return new ArgumentFilter<Object, Object>() {
+                        private final ConditionProfile profile = ConditionProfile.createBinaryProfile();
+
+                        @Override
+                        public boolean test(Object x) {
+                            return profile.profile(x instanceof Integer) || x instanceof RAbstractIntVector;
+                        }
+                    };
+                case Double:
+                    return new ArgumentFilter<Object, Object>() {
+                        private final ConditionProfile profile = ConditionProfile.createBinaryProfile();
+
+                        @Override
+                        public boolean test(Object x) {
+                            return profile.profile(x instanceof Double) || x instanceof RAbstractDoubleVector;
+                        }
+                    };
+                case Logical:
+                    return new ArgumentFilter<Object, Object>() {
+                        private final ConditionProfile profile = ConditionProfile.createBinaryProfile();
+
+                        @Override
+                        public boolean test(Object x) {
+                            return profile.profile(x instanceof Byte) || x instanceof RAbstractLogicalVector;
+                        }
+                    };
+                case Complex:
+                    return x -> x instanceof RAbstractComplexVector;
+                case Character:
+                    return new ArgumentFilter<Object, Object>() {
+                        private final ConditionProfile profile = ConditionProfile.createBinaryProfile();
+
+                        @Override
+                        public boolean test(Object x) {
+                            return profile.profile(x instanceof String) || x instanceof RAbstractStringVector;
+                        }
+                    };
+                case Raw:
+                    return x -> x instanceof RAbstractRawVector;
+                default:
+                    throw RInternalError.unimplemented("type " + filter.getType());
             }
         }
 
diff --git a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/PromiseHelperNode.java b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/PromiseHelperNode.java
index 74d41d8ec674bbe75c785baf3bcf2bfe096fffd4..243858790910424768d6deb86ac0510659900f49 100644
--- a/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/PromiseHelperNode.java
+++ b/com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/PromiseHelperNode.java
@@ -58,9 +58,9 @@ import com.oracle.truffle.r.runtime.nodes.RBaseNode;
  * Holds {@link RPromise}-related functionality that cannot be implemented in
  * "com.oracle.truffle.r.runtime.data" due to package import restrictions.
  */
-public class PromiseHelperNode extends RBaseNode {
+public final class PromiseHelperNode extends RBaseNode {
 
-    public static class PromiseCheckHelperNode extends RBaseNode {
+    public static final class PromiseCheckHelperNode extends RBaseNode {
 
         @Child private PromiseHelperNode promiseHelper;
 
@@ -81,7 +81,7 @@ public class PromiseHelperNode extends RBaseNode {
         }
     }
 
-    public static class PromiseDeoptimizeFrameNode extends RBaseNode {
+    public static final class PromiseDeoptimizeFrameNode extends RBaseNode {
         private final BranchProfile deoptimizeProfile = BranchProfile.create();
 
         /**
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/NativeConnections.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/NativeConnections.java
index 4f3a36f520cf162046f5b318e7107ccd075b4187..7d18153e4a3334d1cabe43c5d4001d8b2fbb265a 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/NativeConnections.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/conn/NativeConnections.java
@@ -302,7 +302,7 @@ public class NativeConnections {
         // converted to a pointer using RAW macro. This turns the raw vector into a native memory
         // backed vector and any consecutive (write) operations in the native code are actually not
         // done on the original vector that backs the byte buffer, so we need to copy back the date
-        // to the byte buffer. It would be more efficitent to use direct byte buffer, but then we'd
+        // to the byte buffer. It would be more efficient to use direct byte buffer, but then we'd
         // need to make the native call interface (CallRFFI.InvokeCallRootNode) more flexible so
         // that it can accept other argument types than SEXPs.
 
diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/env/REnvironment.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/env/REnvironment.java
index 014af717bc7c428eaedd64e7b0459645f8206dba..ecfce5c1599cbf35bb9781ea96fa3c7f44c1d6d5 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/env/REnvironment.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/env/REnvironment.java
@@ -1147,6 +1147,7 @@ public abstract class REnvironment extends RAttributeStorage {
         }
 
         @Override
+        @TruffleBoundary
         public void put(String key, Object value) throws PutException {
             throw new PutException(RError.Message.ENV_ASSIGN_EMPTY);
         }