[Vm-dev] Question about process preemption during longJump

Guillermo Polito guillermopolito at gmail.com
Tue Apr 16 15:27:02 UTC 2013


Hi! I'm looking at some code from StackInterpreter, and the given piece of
code raised a question I cannot fully answer:

longUnconditionalJump
| offset |
offset := (((currentBytecode bitAnd: 7) - 4) * 256) + self fetchByte.
localIP := localIP + offset.
(offset < 0 "backward jump means we're in a loop; check for possible
interrupts"
 and: [*localSP < stackLimit*]) ifTrue:
[self externalizeIPandSP.
 self checkForEventsMayContextSwitch: true.
 self browserPluginReturnIfNeeded.
 self internalizeIPandSP].
self fetchNextBytecode

What does the (localSP < stackLimit) condition stand for? What is its
intention when deciding to make (or not) a context switch?

Tx,
Guille
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20130416/d4ff567e/attachment.htm


More information about the Vm-dev mailing list