CompiledMethod>>getSource

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

CompiledMethod>>getSource

Chris Uppal-3
Does anyone agree that it'd be useful for CompiledMethod to delegate
#getSource to its owning package ?

!CompiledMethod methodsFor!
getSource
 "Answer the source of the receiver.
 This task is delegated to the method's package's SourceManager."

 | owner |
 owner := self owningPackage.
 owner isNil ifTrue: [owner := self class]. "not sure why this is needed"
 ^ owner sourceManager getSourceOfMethod: self.
! !

That would (I think) make it possible to use different source managers on a
per-package basis.  E.g. some packages might "live" in a database, or even
on SourceForge.

Thoughts ?  Am I missing something ?

    -- chris