[Vm-dev] How to access Interpreter code from plugin?

Andreas Raab andreas.raab at gmx.de
Wed Oct 13 18:19:19 UTC 2010


On 10/13/2010 10:44 AM, Mariano Martinez Peck wrote:
> On Wed, Oct 13, 2010 at 7:27 PM, Andreas Raab <andreas.raab at gmx.de
> <mailto:andreas.raab at gmx.de>> wrote:
>
>
>     On 10/13/2010 9:52 AM, Mariano Martinez Peck wrote:
>
>         On Wed, Oct 13, 2010 at 6:31 PM, Igor Stasenko
>         <siguctua at gmail.com <mailto:siguctua at gmail.com>
>         <mailto:siguctua at gmail.com <mailto:siguctua at gmail.com>>> wrote:
>
>
>             Hi, Mariano.
>
>             I don't understand, why you need to dive into specific
>         primitive(s),
>             while you can simply place a hook before entering any primitive
>
>
>         is there a way to do this in a genera way or I need to do it
>         manually
>         for each primitive?
>
>
>     FWIW, it's questions like these that make people wonder if you've
>     done your homework.
>
>
> Is it so hard to answer in a ploite way??

I apologize if my response seemed impolite. I'm actually trying to help 
you. It's futile to attempt what you're trying to do without spending 
some time reading the blue book, reading the chapter in the Nublu book, 
and playing with the interpreter and the simulator. The questions you 
are asking are often so basic that they *are* actually covered in the 
available documentation.

> If you read my first line of the email says "Hi. Sorry if the question
> is newbie. I am still reading the blue book, so in case this is
> explained there I would just appreciate a link to it. "
>
> is it really hard to understand and simply answer page 620 ?

Please read this, it might explain a few things:

http://www.catb.org/esr/faqs/smart-questions.html

Cheers,
   - Andreas

>
> Anyway, those were not my original questions.
>
> Thanks
>
> Mariano
>
>     The precise question is answered on page 620 of the blue book.
>
>     Cheers,
>       - Andreas
>
>
>             and
>             mark all objects, which passed as parameters
>             (receiver & args) as 'used', and then call primitive function?
>
>
>         The problem is that not all of them are "used" in all
>         primitives. Just
>         as an example, #bytecodeNew:
>
>         bytecodePrimNew
>
>              messageSelector := self specialSelector: 28.
>              argumentCount := 0.
>              self normalSend.
>
>         I don't want to trace the receiver there, but it is really not used
>         there. I will trace it in #normalSend.
>         Or sometimes a primitive fails because one of the arguments is
>         more than
>         32bits or because it is not smallInteger or whatever...I don't
>         want to
>         mark them as used just for being a parameter. I want to mark
>         them when
>         they are really used by the VM.
>
>         I want to avoid as much as overhead as possible.
>
>         Right now I put the tracing in #normalSend, but then I modifed some
>         bytecodes like those for #class or #== since they were not going
>         throught normal send.
>
>         Thanks
>
>         Mariano
>
>


More information about the Vm-dev mailing list