Hi folks. I need to intercept all messages. For such purpose, I modified Interpreter >> normalSend like this:<br><br><br>normalSend<br> "Send a message, starting lookup with the receiver's class."<br>
"Assume: messageSelector and argumentCount have been set, and that <br> the receiver and arguments have been pushed onto the stack,"<br> "Note: This method is inlined into the interpreter dispatch loop."<br>
| rcvr |<br> self inline: true.<br> self sharedCodeNamed: 'normalSend' inCase: 131.<br> rcvr := self internalStackValue: argumentCount.<br> <span style="background-color: rgb(255, 255, 51);"> (self isIntegerObject: rcvr)</span><br style="background-color: rgb(255, 255, 51);">
<span style="background-color: rgb(255, 255, 51);"> ifFalse: [ </span><br style="background-color: rgb(255, 255, 51);"><span style="background-color: rgb(255, 255, 51);"> self doSomething: rcvr.</span><br style="background-color: rgb(255, 255, 51);">
<span style="background-color: rgb(255, 255, 51);"> ].</span><br> lkupClass := self fetchClassOf: rcvr.<br> receiverClass := lkupClass.<br> self commonSend.<br><br><br><br>But now, from the IMAGE side I would like to enable or disable such intercept. It would be great if from the Image side I can set a value to a boolean and read such value and ask, from the VM side. <br>
<br>Do you know if I can do this? Should I use specialObjectArray ? If true, can you give me a hint of how to do it ?<br><br>Thank you very much.<br><br>Mariano<br>