void SharkCacher::process_local_slot(int index, SharkValue** addr, int offset) { SharkValue *value = *addr; // Read the value from the frame if necessary if (local_slot_needs_read(index, value)) { *addr = SharkValue::create_generic( value->type(), read_value_from_frame( SharkType::to_stackType(value->basic_type()), adjusted_offset(value, offset)), value->zero_checked()); } }
void SharkOSREntryCacher::process_local_slot(int index, SharkValue** addr, int offset) { SharkValue *value = *addr; // Read the value from the OSR buffer if necessary if (local_slot_needs_read(index, value)) { *addr = SharkValue::create_generic( value->type(), builder()->CreateLoad( CreateAddressOfOSRBufEntry( adjusted_offset(value, max_locals() - 1 - index), SharkType::to_stackType(value->basic_type()))), value->zero_checked()); } }