< prev index next >

src/hotspot/share/oops/klass.hpp

Print this page
rev 48545 : Value-based classes (vbc) / Oop value test via metadata ptr

*** 159,170 **** friend class SharedClassUtil; 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 }; --- 159,176 ---- friend class SharedClassUtil; protected: // Constructor Klass(); ! #if INCLUDE_VBC ! 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); ! } ! #else void* operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw(); + #endif public: enum DefaultsLookupMode { find_defaults, skip_defaults }; enum OverpassLookupMode { find_overpass, skip_overpass }; enum StaticLookupMode { find_static, skip_static };
*** 560,570 **** void set_has_vanilla_constructor() { _access_flags.set_has_vanilla_constructor(); } bool has_miranda_methods () const { return access_flags().has_miranda_methods(); } void set_has_miranda_methods() { _access_flags.set_has_miranda_methods(); } bool is_shared() const { return access_flags().is_shared_class(); } // shadows MetaspaceObj::is_shared)() void set_is_shared() { _access_flags.set_is_shared_class(); } ! bool is_cloneable() const; void set_is_cloneable(); // Biased locking support // Note: the prototype header is always set up to be at least the --- 566,579 ---- void set_has_vanilla_constructor() { _access_flags.set_has_vanilla_constructor(); } bool has_miranda_methods () const { return access_flags().has_miranda_methods(); } void set_has_miranda_methods() { _access_flags.set_has_miranda_methods(); } bool is_shared() const { return access_flags().is_shared_class(); } // shadows MetaspaceObj::is_shared)() void set_is_shared() { _access_flags.set_is_shared_class(); } ! #if INCLUDE_VBC ! bool is_value_based() const { return access_flags().is_value_based_class(); } ! void set_is_value_based() { _access_flags.set_is_value_based_class(); } ! #endif bool is_cloneable() const; void set_is_cloneable(); // Biased locking support // Note: the prototype header is always set up to be at least the
*** 675,684 **** --- 684,698 ---- 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); + + #if INCLUDE_VBC + static bool decode_ptr_is_value_based(narrowKlass v); + static bool ptr_is_value_based(Klass* v); + #endif }; // 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 >