Hi John, I've just quickly take a loook to your code.
I've notice that you appendan enum value LIMIT at the end
like in C to know how many enums values are defined,
in Java, you can use values() instead.
Ok, it create an array but only once.
static enum Kind {
value('V'), // filter and replace Nth argument value
fold('F'), // fold first N arguments, prepend result
collect('C'), // collect last N arguments, replace with result
flyby('Y'); // reify entire argument list, filter, pass to target
static final int COUNT = values().length;
}
A question:
The JSR292 backport contains a similar code,
http://code.google.com/p/jvm-language-runtime/source/browse/trunk/invokedynamic-backport/src/jsr292/java/dyn/MHInserter.java
but use a switch instead of one class by argument value.
I was wondering if the VM was able to remove that switch ?
Rémi
[email protected] a écrit :
> Changeset: 2d82f10e16bf
> Author: jrose
> Date: 2009-06-10 04:18 -0700
> URL: http://hg.openjdk.java.net/mlvm/mlvm/jdk/rev/2d82f10e16bf
>
> meth: {collect,spread,fold}Arguments working
>
> ! indy.patch
>
> _______________________________________________
> mlvm-dev mailing list
> [email protected]
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
>
_______________________________________________
mlvm-dev mailing list
[email protected]
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev