hotspot/src/share/vm/opto/library_call.cpp
changeset 38030 93f24e7b3c43
parent 38018 1dc6c6f21231
child 38033 996ce936543f
--- a/hotspot/src/share/vm/opto/library_call.cpp	Mon Apr 11 21:42:31 2016 +0300
+++ b/hotspot/src/share/vm/opto/library_call.cpp	Mon Apr 11 21:42:55 2016 +0300
@@ -2550,13 +2550,9 @@
     Node* p = NULL;
     // Try to constant fold a load from a constant field
     ciField* field = alias_type->field();
-    if (heap_base_oop != top() &&
-        field != NULL && field->is_constant() && !mismatched) {
+    if (heap_base_oop != top() && field != NULL && field->is_constant() && !mismatched) {
       // final or stable field
-      const Type* con_type = Type::make_constant(alias_type->field(), heap_base_oop);
-      if (con_type != NULL) {
-        p = makecon(con_type);
-      }
+      p = make_constant_from_field(field, heap_base_oop);
     }
     if (p == NULL) {
       // To be valid, unsafe loads may depend on other conditions than