On 5 May 2011 01:59, Johan Fabry <jfabry@dcc.uchile.cl> wrote:
On 04 May 2011, at 17:30, Stéphane Ducasse wrote:
mariano got a really nice proxy model based on the stratified proxy of igor (which is in 1.3).
Question: could this be used for PHANtom? We are now using Methodwrappers but there are some issues (fixed in PHANtom). Mariano, Igor, can you explain the advantages of your model wrt methodwrappers?
Sorry i'm not familiar with methodwrappers. The basic model is separation of proxy and handler. Proxy acts only as a message trap, while handler is actually responsible for handling messages trapped by proxy. Mariano builds on top of that, because he wants to replace classes and/or methods with proxies, and this requires a special handling (class proxy should obey VM-specific Behavior format, and method proxy should implement #run:in:as: when installed in method dictionary ). So, i guess that proxies which representing compiled methods could act similar to method wrappers. But of course you still have to implement all intall/deinstall management et al.. The only advantage of new proxies comparing to usual proxies based on #DNU pattern that they guarantee a clear separation between meta-levels, i.e. even if you send #doesNotUnderstand: message to a proxy, this message will be trapped and handled by handler as any other. -- Best regards, Igor Stasenko AKA sig.