< prev index next >

src/hotspot/share/oops/klass.hpp

Print this page

        

*** 26,35 **** --- 26,36 ---- #define SHARE_VM_OOPS_KLASS_HPP #include "gc/shared/specialized_oop_closures.hpp" #include "memory/iterator.hpp" #include "memory/memRegion.hpp" + #include "oops/markOop.hpp" #include "oops/metadata.hpp" #include "oops/oop.hpp" #include "oops/oopHandle.hpp" #include "trace/traceMacros.hpp" #include "utilities/accessFlags.hpp"
*** 160,170 **** protected: // Constructor Klass(); ! void* operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw(); public: enum DefaultsLookupMode { find_defaults, skip_defaults }; enum OverpassLookupMode { find_overpass, skip_overpass }; enum StaticLookupMode { find_static, skip_static }; --- 161,174 ---- protected: // Constructor Klass(); ! void* operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, bool is_value, TRAPS) throw(); ! void* operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw() { ! return operator new (size, loader_data, word_size, false, THREAD); ! } public: enum DefaultsLookupMode { find_defaults, skip_defaults }; enum OverpassLookupMode { find_overpass, skip_overpass }; enum StaticLookupMode { find_static, skip_static };
*** 581,590 **** --- 585,597 ---- // Biased locking support // Note: the prototype header is always set up to be at least the // prototype markOop. If biased locking is enabled it may further be // biasable and have an epoch. markOop prototype_header() const { return _prototype_header; } + static inline markOop default_prototype_header(Klass* k) { + return (k == NULL) ? markOopDesc::prototype() : k->prototype_header(); + } // NOTE: once instances of this klass are floating around in the // system, this header must only be updated at a safepoint. // NOTE 2: currently we only ever set the prototype header to the // biasable prototype for instanceKlasses. There is no technical // reason why it could not be done for arrayKlasses aside from
*** 687,696 **** --- 694,706 ---- static narrowKlass encode_klass_not_null(Klass* v); static narrowKlass encode_klass(Klass* v); static Klass* decode_klass_not_null(narrowKlass v); static Klass* decode_klass(narrowKlass v); + + static bool decode_ptr_is_value_type(narrowKlass v); + static bool ptr_is_value_type(Klass* v); }; // Helper to convert the oop iterate macro suffixes into bool values that can be used by template functions. #define nvs_nv_to_bool true #define nvs_v_to_bool false
< prev index next >