hotspot/src/share/vm/opto/compile.cpp
changeset 769 78e5090c7a20
parent 768 d0bebc7eefc2
child 952 38812d18eec0
child 781 e1baa9c8f16f
equal deleted inserted replaced
768:d0bebc7eefc2 769:78e5090c7a20
  1067   if( to && _AliasLevel >= 2 && to != TypeOopPtr::BOTTOM ) {
  1067   if( to && _AliasLevel >= 2 && to != TypeOopPtr::BOTTOM ) {
  1068     if( ptr == TypePtr::Constant ) {
  1068     if( ptr == TypePtr::Constant ) {
  1069       // No constant oop pointers (such as Strings); they alias with
  1069       // No constant oop pointers (such as Strings); they alias with
  1070       // unknown strings.
  1070       // unknown strings.
  1071       tj = to = TypeInstPtr::make(TypePtr::BotPTR,to->klass(),false,0,offset);
  1071       tj = to = TypeInstPtr::make(TypePtr::BotPTR,to->klass(),false,0,offset);
  1072     } else if( to->is_instance_field() ) {
  1072     } else if( to->is_known_instance_field() ) {
  1073       tj = to; // Keep NotNull and klass_is_exact for instance type
  1073       tj = to; // Keep NotNull and klass_is_exact for instance type
  1074     } else if( ptr == TypePtr::NotNull || to->klass_is_exact() ) {
  1074     } else if( ptr == TypePtr::NotNull || to->klass_is_exact() ) {
  1075       // During the 2nd round of IterGVN, NotNull castings are removed.
  1075       // During the 2nd round of IterGVN, NotNull castings are removed.
  1076       // Make sure the Bottom and NotNull variants alias the same.
  1076       // Make sure the Bottom and NotNull variants alias the same.
  1077       // Also, make sure exact and non-exact variants alias the same.
  1077       // Also, make sure exact and non-exact variants alias the same.
  1188   _index = i;
  1188   _index = i;
  1189   _adr_type = at;
  1189   _adr_type = at;
  1190   _field = NULL;
  1190   _field = NULL;
  1191   _is_rewritable = true; // default
  1191   _is_rewritable = true; // default
  1192   const TypeOopPtr *atoop = (at != NULL) ? at->isa_oopptr() : NULL;
  1192   const TypeOopPtr *atoop = (at != NULL) ? at->isa_oopptr() : NULL;
  1193   if (atoop != NULL && atoop->is_instance()) {
  1193   if (atoop != NULL && atoop->is_known_instance()) {
  1194     const TypeOopPtr *gt = atoop->cast_to_instance(TypeOopPtr::UNKNOWN_INSTANCE);
  1194     const TypeOopPtr *gt = atoop->cast_to_instance_id(TypeOopPtr::InstanceBot);
  1195     _general_index = Compile::current()->get_alias_index(gt);
  1195     _general_index = Compile::current()->get_alias_index(gt);
  1196   } else {
  1196   } else {
  1197     _general_index = 0;
  1197     _general_index = 0;
  1198   }
  1198   }
  1199 }
  1199 }