SUGGESTED FIX
==== //java/main-dev/java/hotspot/src/share/vm/opto/library_call.cpp#33 - /home/cliffc/HotSpot/cliffc-main/hotspot/src/share/vm/opto/library_call.cpp ====
@@ -1329,22 +1329,26 @@
int nargs;
Node* prim_return_value = top(); // what happens if it's a primitive class?
+ const Type *result_phi_type = 0;
switch (id) {
case ciMethod::_isInstance:
nargs = 1+1; // the Class mirror, plus the object getting queried about
// nothing is an instance of a primitive type
prim_return_value = intcon(0);
+ result_phi_type = TypeInt::BOOL;
NOT_PRODUCT(iname = "Class.isInstance");
break;
case ciMethod::_getModifiers:
nargs = 1+0; // just the Class mirror
prim_return_value = intcon(JVM_ACC_ABSTRACT | JVM_ACC_FINAL | JVM_ACC_PUBLIC);
+ result_phi_type = TypeInt::INT;
NOT_PRODUCT(iname = "Class.getModifiers");
break;
case ciMethod::_getClassAccessFlags:
nargs = 1+0; // just the Class mirror
prim_return_value = intcon(JVM_ACC_ABSTRACT | JVM_ACC_FINAL | JVM_ACC_PUBLIC);
+ result_phi_type = TypeInt::INT;
NOT_PRODUCT(iname = "Reflection.getClassAccessFlags");
break;
default:
@@ -1380,7 +1384,7 @@
// Null-check the mirror, and the mirror's klass ptr (in case it is a primitive).
RegionNode* region = new RegionNode(4);
record_for_igvn(region);
- Node* phi = new PhiNode(region, TypeInt::BOOL);
+ Node* phi = new PhiNode(region, result_phi_type);
// The mirror will never be null of Reflection.getClassAccessFlags, however
// it may be null for Class.isInstance or Class.getModifiers. Throw a NPE
###@###.### 2005-07-15 00:08:19 GMT
|