comparison src/share/vm/oops/klass.cpp @ 2181:d25d4ca69222

Merge.
author Thomas Wuerthinger <wuerthinger@ssw.jku.at>
date Wed, 16 Feb 2011 13:47:20 +0100
parents 06f017f7daa7 3582bf76420e
children 0654ee04b214
comparison
equal deleted inserted replaced
2108:50b45e2d9725 2181:d25d4ca69222
33 #include "oops/klassOop.hpp" 33 #include "oops/klassOop.hpp"
34 #include "oops/oop.inline.hpp" 34 #include "oops/oop.inline.hpp"
35 #include "oops/oop.inline2.hpp" 35 #include "oops/oop.inline2.hpp"
36 #include "runtime/atomic.hpp" 36 #include "runtime/atomic.hpp"
37 37
38 void Klass::set_name(Symbol* n) {
39 _name = n;
40 if (_name != NULL) _name->increment_refcount();
41 }
38 42
39 bool Klass::is_subclass_of(klassOop k) const { 43 bool Klass::is_subclass_of(klassOop k) const {
40 // Run up the super chain and check 44 // Run up the super chain and check
41 klassOop t = as_klassOop(); 45 klassOop t = as_klassOop();
42 46
113 assert(k->is_klass(), "argument must be a class"); 117 assert(k->is_klass(), "argument must be a class");
114 return is_subclass_of(k); 118 return is_subclass_of(k);
115 } 119 }
116 120
117 121
118 methodOop Klass::uncached_lookup_method(symbolOop name, symbolOop signature) const { 122 methodOop Klass::uncached_lookup_method(Symbol* name, Symbol* signature) const {
119 #ifdef ASSERT 123 #ifdef ASSERT
120 tty->print_cr("Error: uncached_lookup_method called on a klass oop." 124 tty->print_cr("Error: uncached_lookup_method called on a klass oop."
121 " Likely error: reflection method does not correctly" 125 " Likely error: reflection method does not correctly"
122 " wrap return value in a mirror object."); 126 " wrap return value in a mirror object.");
123 #endif 127 #endif
453 set_subklass(NULL); 457 set_subklass(NULL);
454 set_next_sibling(NULL); 458 set_next_sibling(NULL);
455 } 459 }
456 460
457 461
462 void Klass::shared_symbols_iterate(SymbolClosure* closure) {
463 closure->do_symbol(&_name);
464 }
465
466
458 klassOop Klass::array_klass_or_null(int rank) { 467 klassOop Klass::array_klass_or_null(int rank) {
459 EXCEPTION_MARK; 468 EXCEPTION_MARK;
460 // No exception can be thrown by array_klass_impl when called with or_null == true. 469 // No exception can be thrown by array_klass_impl when called with or_null == true.
461 // (In anycase, the execption mark will fail if it do so) 470 // (In anycase, the execption mark will fail if it do so)
462 return array_klass_impl(true, rank, THREAD); 471 return array_klass_impl(true, rank, THREAD);