Mercurial > hg > truffle
diff 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 |
line wrap: on
line diff
--- a/src/share/vm/opto/callnode.hpp Mon Sep 15 09:58:26 2008 -0700 +++ b/src/share/vm/opto/callnode.hpp Wed Sep 17 08:29:17 2008 -0700 @@ -755,6 +755,15 @@ virtual int Opcode() const; virtual uint size_of() const; // Size is bigger + // Dig the length operand out of a array allocation site. + Node* Ideal_length() { + return in(AllocateNode::ALength); + } + + // Dig the length operand out of a array allocation site and narrow the + // type with a CastII, if necesssary + Node* make_ideal_length(const TypeOopPtr* ary_type, PhaseTransform *phase, bool can_create = true); + // Pattern-match a possible usage of AllocateArrayNode. // Return null if no allocation is recognized. static AllocateArrayNode* Ideal_array_allocation(Node* ptr, PhaseTransform* phase) { @@ -762,12 +771,6 @@ return (allo == NULL || !allo->is_AllocateArray()) ? NULL : allo->as_AllocateArray(); } - - // Dig the length operand out of a (possible) array allocation site. - static Node* Ideal_length(Node* ptr, PhaseTransform* phase) { - AllocateArrayNode* allo = Ideal_array_allocation(ptr, phase); - return (allo == NULL) ? NULL : allo->in(AllocateNode::ALength); - } }; //------------------------------AbstractLockNode-----------------------------------