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 e0c9f9eb525f116bfd2cf38921a8320f3e12bfb0..cc6676d89f3499383915a05d82b9a91b50f5cb78 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 @@ -32,6 +32,7 @@ import com.oracle.truffle.r.nodes.RASTUtils; import com.oracle.truffle.r.nodes.RRootNode; import com.oracle.truffle.r.nodes.function.PromiseHelperNode.PromiseDeoptimizeFrameNode; 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; @@ -49,6 +50,8 @@ public final class FunctionExpressionNode extends RSourceSectionNode implements return new FunctionExpressionNode(src, callTarget); } + @Child private SetVisibilityNode visibility = SetVisibilityNode.create(); + @CompilationFinal private RootCallTarget callTarget; private final PromiseDeoptimizeFrameNode deoptFrameNode; @CompilationFinal private FastPathFactory fastPath; @@ -68,6 +71,7 @@ public final class FunctionExpressionNode extends RSourceSectionNode implements @Override public RFunction executeFunction(VirtualFrame frame) { + visibility.execute(frame, true); MaterializedFrame matFrame = frame.materialize(); if (deoptFrameNode != null) { // Deoptimize every promise which is now in this frame, as it might leave it's stack