interpret loop termination and localIP

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

interpret loop termination and localIP

K K Subbu
 
Hi,

In CogVMSimulator>>interpret method:
-----
        self fetchNextBytecode.
        [true] whileTrue:
                [self assertValidExecutionPointers.
                 atEachStepBlock value. "N.B. may be nil"
                 self dispatchOn: currentBytecode in: BytecodeTable.
                 self incrementByteCount].
        localIP := localIP - 1.  "undo the pre-increment of IP before returning"
-----
Under what conditions will the loop terminate?

If it terminates, the following statement assumes that the last
instruction was a single-byte bytecode and no extended multi-byte
instructions were involved. Is this fortuitous or by design?

Thanks and Regards .. Subbu