Issue 6042 in pharo: CompiledMethod>>#comment method is not working

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

Issue 6042 in pharo: CompiledMethod>>#comment method is not working

pharo
Status: Accepted
Owner: [hidden email]
Labels: Type-Bug Milestone-2.0

New issue 6042 by [hidden email]: CompiledMethod>>#comment method is  
not working
http://code.google.com/p/pharo/issues/detail?id=6042

By example
Take the method Object>>#adaptToFloat:andCompare:

adaptToFloat: rcvr andCompare: selector
        "If I am involved in comparison with a Float.
        Default behaviour is to process comparison as any other selectors."
        ^ self adaptToFloat: rcvr andSend: selector

(Object>>#adaptToFloat:andCompare:) comment --> 'selector'

I have no idea where it can come from :s


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6042 in pharo: CompiledMethod>>#comment method is not working

pharo
Updates:
        Labels: Importance-High

Comment #1 on issue 6042 by [hidden email]: CompiledMethod>>#comment  
method is not working
http://code.google.com/p/pharo/issues/detail?id=6042

It seams that Parser is broken ...

In firstPrecodeCommentFor: selector
        "If there is a comment in the source code at the given selector that  
preceeds the body of the method, return it here, else return nil"
        "Behavior firstPrecodeCommentFor: #firstPrecodeCommentFor:"
        | parser source tree |
        (#(#Comment #Definition #Hierarchy ) includes: selector) ifTrue:
                [ "Not really a selector"
                ^ nil ].
        source := self
                sourceCodeAt: selector asSymbol
                ifAbsent: [ ^ nil ].
        parser := self parserClass new.
        tree := parser
                parse: source readStream
                class: self
                noPattern: false
                context: nil
                notifying: nil
                ifFail: [ ^ nil ].
        ^ (tree comment ifNil: [ ^ nil ]) first

tree comment return the first argument of the method or the selector if no  
argument ...


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6042 in pharo: CompiledMethod>>#comment method is not working

pharo
Updates:
        Status: FixReviewNeeded

Comment #2 on issue 6042 by [hidden email]: CompiledMethod>>#comment  
method is not working
http://code.google.com/p/pharo/issues/detail?id=6042

Fix the problem, but I can't ensure it didn't break something else

Attachments:
        Scanner.BenjaminVanRyseghem.1.cs  569 bytes


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6042 in pharo: CompiledMethod>>#comment method is not working

pharo
Updates:
        Status: FixToInclude

Comment #3 on issue 6042 by [hidden email]:  
CompiledMethod>>#comment method is not working
http://code.google.com/p/pharo/issues/detail?id=6042

Looks fine


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6042 in pharo: CompiledMethod>>#comment method is not working

pharo
Updates:
        Status: Integrated

Comment #4 on issue 6042 by [hidden email]: CompiledMethod>>#comment  
method is not working
http://code.google.com/p/pharo/issues/detail?id=6042

in 2.0 160


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker