Mercurial > hg > truffle
comparison src/share/vm/opto/callnode.hpp @ 366:8261ee795323
6711100: 64bit fastdebug server vm crashes with assert(_base == Int,"Not an Int")
Summary: insert CastII nodes to narrow type of load_array_length() node
Reviewed-by: never, kvn
author | rasbold |
---|---|
date | Wed, 17 Sep 2008 08:29:17 -0700 |
parents | d1605aabd0a1 |
children | a1980da045cc |
comparison
equal
deleted
inserted
replaced
333:7484fa4b8825 | 366:8261ee795323 |
---|---|
753 set_req(AllocateNode::ALength, count_val); | 753 set_req(AllocateNode::ALength, count_val); |
754 } | 754 } |
755 virtual int Opcode() const; | 755 virtual int Opcode() const; |
756 virtual uint size_of() const; // Size is bigger | 756 virtual uint size_of() const; // Size is bigger |
757 | 757 |
758 // Dig the length operand out of a array allocation site. | |
759 Node* Ideal_length() { | |
760 return in(AllocateNode::ALength); | |
761 } | |
762 | |
763 // Dig the length operand out of a array allocation site and narrow the | |
764 // type with a CastII, if necesssary | |
765 Node* make_ideal_length(const TypeOopPtr* ary_type, PhaseTransform *phase, bool can_create = true); | |
766 | |
758 // Pattern-match a possible usage of AllocateArrayNode. | 767 // Pattern-match a possible usage of AllocateArrayNode. |
759 // Return null if no allocation is recognized. | 768 // Return null if no allocation is recognized. |
760 static AllocateArrayNode* Ideal_array_allocation(Node* ptr, PhaseTransform* phase) { | 769 static AllocateArrayNode* Ideal_array_allocation(Node* ptr, PhaseTransform* phase) { |
761 AllocateNode* allo = Ideal_allocation(ptr, phase); | 770 AllocateNode* allo = Ideal_allocation(ptr, phase); |
762 return (allo == NULL || !allo->is_AllocateArray()) | 771 return (allo == NULL || !allo->is_AllocateArray()) |
763 ? NULL : allo->as_AllocateArray(); | 772 ? NULL : allo->as_AllocateArray(); |
764 } | |
765 | |
766 // Dig the length operand out of a (possible) array allocation site. | |
767 static Node* Ideal_length(Node* ptr, PhaseTransform* phase) { | |
768 AllocateArrayNode* allo = Ideal_array_allocation(ptr, phase); | |
769 return (allo == NULL) ? NULL : allo->in(AllocateNode::ALength); | |
770 } | 773 } |
771 }; | 774 }; |
772 | 775 |
773 //------------------------------AbstractLockNode----------------------------------- | 776 //------------------------------AbstractLockNode----------------------------------- |
774 class AbstractLockNode: public CallNode { | 777 class AbstractLockNode: public CallNode { |