Mercurial > hg > truffle
diff src/share/vm/oops/methodOop.hpp @ 2334:dbad0519a1c4
6845426: non-static <clinit> method with no args is called during the class initialization process
Summary: Only call <clinit> with ACC_STATIC for classfiles with version > 50
Reviewed-by: acorn, dholmes, coleenp
author | kamg |
---|---|
date | Fri, 04 Mar 2011 14:40:46 -0500 |
parents | f77b3ec064b0 |
children | 799d8ccf63cf |
line wrap: on
line diff
--- a/src/share/vm/oops/methodOop.hpp Thu Mar 03 19:53:03 2011 -0500 +++ b/src/share/vm/oops/methodOop.hpp Fri Mar 04 14:40:46 2011 -0500 @@ -497,6 +497,13 @@ // returns true if the method is an initializer (<init> or <clinit>). bool is_initializer() const; + // returns true if the method is static OR if the classfile version < 51 + bool has_valid_initializer_flags() const; + + // returns true if the method name is <clinit> and the method has + // valid static initializer flags. + bool is_static_initializer() const; + // compiled code support // NOTE: code() is inherently racy as deopt can be clearing code // simultaneously. Use with caution.