[squeak-dev] Tracing proxies
Chris Muller
ma.chris.m at gmail.com
Thu May 26 19:12:22 UTC 2011
>> If so, that's very nicely elegant. At first, I was hoping this
>> approach would allow Magma a chance to handle the problem of passing a
>> proxy to a primitive, rather than the user having to send a #yourself,
>> but it doesn't look like it would help for that.
>
> If we add this package to the Trunk, then we will be able to identify these
> kind of proxies in the arguments of primitive calls when they fail and retry
> the primitive with the real objects. This should help in most cases.
I'm not opposed to adding this package to trunk, but I guess we could
do that even if we didn't add it trunk by sending #yourself couldn't
we? For example, for Object>>#perform:
perform: aSymbol
"Send the unary selector, aSymbol, to the receiver.
Fail if the number of arguments expected by the selector is not zero.
Primitive. Optional. See Object documentation whatIsAPrimitive."
<primitive: 83>
^ self perform: aSymbol yourself withArguments: (Array new: 0)
Would would the solution look like (approximately) using
stratified-proxys approach? I thought this is nice because it doesn't
necessarily assume the primitive failed because aSymbol was a proxy..
Whatever the solution, I am ready to do something soon; I have several
#yourself sends sprinkled throughout my code to avoid the situation,
which is annoying.
More information about the Squeak-dev
mailing list
|