Hi guys. I am experimenting with something that creates proxies automatically and become existing objects to those proxies. The objects I become with proxies are selected kind of automatically and they can be instances of any class. I have a list of classes that I don&#39;t become their instances since it seems I can easily crash the VM (such as SmallIntegers, Characters, Symbols, etc).  Now...with mi proxy implementation I can intercept almost all messages, so I don&#39;t have a problem with that. What I am thinking now is the problem of proxies that are passed as arguments to primitives. My question is if there can be primitives that assumes the type of the argument and do something directly. So if I send a proxy that doesn&#39;t respect the expected shape...it can answer something wrong or even crash. Another possibility is that the primitive fails normally (primitiveFailure) but then that there is no smalltalk code after the primitive invocation (I guess not all methods that use a primitive has the correct smalltalk code after).<br>
So.... Is this possible?  do you have an example? <br><br>Now the second question is which are mostly the types of arguments? as much as I could see they are most of the times SmallInteger, Characters, Symbols, etc., which I do not become anyway. Do you have a list of more types that could bother me? for example what about Points, Bitmaps, Color, Process, etc.?<br>
<br>I was thinking also that if I can tag proxies (say I can mark a bit in the object header) then I could modify the place of the VM that dispatch primitives and check that all arguments are proxies and otherwise do a primitive failure... but again, I am not sure all smalltalk code after primitives is correct..<br clear="all">
<br>Thanks in advance,<br><br>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br><br>