src/share/native/common/check_code.c
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File jdk Cdiff src/share/native/common/check_code.c

src/share/native/common/check_code.c

Print this page

        

*** 204,213 **** --- 204,215 ---- #define LDC_CLASS_MAJOR_VERSION 49 #define LDC_METHOD_HANDLE_MAJOR_VERSION 51 + #define STATIC_METHOD_IN_INTERFACE_MAJOR_VERSION 52 + #define ALLOC_STACK_SIZE 16 /* big enough */ typedef struct alloc_stack_type { void *ptr; int kind;
*** 1244,1258 **** int key = (code[offset + 1] << 8) + code[offset + 2]; const char *methodname; jclass cb = context->class; fullinfo_type clazz_info; int is_constructor, is_internal, is_invokedynamic; ! int kind = (opcode == JVM_OPC_invokeinterface ! ? 1 << JVM_CONSTANT_InterfaceMethodref ! : opcode == JVM_OPC_invokedynamic ! ? 1 << JVM_CONSTANT_NameAndType ! : 1 << JVM_CONSTANT_Methodref); is_invokedynamic = opcode == JVM_OPC_invokedynamic; /* Make sure the constant pool item is the right type. */ verify_constant_pool_type(context, key, kind); methodname = JVM_GetCPMethodNameUTF(env, cb, key); check_and_push(context, methodname, VM_STRING_UTF); --- 1246,1273 ---- int key = (code[offset + 1] << 8) + code[offset + 2]; const char *methodname; jclass cb = context->class; fullinfo_type clazz_info; int is_constructor, is_internal, is_invokedynamic; ! int kind; ! ! switch (opcode ) { ! case JVM_OPC_invokestatic: ! kind = ((context->major_version < STATIC_METHOD_IN_INTERFACE_MAJOR_VERSION) ! ? (1 << JVM_CONSTANT_Methodref) ! : ((1 << JVM_CONSTANT_InterfaceMethodref) | (1 << JVM_CONSTANT_Methodref))); ! break; ! case JVM_OPC_invokedynamic: ! kind = 1 << JVM_CONSTANT_NameAndType; ! break; ! case JVM_OPC_invokeinterface: ! kind = 1 << JVM_CONSTANT_InterfaceMethodref; ! break; ! default: ! kind = 1 << JVM_CONSTANT_Methodref; ! } ! is_invokedynamic = opcode == JVM_OPC_invokedynamic; /* Make sure the constant pool item is the right type. */ verify_constant_pool_type(context, key, kind); methodname = JVM_GetCPMethodNameUTF(env, cb, key); check_and_push(context, methodname, VM_STRING_UTF);
src/share/native/common/check_code.c
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File