105
106 void init_for_archive(LambdaProxyClassKey& dumptime_key);
107
108 #ifndef PRODUCT
109 void print_on(outputStream* st) const;
110 #endif
111 };
112
113 class DumpTimeLambdaProxyClassInfo {
114 public:
115 GrowableArray<InstanceKlass*>* _proxy_klasses;
116 DumpTimeLambdaProxyClassInfo() : _proxy_klasses(nullptr) {}
117 DumpTimeLambdaProxyClassInfo& operator=(const DumpTimeLambdaProxyClassInfo&) = delete;
118 ~DumpTimeLambdaProxyClassInfo();
119
120 void add_proxy_klass(InstanceKlass* proxy_klass) {
121 if (_proxy_klasses == nullptr) {
122 _proxy_klasses = new (mtClassShared) GrowableArray<InstanceKlass*>(5, mtClassShared);
123 }
124 assert(_proxy_klasses != nullptr, "sanity");
125 _proxy_klasses->append(proxy_klass);
126 }
127
128 void metaspace_pointers_do(MetaspaceClosure* it) {
129 for (int i=0; i<_proxy_klasses->length(); i++) {
130 it->push(_proxy_klasses->adr_at(i));
131 }
132 }
133 };
134
135 class RunTimeLambdaProxyClassInfo {
136 LambdaProxyClassKey _key;
137 InstanceKlass* _proxy_klass_head;
138 public:
139 RunTimeLambdaProxyClassInfo(LambdaProxyClassKey key, InstanceKlass* proxy_klass_head) :
140 _key(key), _proxy_klass_head(proxy_klass_head) {}
141
142 InstanceKlass* proxy_klass_head() const { return _proxy_klass_head; }
143
144 // Used by LambdaProxyClassDictionary to implement OffsetCompactHashtable::EQUALS
145 static inline bool EQUALS(
|
105
106 void init_for_archive(LambdaProxyClassKey& dumptime_key);
107
108 #ifndef PRODUCT
109 void print_on(outputStream* st) const;
110 #endif
111 };
112
113 class DumpTimeLambdaProxyClassInfo {
114 public:
115 GrowableArray<InstanceKlass*>* _proxy_klasses;
116 DumpTimeLambdaProxyClassInfo() : _proxy_klasses(nullptr) {}
117 DumpTimeLambdaProxyClassInfo& operator=(const DumpTimeLambdaProxyClassInfo&) = delete;
118 ~DumpTimeLambdaProxyClassInfo();
119
120 void add_proxy_klass(InstanceKlass* proxy_klass) {
121 if (_proxy_klasses == nullptr) {
122 _proxy_klasses = new (mtClassShared) GrowableArray<InstanceKlass*>(5, mtClassShared);
123 }
124 assert(_proxy_klasses != nullptr, "sanity");
125 // Try to preserve the order. get_shared_lambda_proxy_class returns shared classes in reverse order.
126 _proxy_klasses->insert_before(0, proxy_klass);
127 }
128
129 void metaspace_pointers_do(MetaspaceClosure* it) {
130 for (int i=0; i<_proxy_klasses->length(); i++) {
131 it->push(_proxy_klasses->adr_at(i));
132 }
133 }
134 };
135
136 class RunTimeLambdaProxyClassInfo {
137 LambdaProxyClassKey _key;
138 InstanceKlass* _proxy_klass_head;
139 public:
140 RunTimeLambdaProxyClassInfo(LambdaProxyClassKey key, InstanceKlass* proxy_klass_head) :
141 _key(key), _proxy_klass_head(proxy_klass_head) {}
142
143 InstanceKlass* proxy_klass_head() const { return _proxy_klass_head; }
144
145 // Used by LambdaProxyClassDictionary to implement OffsetCompactHashtable::EQUALS
146 static inline bool EQUALS(
|