Hi. There is something I don&#39;t understand about #cannotInterpret and maybe you can help me. Since I am not sure if this is more image side or vm, I did a cross post, sorry for that.<br>Context: I am implementing proxies for classes. Since I want that a proxy loads back the original object when receiving the message #class, I have removed from the compiler the shortcut bytecode for class, with this:<br>
<br>(ParseNode classVarNamed:  &#39;StdSelectors&#39;) removeKey: #class ifAbsent: [].<br><br>Now, my testcase is something like this:<br><br>    | inst proxy |<br>    &quot;This is the simplest test that does the less assert as possible.&quot;<br>
    inst := ClassWith1Var new.<br>    self assert: inst foo = &#39;foo&#39;.<br>    proxy := ClassProxyInstVar new.<br>    proxy become: ClassWith1Var.<br>    &quot;here I can send any message, it is just to load back the original class&quot;<br>
    inst basicIdentityHash.<br>    self assert: (inst class == ClassWith1Var).<br>    self assert: inst foo = &#39;foo&#39;.<br><br><br>ProtoObject subclass: #ClassProxyInstVar<br>    instanceVariableNames: &#39;superclass methodDict format actualClass&#39;<br>
    classVariableNames: &#39;&#39;<br>    poolDictionaries: &#39;&#39;<br>    category: &#39;Proxies&#39;<br><br><br>ClassProxyInstVar &gt;&gt; initialize<br>    super initialize.<br>    superclass := ProxySuperclass.<br>
    methodDict := nil.<br>    actualClass := self<br><br><br>So...with this i can use an instance of ClassProxyInstVar like a class. When an instance of the class receives a message, the methodDict will be in nil, and then the VM will send the #cannotInterpret. and there I want to put back the original class. Then I do:<br>
<br>ProxySuperclass &gt;&gt; cannotInterpret: aMessage<br>    Transcript cr; <br>        show: &#39;cannotInterpret:&#39;;<br>        space;<br>        show: aMessage selector..<br>    self class restore.<br>    ^aMessage sendTo: self<br>
<br>Now, this is working, but there is something I DO NOT UNSERSTAND. When I try to do the &quot;inst basicIdentityHash&quot; the VM will send the #cannotInterpret to ProxySuperclass because the methodDict was nil in ClassProxyInstVar. Ok, perfect. What I don&#39;t understand is how the method #cannotInterptet can be run perfeclty in this case, since I am doing a &quot;self class restore&quot; there. Remember I removed the shortcut bytecode, so #class is sent like any normal message. So, my question is, when sending &quot;self class&quot;, why the VM doesn&#39;t call #cannotInterpter again like it did it when I did &quot;   inst basicIdentityHash.&quot;  ?  in other words...why the VM isn&#39;t entering in a loop ?   There is something I am not seeing.<br>
<br>Thanks for any help in advance,<br><br>Mariano<br>