< prev index next >

src/hotspot/share/c1/c1_Instruction.cpp

Print this page


  97 }
  98 
  99 
 100 void Instruction::state_values_do(ValueVisitor* f) {
 101   if (state_before() != NULL) {
 102     state_before()->values_do(f);
 103   }
 104   if (exception_state() != NULL){
 105     exception_state()->values_do(f);
 106   }
 107 }
 108 
 109 ciType* Instruction::exact_type() const {
 110   ciType* t =  declared_type();
 111   if (t != NULL && t->is_klass()) {
 112     return t->as_klass()->exact_klass();
 113   }
 114   return NULL;
 115 }
 116 










 117 
 118 // FIXME -- this is used by ValueStack::merge_types only. We should remove this function
 119 // and use a better way for handling phi nodes.
 120 bool Instruction::is_flattened_array() const {
 121   if (ValueArrayFlatten) {
 122     ciType* type = declared_type();
 123     if (type != NULL && type->is_value_array_klass()) {
 124       ciValueKlass* element_klass = type->as_value_array_klass()->element_klass()->as_value_klass();
 125       assert(element_klass->is_loaded(), "ciValueKlasses are always loaded");
 126       if (element_klass->flatten_array()) {
 127         return true;
 128       }
 129     }
 130   }
 131 
 132   return false;
 133 }
 134 
 135 bool Instruction::is_loaded_flattened_array() const {
 136   if (ValueArrayFlatten) {




  97 }
  98 
  99 
 100 void Instruction::state_values_do(ValueVisitor* f) {
 101   if (state_before() != NULL) {
 102     state_before()->values_do(f);
 103   }
 104   if (exception_state() != NULL){
 105     exception_state()->values_do(f);
 106   }
 107 }
 108 
 109 ciType* Instruction::exact_type() const {
 110   ciType* t =  declared_type();
 111   if (t != NULL && t->is_klass()) {
 112     return t->as_klass()->exact_klass();
 113   }
 114   return NULL;
 115 }
 116 
 117 ciKlass* Instruction::as_loaded_klass_or_null() const {
 118   ciType* type = declared_type();
 119   if (type != NULL && type->is_klass()) {
 120     ciKlass* klass = type->as_klass();
 121     if (klass->is_loaded()) {
 122       return klass;
 123     }
 124   }
 125   return NULL;
 126 }
 127 
 128 // FIXME -- this is used by ValueStack::merge_types only. We should remove this function
 129 // and use a better way for handling phi nodes.
 130 bool Instruction::is_flattened_array() const {
 131   if (ValueArrayFlatten) {
 132     ciType* type = declared_type();
 133     if (type != NULL && type->is_value_array_klass()) {
 134       ciValueKlass* element_klass = type->as_value_array_klass()->element_klass()->as_value_klass();
 135       assert(element_klass->is_loaded(), "ciValueKlasses are always loaded");
 136       if (element_klass->flatten_array()) {
 137         return true;
 138       }
 139     }
 140   }
 141 
 142   return false;
 143 }
 144 
 145 bool Instruction::is_loaded_flattened_array() const {
 146   if (ValueArrayFlatten) {


< prev index next >