paulk-asert commented on code in PR #2673:
URL: https://github.com/apache/groovy/pull/2673#discussion_r3536515856
##########
src/main/java/org/codehaus/groovy/vmplugin/v8/Selector.java:
##########
@@ -1226,6 +1251,26 @@ void buildInvokeHandle() {
addExceptionHandler();
}
}
+
+ @Override
+ MetaMethod selectForColdReflection() {
+ if (safeNavigation || spread || args[0] == null
+ || args[0] instanceof Class || args[0] instanceof
GroovyInterceptable) {
+ return null;
+ }
Review Comment:
AI read: That hook is only reached for CallType.METHOD — the fallback gates
on it, so CastSelector/InterfaceSelector are never asked; I've added a
defensive check plus comments since that wasn't visible from the diff. The
instanceof Class test isn't about asType/cast: a Class receiver means a
static-method-style call, and those promote on their first hit anyway
(GROOVY-11935), so the reflective tier would buy nothing. Null receivers mean
NullObject MOP dispatch, which I kept out of the plain-call scope for the spike
— supportable later if the numbers justify it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]