On 05/01/2012 09:24 PM, [email protected] wrote:
> Changeset: 5ec0f6472b4b
> Author: twisti
> Date: 2012-05-01 12:24 -0700
> URL: http://hg.openjdk.java.net/mlvm/mlvm/jdk/rev/5ec0f6472b4b
>
> meth-lazy: moved to ASM for bytecode generation
>
> ! meth-lazy-7023639.patch
>
> _______________________________________________
> mlvm-dev mailing list
> [email protected]
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
Hi Christian,
in emitIconstInsn, you forget ICONST_M1, also
ICONST_M1, ICONST_0, ICONST_1, etc are subsequent values so
you can write:
switch(i) {
case -1:
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
opcode = Opcodes.ICONST_0 + i;
...
}
for emitLoadInsn, emitStoreInsn and emitReturnType, you can use
the same switch that map 'I', 'J', 'F', 'D', 'A', 'V' to 0...5,
because ISTORE, ILOAD and IRETURN variants are all in the same order.
Also nextEIID and nextNFID can use an AtomicInter and its method
getAndIncrement
instead of a synchronized method, it should be more efficient.
cheers,
Rémi
_______________________________________________
mlvm-dev mailing list
[email protected]
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev