Bug in Method Refactor 'Inline Self Sends' for chained method sends.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug in Method Refactor 'Inline Self Sends' for chained method sends.

Antony Blakey-4
Two methods:

MyClass>>myMethod
   self
       writeByte: 1;
       writeByte: 2.

MyClass>>writeByte: aByte
   socket sendByte: aByte.

If I do an 'Inline Self Sends' refactor on MyClass>>writeByte, then
MyClass>>myMethod ends up as:

MyClass>>myMethod
   self
       sendByte: 1;
       sendByte: 2.

i.e. the receiver in a chained self send is not rewritten, although the
selector is. The safest bet would be to disable the inlining for chained
method sends; the best would be to recognise where it could actually be
done (i.e. all of the chained sends are the same selector).

-------------------------
Antony Blakey
mailto:[hidden email]
Linkuistics Pty Ltd
Adelaide, South Australia


Reply | Threaded
Open this post in threaded view
|

Re: Bug in Method Refactor 'Inline Self Sends' for chained method sends.

Blair McGlashan
"Antony Blakey" <[hidden email]> wrote in message
news:[hidden email]...
>...the receiver in a chained self send is not rewritten, although the
> selector is. The safest bet would be to disable the inlining for chained
> method sends; the best would be to recognise where it could actually be
> done (i.e. all of the chained sends are the same selector).

This is not really the best place to report suspected bugs in the
Refactoring Engine. I believe that
http://st-www.cs.uiuc.edu/users/brant/Refactory/ has instructions on
reporting bugs (which, as far as I recall, essentially amounted to reporting
them to either John Brant or Don Roberts via e-mail), but the server was
down when I tried to look just now.

An alternative location might be the Refactoring Browser wiki at:
http://wiki.cs.uiuc.edu/RefactoringBrowser

Regards

Blair