[Vm-dev] Re: [Vm-beginners] From Window to Compiler evaluate:

Igor Stasenko siguctua at gmail.com
Mon May 7 22:25:33 UTC 2012


On 7 May 2012 18:37, Chris Cunnington <smalltalktelevision at gmail.com> wrote:
> How does the vm pass a string to the compiler in object memory to be
> evaluated?
>
> The VM works with the OS so that a window collects a string in UTF-8 or
> Unicode and send it to the compiler in the object memory in RAM.
>
> Date today
>
> becomes
>
> Compiler evaluate: 'Date today'
>
> I see in MicroSqueak
>
> Interpreter>>primitiveKbdPeek
>
> sends things to the stack. I understand something called 'the stack' they
> way understand unicorns.
>
> But is it true to say that the stack is a step on the way to the compiler in
> RAM?
>
> Window-->characters-->vm-->primitiveKbdPeek-->stack-->object
> memory-->compiler--> Compiler evaluate:-->bytecodes
>
> Then, after bytecodes have been generated, Interpreter>>interpret can do
> what it does. The output can make a trip back to the window going back the
> way it came.
>
> How accurate or inaccurate is this description?
>
Well, speaking of unicorns.. ;)

At OS level, VM listens for events, like key push/release, mouse move(s) etc.
It translates incoming events to own format and puts it into internal queue.
Then smalltalk side walking by, like a postman and picks up the queued events,
during its walk it decodes them and dispatching to own subsystem(s),
like MVC or Morphic, which ends up in some widget which represents text editor.
Once user pressing cmd-D (or alt-d) a text editor rides an unicorn
(with a cart loaded
by typed text) right to the compiler

;)


> Thanks,
> Chris
> _______________________________________________
> VM-beginners mailing list
> VM-beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners



-- 
Best regards,
Igor Stasenko.


More information about the Vm-dev mailing list