Skip to content

Commit 5cca09b

Browse files
committed
Ensure CachedLazyCallTargetSupplier#get() is not called in PE code
1 parent a43eaba commit 5cca09b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/org/truffleruby/language/methods/CachedLazyCallTargetSupplier.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010
package org.truffleruby.language.methods;
1111

12+
import com.oracle.truffle.api.CompilerAsserts;
1213
import com.oracle.truffle.api.RootCallTarget;
1314

1415
import java.util.function.Supplier;
@@ -24,6 +25,7 @@ public CachedLazyCallTargetSupplier(Supplier<RootCallTarget> supplier) {
2425
}
2526

2627
public RootCallTarget get() {
28+
CompilerAsserts.neverPartOfCompilation("Only behind a transfer, must not PE the Supplier");
2729
synchronized (this) {
2830
if (callTarget == null) {
2931
callTarget = supplier.get();

0 commit comments

Comments
 (0)