From bf0a32b090e0840d544ee4eb055af3639ebb8f6e Mon Sep 17 00:00:00 2001
From: stepan <stepan.sindelar@oracle.com>
Date: Thu, 19 Apr 2018 15:52:17 +0200
Subject: [PATCH] Avoid recursion in PE

---
 .../src/com/oracle/truffle/r/runtime/context/RContext.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/RContext.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/RContext.java
index 3544f269c7..9762df621c 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/RContext.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/context/RContext.java
@@ -692,12 +692,17 @@ public final class RContext {
             // methods information
             assert contextKind != ContextKind.SHARE_NOTHING;
             assert parentContext != null;
-            return parentContext.getPrimitiveMethodsInfo();
+            return parentContext.getPrimitiveMethodsInfoWithBoundary();
         } else {
             return primitiveMethodsInfo;
         }
     }
 
+    @TruffleBoundary
+    private PrimitiveMethodsInfo getPrimitiveMethodsInfoWithBoundary() {
+        return getPrimitiveMethodsInfo();
+    }
+
     /**
      * This is a static property of the implementation and not context-specific.
      */
-- 
GitLab