comparison src/share/vm/opto/graphKit.cpp @ 11198:1e6d5dec4a4e

Merge.
author Christian Humer <christian.humer@gmail.com>
date Mon, 05 Aug 2013 13:20:06 +0200
parents 6b0fd0964b87
children cefad50507d8
comparison
equal deleted inserted replaced
11197:3479ab380552 11198:1e6d5dec4a4e
3330 // Given an oop pointer or raw pointer, see if it feeds from an AllocateNode. 3330 // Given an oop pointer or raw pointer, see if it feeds from an AllocateNode.
3331 AllocateNode* AllocateNode::Ideal_allocation(Node* ptr, PhaseTransform* phase) { 3331 AllocateNode* AllocateNode::Ideal_allocation(Node* ptr, PhaseTransform* phase) {
3332 if (ptr == NULL) { // reduce dumb test in callers 3332 if (ptr == NULL) { // reduce dumb test in callers
3333 return NULL; 3333 return NULL;
3334 } 3334 }
3335 ptr = ptr->uncast(); // strip a raw-to-oop cast 3335 if (ptr->is_CheckCastPP()) { // strip only one raw-to-oop cast
3336 if (ptr == NULL) return NULL; 3336 ptr = ptr->in(1);
3337 3337 if (ptr == NULL) return NULL;
3338 }
3339 // Return NULL for allocations with several casts:
3340 // j.l.reflect.Array.newInstance(jobject, jint)
3341 // Object.clone()
3342 // to keep more precise type from last cast.
3338 if (ptr->is_Proj()) { 3343 if (ptr->is_Proj()) {
3339 Node* allo = ptr->in(0); 3344 Node* allo = ptr->in(0);
3340 if (allo != NULL && allo->is_Allocate()) { 3345 if (allo != NULL && allo->is_Allocate()) {
3341 return allo->as_Allocate(); 3346 return allo->as_Allocate();
3342 } 3347 }