ChangeSet notified before source is stored?

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

ChangeSet notified before source is stored?

Boris Popov, DeepCove Labs (SNN)

Here’s a Friday surprise, it turns out that ChangeSet is notified of compiled method changes immediately after a copy is installed into the method dictionary, but before the source is stored and pointer updated, which means one can’t dynamically invoke any steps that perform further code analysis or processing from within #update:with:from when given class is a dependent of a ChangeSet. Is there another hook someplace (Announcement?) that one could subscribe to? I couldn’t find any at a quick glance.

 

compile: code classified: heading notifying: requestor attributes: attributes environment: aNamespace

                | selector srcs actualHeading |

                self

                                compile: code  ß notification is invoked from here

                                notifying: requestor

                                attributes: attributes

                                selectorBlock:

                                                [:sel :oldMeth |

                                                selector := sel.

                                                srcs := oldMeth == nil

                                                                                                ifTrue: [MethodSourceCollection new]

                                                                                                ifFalse: [oldMeth methodSources copy]]

                                ifFail: [^nil]

                                environment: aNamespace.

                srcs source: code.

                actualHeading := self organization classify: selector under: heading.

                (methodDict at: selector) sourcePointer: (SourceFileManager default ß source is only updated here

                                                                storeMethodSources: srcs

                                                                class: self

                                                                selector: selector

                                                                category: actualHeading

                                                                safely: true).

                ^selector

 

-Boris


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc