Mercurial > hg > truffle
comparison src/share/vm/opto/stringopts.cpp @ 3297:6431be02f3ac
Merge
author | trims |
---|---|
date | Fri, 29 Apr 2011 16:55:43 -0700 |
parents | 01fd6090fdd8 |
children | 2b27ef5c2173 |
comparison
equal
deleted
inserted
replaced
3265:d7cc76ea8d06 | 3297:6431be02f3ac |
---|---|
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 } |