Comment of BlockClosure>>sourceNode
The comment of the following method seems to be more an explanation of the implementation than of the expected behavior. Should we change that to something like: "Return an instance of RBBlockNode representing the receiver's AST." BlockClosure>>sourceNode "the bytecode just before the first bytecode of the block is a bytecode that creates the complete block" ^ self method sourceNodeForPC: self startpc - 1. -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill
2015-10-05 14:53 GMT+02:00 Damien Cassou <damien.cassou@inria.fr>:
The comment of the following method seems to be more an explanation of the implementation than of the expected behavior. Should we change that to something like: "Return an instance of RBBlockNode representing the receiver's AST."
Which would completely hide the reason for going backward one step in the bytecode.
I'd vote for adding to the current comment. Thierry
BlockClosure>>sourceNode "the bytecode just before the first bytecode of the block is a bytecode that creates the complete block" ^ self method sourceNodeForPC: self startpc - 1.
-- Damien Cassou http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill
On 05 Oct 2015, at 14:58, Thierry Goubier <thierry.goubier@gmail.com> wrote:
2015-10-05 14:53 GMT+02:00 Damien Cassou <damien.cassou@inria.fr <mailto:damien.cassou@inria.fr>>: The comment of the following method seems to be more an explanation of the implementation than of the expected behavior. Should we change that to something like: "Return an instance of RBBlockNode representing the receiver's AST."
Which would completely hide the reason for going backward one step in the bytecode.
I'd vote for adding to the current comment.
Yes, add to it. the implementation comment is important: âWhy the heck -1â... Marcus
Thierry Goubier <thierry.goubier@gmail.com> writes:
2015-10-05 14:53 GMT+02:00 Damien Cassou <damien.cassou@inria.fr>:
The comment of the following method seems to be more an explanation of the implementation than of the expected behavior. Should we change that to something like: "Return an instance of RBBlockNode representing the receiver's AST."
Which would completely hide the reason for going backward one step in the bytecode.
I'd vote for adding to the current comment.
the existing comment is useful, I agree. https://pharo.fogbugz.com/f/cases/16721/Comment-of-BlockClosure-sourceNode-i... -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill
participants (3)
-
Damien Cassou -
Marcus Denker -
Thierry Goubier