groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pascalschumac...@apache.org
Subject groovy git commit: Provide static reference for indy setting (closes #118)
Date Fri, 15 Jan 2016 19:06:55 GMT
Repository: groovy
Updated Branches:
  refs/heads/master b7cb15839 -> a0c40f1fc


Provide static reference for indy setting (closes #118)


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/a0c40f1f
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/a0c40f1f
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/a0c40f1f

Branch: refs/heads/master
Commit: a0c40f1fc7e5778c460b43577f7141dc3d794ef6
Parents: b7cb158
Author: Chris Earle <chris.earle@elasticsearch.com>
Authored: Thu Sep 17 15:49:19 2015 -0400
Committer: pascalschumacher <pascalschumacher@gmx.net>
Committed: Fri Jan 15 20:05:32 2016 +0100

----------------------------------------------------------------------
 .../org/codehaus/groovy/classgen/asm/WriterController.java    | 2 +-
 .../org/codehaus/groovy/control/CompilerConfiguration.java    | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/a0c40f1f/src/main/org/codehaus/groovy/classgen/asm/WriterController.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/classgen/asm/WriterController.java b/src/main/org/codehaus/groovy/classgen/asm/WriterController.java
index 7aaafd1..e6246b4 100644
--- a/src/main/org/codehaus/groovy/classgen/asm/WriterController.java
+++ b/src/main/org/codehaus/groovy/classgen/asm/WriterController.java
@@ -94,7 +94,7 @@ public class WriterController {
             optimizeForInt=false;
             // set other optimizations options to false here
         } else {
-            if (Boolean.TRUE.equals(optOptions.get("indy"))) invokedynamic=true;
+            if (Boolean.TRUE.equals(optOptions.get(CompilerConfiguration.INVOKEDYNAMIC)))
invokedynamic=true;
             if (Boolean.FALSE.equals(optOptions.get("int"))) optimizeForInt=false;
             if (invokedynamic) optimizeForInt=false;
             // set other optimizations options to false here

http://git-wip-us.apache.org/repos/asf/groovy/blob/a0c40f1f/src/main/org/codehaus/groovy/control/CompilerConfiguration.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/control/CompilerConfiguration.java b/src/main/org/codehaus/groovy/control/CompilerConfiguration.java
index 156d953..f71808f 100644
--- a/src/main/org/codehaus/groovy/control/CompilerConfiguration.java
+++ b/src/main/org/codehaus/groovy/control/CompilerConfiguration.java
@@ -39,6 +39,9 @@ public class CompilerConfiguration {
 
     private static final String JDK5_CLASSNAME_CHECK = "java.lang.annotation.Annotation";
 
+    /** This (<code>"indy"</code>) is the Optimization Option value for enabling
<code>invokedynamic</code> complilation. */
+    public static final String INVOKEDYNAMIC = "indy";
+
     /** This (<code>"1.4"</code>) is the value for targetBytecode to compile
for a JDK 1.4. **/
     public static final String JDK4 = "1.4";
     /** This (<code>"1.5"</code>) is the value for targetBytecode to compile
for a JDK 1.5. **/
@@ -214,12 +217,12 @@ public class CompilerConfiguration {
         } catch (Exception e) {
             // IGNORE
         }
-        if (DEFAULT!=null && Boolean.TRUE.equals(DEFAULT.getOptimizationOptions().get("indy")))
{
+        if (DEFAULT!=null && Boolean.TRUE.equals(DEFAULT.getOptimizationOptions().get(INVOKEDYNAMIC)))
{
             indy = true;
         }
         Map options = new HashMap<String,Boolean>(3);
         if (indy) {
-            options.put("indy", Boolean.TRUE);
+            options.put(INVOKEDYNAMIC, Boolean.TRUE);
         }
         setOptimizationOptions(options);
     }


Mime
View raw message