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 2017/05/05 17:28:02 UTC
groovy git commit: Set the default version of bytecode as 1.8
Repository: groovy
Updated Branches:
refs/heads/master 1a1dbd801 -> c6e1ad1b6
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/c6e1ad1b
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/c6e1ad1b
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/c6e1ad1b
Branch: refs/heads/master
Commit: c6e1ad1b68e0b394eb16c703ed7fe495ff293c2e
Parents: 1a1dbd8
Author: sunlan <su...@apache.org>
Authored: Sat May 6 01:27:47 2017 +0800
Committer: sunlan <su...@apache.org>
Committed: Sat May 6 01:27:47 2017 +0800
----------------------------------------------------------------------
.../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/c6e1ad1b/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;