Mercurial > hg > truffle
diff src/share/vm/opto/library_call.cpp @ 825:8f5825e0aeaa
6818666: G1: Type lost in g1 pre-barrier
Reviewed-by: kvn
author | never |
---|---|
date | Fri, 26 Jun 2009 13:03:29 -0700 |
parents | aabd393cf1ee |
children | bf3489cc0aa0 |
line wrap: on
line diff
--- a/src/share/vm/opto/library_call.cpp Fri Jun 26 07:26:10 2009 -0700 +++ b/src/share/vm/opto/library_call.cpp Fri Jun 26 13:03:29 2009 -0700 @@ -2178,9 +2178,8 @@ // Possibly an oop being stored to Java heap or native memory if (!TypePtr::NULL_PTR->higher_equal(_gvn.type(heap_base_oop))) { // oop to Java heap. - (void) store_oop_to_unknown(control(), heap_base_oop, adr, adr_type, val, val->bottom_type(), type); + (void) store_oop_to_unknown(control(), heap_base_oop, adr, adr_type, val, type); } else { - // We can't tell at compile time if we are storing in the Java heap or outside // of it. So we need to emit code to conditionally do the proper type of // store. @@ -2189,7 +2188,7 @@ kit.declares_done(); // QQQ who knows what probability is here?? kit.if_then(heap_base_oop, BoolTest::ne, null(), PROB_UNLIKELY(0.999)); { - (void) store_oop_to_unknown(control(), heap_base_oop, adr, adr_type, val, val->bottom_type(), type); + (void) store_oop_to_unknown(control(), heap_base_oop, adr, adr_type, val, type); } kit.else_(); { (void) store_to_memory(control(), adr, val, type, adr_type, is_volatile); } kit.end_if(); @@ -2394,7 +2393,7 @@ case T_OBJECT: // reference stores need a store barrier. // (They don't if CAS fails, but it isn't worth checking.) - pre_barrier(control(), base, adr, alias_idx, newval, value_type, T_OBJECT); + pre_barrier(control(), base, adr, alias_idx, newval, value_type->is_oopptr(), T_OBJECT); #ifdef _LP64 if (adr->bottom_type()->is_ptr_to_narrowoop()) { Node *newval_enc = _gvn.transform(new (C, 2) EncodePNode(newval, newval->bottom_type()->make_narrowoop())); @@ -2489,7 +2488,7 @@ bool require_atomic_access = true; Node* store; if (type == T_OBJECT) // reference stores need a store barrier. - store = store_oop_to_unknown(control(), base, adr, adr_type, val, value_type, type); + store = store_oop_to_unknown(control(), base, adr, adr_type, val, type); else { store = store_to_memory(control(), adr, val, type, adr_type, require_atomic_access); }