Unused temps are not removed when saving a method if they are immediately preceded, or followed, by the | character.
This changeset modifies Parser>>removeUnusedTemps so that rather than checking that each temp name found in the temp list is surrounded by separators, it checks that the temp is surrounded by non-alphaNumerics.
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.693 / Virus Database: 454 - Release Date: 01/06/2004
I'm not able to reproduce this problem. Could you send some examples, and even bettter some tests :-)
In a standard browser (open...browser from the world menu), create a new method in Object with the following source...
unusedTempsNotRemoved |a b| ^self
Accept it. The user is prompted to remove the unused temp 'a', say 'yes' to the prompt. The user is prompted to remove the unused temp 'b', say 'yes' to the prompt. The method saves ok, but 'a' and 'b' are not removed from the source, which remains exactly as above.
Note that there must be NO spaces before the 'a' and NO spaces after the 'b'. If there are spaces, then the unused temps are removed from the source correctly, as per this example...
unusedTempsAreRemoved | a b | ^self
which, after accepting and saying 'yes' to both prompts, results in the following method source...
unusedTempsAreRemoved | | ^self
I have checked that this problem exists in 3.7 gamma 5978. I hope this clarifies the bug. Cheers, Andy
----- Original Message ----- From: karl.ramberg@chello.se To: squeak-dev@lists.squeakfoundation.org; amtween@hotmail.com Sent: Tuesday, July 27, 2004 7:43 PM Subject: [FIX]Unused Temps sometimes not removed ( [er] Not able to reproduce problem )
I'm not able to reproduce this problem. Could you send some examples, and even bettter some tests :-)
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.716 / Virus Database: 472 - Release Date: 05/07/2004
squeak-dev@lists.squeakfoundation.org