[Pharo-project] anyone have a more up-to-date MethodWrappers for Squeak than MethodWrappers3.9-pmm.10?
Hi All, the most up-to-date MethodWrappers I can find is for Squeak 3.9, pre-closures. Anyone have anything compatible with Squeak 4.1/4.2/Pharo 1.1/1.2/1.3? -- best, Eliot
Eliot, you can take a look to http://www.squeaksource.com/ObjectMetaTools Package MethodWrapper. Do you mean the implementation that uses the #run:with:in ? Cheers On Tue, Sep 13, 2011 at 11:42 PM, Eliot Miranda <eliot.miranda@gmail.com>wrote:
Hi All,
the most up-to-date MethodWrappers I can find is for Squeak 3.9, pre-closures. Anyone have anything compatible with Squeak 4.1/4.2/Pharo 1.1/1.2/1.3?
-- best, Eliot
-- Mariano http://marianopeck.wordpress.com
On Tue, Sep 13, 2011 at 2:58 PM, Mariano Martinez Peck < marianopeck@gmail.com> wrote:
Eliot, you can take a look to
http://www.squeaksource.com/ObjectMetaTools
Package MethodWrapper. Do you mean the implementation that uses the #run:with:in ?
I'll take a look at this. I'd started looking at the older one. If anyone's interested attached are changes that restore generateWith:using: that allow one to create instances of subclasses of CompiledMethod.
Cheers
On Tue, Sep 13, 2011 at 11:42 PM, Eliot Miranda <eliot.miranda@gmail.com>wrote:
Hi All,
the most up-to-date MethodWrappers I can find is for Squeak 3.9, pre-closures. Anyone have anything compatible with Squeak 4.1/4.2/Pharo 1.1/1.2/1.3?
-- best, Eliot
-- Mariano http://marianopeck.wordpress.com
-- best, Eliot
Note that now in Pharo, we have Ghost (on squeaksource) that allows proxifying (building proxy for) any object includling classes and methods. It can be used as a good alternative to method wrappers and encourages clean design by separating messages capturing (trap) and the processing. Noury On 14 sept. 2011, at 01:37, Eliot Miranda wrote:
On Tue, Sep 13, 2011 at 2:58 PM, Mariano Martinez Peck <marianopeck@gmail.com> wrote: Eliot, you can take a look to http://www.squeaksource.com/ObjectMetaTools
Package MethodWrapper. Do you mean the implementation that uses the #run:with:in ?
I'll take a look at this. I'd started looking at the older one.
If anyone's interested attached are changes that restore generateWith:using: that allow one to create instances of subclasses of CompiledMethod.
Cheers
On Tue, Sep 13, 2011 at 11:42 PM, Eliot Miranda <eliot.miranda@gmail.com> wrote: Hi All,
the most up-to-date MethodWrappers I can find is for Squeak 3.9, pre-closures. Anyone have anything compatible with Squeak 4.1/4.2/Pharo 1.1/1.2/1.3?
-- best, Eliot
-- Mariano http://marianopeck.wordpress.com
-- best, Eliot
<generateWith.st>
Noury Bouraqadi Ecole des Mines de Douai http://car.mines-douai.fr/noury http://twitter.com/#!/NouryBouraqadi -- -19èmes Journées Francophones sur les Systèmes Multi-Agents (JFSMAâ11) http://www.univ-valenciennes.fr/congres/jfsma2011/ 17-19 Octobre 2011, Valenciennes, France -5th International Conference on Smalltalk Technologies http://www.fast.org.ar November 3th - 5th, 2011 Universidad Nacional de Quilmes (Argentina)
Hi All, I'm getting on ok with updating the 3.9 code to 4.2 but there are a few uglies. This in particular is clear as mud: DF 4/19/2006 00:34 · MwMethodWrapper class methods for class initialization tweakClassFormat self setFormat: (self format bitOr: 16r200). Who is DF? What's the intent of this method? MwMethodWrapper is a subclass of CompiledMethod and so should have instSpec equal to CompiledMethod's instSpec (12/16rC). This sets it to 4 (WeakArray's). As far as I can see the above method is pointless. But how can I be sure. There's _no comment_ at all in this method. On Tue, Sep 13, 2011 at 2:42 PM, Eliot Miranda <eliot.miranda@gmail.com>wrote:
Hi All,
the most up-to-date MethodWrappers I can find is for Squeak 3.9, pre-closures. Anyone have anything compatible with Squeak 4.1/4.2/Pharo 1.1/1.2/1.3?
-- best, Eliot
-- best, Eliot
Hi All, does this test look right to you? Isn't the line "self assert:wrapper wasActive" just bogus? MwMethodWrapperTest>>testWasActive | wrapper | wrapper := self wrapperClass on: #methodOne inClass: MwClassA. self deny: wrapper wasActive. wrapper install. self deny: wrapper wasActive. wrapper uninstall. self assert: wrapper wasActive. self should: [wrapper install] raise: Error. On Tue, Sep 13, 2011 at 2:42 PM, Eliot Miranda <eliot.miranda@gmail.com>wrote:
Hi All,
the most up-to-date MethodWrappers I can find is for Squeak 3.9, pre-closures. Anyone have anything compatible with Squeak 4.1/4.2/Pharo 1.1/1.2/1.3?
-- best, Eliot
-- best, Eliot
On Sep 16, 2011, at 12:18 AM, Eliot Miranda wrote:
Hi All,
does this test look right to you? Isn't the line "self assert:wrapper wasActive" just bogus?
MwMethodWrapperTest>>testWasActive
| wrapper | wrapper := self wrapperClass on: #methodOne inClass: MwClassA. self deny: wrapper wasActive. wrapper install. self deny: wrapper wasActive. wrapper uninstall. self assert: wrapper wasActive.
^^^^^^^^^^^^^^ looks suspicious to me. I played a lot with the internals of MW on VW and I do not see this test as making sense.
self should: [wrapper install] raise: Error.
Similarly (may be this is the squeak/phaor implementation) but normally installing/uninstalling should be revertable without this last test.
On Tue, Sep 13, 2011 at 2:42 PM, Eliot Miranda <eliot.miranda@gmail.com> wrote: Hi All,
the most up-to-date MethodWrappers I can find is for Squeak 3.9, pre-closures. Anyone have anything compatible with Squeak 4.1/4.2/Pharo 1.1/1.2/1.3?
-- best, Eliot
-- best, Eliot
On Fri, Sep 16, 2011 at 11:08 AM, Stéphane Ducasse < stephane.ducasse@inria.fr> wrote:
On Sep 16, 2011, at 12:18 AM, Eliot Miranda wrote:
Hi All,
does this test look right to you? Isn't the line "self assert:wrapper wasActive" just bogus?
MwMethodWrapperTest>>testWasActive
| wrapper | wrapper := self wrapperClass on: #methodOne inClass: MwClassA. self deny: wrapper wasActive. wrapper install. self deny: wrapper wasActive. wrapper uninstall. self assert: wrapper wasActive.
^^^^^^^^^^^^^^ looks suspicious to me. I played a lot with the internals of MW on VW and I do not see this test as making sense.
self should: [wrapper install] raise: Error.
Similarly (may be this is the squeak/phaor implementation) but normally installing/uninstalling should be revertable without this last test.
Thanks! That makes sense to me too (and the final "self should: [wrapper install] raise: Error" does not raise an error with the current code).
On Tue, Sep 13, 2011 at 2:42 PM, Eliot Miranda <eliot.miranda@gmail.com>
wrote:
Hi All,
the most up-to-date MethodWrappers I can find is for Squeak 3.9, pre-closures. Anyone have anything compatible with Squeak 4.1/4.2/Pharo 1.1/1.2/1.3?
-- best, Eliot
-- best, Eliot
-- best, Eliot
participants (4)
-
Eliot Miranda -
Mariano Martinez Peck -
Noury Bouraqadi -
Stéphane Ducasse