761 return true;
762 }
763 return false;
764 }
765 if (t_oop->is_known_instance()) {
766 // The instance_id is set only for scalar-replaceable allocations which
767 // are not passed as arguments according to Escape Analysis.
768 return false;
769 }
770 if (t_oop->is_ptr_to_boxed_value()) {
771 ciKlass* boxing_klass = t_oop->klass();
772 if (is_CallStaticJava() && as_CallStaticJava()->is_boxing_method()) {
773 // Skip unrelated boxing methods.
774 Node* proj = proj_out(TypeFunc::Parms);
775 if ((proj == NULL) || (phase->type(proj)->is_instptr()->klass() != boxing_klass)) {
776 return false;
777 }
778 }
779 if (is_CallJava() && as_CallJava()->method() != NULL) {
780 ciMethod* meth = as_CallJava()->method();
781 if (meth->is_accessor()) {
782 return false;
783 }
784 // May modify (by reflection) if an boxing object is passed
785 // as argument or returned.
786 if (returns_pointer() && (proj_out(TypeFunc::Parms) != NULL)) {
787 Node* proj = proj_out(TypeFunc::Parms);
788 const TypeInstPtr* inst_t = phase->type(proj)->isa_instptr();
789 if ((inst_t != NULL) && (!inst_t->klass_is_exact() ||
790 (inst_t->klass() == boxing_klass))) {
791 return true;
792 }
793 }
794 const TypeTuple* d = tf()->domain();
795 for (uint i = TypeFunc::Parms; i < d->cnt(); i++) {
796 const TypeInstPtr* inst_t = d->field_at(i)->isa_instptr();
797 if ((inst_t != NULL) && (!inst_t->klass_is_exact() ||
798 (inst_t->klass() == boxing_klass))) {
799 return true;
800 }
801 }
|
761 return true;
762 }
763 return false;
764 }
765 if (t_oop->is_known_instance()) {
766 // The instance_id is set only for scalar-replaceable allocations which
767 // are not passed as arguments according to Escape Analysis.
768 return false;
769 }
770 if (t_oop->is_ptr_to_boxed_value()) {
771 ciKlass* boxing_klass = t_oop->klass();
772 if (is_CallStaticJava() && as_CallStaticJava()->is_boxing_method()) {
773 // Skip unrelated boxing methods.
774 Node* proj = proj_out(TypeFunc::Parms);
775 if ((proj == NULL) || (phase->type(proj)->is_instptr()->klass() != boxing_klass)) {
776 return false;
777 }
778 }
779 if (is_CallJava() && as_CallJava()->method() != NULL) {
780 ciMethod* meth = as_CallJava()->method();
781 if (meth->is_getter()) {
782 return false;
783 }
784 // May modify (by reflection) if an boxing object is passed
785 // as argument or returned.
786 if (returns_pointer() && (proj_out(TypeFunc::Parms) != NULL)) {
787 Node* proj = proj_out(TypeFunc::Parms);
788 const TypeInstPtr* inst_t = phase->type(proj)->isa_instptr();
789 if ((inst_t != NULL) && (!inst_t->klass_is_exact() ||
790 (inst_t->klass() == boxing_klass))) {
791 return true;
792 }
793 }
794 const TypeTuple* d = tf()->domain();
795 for (uint i = TypeFunc::Parms; i < d->cnt(); i++) {
796 const TypeInstPtr* inst_t = d->field_at(i)->isa_instptr();
797 if ((inst_t != NULL) && (!inst_t->klass_is_exact() ||
798 (inst_t->klass() == boxing_klass))) {
799 return true;
800 }
801 }
|