--- old/src/share/vm/opto/type.hpp 2017-06-01 17:27:46.907201211 +0200 +++ new/src/share/vm/opto/type.hpp 2017-06-01 17:27:46.828201314 +0200 @@ -28,6 +28,7 @@ #include "ci/ciValueKlass.hpp" #include "opto/adlcVMDeps.hpp" #include "runtime/handles.hpp" +#include "runtime/sharedRuntime.hpp" // Portions of code courtesy of Clifford Click @@ -691,7 +692,7 @@ } static const TypeTuple *make( uint cnt, const Type **fields ); - static const TypeTuple *make_range(ciSignature *sig); + static const TypeTuple *make_range(ciSignature *sig, bool ret_vt_fields = false); static const TypeTuple *make_domain(ciInstanceKlass* recv, ciSignature *sig, bool vt_fields_as_args = false); // Subroutine call type with space allocated for argument types @@ -1344,6 +1345,8 @@ virtual const Type* xmeet_helper(const Type* t) const; virtual const Type* xdual() const; + static const TypeValueTypePtr* NOTNULL; + #ifndef PRODUCT virtual void dump2(Dict &d, uint depth, outputStream* st) const; // Specialized per-Type dumping #endif @@ -1402,8 +1405,6 @@ virtual bool singleton(void) const; // TRUE if type is a singleton private: - static const TypeKlassPtr* make_from_klass_common(ciKlass* klass, bool klass_change, bool try_for_exact); - ciKlass* _klass; // Does the type exclude subclasses of the klass? (Inexact == polymorphic.) @@ -1417,23 +1418,6 @@ bool is_loaded() const { return klass()->is_loaded(); } - // Creates a type given a klass. Correctly handles multi-dimensional arrays - // Respects UseUniqueSubclasses. - // If the klass is final, the resulting type will be exact. - static const TypeKlassPtr* make_from_klass(ciKlass* klass) { - return make_from_klass_common(klass, true, false); - } - // Same as before, but will produce an exact type, even if - // the klass is not final, as long as it has exactly one implementation. - static const TypeKlassPtr* make_from_klass_unique(ciKlass* klass) { - return make_from_klass_common(klass, true, true); - } - // Same as before, but does not respects UseUniqueSubclasses. - // Use this only for creating array element types. - static const TypeKlassPtr* make_from_klass_raw(ciKlass* klass) { - return make_from_klass_common(klass, false, false); - } - // Make a generic (unclassed) pointer to metadata. static const TypeKlassPtr* make(PTR ptr, Offset offset); @@ -1589,7 +1573,8 @@ //------------------------------TypeFunc--------------------------------------- // Class of Array Types class TypeFunc : public Type { - TypeFunc(const TypeTuple *domain_sig, const TypeTuple *domain_cc, const TypeTuple *range) : Type(Function), _domain_sig(domain_sig), _domain_cc(domain_cc), _range(range) {} + TypeFunc(const TypeTuple *domain_sig, const TypeTuple *domain_cc, const TypeTuple *range_sig, const TypeTuple *range_cc) + : Type(Function), _domain_sig(domain_sig), _domain_cc(domain_cc), _range_sig(range_sig), _range_cc(range_cc) {} virtual bool eq( const Type *t ) const; virtual int hash() const; // Type specific hashing virtual bool singleton(void) const; // TRUE if type is a singleton @@ -1603,7 +1588,11 @@ // type argument as a list of its fields). const TypeTuple* const _domain_sig; const TypeTuple* const _domain_cc; - const TypeTuple* const _range; // Range of results + // Range of results. Similar to domains: a value type result can be + // returned in registers in which case range_cc lists all fields and + // is the actual calling convention. + const TypeTuple* const _range_sig; + const TypeTuple* const _range_cc; public: // Constants are shared among ADLC and VM @@ -1619,11 +1608,13 @@ // Accessors: const TypeTuple* domain_sig() const { return _domain_sig; } const TypeTuple* domain_cc() const { return _domain_cc; } - const TypeTuple* range() const { return _range; } + const TypeTuple* range_sig() const { return _range_sig; } + const TypeTuple* range_cc() const { return _range_cc; } static const TypeFunc *make(ciMethod* method); static const TypeFunc *make(ciSignature signature, const Type* extra); - static const TypeFunc *make(const TypeTuple* domain, const TypeTuple* domain_cc, const TypeTuple* range); + static const TypeFunc *make(const TypeTuple* domain_sig, const TypeTuple* domain_cc, + const TypeTuple* range_sig, const TypeTuple* range_cc); static const TypeFunc *make(const TypeTuple* domain, const TypeTuple* range); virtual const Type *xmeet( const Type *t ) const; @@ -1631,6 +1622,8 @@ BasicType return_type() const; + bool returns_value_type_as_fields() const { return range_sig() != range_cc(); } + #ifndef PRODUCT virtual void dump2( Dict &d, uint depth, outputStream *st ) const; // Specialized per-Type dumping #endif