800 }
801 }
802 return false;
803 }
804 }
805 return true;
806 }
807
808 // Does this call have a direct reference to n other than debug information?
809 bool CallNode::has_non_debug_use(Node *n) {
810 const TypeTuple * d = tf()->domain();
811 for (uint i = TypeFunc::Parms; i < d->cnt(); i++) {
812 Node *arg = in(i);
813 if (arg == n) {
814 return true;
815 }
816 }
817 return false;
818 }
819
820 // Returns the unique CheckCastPP of a call
821 // or 'this' if there are several CheckCastPP or unexpected uses
822 // or returns NULL if there is no one.
823 Node *CallNode::result_cast() {
824 Node *cast = NULL;
825
826 Node *p = proj_out(TypeFunc::Parms);
827 if (p == NULL)
828 return NULL;
829
830 for (DUIterator_Fast imax, i = p->fast_outs(imax); i < imax; i++) {
831 Node *use = p->fast_out(i);
832 if (use->is_CheckCastPP()) {
833 if (cast != NULL) {
834 return this; // more than 1 CheckCastPP
835 }
836 cast = use;
837 } else if (!use->is_Initialize() &&
838 !use->is_AddP() &&
839 use->Opcode() != Op_MemBarStoreStore) {
|
800 }
801 }
802 return false;
803 }
804 }
805 return true;
806 }
807
808 // Does this call have a direct reference to n other than debug information?
809 bool CallNode::has_non_debug_use(Node *n) {
810 const TypeTuple * d = tf()->domain();
811 for (uint i = TypeFunc::Parms; i < d->cnt(); i++) {
812 Node *arg = in(i);
813 if (arg == n) {
814 return true;
815 }
816 }
817 return false;
818 }
819
820 bool CallNode::has_debug_use(Node *n) {
821 for (uint i = jvms()->debug_start(); i < jvms()->debug_end(); i++) {
822 Node *arg = in(i);
823 if (arg == n) {
824 return true;
825 }
826 }
827 return false;
828 }
829
830 // Returns the unique CheckCastPP of a call
831 // or 'this' if there are several CheckCastPP or unexpected uses
832 // or returns NULL if there is no one.
833 Node *CallNode::result_cast() {
834 Node *cast = NULL;
835
836 Node *p = proj_out(TypeFunc::Parms);
837 if (p == NULL)
838 return NULL;
839
840 for (DUIterator_Fast imax, i = p->fast_outs(imax); i < imax; i++) {
841 Node *use = p->fast_out(i);
842 if (use->is_CheckCastPP()) {
843 if (cast != NULL) {
844 return this; // more than 1 CheckCastPP
845 }
846 cast = use;
847 } else if (!use->is_Initialize() &&
848 !use->is_AddP() &&
849 use->Opcode() != Op_MemBarStoreStore) {
|