lambda/lambda/langtools: initial lambda push; the current prototype suuports the following features:
Rémi Forax
forax at univ-mlv.fr
Fri May 28 07:40:47 PDT 2010
I've found some bugs :)
// this doesn't compile - how to declare a function type that doesn't
takes any parameter ?
#int() bar;
// in my opinion, an instruction can start with a lambda that has a body,
// but the hand-coded grammar of the compiler doesn't allow that.
#(int x) { System.out.println(x); }.();
// Open question: can an instruction starts with a lambda expression ?
// this snippet generate invalid code (at bytecode offset 4)
int v = #(Object o) {
System.out.println(this.type());
return 3;
}.("foo");
static int lambda$0(java.dyn.MethodHandle, java.lang.Object);
Code:
0: getstatic #1 // Field
java/lang/System.out:Ljava/io/PrintStream;
3: aload_0
4: invokevirtual #2 // Method "".type:()Ljava/dyn/MethodType;
7: invokevirtual #3 // Method
java/io/PrintStream.println:(Ljava/lang/Object;)V
10: iconst_3
11: ireturn
Rémi
More information about the lambda-dev
mailing list