groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject [14/50] [abbrv] groovy git commit: Set the default version of bytecode as 1.8
Date Wed, 10 May 2017 22:26:42 GMT
Set the default version of bytecode as 1.8


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

Branch: refs/heads/parrot
Commit: b469cbb67d38e85ab62193b3e0da937fc732cab1
Parents: 07456a5
Author: sunlan <sunlan@apache.org>
Authored: Sat May 6 01:27:47 2017 +0800
Committer: paulk <paulk@asert.com.au>
Committed: Thu May 11 08:09:10 2017 +1000

----------------------------------------------------------------------
 .../org/codehaus/groovy/classgen/asm/WriterController.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/b469cbb6/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 e8c5b61..e4cfdbe 100644
--- a/src/main/org/codehaus/groovy/classgen/asm/WriterController.java
+++ b/src/main/org/codehaus/groovy/classgen/asm/WriterController.java
@@ -65,7 +65,7 @@ public class WriterController {
     private StatementWriter statementWriter;
     private boolean fastPath = false;
     private TypeChooser typeChooser;
-    private int bytecodeVersion = Opcodes.V1_5;
+    private int bytecodeVersion = Opcodes.V1_8;
     private int lineNumber = -1;
     private int helperMethodIndex = 0;
     private List<String> superMethodNames = new ArrayList<String>();
@@ -130,10 +130,10 @@ public class WriterController {
 
     private static int chooseBytecodeVersion(final boolean invokedynamic, final String targetBytecode)
{
         if (invokedynamic) {
-            if (CompilerConfiguration.JDK8.equals(targetBytecode)) {
-                return Opcodes.V1_8;
+            if (CompilerConfiguration.JDK7.equals(targetBytecode)) {
+                return Opcodes.V1_7;
             }
-            return Opcodes.V1_7;
+            return Opcodes.V1_8;
         } else {
             if (CompilerConfiguration.JDK4.equals(targetBytecode)) {
                 return Opcodes.V1_4;


Mime
View raw message