comparison src/share/vm/classfile/javaClasses.hpp @ 1039:987e948ebbc8

6815692: method handle code needs some cleanup (post-6655638) Summary: correctly raise exceptions, support safe bitwise "raw" conversions, fix bugs revealed by VerifyMethodHandles, remove dead code, improve debugging support Reviewed-by: never, twisti
author jrose
date Sat, 17 Oct 2009 19:51:05 -0700
parents be93aad57795
children 389049f3f393
comparison
equal deleted inserted replaced
1038:71fdc5052e49 1039:987e948ebbc8
901 } 901 }
902 902
903 // Relevant integer codes (keep these in synch. with MethodHandleNatives.Constants): 903 // Relevant integer codes (keep these in synch. with MethodHandleNatives.Constants):
904 enum { 904 enum {
905 OP_RETYPE_ONLY = 0x0, // no argument changes; straight retype 905 OP_RETYPE_ONLY = 0x0, // no argument changes; straight retype
906 OP_CHECK_CAST = 0x1, // ref-to-ref conversion; requires a Class argument 906 OP_RETYPE_RAW = 0x1, // straight retype, trusted (void->int, Object->T)
907 OP_PRIM_TO_PRIM = 0x2, // converts from one primitive to another 907 OP_CHECK_CAST = 0x2, // ref-to-ref conversion; requires a Class argument
908 OP_REF_TO_PRIM = 0x3, // unboxes a wrapper to produce a primitive 908 OP_PRIM_TO_PRIM = 0x3, // converts from one primitive to another
909 OP_PRIM_TO_REF = 0x4, // boxes a primitive into a wrapper (NYI) 909 OP_REF_TO_PRIM = 0x4, // unboxes a wrapper to produce a primitive
910 OP_SWAP_ARGS = 0x5, // swap arguments (vminfo is 2nd arg) 910 OP_PRIM_TO_REF = 0x5, // boxes a primitive into a wrapper (NYI)
911 OP_ROT_ARGS = 0x6, // rotate arguments (vminfo is displaced arg) 911 OP_SWAP_ARGS = 0x6, // swap arguments (vminfo is 2nd arg)
912 OP_DUP_ARGS = 0x7, // duplicates one or more arguments (at TOS) 912 OP_ROT_ARGS = 0x7, // rotate arguments (vminfo is displaced arg)
913 OP_DROP_ARGS = 0x8, // remove one or more argument slots 913 OP_DUP_ARGS = 0x8, // duplicates one or more arguments (at TOS)
914 OP_COLLECT_ARGS = 0x9, // combine one or more arguments into a varargs (NYI) 914 OP_DROP_ARGS = 0x9, // remove one or more argument slots
915 OP_SPREAD_ARGS = 0xA, // expand in place a varargs array (of known size) 915 OP_COLLECT_ARGS = 0xA, // combine one or more arguments into a varargs (NYI)
916 OP_FLYBY = 0xB, // operate first on reified argument list (NYI) 916 OP_SPREAD_ARGS = 0xB, // expand in place a varargs array (of known size)
917 OP_RICOCHET = 0xC, // run an adapter chain on the return value (NYI) 917 OP_FLYBY = 0xC, // operate first on reified argument list (NYI)
918 CONV_OP_LIMIT = 0xD, // limit of CONV_OP enumeration 918 OP_RICOCHET = 0xD, // run an adapter chain on the return value (NYI)
919 CONV_OP_LIMIT = 0xE, // limit of CONV_OP enumeration
919 920
920 CONV_OP_MASK = 0xF00, // this nybble contains the conversion op field 921 CONV_OP_MASK = 0xF00, // this nybble contains the conversion op field
921 CONV_VMINFO_MASK = 0x0FF, // LSB is reserved for JVM use 922 CONV_VMINFO_MASK = 0x0FF, // LSB is reserved for JVM use
922 CONV_VMINFO_SHIFT = 0, // position of bits in CONV_VMINFO_MASK 923 CONV_VMINFO_SHIFT = 0, // position of bits in CONV_VMINFO_MASK
923 CONV_OP_SHIFT = 8, // position of bits in CONV_OP_MASK 924 CONV_OP_SHIFT = 8, // position of bits in CONV_OP_MASK