src/share/vm/opto/graphKit.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 7000491 Sdiff src/share/vm/opto

src/share/vm/opto/graphKit.cpp

Print this page




 552         ex_obj = env()->ClassCastException_instance();
 553       }
 554       break;
 555     }
 556     if (failing()) { stop(); return; }  // exception allocation might fail
 557     if (ex_obj != NULL) {
 558       // Cheat with a preallocated exception object.
 559       if (C->log() != NULL)
 560         C->log()->elem("hot_throw preallocated='1' reason='%s'",
 561                        Deoptimization::trap_reason_name(reason));
 562       const TypeInstPtr* ex_con  = TypeInstPtr::make(ex_obj);
 563       Node*              ex_node = _gvn.transform( ConNode::make(C, ex_con) );
 564 
 565       // Clear the detail message of the preallocated exception object.
 566       // Weblogic sometimes mutates the detail message of exceptions
 567       // using reflection.
 568       int offset = java_lang_Throwable::get_detailMessage_offset();
 569       const TypePtr* adr_typ = ex_con->add_offset(offset);
 570 
 571       Node *adr = basic_plus_adr(ex_node, ex_node, offset);
 572       Node *store = store_oop_to_object(control(), ex_node, adr, adr_typ, null(), ex_con, T_OBJECT);

 573 
 574       add_exception_state(make_exception_state(ex_node));
 575       return;
 576     }
 577   }
 578 
 579   // %%% Maybe add entry to OptoRuntime which directly throws the exc.?
 580   // It won't be much cheaper than bailing to the interp., since we'll
 581   // have to pass up all the debug-info, and the runtime will have to
 582   // create the stack trace.
 583 
 584   // Usual case:  Bail to interpreter.
 585   // Reserve the right to recompile if we haven't seen anything yet.
 586 
 587   Deoptimization::DeoptAction action = Deoptimization::Action_maybe_recompile;
 588   if (treat_throw_as_hot
 589       && (method()->method_data()->trap_recompiled_at(bci())
 590           || C->too_many_traps(reason))) {
 591     // We cannot afford to take more traps here.  Suffer in the interpreter.
 592     if (C->log() != NULL)




 552         ex_obj = env()->ClassCastException_instance();
 553       }
 554       break;
 555     }
 556     if (failing()) { stop(); return; }  // exception allocation might fail
 557     if (ex_obj != NULL) {
 558       // Cheat with a preallocated exception object.
 559       if (C->log() != NULL)
 560         C->log()->elem("hot_throw preallocated='1' reason='%s'",
 561                        Deoptimization::trap_reason_name(reason));
 562       const TypeInstPtr* ex_con  = TypeInstPtr::make(ex_obj);
 563       Node*              ex_node = _gvn.transform( ConNode::make(C, ex_con) );
 564 
 565       // Clear the detail message of the preallocated exception object.
 566       // Weblogic sometimes mutates the detail message of exceptions
 567       // using reflection.
 568       int offset = java_lang_Throwable::get_detailMessage_offset();
 569       const TypePtr* adr_typ = ex_con->add_offset(offset);
 570 
 571       Node *adr = basic_plus_adr(ex_node, ex_node, offset);
 572       const TypeOopPtr* val_type = TypeOopPtr::make_from_klass(env()->String_klass());
 573       Node *store = store_oop_to_object(control(), ex_node, adr, adr_typ, null(), val_type, T_OBJECT);
 574 
 575       add_exception_state(make_exception_state(ex_node));
 576       return;
 577     }
 578   }
 579 
 580   // %%% Maybe add entry to OptoRuntime which directly throws the exc.?
 581   // It won't be much cheaper than bailing to the interp., since we'll
 582   // have to pass up all the debug-info, and the runtime will have to
 583   // create the stack trace.
 584 
 585   // Usual case:  Bail to interpreter.
 586   // Reserve the right to recompile if we haven't seen anything yet.
 587 
 588   Deoptimization::DeoptAction action = Deoptimization::Action_maybe_recompile;
 589   if (treat_throw_as_hot
 590       && (method()->method_data()->trap_recompiled_at(bci())
 591           || C->too_many_traps(reason))) {
 592     // We cannot afford to take more traps here.  Suffer in the interpreter.
 593     if (C->log() != NULL)


src/share/vm/opto/graphKit.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File