< prev index next >

src/share/vm/opto/parse3.cpp

Print this page

        

*** 160,169 **** --- 160,173 ---- bool is_vol = field->is_volatile(); // Compute address and memory type. int offset = field->offset_in_bytes(); const TypePtr* adr_type = C->alias_type(field)->adr_type(); + + // Insert read barrier for Shenandoah. + obj = shenandoah_read_barrier(obj); + Node *adr = basic_plus_adr(obj, obj, offset); BasicType bt = field->layout_type(); // Build the resultant type of the load const Type *type;
*** 242,251 **** --- 246,258 ---- // If reference is volatile, prevent following memory ops from // floating down past the volatile write. Also prevents commoning // another volatile read. if (is_vol) insert_mem_bar(Op_MemBarRelease); + // Insert write barrier for Shenandoah. + obj = shenandoah_write_barrier(obj); + // Compute address and memory type. int offset = field->offset_in_bytes(); const TypePtr* adr_type = C->alias_type(field)->adr_type(); Node* adr = basic_plus_adr(obj, obj, offset); BasicType bt = field->layout_type();
*** 271,280 **** --- 278,290 ---- if (!field->type()->is_loaded()) { field_type = TypeInstPtr::BOTTOM; } else { field_type = TypeOopPtr::make_from_klass(field->type()->as_klass()); } + + val = shenandoah_read_barrier_nomem(val); + store = store_oop_to_object(control(), obj, adr, adr_type, val, field_type, bt, mo); } else { bool needs_atomic_access = is_vol || AlwaysAtomicAccesses; store = store_to_memory(control(), adr, val, bt, adr_type, mo, needs_atomic_access); }
< prev index next >