320 if( !UseInterpreter || CompileTheWorld /* running Xcomp or CTW */ ) { |
320 if( !UseInterpreter || CompileTheWorld /* running Xcomp or CTW */ ) { |
321 // Checks that constant pool's call site has been visited |
321 // Checks that constant pool's call site has been visited |
322 // stricter than callee_holder->is_initialized() |
322 // stricter than callee_holder->is_initialized() |
323 ciBytecodeStream iter(caller_method); |
323 ciBytecodeStream iter(caller_method); |
324 iter.force_bci(caller_bci); |
324 iter.force_bci(caller_bci); |
325 int index = iter.get_index_int(); |
|
326 if( !caller_method->is_klass_loaded(index, true) ) { |
|
327 return false; |
|
328 } |
|
329 // Try to do constant pool resolution if running Xcomp |
|
330 Bytecodes::Code call_bc = iter.cur_bc(); |
325 Bytecodes::Code call_bc = iter.cur_bc(); |
331 if( !caller_method->check_call(index, call_bc == Bytecodes::_invokestatic) ) { |
326 // An invokedynamic instruction does not have a klass. |
332 return false; |
327 if (call_bc != Bytecodes::_invokedynamic) { |
|
328 int index = iter.get_index_int(); |
|
329 if (!caller_method->is_klass_loaded(index, true)) { |
|
330 return false; |
|
331 } |
|
332 // Try to do constant pool resolution if running Xcomp |
|
333 if( !caller_method->check_call(index, call_bc == Bytecodes::_invokestatic) ) { |
|
334 return false; |
|
335 } |
333 } |
336 } |
334 } |
337 } |
335 // We will attempt to see if a class/field/etc got properly loaded. If it |
338 // We will attempt to see if a class/field/etc got properly loaded. If it |
336 // did not, it may attempt to throw an exception during our probing. Catch |
339 // did not, it may attempt to throw an exception during our probing. Catch |
337 // and ignore such exceptions and do not attempt to compile the method. |
340 // and ignore such exceptions and do not attempt to compile the method. |