[Vm-dev] interpret loop termination and localIP

K K Subbu kksubbu.ml at gmail.com
Wed May 20 06:40:16 UTC 2020


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


More information about the Vm-dev mailing list