comparison src/share/vm/classfile/verifier.hpp @ 10408:836a62f43af9

Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author Doug Simon <doug.simon@oracle.com>
date Wed, 19 Jun 2013 10:45:56 +0200
parents 4552a7633a07
children ef57c43512d6
comparison
equal deleted inserted replaced
10086:e0fb8a213650 10408:836a62f43af9
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.
34 34
35 // The verifier class 35 // The verifier class
36 class Verifier : AllStatic { 36 class Verifier : AllStatic {
37 public: 37 public:
38 enum { 38 enum {
39 STRICTER_ACCESS_CTRL_CHECK_VERSION = 49,
39 STACKMAP_ATTRIBUTE_MAJOR_VERSION = 50, 40 STACKMAP_ATTRIBUTE_MAJOR_VERSION = 50,
40 INVOKEDYNAMIC_MAJOR_VERSION = 51 41 INVOKEDYNAMIC_MAJOR_VERSION = 51,
42 NO_RELAX_ACCESS_CTRL_CHECK_VERSION = 52
41 }; 43 };
42 typedef enum { ThrowException, NoException } Mode; 44 typedef enum { ThrowException, NoException } Mode;
43 45
44 /** 46 /**
45 * Verify the bytecodes for a class. If 'throw_exception' is true 47 * Verify the bytecodes for a class. If 'throw_exception' is true
222 void reset_frames() { 224 void reset_frames() {
223 _type.reset_frame(); 225 _type.reset_frame();
224 _expected.reset_frame(); 226 _expected.reset_frame();
225 } 227 }
226 228
227 void details(outputStream* ss, Method* method) const; 229 void details(outputStream* ss, const Method* method) const;
228 230
229 #ifdef ASSERT 231 #ifdef ASSERT
230 void print_on(outputStream* str) const { 232 void print_on(outputStream* str) const {
231 str->print("error_context(%d, %d,", _bci, _fault); 233 str->print("error_context(%d, %d,", _bci, _fault);
232 _type.print_on(str); 234 _type.print_on(str);
235 str->print(")"); 237 str->print(")");
236 } 238 }
237 #endif 239 #endif
238 240
239 private: 241 private:
240 void location_details(outputStream* ss, Method* method) const; 242 void location_details(outputStream* ss, const Method* method) const;
241 void reason_details(outputStream* ss) const; 243 void reason_details(outputStream* ss) const;
242 void frame_details(outputStream* ss) const; 244 void frame_details(outputStream* ss) const;
243 void bytecode_details(outputStream* ss, Method* method) const; 245 void bytecode_details(outputStream* ss, const Method* method) const;
244 void handler_details(outputStream* ss, Method* method) const; 246 void handler_details(outputStream* ss, const Method* method) const;
245 void stackmap_details(outputStream* ss, Method* method) const; 247 void stackmap_details(outputStream* ss, const Method* method) const;
246 }; 248 };
247 249
248 // A new instance of this class is created for each class being verified 250 // A new instance of this class is created for each class being verified
249 class ClassVerifier : public StackObj { 251 class ClassVerifier : public StackObj {
250 private: 252 private: