< prev index next >

src/hotspot/share/ci/ciConstant.cpp

Print this page
@@ -59,10 +59,23 @@
      }
    }
    return false;
  }
  
+ // ------------------------------------------------------------------
+ // ciConstant::should_be_constant
+ bool ciConstant::should_be_constant() const {
+   if (is_valid()) {
+     if (is_reference_type(basic_type())) {
+       return as_object()->should_be_constant();
+     } else {
+       return true;
+     }
+   }
+   return false;
+ }
+ 
  // ------------------------------------------------------------------
  // ciConstant::print
  void ciConstant::print() {
    tty->print("<ciConstant type=%s value=",
               basictype_to_str(basic_type()));
< prev index next >