176 _instantiated_method_type == other._instantiated_method_type;
177 }
178
179 #ifndef PRODUCT
180 void print_on(outputStream* st) const;
181 #endif
182 };
183
184 class DumpTimeLambdaProxyClassInfo {
185 public:
186 GrowableArray<InstanceKlass*>* _proxy_klasses;
187 DumpTimeLambdaProxyClassInfo() : _proxy_klasses(nullptr) {}
188 DumpTimeLambdaProxyClassInfo& operator=(const DumpTimeLambdaProxyClassInfo&) = delete;
189 ~DumpTimeLambdaProxyClassInfo();
190
191 void add_proxy_klass(InstanceKlass* proxy_klass) {
192 if (_proxy_klasses == nullptr) {
193 _proxy_klasses = new (mtClassShared) GrowableArray<InstanceKlass*>(5, mtClassShared);
194 }
195 assert(_proxy_klasses != nullptr, "sanity");
196 _proxy_klasses->append(proxy_klass);
197 }
198
199 void metaspace_pointers_do(MetaspaceClosure* it) {
200 for (int i=0; i<_proxy_klasses->length(); i++) {
201 it->push(_proxy_klasses->adr_at(i));
202 }
203 }
204 };
205
206 class RunTimeLambdaProxyClassInfo {
207 RunTimeLambdaProxyClassKey _key;
208 InstanceKlass* _proxy_klass_head;
209 public:
210 RunTimeLambdaProxyClassInfo(RunTimeLambdaProxyClassKey key, InstanceKlass* proxy_klass_head) :
211 _key(key), _proxy_klass_head(proxy_klass_head) {}
212
213 InstanceKlass* proxy_klass_head() const { return _proxy_klass_head; }
214
215 // Used by LambdaProxyClassDictionary to implement OffsetCompactHashtable::EQUALS
216 static inline bool EQUALS(
|
176 _instantiated_method_type == other._instantiated_method_type;
177 }
178
179 #ifndef PRODUCT
180 void print_on(outputStream* st) const;
181 #endif
182 };
183
184 class DumpTimeLambdaProxyClassInfo {
185 public:
186 GrowableArray<InstanceKlass*>* _proxy_klasses;
187 DumpTimeLambdaProxyClassInfo() : _proxy_klasses(nullptr) {}
188 DumpTimeLambdaProxyClassInfo& operator=(const DumpTimeLambdaProxyClassInfo&) = delete;
189 ~DumpTimeLambdaProxyClassInfo();
190
191 void add_proxy_klass(InstanceKlass* proxy_klass) {
192 if (_proxy_klasses == nullptr) {
193 _proxy_klasses = new (mtClassShared) GrowableArray<InstanceKlass*>(5, mtClassShared);
194 }
195 assert(_proxy_klasses != nullptr, "sanity");
196 // Try to preserve the order. get_shared_lambda_proxy_class returns shared classes in reverse order.
197 _proxy_klasses->insert_before(0, proxy_klass);
198 }
199
200 void metaspace_pointers_do(MetaspaceClosure* it) {
201 for (int i=0; i<_proxy_klasses->length(); i++) {
202 it->push(_proxy_klasses->adr_at(i));
203 }
204 }
205 };
206
207 class RunTimeLambdaProxyClassInfo {
208 RunTimeLambdaProxyClassKey _key;
209 InstanceKlass* _proxy_klass_head;
210 public:
211 RunTimeLambdaProxyClassInfo(RunTimeLambdaProxyClassKey key, InstanceKlass* proxy_klass_head) :
212 _key(key), _proxy_klass_head(proxy_klass_head) {}
213
214 InstanceKlass* proxy_klass_head() const { return _proxy_klass_head; }
215
216 // Used by LambdaProxyClassDictionary to implement OffsetCompactHashtable::EQUALS
217 static inline bool EQUALS(
|