Parser-removeUnusedTemps enhancement

Romain Robbes romain.robbes at gmail.com
Wed Oct 3 08:32:57 UTC 2007


Well, writing a unit test for this will be a pain. It's a one-method  
change, should I really write a new test class compiling several  
methods, somehow bypassing user input to return an accurate answer,  
decompiling and comparing the source code with an expected result,  
and remove the temporary methods just for this?

I did add the bug report though (http://bugs.squeak.org/ 
bug_view_advanced_page.php?bug_id=6704),
but editing of the wiki page requires a password.

	Romain

On Oct 3, 2007, at 10:12 AM, Damien Cassou wrote:

> Please open a bug report on bugs.squeak.org, write some unit tests and
> add a link to your report in http://wiki.squeak.org/squeak/5934
>
> 2007/10/3, Romain Robbes <romain.robbes at gmail.com>:
>>
>>
>> When accepting a method, if the parser encounters an unused temporary
>> variable, it offers to remove it.
>> However half of the time the variable is stored into, and the  
>> parser does
>> not remove it, instead telling that you should first remove the  
>> statement
>> where the variable is stored.
>>
>> With this fix (basically reordering the test and the user  
>> confirmation) only
>> the variables which are truly unused are removed.
>> The code of the method is simpler too.
>>
>>  Romain
>>
>> --
>> Romain Robbes
>> http://romain.robb.es
>>
>>
>>
>>
>>
>>
>>
>
>
> -- 
> Damien Cassou
>

--
Romain Robbes
http://romain.robb.es


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20071003/bbd8b84b/attachment.htm


More information about the Squeak-dev mailing list