sO newPreciseCall_sentinel(O o, S method, O methodNotFoundSentinel, O... args) ctex { if (o == null) null; bool staticCall = o instanceof Class; Class c = staticCall ? (Class) o : o.getClass(); O target = staticCall ? null : o; _MethodCache cache = callOpt_getCache(c); L methods = cache.cache.get(method); Method best = null; int bestScore = Int.MAX_VALUE; bool widening; if (methods != null) for (Method m : methods) { if (staticCall && !isStaticMethod(m)) continue; int score = methodApplicabilityScore_withPrimitiveWidening(m, args); if (score == 0) ret invokeMethod(m, target, args); if (abs(score) < bestScore) { best = m; bestScore = abs(score); widening = score < 0; } } if (best != null) if (widening) ret invokeMethodWithWidening(best, target, args); else ret invokeMethod(best, target, args); ret callWithVarargs_sentinel(o, method, methodNotFoundSentinel, args); // TODO: make this precise too }