I was wondering ...
Lawson English
english at primenet.com
Fri Jun 25 08:07:36 UTC 1999
Christian Brunschen <cb at df.lth.se> said:
> How would one handle a message which, in Squeak, takes an Integer ?
>You'd want it to take a C 'int' on the Objective-C side, and translate
>that to a Squeak Integer in the process of forwarding. But that also means
>that the SqueakProxy would have to be able to extract this information -
>'parameter no. 4 is an Integer, so we take in an 'int' from Objective-C' -
>from the Squeak object it stands for...
> This can obviously be 'solved' by annotating Squeak methods with type
>information, but that doesn't feel like a good solution.
> Any ideas, other than asking Apple to rewrite the compiler so that type
>information is saved on the call stack as well? ;)
When an object that is to be referenced by SqueakProxy is initialized, it
attempts to register its relevant methods' parameter-lists with
SqueakProxy, which keeps a list of unique references to each class's
methods' parameter-list(s). After that, every time an instance of a given
class evokes SqueakProxy, it is automatically assigned a reference to the
correct parameter-list(s) and SqueakProxy keeps track of what is what when
passing parameters around.
Reference counting is done by SqueakProxy, and when the count hits zero,
the parameter-list(s) are deleted.
----------------------------------------------------------------------
Use your imagination.
----------------------------------------------------------------------
More information about the Squeak-dev
mailing list
|