[squeak-dev] step through VM source
K. K. Subramaniam
subbukk at gmail.com
Mon Jul 27 16:43:49 UTC 2009
On Monday 27 Jul 2009 4:21:35 pm Ang Beepeng wrote:
> I was looking at Croquet VM source code and stepping through the code. It
> seems like the interpret() loops forever, while I expect to find a point
> where it finished initialization and wait for user input.
In the interpret() loop, input events are handled by bytecodes (see
primitiveKbdNext, primitiveKbdPeek, primitiveMouseButtons,
primitiveInputSemaphore, primitiveGetNextEvent, primitiveInputWord).
When primitiveQuit bytecode is encountered, VM terminates itself by calling
exit functions in the display module (see ioExit()).
> I know that it loops forever, but what is the VM doing before it gets any
> input from the user?
It starts interpreting bytecodes from last snapshot point. See
primitiveSnapshot().
HTH .. Subbu
More information about the Squeak-dev
mailing list
|