Re: [Pharo-project] Issue 3224 in pharo: Migrating MethodReference to MethodReferenceWithSource
Comment #4 on issue 3224 by luc.fabresse: Migrating MethodReference to MethodReferenceWithSource http://code.google.com/p/pharo/issues/detail?id=3224 some comments. We must add a hash method on SourcedMethodReference. I propose: SourcedMethodReference>>hash "Answer a SmallInteger whose value is related to the receiver's identity." ^ super hash bitXor: self sourcePointer All instances of SourcedMethodReference should (*must*) have a defined sourcePointer (not be nil) at instanciation time. But it seems that it is not the case since some initializing methods from MethodReference are not redefined in SourcedMethodReference: MethodReference>>setClass:methodSymbol: MethodReference>>setClassAndSelectorIn: MethodReference>>setClassSymbol:classIsMeta:methodSymbol:stringVersion: MethodReference>>setClass:methodSymbol:stringVersion: For example, in SystemNavigation a lot of methods use: SourcedMethodReference new setClass: class methodSymbol: sel which leave sourcePointer uninitialized. Did these changes break some tests?
Comment #5 on issue 3224 by Benjamin.VanRyseghem.Pharo: Migrating MethodReference to MethodReferenceWithSource http://code.google.com/p/pharo/issues/detail?id=3224 Those methods are part of a messy interface and should be removed, I think that's why they hadn't be reimplemented :)
Comment #6 on issue 3224 by luc.fabresse: Migrating MethodReference to MethodReferenceWithSource http://code.google.com/p/pharo/issues/detail?id=3224 ok, so we must kill the senders.
Comment #7 on issue 3224 by stephane.ducasse: Migrating MethodReference to MethodReferenceWithSource http://code.google.com/p/pharo/issues/detail?id=3224 The problem is that MethodReference was also used to just be an object that represent a class name and a selector. In addition it was also used to wrap a compiledMethod and as such a compiledMethod got a sourcePointer (I image).
Comment #8 on issue 3224 by stephane.ducasse: Migrating MethodReference to MethodReferenceWithSource http://code.google.com/p/pharo/issues/detail?id=3224 The problem is that MethodReference was also used to just be an object that represent a class name and a selector. In addition it was also used to wrap a compiledMethod and as such a compiledMethod got a sourcePointer (I image).
Comment #9 on issue 3224 by stephane.ducasse: Migrating MethodReference to MethodReferenceWithSource http://code.google.com/p/pharo/issues/detail?id=3224 I have the impression that we should not convert everything to SourcedMethodReference blindy. but this is difficult to know what is doing what.
Comment #10 on issue 3224 by Benjamin.VanRyseghem.Pharo: Migrating MethodReference to MethodReferenceWithSource http://code.google.com/p/pharo/issues/detail?id=3224 We can blindly replace MethodReference by SourcedMethodReference in methods which create new objects, but as long as MethodReference objects are living in the system, we can't blindly replace the methods which use MethodReference objects ... Moreover, a lot of such method use methods like isKindOf: etc.
Comment #11 on issue 3224 by stephane.ducasse: Migrating MethodReference to MethodReferenceWithSource http://code.google.com/p/pharo/issues/detail?id=3224 Integrated the second files (dealing with SystemNavigation) comment
Comment #12 on issue 3224 by stephane.ducasse: Migrating MethodReference to MethodReferenceWithSource http://code.google.com/p/pharo/issues/detail?id=3224 Here are new changeset breaking the tests but that should be used to make progress Attachments: FixingMethodReference.1.cs 43.1 KB FixingMethodReference-AddOns.1.cs 1.7 KB
Comment #13 on issue 3224 by Benjamin.VanRyseghem.Pharo: Migrating MethodReference to MethodReferenceWithSource http://code.google.com/p/pharo/issues/detail?id=3224 Here are two new change set which fix a little bit the SourceReference API and fix some tests. The order matters. With that, only two error tests left, but I do not know why Attachments: FixingSourceReferenceChangingTimeStampIntoAString.1.cs 4.5 KB FixTestsForSourcedMethodReference.1.cs 2.4 KB
Comment #14 on issue 3224 by stephane.ducasse: Migrating MethodReference to MethodReferenceWithSource http://code.google.com/p/pharo/issues/detail?id=3224 Benjamin should I load your cs in addition or just instead of the other ones.
Comment #15 on issue 3224 by Benjamin.VanRyseghem: Migrating MethodReference to MethodReferenceWithSource http://code.google.com/p/pharo/issues/detail?id=3224 In addition of your cs :)
Comment #16 on issue 3224 by Benjamin.VanRyseghem.Pharo: Migrating MethodReference to MethodReferenceWithSource http://code.google.com/p/pharo/issues/detail?id=3224 Here the cs to fix the last tests ^^ easy ^^ Attachments: FixTestsForSMR.3.cs 2.6 KB
Comment #17 on issue 3224 by stephane.ducasse: Migrating MethodReference to MethodReferenceWithSource http://code.google.com/p/pharo/issues/detail?id=3224 Thanks
Updates: Status: Closed Comment #18 on issue 3224 by stephane.ducasse: Migrating MethodReference to MethodReferenceWithSource http://code.google.com/p/pharo/issues/detail?id=3224 finalllllly in 12303
participants (1)
-
pharo@googlecode.com