You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2021/06/27 15:41:03 UTC

[groovy] branch danielsun/indy-callsite created (now ff1c69c)

This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a change to branch danielsun/indy-callsite
in repository https://gitbox.apache.org/repos/asf/groovy.git.


      at ff1c69c  GROOVY-9513: Ensure enabling indy by default

This branch includes the following new commits:

     new ff1c69c  GROOVY-9513: Ensure enabling indy by default

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[groovy] 01/01: GROOVY-9513: Ensure enabling indy by default

Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch danielsun/indy-callsite
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit ff1c69c87d1def416d1c6a1415a04077b046b883
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sun Jun 27 23:31:58 2021 +0800

    GROOVY-9513: Ensure enabling indy by default
---
 src/main/java/org/codehaus/groovy/classgen/asm/WriterController.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/WriterController.java b/src/main/java/org/codehaus/groovy/classgen/asm/WriterController.java
index d5a59e1..5a8539d 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/WriterController.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/WriterController.java
@@ -81,14 +81,14 @@ public class WriterController {
     public void init(final AsmClassGenerator asmClassGenerator, final GeneratorContext gcon, final ClassVisitor cv, final ClassNode cn) {
         CompilerConfiguration config = cn.getCompileUnit().getConfig();
         Map<String,Boolean> optOptions = config.getOptimizationOptions();
-        boolean invokedynamic = false;
+        boolean invokedynamic = true;
         if (optOptions.isEmpty()) {
             // IGNORE
         } else if (Boolean.FALSE.equals(optOptions.get("all"))) {
             this.optimizeForInt = false;
             // set other optimizations options to false here
         } else {
-            if (config.isIndyEnabled()) invokedynamic = true;
+            if (!config.isIndyEnabled()) invokedynamic = false;
             if (Boolean.FALSE.equals(optOptions.get("int"))) this.optimizeForInt = false;
             if (invokedynamic) this.optimizeForInt = false;
             // set other optimizations options to false here