Re: [Pharo-project] MethodWrappers
On Sep 21, 2011, at 12:59 PM, Frank Shearar wrote:
On 21 September 2011 11:48, Torsten Bergmann <astares@gmx.de> wrote:
Hi Eliot,
at [1] you mentioned a port of MethodWrappers to Squeak 4.2. Is there also a port for Pharo available or do you plan to port it?
For those who dont know about MethodWrappers: look at [2]
And if you're wondering why on Earth you'd want them, take a look at SUnit's TestCoverage class for a use case.
But that is working in Pharo already, isn't it? Using the MethodWrapper version that is based on Object-As-Methods, as far as I know. Marcus -- Marcus Denker -- http://marcusdenker.de
On 21 September 2011 12:26, Marcus Denker <marcus.denker@inria.fr> wrote:
On Sep 21, 2011, at 12:59 PM, Frank Shearar wrote:
On 21 September 2011 11:48, Torsten Bergmann <astares@gmx.de> wrote:
Hi Eliot,
at [1] you mentioned a port of MethodWrappers to Squeak 4.2. Is there also a port for Pharo available or do you plan to port it?
For those who dont know about MethodWrappers: look at [2]
And if you're wondering why on Earth you'd want them, take a look at SUnit's TestCoverage class for a use case.
But that is working in Pharo already, isn't it?
Using the MethodWrapper version that is based on Object-As-Methods, as far as I know.
Indeed - I didn't mean to suggest that TestCoverage uses MethodWrappers the library, just that it uses the concept of method wrappers. (What it does is replace the existing CompiledMethods in a class' method dictionary with a TestCoverage instance proxying the CompiledMethod. When you run that method, you set a flag in the TestCoverage instance. After you've calculated the package tests' coverage, it uninstalls itself by replacing itself with the original CompiledMethod in the class' method dictionary.) frank
    Marcus
-- Marcus Denker -- http://marcusdenker.de
Marcus Denker-4 wrote
On 21 September 2011 11:48, Torsten Bergmann <astares@> wrote:
at [1] you mentioned a port of MethodWrappers to Squeak 4.2. Is there also a port for Pharo available or do you plan to port it? But that is working in Pharo already, isn't it?
Most of the tests pass in both 1.4 and 2.0. The only failure, #testNoProtoInstanceCount, is a test that does not make sense to me (I think it should fail) and the ~6 errors are due to a missing MethodNode>>ensureNotQuick, which doesn't exist in Squeak 4.2 either Also, Gofer does not like packages with dots in the name, so one has to write "MethodWrappers4.2-eem.25" "MethodWrappers4", not "MethodWrappers4.2". I'm guessing this will fall apart when "MethodWrappers4.3" is released... Gofer it squeaksource: 'MethodWrappers'; package: 'MethodWrappers4'; load. Sean -- View this message in context: http://forum.world.st/MethodWrappers-tp3829576p4601624.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
participants (3)
-
Frank Shearar -
Marcus Denker -
Sean P. DeNigris