src/cpu/x86/vm/c1_LIRGenerator_x86.cpp

changeset 3153
5cceda753a4a
parent 2781
e1162778c1c8
child 3787
6759698e3140
equal deleted inserted replaced
3149:77e1a9153757 3153:5cceda753a4a
265 assert(x->is_pinned(),""); 265 assert(x->is_pinned(),"");
266 bool needs_range_check = true; 266 bool needs_range_check = true;
267 bool use_length = x->length() != NULL; 267 bool use_length = x->length() != NULL;
268 bool obj_store = x->elt_type() == T_ARRAY || x->elt_type() == T_OBJECT; 268 bool obj_store = x->elt_type() == T_ARRAY || x->elt_type() == T_OBJECT;
269 bool needs_store_check = obj_store && (x->value()->as_Constant() == NULL || 269 bool needs_store_check = obj_store && (x->value()->as_Constant() == NULL ||
270 !get_jobject_constant(x->value())->is_null_object()); 270 !get_jobject_constant(x->value())->is_null_object() ||
271 x->should_profile());
271 272
272 LIRItem array(x->array(), this); 273 LIRItem array(x->array(), this);
273 LIRItem index(x->index(), this); 274 LIRItem index(x->index(), this);
274 LIRItem value(x->value(), this); 275 LIRItem value(x->value(), this);
275 LIRItem length(this); 276 LIRItem length(this);
319 LIR_Opr tmp1 = new_register(objectType); 320 LIR_Opr tmp1 = new_register(objectType);
320 LIR_Opr tmp2 = new_register(objectType); 321 LIR_Opr tmp2 = new_register(objectType);
321 LIR_Opr tmp3 = new_register(objectType); 322 LIR_Opr tmp3 = new_register(objectType);
322 323
323 CodeEmitInfo* store_check_info = new CodeEmitInfo(range_check_info); 324 CodeEmitInfo* store_check_info = new CodeEmitInfo(range_check_info);
324 __ store_check(value.result(), array.result(), tmp1, tmp2, tmp3, store_check_info); 325 __ store_check(value.result(), array.result(), tmp1, tmp2, tmp3, store_check_info, x->profiled_method(), x->profiled_bci());
325 } 326 }
326 327
327 if (obj_store) { 328 if (obj_store) {
328 // Needs GC write barriers. 329 // Needs GC write barriers.
329 pre_barrier(LIR_OprFact::address(array_addr), LIR_OprFact::illegalOpr /* pre_val */, 330 pre_barrier(LIR_OprFact::address(array_addr), LIR_OprFact::illegalOpr /* pre_val */,

mercurial