OTTAWA -- The Liberal government is changing sexual assault law to make it clear that an unconscious person cannot consent to sexual activity, part of an effort to bring legislation up to speed with the courts -- and the times.

"I'm hopeful that these proposed changes will go a long way towards ensuring that victims of sexual assault are treated with compassion and with the respect that they deserve," Justice Minister Jody Wilson-Raybould said Tuesday.

The proposed legislation, known as Bill C-51, would update the Criminal Code to reflect a 2011 decision by the Supreme Court of Canada, which involved the case of a couple that engaged in erotic asphyxiation.

The ruling, known as R. v. J.A., restored the conviction of a man who had performed sexual acts upon his longtime girlfriend after she became unconscious. She had consented to being choked by him, but the high court ruled that consent did not apply after she had lost consciousness.

The proposed legislation does not, however, specifically address whether someone, due to being drunk, impaired or a mental disability, is capable of providing consent, instead leaving that up to the courts to decide on a case-by-case basis.

Bill C-51 would also expand rape shield provisions -- designed to prevent the sexual history of a complainant from being used against them -- to include text messages, photos and other communications of a sexual nature, either from before or after the sexual activity in question.

It would also set up a regime to clarify whether an accused can introduce in court any private records of a complainant, such as diary entries.

The bill would also make it clear that a complainant has the right to a lawyer during rape shield proceedings, and require the judge to inform them of this right as quickly as possible.

Eliminate laws against duelling, selling crime comics

During a technical briefing for the media -- provided on the condition that sources not be named -- a government official said that the proposed changes are meant to codify and standardize what many judges are already putting into practice.

Wilson-Raybould described the proposed reforms as the first major changes to sexual assault law since 1992, when former prime minister Kim Campbell, who was then justice minister, brought in the rape shield provisions.

The bill is also a continuation of a Liberal plan to repeal or update sections of the Criminal Code that have been found obsolete or redundant, including a ban on challenging someone to a duel, fraudulently pretending to practice witchcraft or selling comic books depicting crimes.

It would also clean up sections the courts have found unconstitutional, such as a 2009 change brought in by the Conservatives that prevented anyone who had a previous conviction or breached a condition of bail from being eligible for enhanced credit for time served.

"These changes would help prevent expensive, time-consuming litigation in cases where the outcome can already be safely predicted," Wilson-Raybould said.

The bill would also require the justice minister to explain publicly why any newly proposed laws -- including those outside her portfolio -- are compliant with the Charter of Rights and Freedoms, which is something she has been doing for her own bills.

Wilson-Raybould, who has promised a larger overhaul of the criminal justice system that includes sentencing reform such as changes to mandatory minimum penalties, defended the decision to introduce this legislation first.

"Some reforms are going to take longer because they require more substantive engagement around the legal and policy issues," she said. "That's not to say that because they're taking longer, they're not as important or that this one is more important."

She introduced another bill to clean up other unconstitutional sections of the Criminal Code -- including the statute dealing with abortion -- in March.

Conservative justice critic Rob Nicholson said he hopes the efforts to clean up the Criminal Code won't distract from the job of filling judicial vacancies, which is seen as one reason for trial delays that have been causing cases to be dismissed.

"Get on with the things that you're supposed to be doing," he said.