hotspot/src/share/vm/classfile/verifier.cpp
changeset 15736 86457c430782
parent 14391 df0a1573d5bd
child 16442 a929bb40c0e8
equal deleted inserted replaced
15735:e935a2f2749b 15736:86457c430782
     1 /*
     1 /*
     2  * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    59 #endif
    59 #endif
    60 #ifdef TARGET_ARCH_ppc
    60 #ifdef TARGET_ARCH_ppc
    61 # include "bytes_ppc.hpp"
    61 # include "bytes_ppc.hpp"
    62 #endif
    62 #endif
    63 
    63 
    64 #define NOFAILOVER_MAJOR_VERSION 51
    64 #define NOFAILOVER_MAJOR_VERSION                  51
       
    65 #define STATIC_METHOD_IN_INTERFACE_MAJOR_VERSION  52
    65 
    66 
    66 // Access to external entry for VerifyClassCodes - old byte code verifier
    67 // Access to external entry for VerifyClassCodes - old byte code verifier
    67 
    68 
    68 extern "C" {
    69 extern "C" {
    69   typedef jboolean (*verify_byte_codes_fn_t)(JNIEnv *, jclass, char *, jint);
    70   typedef jboolean (*verify_byte_codes_fn_t)(JNIEnv *, jclass, char *, jint);
  2314       types = 1 << JVM_CONSTANT_InvokeDynamic;
  2315       types = 1 << JVM_CONSTANT_InvokeDynamic;
  2315       break;
  2316       break;
  2316     case Bytecodes::_invokespecial:
  2317     case Bytecodes::_invokespecial:
  2317       types = (1 << JVM_CONSTANT_InterfaceMethodref) |
  2318       types = (1 << JVM_CONSTANT_InterfaceMethodref) |
  2318               (1 << JVM_CONSTANT_Methodref);
  2319               (1 << JVM_CONSTANT_Methodref);
       
  2320       break;
       
  2321     case Bytecodes::_invokestatic:
       
  2322       types = (_klass->major_version() < STATIC_METHOD_IN_INTERFACE_MAJOR_VERSION) ?
       
  2323         (1 << JVM_CONSTANT_Methodref) :
       
  2324         ((1 << JVM_CONSTANT_InterfaceMethodref) | (1 << JVM_CONSTANT_Methodref));
  2319       break;
  2325       break;
  2320     default:
  2326     default:
  2321       types = 1 << JVM_CONSTANT_Methodref;
  2327       types = 1 << JVM_CONSTANT_Methodref;
  2322   }
  2328   }
  2323   verify_cp_type(bcs->bci(), index, cp, types, CHECK_VERIFY(this));
  2329   verify_cp_type(bcs->bci(), index, cp, types, CHECK_VERIFY(this));