diff src/share/vm/classfile/verifier.hpp @ 1570:de91a2f25c7e

6956164: nightly regressions from 6939207 Summary: Fix errors in 6939207. Reviewed-by: kvn
author jrose
date Thu, 27 May 2010 09:54:07 -0700
parents ad6585fd4087
children e9ff18c4ace7
line wrap: on
line diff
--- a/src/share/vm/classfile/verifier.hpp	Tue May 25 13:18:49 2010 -0700
+++ b/src/share/vm/classfile/verifier.hpp	Thu May 27 09:54:07 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,