void HeapAddress::write_barrier_prolog() { GUARANTEE(stack_type() == T_OBJECT, "write barrier should not be updated for non-object stores"); // allocate an address register for the write barrier implementation set_address_register(RegisterAllocator::allocate()); // compute the effective address and store it in the address register BinaryAssembler::Address address = compute_address_for(lo_offset()); code_generator()->leal(address_register(), address); }
BinaryAssembler::Address HeapAddress::address_for(jint address_offset) { // use the address register if available if (has_address_register()) { GUARANTEE(address_offset == lo_offset(), "the address register holds the address for the low offset"); return BinaryAssembler::Address(address_register()); } // return the computed address return compute_address_for(address_offset); }
// get the platform dependant address for this address BinaryAssembler::Address lo_address() { return address_for(lo_offset()); }