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

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

Copilot commented on code in PR #2546:
URL: https://github.com/apache/groovy/pull/2546#discussion_r3292516362


##########
src/main/java/org/codehaus/groovy/classgen/asm/indy/sc/IndyStaticTypesMultiTypeDispatcher.java:
##########
@@ -36,7 +36,9 @@
  * Multi type dispatcher for binary expression backend combining indy and 
static compilation
  *
  * @since 2.5.0
+ * @deprecated 6.0.0

Review Comment:
   The new deprecation Javadoc (`@deprecated 6.0.0`) isn’t very informative for 
API consumers; in this codebase deprecation docs typically include the 
recommended replacement and/or rationale (e.g., "Use … instead"). Consider 
updating the `@deprecated` tag text to point to 
`StaticTypesBinaryExpressionMultiTypeDispatcher` (or other intended 
alternative) and optionally mention that indy array access is no longer used in 
static compilation.
   





> deprecate IndyStaticTypesMultiTypeDispatcher
> --------------------------------------------
>
>                 Key: GROOVY-12022
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12022
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Jochen Theodorou
>            Assignee: Jochen Theodorou
>            Priority: Minor
>
> In IndyStaticTypesMultiTypeDispatcher.java (lines 95-99), the get and set 
> names are swapped for float and boolean arrays (using name "get" for a 
> descriptor that returns void and takes a value).
>  The code works because the IndyInterface.staticArrayAccess bootstrap method 
> ignores the name parameter and uses the parameter count of the MethodType 
> instead.
> But in general I see no reason to use invokedynamic here. The non-indy code 
> uses BytecodeInterface8 to access the specific code paths for array access 
> and should be faster than the indy version since it is a "simple" static 
> method invocation. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to