hotspot/src/share/vm/classfile/verifier.hpp
changeset 5702 201c5cde25bb
parent 5547 f4b087cbb361
parent 5693 3015c564fcbc
child 5882 6b2aecc4f7d8
--- a/hotspot/src/share/vm/classfile/verifier.hpp	Tue Jun 01 11:48:33 2010 -0700
+++ b/hotspot/src/share/vm/classfile/verifier.hpp	Wed Jun 02 22:45:42 2010 -0700
@@ -158,6 +158,16 @@
   methodHandle        _method; // current method being verified
   VerificationType    _this_type; // the verification type of the current class
 
+  // Some recursive calls from the verifier to the name resolver
+  // can cause the current class to be re-verified and rewritten.
+  // If this happens, the original verification should not continue,
+  // because constant pool indexes will have changed.
+  // The rewriter is preceded by the verifier.  If the verifier throws
+  // an error, rewriting is prevented.  Also, rewriting always precedes
+  // bytecode execution or compilation.  Thus, is_rewritten implies
+  // that a class has been verified and prepared for execution.
+  bool was_recursively_verified() { return _klass->is_rewritten(); }
+
  public:
   enum {
     BYTECODE_OFFSET = 1,