comparison src/share/vm/opto/stringopts.cpp @ 3283:01fd6090fdd8

7032162: assert(flat != TypePtr::BOTTOM) failed: cannot alias-analyze an untyped ptr Reviewed-by: kvn
author never
date Thu, 28 Apr 2011 14:00:13 -0700
parents 1d1603768966
children 2b27ef5c2173
comparison
equal deleted inserted replaced
3282:149bb459be66 3283:01fd6090fdd8
1170 } 1170 }
1171 1171
1172 1172
1173 Node* PhaseStringOpts::copy_string(GraphKit& kit, Node* str, Node* char_array, Node* start) { 1173 Node* PhaseStringOpts::copy_string(GraphKit& kit, Node* str, Node* char_array, Node* start) {
1174 Node* string = str; 1174 Node* string = str;
1175 Node* offset = kit.make_load(NULL, 1175 Node* offset = kit.make_load(kit.control(),
1176 kit.basic_plus_adr(string, string, java_lang_String::offset_offset_in_bytes()), 1176 kit.basic_plus_adr(string, string, java_lang_String::offset_offset_in_bytes()),
1177 TypeInt::INT, T_INT, offset_field_idx); 1177 TypeInt::INT, T_INT, offset_field_idx);
1178 Node* count = kit.make_load(NULL, 1178 Node* count = kit.make_load(kit.control(),
1179 kit.basic_plus_adr(string, string, java_lang_String::count_offset_in_bytes()), 1179 kit.basic_plus_adr(string, string, java_lang_String::count_offset_in_bytes()),
1180 TypeInt::INT, T_INT, count_field_idx); 1180 TypeInt::INT, T_INT, count_field_idx);
1181 const TypeAryPtr* value_type = TypeAryPtr::make(TypePtr::NotNull, 1181 const TypeAryPtr* value_type = TypeAryPtr::make(TypePtr::NotNull,
1182 TypeAry::make(TypeInt::CHAR,TypeInt::POS), 1182 TypeAry::make(TypeInt::CHAR,TypeInt::POS),
1183 ciTypeArrayKlass::make(T_CHAR), true, 0); 1183 ciTypeArrayKlass::make(T_CHAR), true, 0);
1184 Node* value = kit.make_load(NULL, 1184 Node* value = kit.make_load(kit.control(),
1185 kit.basic_plus_adr(string, string, java_lang_String::value_offset_in_bytes()), 1185 kit.basic_plus_adr(string, string, java_lang_String::value_offset_in_bytes()),
1186 value_type, T_OBJECT, value_field_idx); 1186 value_type, T_OBJECT, value_field_idx);
1187 1187
1188 // copy the contents 1188 // copy the contents
1189 if (offset->is_Con() && count->is_Con() && value->is_Con() && count->get_int() < unroll_string_copy_length) { 1189 if (offset->is_Con() && count->is_Con() && value->is_Con() && count->get_int() < unroll_string_copy_length) {
1340 arg = phi; 1340 arg = phi;
1341 sc->set_argument(argi, arg); 1341 sc->set_argument(argi, arg);
1342 } 1342 }
1343 // Node* offset = kit.make_load(NULL, kit.basic_plus_adr(arg, arg, offset_offset), 1343 // Node* offset = kit.make_load(NULL, kit.basic_plus_adr(arg, arg, offset_offset),
1344 // TypeInt::INT, T_INT, offset_field_idx); 1344 // TypeInt::INT, T_INT, offset_field_idx);
1345 Node* count = kit.make_load(NULL, kit.basic_plus_adr(arg, arg, java_lang_String::count_offset_in_bytes()), 1345 Node* count = kit.make_load(kit.control(), kit.basic_plus_adr(arg, arg, java_lang_String::count_offset_in_bytes()),
1346 TypeInt::INT, T_INT, count_field_idx); 1346 TypeInt::INT, T_INT, count_field_idx);
1347 length = __ AddI(length, count); 1347 length = __ AddI(length, count);
1348 string_sizes->init_req(argi, NULL); 1348 string_sizes->init_req(argi, NULL);
1349 break; 1349 break;
1350 } 1350 }