Question
What is the difference between modifies this, modifies this.x, and modifies this`x?
Answer
A modifies clause for a method lists object references whose fields may be modified by the body of the method.
thismeans that all the fields of thethisobject may be modified by the bodythis.x(wherexis a field ofthisand has some reference type) means that fields ofxmay be modified (but not the fieldxitself ofthis)this`xmeans that just the fieldxofthismay be modified (and not any other fields, unless they are listed themselves)
If there are multiple items listed in the modifies clause, the implicit clause is the union of all of them.
More on framing (modifies and reads clauses) can be found in the reference manual section on Framing specifications.