Thu, 28 Apr 2011 14:00:13 -0700
7032162: assert(flat != TypePtr::BOTTOM) failed: cannot alias-analyze an untyped ptr
Reviewed-by: kvn
src/share/vm/ci/ciObject.cpp | file | annotate | diff | comparison | revisions | |
src/share/vm/opto/stringopts.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/ci/ciObject.cpp Wed Apr 27 15:40:36 2011 -0700 1.2 +++ b/src/share/vm/ci/ciObject.cpp Thu Apr 28 14:00:13 2011 -0700 1.3 @@ -194,6 +194,16 @@ 1.4 // ciObject::should_be_constant() 1.5 bool ciObject::should_be_constant() { 1.6 if (ScavengeRootsInCode >= 2) return true; // force everybody to be a constant 1.7 + if (!JavaObjectsInPerm && !is_null_object()) { 1.8 + // We want Strings and Classes to be embeddable by default since 1.9 + // they used to be in the perm world. Not all Strings used to be 1.10 + // embeddable but there's no easy way to distinguish the interned 1.11 + // from the regulars ones so just treat them all that way. 1.12 + ciEnv* env = CURRENT_ENV; 1.13 + if (klass() == env->String_klass() || klass() == env->Class_klass()) { 1.14 + return true; 1.15 + } 1.16 + } 1.17 return handle() == NULL || !is_scavengable(); 1.18 } 1.19
2.1 --- a/src/share/vm/opto/stringopts.cpp Wed Apr 27 15:40:36 2011 -0700 2.2 +++ b/src/share/vm/opto/stringopts.cpp Thu Apr 28 14:00:13 2011 -0700 2.3 @@ -1172,16 +1172,16 @@ 2.4 2.5 Node* PhaseStringOpts::copy_string(GraphKit& kit, Node* str, Node* char_array, Node* start) { 2.6 Node* string = str; 2.7 - Node* offset = kit.make_load(NULL, 2.8 + Node* offset = kit.make_load(kit.control(), 2.9 kit.basic_plus_adr(string, string, java_lang_String::offset_offset_in_bytes()), 2.10 TypeInt::INT, T_INT, offset_field_idx); 2.11 - Node* count = kit.make_load(NULL, 2.12 + Node* count = kit.make_load(kit.control(), 2.13 kit.basic_plus_adr(string, string, java_lang_String::count_offset_in_bytes()), 2.14 TypeInt::INT, T_INT, count_field_idx); 2.15 const TypeAryPtr* value_type = TypeAryPtr::make(TypePtr::NotNull, 2.16 TypeAry::make(TypeInt::CHAR,TypeInt::POS), 2.17 ciTypeArrayKlass::make(T_CHAR), true, 0); 2.18 - Node* value = kit.make_load(NULL, 2.19 + Node* value = kit.make_load(kit.control(), 2.20 kit.basic_plus_adr(string, string, java_lang_String::value_offset_in_bytes()), 2.21 value_type, T_OBJECT, value_field_idx); 2.22 2.23 @@ -1342,7 +1342,7 @@ 2.24 } 2.25 // Node* offset = kit.make_load(NULL, kit.basic_plus_adr(arg, arg, offset_offset), 2.26 // TypeInt::INT, T_INT, offset_field_idx); 2.27 - Node* count = kit.make_load(NULL, kit.basic_plus_adr(arg, arg, java_lang_String::count_offset_in_bytes()), 2.28 + Node* count = kit.make_load(kit.control(), kit.basic_plus_adr(arg, arg, java_lang_String::count_offset_in_bytes()), 2.29 TypeInt::INT, T_INT, count_field_idx); 2.30 length = __ AddI(length, count); 2.31 string_sizes->init_req(argi, NULL);