Skip to content

Commit 03d8604

Browse files
otethaltimfel
authored andcommitted
Use weak reference for cached code in GetCodeCallTargetNode
1 parent 4f1dd1a commit 03d8604

File tree

1 file changed

+2
-2
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/code

1 file changed

+2
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/code/CodeNodes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ public static RootCallTarget executeUncached(PCode code) {
200200

201201
@Specialization(guards = {"cachedCode == code", "isSingleContext()"}, limit = "2")
202202
static RootCallTarget doCachedCode(Node node, @SuppressWarnings("unused") PCode code,
203-
@SuppressWarnings("unused") @Cached("code") PCode cachedCode,
204-
@Cached("code.initializeCallTarget()") RootCallTarget cachedRootCallTarget) {
203+
@SuppressWarnings("unused") @Cached(value = "code", weak = true) PCode cachedCode,
204+
@Cached(value = "code.initializeCallTarget()", weak = true) RootCallTarget cachedRootCallTarget) {
205205
return cachedRootCallTarget;
206206
}
207207

0 commit comments

Comments
 (0)