Mercurial > hg > truffle
comparison src/share/vm/oops/klass.cpp @ 10265:92ef81e2f571
8003557: NPG: Klass* const k should be const Klass* k.
Summary: With NPG, const KlassOop klass which is in fact a definition converted to Klass* const, which is not the original intention. The right usage is converting them to const Klass*.
Reviewed-by: coleenp, kvn
Contributed-by: yumin.qi@oracle.com
author | minqi |
---|---|
date | Fri, 10 May 2013 08:27:30 -0700 |
parents | 1fc4d4768b90 |
children | 6bd680e9ea35 |
comparison
equal
deleted
inserted
replaced
10262:c272092594bd | 10265:92ef81e2f571 |
---|---|
48 void Klass::set_name(Symbol* n) { | 48 void Klass::set_name(Symbol* n) { |
49 _name = n; | 49 _name = n; |
50 if (_name != NULL) _name->increment_refcount(); | 50 if (_name != NULL) _name->increment_refcount(); |
51 } | 51 } |
52 | 52 |
53 bool Klass::is_subclass_of(Klass* k) const { | 53 bool Klass::is_subclass_of(const Klass* k) const { |
54 // Run up the super chain and check | 54 // Run up the super chain and check |
55 if (this == k) return true; | 55 if (this == k) return true; |
56 | 56 |
57 Klass* t = const_cast<Klass*>(this)->super(); | 57 Klass* t = const_cast<Klass*>(this)->super(); |
58 | 58 |