--- a/hotspot/src/share/vm/ci/ciInstanceKlass.cpp Mon Jun 07 14:17:01 2010 -0700
+++ b/hotspot/src/share/vm/ci/ciInstanceKlass.cpp Wed Jun 09 18:50:45 2010 -0700
@@ -324,9 +324,11 @@
//
// Get the instance of java.lang.Class corresponding to this klass.
ciInstance* ciInstanceKlass::java_mirror() {
- assert(is_loaded(), "must be loaded");
if (_java_mirror == NULL) {
- _java_mirror = ciKlass::java_mirror();
+ if (!is_loaded())
+ _java_mirror = ciEnv::current()->get_unloaded_klass_mirror(this);
+ else
+ _java_mirror = ciKlass::java_mirror();
}
return _java_mirror;
}