changeset 5199:58e010ab2d06

Merge
author rbackman
date Tue, 27 Aug 2013 19:37:39 +0200
parents 022415fe638e 59982ff9e0ec
children 7181dd13a6c4
files
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/c1/c1_GraphBuilder.cpp	Mon Aug 26 21:48:19 2013 -0700
+++ b/src/share/vm/c1/c1_GraphBuilder.cpp	Tue Aug 27 19:37:39 2013 +0200
@@ -1583,7 +1583,7 @@
       ObjectType* obj_type = obj->type()->as_ObjectType();
       if (obj_type->is_constant() && !PatchALot) {
         ciObject* const_oop = obj_type->constant_value();
-        if (!const_oop->is_null_object()) {
+        if (!const_oop->is_null_object() && const_oop->is_loaded()) {
           if (field->is_constant()) {
             ciConstant field_val = field->constant_value_of(const_oop);
             BasicType field_type = field_val.basic_type();
--- a/src/share/vm/ci/ciInstance.cpp	Mon Aug 26 21:48:19 2013 -0700
+++ b/src/share/vm/ci/ciInstance.cpp	Tue Aug 27 19:37:39 2013 +0200
@@ -60,10 +60,10 @@
 //
 // Constant value of a field.
 ciConstant ciInstance::field_value(ciField* field) {
-  assert(is_loaded() &&
-         field->holder()->is_loaded() &&
-         klass()->is_subclass_of(field->holder()),
-         "invalid access");
+  assert(is_loaded(), "invalid access - must be loaded");
+  assert(field->holder()->is_loaded(), "invalid access - holder must be loaded");
+  assert(klass()->is_subclass_of(field->holder()), "invalid access - must be subclass");
+
   VM_ENTRY_MARK;
   ciConstant result;
   Handle obj = get_oop();