< prev index next >

src/share/vm/classfile/verifier.hpp

Print this page
rev 8362 : 8079792: GC directory structure cleanup
Reviewed-by:


   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_CLASSFILE_VERIFIER_HPP
  26 #define SHARE_VM_CLASSFILE_VERIFIER_HPP
  27 
  28 #include "classfile/verificationType.hpp"
  29 #include "memory/gcLocker.hpp"
  30 #include "oops/klass.hpp"
  31 #include "oops/method.hpp"
  32 #include "runtime/handles.hpp"
  33 #include "utilities/growableArray.hpp"
  34 #include "utilities/exceptions.hpp"

  35 
  36 // The verifier class
  37 class Verifier : AllStatic {
  38  public:
  39   enum {
  40     STRICTER_ACCESS_CTRL_CHECK_VERSION  = 49,
  41     STACKMAP_ATTRIBUTE_MAJOR_VERSION    = 50,
  42     INVOKEDYNAMIC_MAJOR_VERSION         = 51,
  43     NO_RELAX_ACCESS_CTRL_CHECK_VERSION  = 52
  44   };
  45   typedef enum { ThrowException, NoException } Mode;
  46 
  47   /**
  48    * Verify the bytecodes for a class.  If 'throw_exception' is true
  49    * then the appropriate VerifyError or ClassFormatError will be thrown.
  50    * Otherwise, no exception is thrown and the return indicates the
  51    * error.
  52    */
  53   static bool verify(instanceKlassHandle klass, Mode mode, bool should_verify_class, TRAPS);
  54 




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_CLASSFILE_VERIFIER_HPP
  26 #define SHARE_VM_CLASSFILE_VERIFIER_HPP
  27 
  28 #include "classfile/verificationType.hpp"
  29 #include "gc/shared/gcLocker.hpp"
  30 #include "oops/klass.hpp"
  31 #include "oops/method.hpp"
  32 #include "runtime/handles.hpp"

  33 #include "utilities/exceptions.hpp"
  34 #include "utilities/growableArray.hpp"
  35 
  36 // The verifier class
  37 class Verifier : AllStatic {
  38  public:
  39   enum {
  40     STRICTER_ACCESS_CTRL_CHECK_VERSION  = 49,
  41     STACKMAP_ATTRIBUTE_MAJOR_VERSION    = 50,
  42     INVOKEDYNAMIC_MAJOR_VERSION         = 51,
  43     NO_RELAX_ACCESS_CTRL_CHECK_VERSION  = 52
  44   };
  45   typedef enum { ThrowException, NoException } Mode;
  46 
  47   /**
  48    * Verify the bytecodes for a class.  If 'throw_exception' is true
  49    * then the appropriate VerifyError or ClassFormatError will be thrown.
  50    * Otherwise, no exception is thrown and the return indicates the
  51    * error.
  52    */
  53   static bool verify(instanceKlassHandle klass, Mode mode, bool should_verify_class, TRAPS);
  54 


< prev index next >