8204540: Automatic oop closure devirtualization

Reviewed-by: kbarrett, eosterlund
This commit is contained in:
Stefan Karlsson 2018-05-26 06:59:49 +02:00
parent af4bf0927b
commit 11813888b8
101 changed files with 1024 additions and 1576 deletions

View file

@ -46,7 +46,7 @@ class ArrayKlass: public Klass {
// Constructors
// The constructor with the Symbol argument does the real array
// initialization, the other is a dummy
ArrayKlass(Symbol* name);
ArrayKlass(Symbol* name, KlassID id);
ArrayKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for cds"); }
public:
@ -147,36 +147,4 @@ class ArrayKlass: public Klass {
void oop_verify_on(oop obj, outputStream* st);
};
// Array oop iteration macros for declarations.
// Used to generate the declarations in the *ArrayKlass header files.
#define OOP_OOP_ITERATE_DECL_RANGE(OopClosureType, nv_suffix) \
void oop_oop_iterate_range##nv_suffix(oop obj, OopClosureType* closure, int start, int end);
#if INCLUDE_OOP_OOP_ITERATE_BACKWARDS
// Named NO_BACKWARDS because the definition used by *ArrayKlass isn't reversed, see below.
#define OOP_OOP_ITERATE_DECL_NO_BACKWARDS(OopClosureType, nv_suffix) \
void oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure);
#endif
// Array oop iteration macros for definitions.
// Used to generate the definitions in the *ArrayKlass.inline.hpp files.
#define OOP_OOP_ITERATE_DEFN_RANGE(KlassType, OopClosureType, nv_suffix) \
\
void KlassType::oop_oop_iterate_range##nv_suffix(oop obj, OopClosureType* closure, int start, int end) { \
oop_oop_iterate_range<nvs_to_bool(nv_suffix)>(obj, closure, start, end); \
}
#if INCLUDE_OOP_OOP_ITERATE_BACKWARDS
#define OOP_OOP_ITERATE_DEFN_NO_BACKWARDS(KlassType, OopClosureType, nv_suffix) \
void KlassType::oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* closure) { \
/* No reverse implementation ATM. */ \
oop_oop_iterate<nvs_to_bool(nv_suffix)>(obj, closure); \
}
#else
#define OOP_OOP_ITERATE_DEFN_NO_BACKWARDS(KlassType, OopClosureType, nv_suffix)
#endif
#endif // SHARE_VM_OOPS_ARRAYKLASS_HPP