[
https://issues.apache.org/jira/browse/GROOVY-12137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18094347#comment-18094347
]
ASF GitHub Bot commented on GROOVY-12137:
-----------------------------------------
blackdrag commented on code in PR #2673:
URL: https://github.com/apache/groovy/pull/2673#discussion_r3538044994
##########
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:
CastSelector is not supposed to be used for CallType.METHOD, also there are
no static method calls for CastSelector. CastSelector is for non-trivial casts
that may result in asType calls. if the receiver is Class it means we are
dealing with something like "(T) c" where c is an instance of Class. It is not
for a normal method call to asType(Class). Things left out of the spike are ok,
if the PR is not intended for merge. Otherwise it should have at the very least
a TODO.
> experimental reflective cold tier for indy dispatch
> ---------------------------------------------------
>
> Key: GROOVY-12137
> URL: https://issues.apache.org/jira/browse/GROOVY-12137
> Project: Groovy
> Issue Type: Task
> Reporter: Paul King
> Priority: Major
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)