Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated code from ChapelSyncVars module #26522

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 0 additions & 99 deletions modules/internal/ChapelSyncvar.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -158,20 +158,6 @@ module ChapelSyncvar {
this.isOwned = false;
}

@deprecated(notes="Initializing a type-inferred variable from a 'sync' is deprecated; apply a 'read??()' method to the right-hand side")
proc init=(const ref other: _syncvar(?)) {
// Allow initialization from compatible sync variables, e.g.:
// var x : sync int = 5;
// var y : sync real = x;
if isCoercible(other.valType, this.type.valType) == false {
param theseTypes = "'" + this.type:string + "' from '" + other.type:string + "'";
param because = "because '" + other.valType:string + "' is not coercible to '" + this.type.valType:string + "'";
compilerError("cannot initialize ", theseTypes, " ", because);
}
this.init(this.type.valType);
this.writeEF(other.readFE());
}

pragma "dont disable remote value forwarding"
proc init=(in other : this.type.valType) {
this.init(this.type.valType, other);
Expand Down Expand Up @@ -298,91 +284,12 @@ module ChapelSyncvar {
return wrapped.isFull;
}

@chpldoc.nodoc
@deprecated(notes="Direct assignment to 'sync' variables is deprecated; apply a 'write??()' method to modify one")
operator =(ref lhs : _syncvar(?t), rhs : t) {
lhs.wrapped.writeEF(rhs);
}

@chpldoc.nodoc
inline operator :(from, type t:_syncvar)
where from.type == t.valType {
return new _syncvar(from);
}

@chpldoc.nodoc
@deprecated(notes="Casting sync variables is deprecated")
inline operator :(from: _syncvar, type toType:_syncvar) {
// TODO: this doesn't seem right - it doesn't use toType
return new _syncvar(from);
}

@chpldoc.nodoc
@deprecated("'op=' assignments to 'sync' variables are deprecated; add explicit '.read??'/'.write??' methods to modify one")
operator +=(ref lhs : _syncvar(?t), rhs : t) {
lhs.wrapped.writeEF(lhs.wrapped.readFE() + rhs);
}

@chpldoc.nodoc
@deprecated("'op=' assignments to 'sync' variables are deprecated; add explicit '.read??'/'.write??' methods to modify one")
operator -=(ref lhs : _syncvar(?t), rhs : t) {
lhs.wrapped.writeEF(lhs.wrapped.readFE() - rhs);
}

@chpldoc.nodoc
@deprecated("'op=' assignments to 'sync' variables are deprecated; add explicit '.read??'/'.write??' methods to modify one")
operator *=(ref lhs : _syncvar(?t), rhs : t) {
lhs.wrapped.writeEF(lhs.wrapped.readFE() * rhs);
}

@chpldoc.nodoc
@deprecated("'op=' assignments to 'sync' variables are deprecated; add explicit '.read??'/'.write??' methods to modify one")
operator /=(ref lhs : _syncvar(?t), rhs : t) {
lhs.wrapped.writeEF(lhs.wrapped.readFE() / rhs);
}

@chpldoc.nodoc
@deprecated("'op=' assignments to 'sync' variables are deprecated; add explicit '.read??'/'.write??' methods to modify one")
operator %=(ref lhs : _syncvar(?t), rhs : t) {
lhs.wrapped.writeEF(lhs.wrapped.readFE() % rhs);
}

@chpldoc.nodoc
@deprecated("'op=' assignments to 'sync' variables are deprecated; add explicit '.read??'/'.write??' methods to modify one")
operator **=(ref lhs : _syncvar(?t), rhs : t) {
lhs.wrapped.writeEF(lhs.wrapped.readFE() ** rhs);
}

@chpldoc.nodoc
@deprecated("'op=' assignments to 'sync' variables are deprecated; add explicit '.read??'/'.write??' methods to modify one")
operator &=(ref lhs : _syncvar(?t), rhs : t) {
lhs.wrapped.writeEF(lhs.wrapped.readFE() & rhs);
}

@chpldoc.nodoc
@deprecated("'op=' assignments to 'sync' variables are deprecated; add explicit '.read??'/'.write??' methods to modify one")
operator |=(ref lhs : _syncvar(?t), rhs : t) {
lhs.wrapped.writeEF(lhs.wrapped.readFE() | rhs);
}

@chpldoc.nodoc
@deprecated("'op=' assignments to 'sync' variables are deprecated; add explicit '.read??'/'.write??' methods to modify one")
operator ^=(ref lhs : _syncvar(?t), rhs : t) {
lhs.wrapped.writeEF(lhs.wrapped.readFE() ^ rhs);
}

@chpldoc.nodoc
@deprecated("'op=' assignments to 'sync' variables are deprecated; add explicit '.read??'/'.write??' methods to modify one")
operator >>=(ref lhs : _syncvar(?t), rhs : t) {
lhs.wrapped.writeEF(lhs.wrapped.readFE() >> rhs);
}

@chpldoc.nodoc
@deprecated("'op=' assignments to 'sync' variables are deprecated; add explicit '.read??'/'.write??' methods to modify one")
operator <<=(ref lhs : _syncvar(?t), rhs : t) {
lhs.wrapped.writeEF(lhs.wrapped.readFE() << rhs);
}

// TODO Jade: remove me when compiler generated inits are removed
proc chpl__compilerGeneratedAssignSyncSingle(ref lhs: _syncvar(?),
ref rhs: _syncvar(?)) {
Expand All @@ -397,12 +304,6 @@ module ChapelSyncvar {
return ret;
}

pragma "init copy fn"
@deprecated(notes="Initializing a type-inferred variable from a 'sync' is deprecated; apply a '.read??()' method to the right-hand side")
proc chpl__initCopy(ref sv : _syncvar(?t), definedConst: bool) {
return sv.readFE();
}

pragma "auto copy fn"
proc chpl__autoCopy(const ref rhs : _syncvar, definedConst: bool) {
// Does it make sense to have a const sync? If so, can we make use of that
Expand Down
Loading