291
292 // uncommon-trap call-sites where callee is unloaded, uninitialized or will not link
293 bool Parse::can_not_compile_call_site(ciMethod *dest_method, ciInstanceKlass* klass) {
294 // Additional inputs to consider...
295 // bc = bc()
296 // caller = method()
297 // iter().get_method_holder_index()
298 assert( dest_method->is_loaded(), "ciTypeFlow should not let us get here" );
299 // Interface classes can be loaded & linked and never get around to
300 // being initialized. Uncommon-trap for not-initialized static or
301 // v-calls. Let interface calls happen.
302 ciInstanceKlass* holder_klass = dest_method->holder();
303 if (!holder_klass->is_initialized() &&
304 !holder_klass->is_interface()) {
305 uncommon_trap(Deoptimization::Reason_uninitialized,
306 Deoptimization::Action_reinterpret,
307 holder_klass);
308 return true;
309 }
310 if (dest_method->is_method_handle_invoke()
311 && holder_klass->name() == ciSymbol::java_dyn_Dynamic()) {
312 // FIXME: NYI
313 uncommon_trap(Deoptimization::Reason_unhandled,
314 Deoptimization::Action_none,
315 holder_klass);
316 return true;
317 }
318
319 assert(dest_method->will_link(method()->holder(), klass, bc()), "dest_method: typeflow responsibility");
320 return false;
321 }
322
323
324 //------------------------------do_call----------------------------------------
325 // Handle your basic call. Inline if we can & want to, else just setup call.
326 void Parse::do_call() {
327 // It's likely we are going to add debug info soon.
328 // Also, if we inline a guy who eventually needs debug info for this JVMS,
329 // our contribution to it is cleaned up right here.
330 kill_dead_locals();
331
|
291
292 // uncommon-trap call-sites where callee is unloaded, uninitialized or will not link
293 bool Parse::can_not_compile_call_site(ciMethod *dest_method, ciInstanceKlass* klass) {
294 // Additional inputs to consider...
295 // bc = bc()
296 // caller = method()
297 // iter().get_method_holder_index()
298 assert( dest_method->is_loaded(), "ciTypeFlow should not let us get here" );
299 // Interface classes can be loaded & linked and never get around to
300 // being initialized. Uncommon-trap for not-initialized static or
301 // v-calls. Let interface calls happen.
302 ciInstanceKlass* holder_klass = dest_method->holder();
303 if (!holder_klass->is_initialized() &&
304 !holder_klass->is_interface()) {
305 uncommon_trap(Deoptimization::Reason_uninitialized,
306 Deoptimization::Action_reinterpret,
307 holder_klass);
308 return true;
309 }
310 if (dest_method->is_method_handle_invoke()
311 && holder_klass->name() == ciSymbol::java_dyn_InvokeDynamic()) {
312 // FIXME: NYI
313 uncommon_trap(Deoptimization::Reason_unhandled,
314 Deoptimization::Action_none,
315 holder_klass);
316 return true;
317 }
318
319 assert(dest_method->will_link(method()->holder(), klass, bc()), "dest_method: typeflow responsibility");
320 return false;
321 }
322
323
324 //------------------------------do_call----------------------------------------
325 // Handle your basic call. Inline if we can & want to, else just setup call.
326 void Parse::do_call() {
327 // It's likely we are going to add debug info soon.
328 // Also, if we inline a guy who eventually needs debug info for this JVMS,
329 // our contribution to it is cleaned up right here.
330 kill_dead_locals();
331
|