[ENH] RE: Does #class deserve to be a very-special shortcut bytecode anymore?

Rob Withers rwithers12 at mediaone.net
Sun Jan 6 00:38:22 UTC 2002


At 02:22 PM 1/5/2002, you wrote:
>I don't think I 've ever come across a proxying scheme that really
>worked completely; there's always some awkard balancing act to try to
>cope with basic messages either refering to the proxy or the proxant (my
>new word for the thing the proxy is proxying for. A license to use this
>word can be obtained from my business agents, 'Dewey, Cheatham and Howe')
>and what do you do to get to the 'other side'... Somebody somewhere must
>have really got it right but I've never had the priviledge of working
>with it.

Tim,

This certainly isn't the solution for a good proxy, but I am intrigued by 
it's usefulness as a filter on sending messages to an Oop.  I am thinking 
that this would be useful for Security, if I can only get the correct Mixin 
behavior.  So, this defines a MessageRedirector class, which is a compact 
class.   When you enable redirection (a vm call) it registers the ccIndex 
and in lookupMethodInClass it checks whether receiver oop is a 
MessageRedirector.  If it is, it sends the well known message 
#redirectMessage: to the object in the first slot of the redirector.  It 
does this for all messages, especially now that we fixed the 
bytecodePrimClass/bytecodePrimEquivalent methods.

The must have system methods are set using a very poor mixin pattern.  I 
have an auxilliary methodDictionary which compiles basemethodStrings in the 
scope of the RedirectorContext class.  I also included TestCases.

rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MessageRedirectors.18.cs
Type: application/octet-stream
Size: 55869 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020105/eeb6906f/MessageRedirectors.18.obj


More information about the Squeak-dev mailing list