[ 
https://issues.apache.org/jira/browse/GROOVY-12137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18094896#comment-18094896
 ] 

ASF GitHub Bot commented on GROOVY-12137:
-----------------------------------------

paulk-asert commented on code in PR #2673:
URL: https://github.com/apache/groovy/pull/2673#discussion_r3549143055


##########
src/main/java/org/codehaus/groovy/vmplugin/v8/Selector.java:
##########
@@ -1226,6 +1251,35 @@ void buildInvokeHandle() {
                 addExceptionHandler();
             }
         }
+
+        @Override
+        MetaMethod selectForColdReflection() {
+            // defensive: the cold tier is only for plain method calls; the
+            // fallback gates on CallType.METHOD, so subclasses (CastSelector,
+            // InterfaceSelector) are never asked, but make it explicit here
+            if (callType != CallType.METHOD) return null;
+            // these all need the full handle path: spread and safe-null have
+            // their own adaptation/constant handles; a null receiver means
+            // NullObject MOP dispatch; a Class receiver is a static-method

Review Comment:
   (NullObject): You're right — nothing fundamental prevents serving 
NullObject's methods reflectively; the exclusion was spike conservatism. Marked 
as TODO as suggested.





> 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)

Reply via email to