WIP on Java8. Looking at lambda reloading first (required invokedynamic handling)

This commit is contained in:
Andy Clement
2014-02-13 10:39:32 -08:00
parent 8dff505b88
commit 9774e2a0d4
64 changed files with 745 additions and 140 deletions

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@@ -0,0 +1 @@
#Thu Feb 06 13:01:33 PST 2014

View File

@@ -0,0 +1 @@


17
testdata-java8/.project Normal file
View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>testdata-java8</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@@ -0,0 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7

View File

@@ -0,0 +1,3 @@
apply plugin: 'java'
sourceCompatibility = 1.8

2
testdata-java8/build.sh Executable file
View File

@@ -0,0 +1,2 @@
cd src/main/java
find . -name "*.java" | javac

BIN
testdata-java8/code.jar Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,12 @@
package basic;
public class FirstClass {
public static void main(String[] args) {
System.out.println("This is Java8");
}
public static int run() {
return 8;
}
}

View File

@@ -0,0 +1,16 @@
package basic;
public class LambdaA {
public interface Foo { int m(); }
public static void main(String[] args) {
run();
}
public static int run() {
Foo f = null;
f = () -> 77;
return f.m();
}
}

View File

@@ -0,0 +1,16 @@
package basic;
public class LambdaA2 {
public interface Foo { int m(); }
public static void main(String[] args) {
run();
}
public static int run() {
Foo f = null;
f = () -> 88;
return f.m();
}
}