Skip to content

Commit f8aee21

Browse files
committed
Speed up call boundary lookup on HotSpot.
1 parent c0c90a8 commit f8aee21

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntime.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,16 +483,18 @@ public boolean bypassedReservedOop() {
483483
}
484484

485485
private void installCallBoundaryMethods(HotSpotTruffleCompiler compiler) {
486-
ResolvedJavaType type = getMetaAccess().lookupJavaType(OptimizedCallTarget.class);
487-
for (ResolvedJavaMethod method : type.getDeclaredMethods(false)) {
488-
if (method.getAnnotation(TruffleCallBoundary.class) != null) {
486+
ResolvedJavaType target = getMetaAccess().lookupJavaType(OptimizedCallTarget.class);
487+
for (ResolvedJavaMethod method : target.getDeclaredMethods(false)) {
488+
if (method.getName().equals("callBoundary")) {
489+
assert method.getAnnotation(TruffleCallBoundary.class) != null;
489490
if (compiler != null) {
490491
OptimizedCallTarget initCallTarget = initializeCallTarget;
491492
Objects.requireNonNull(initCallTarget);
492493
compiler.installTruffleCallBoundaryMethod(method, initCallTarget);
493494
} else {
494495
setNotInlinableOrCompilable(method);
495496
}
497+
break;
496498
}
497499
}
498500
}

0 commit comments

Comments
 (0)