Mercurial > hg > graal-compiler
comparison src/share/vm/compiler/compileBroker.cpp @ 7409:30866cd626b0
8004883: NPG: clean up anonymous class fix
Summary: Add klass_holder() to return either mirror or class_loader depending on if the class is anonymous or not.
Reviewed-by: stefank, jrose
author | coleenp |
---|---|
date | Wed, 12 Dec 2012 11:39:29 -0500 |
parents | 90273fc0a981 |
children | 989155e2d07a 9deda4d8e126 606eada1bf86 |
comparison
equal
deleted
inserted
replaced
7396:4a2ed49abd51 | 7409:30866cd626b0 |
---|---|
267 methodHandle hot_method, | 267 methodHandle hot_method, |
268 int hot_count, | 268 int hot_count, |
269 const char* comment, | 269 const char* comment, |
270 bool is_blocking) { | 270 bool is_blocking) { |
271 assert(!_lock->is_locked(), "bad locking"); | 271 assert(!_lock->is_locked(), "bad locking"); |
272 InstanceKlass* holder = method->method_holder(); | |
273 | 272 |
274 _compile_id = compile_id; | 273 _compile_id = compile_id; |
275 _method = method(); | 274 _method = method(); |
276 _method_holder = JNIHandles::make_global( | 275 _method_holder = JNIHandles::make_global(method->method_holder()->klass_holder()); |
277 holder->is_anonymous() ? holder->java_mirror(): holder->class_loader()); | |
278 _osr_bci = osr_bci; | 276 _osr_bci = osr_bci; |
279 _is_blocking = is_blocking; | 277 _is_blocking = is_blocking; |
280 _comp_level = comp_level; | 278 _comp_level = comp_level; |
281 _num_inlined_bytecodes = 0; | 279 _num_inlined_bytecodes = 0; |
282 | 280 |
296 if (hot_method == method) { | 294 if (hot_method == method) { |
297 _hot_method = _method; | 295 _hot_method = _method; |
298 } else { | 296 } else { |
299 _hot_method = hot_method(); | 297 _hot_method = hot_method(); |
300 // only add loader or mirror if different from _method_holder | 298 // only add loader or mirror if different from _method_holder |
301 InstanceKlass* hot_holder = hot_method->method_holder(); | 299 _hot_method_holder = JNIHandles::make_global(hot_method->method_holder()->klass_holder()); |
302 _hot_method_holder = JNIHandles::make_global( | |
303 hot_holder->is_anonymous() ? hot_holder->java_mirror() : | |
304 hot_holder->class_loader()); | |
305 } | 300 } |
306 } | 301 } |
307 } | 302 } |
308 | 303 |
309 _next = NULL; | 304 _next = NULL; |