6395208: Elide autoboxing for calls to HashMap.get(int) and HashMap.get(long)

Reviewed-by: kvn, rasbold
This commit is contained in:
Tom Rodriguez 2007-12-05 09:01:00 -08:00
parent 5fa349cc42
commit 10c473e425
16 changed files with 540 additions and 67 deletions

View file

@ -608,6 +608,28 @@ Node* AddPNode::Ideal_base_and_offset(Node* ptr, PhaseTransform* phase,
return NULL;
}
//------------------------------unpack_offsets----------------------------------
// Collect the AddP offset values into the elements array, giving up
// if there are more than length.
int AddPNode::unpack_offsets(Node* elements[], int length) {
int count = 0;
Node* addr = this;
Node* base = addr->in(AddPNode::Base);
while (addr->is_AddP()) {
if (addr->in(AddPNode::Base) != base) {
// give up
return -1;
}
elements[count++] = addr->in(AddPNode::Offset);
if (count == length) {
// give up
return -1;
}
addr = addr->in(AddPNode::Address);
}
return count;
}
//------------------------------match_edge-------------------------------------
// Do we Match on this edge index or not? Do not match base pointer edge
uint AddPNode::match_edge(uint idx) const {