15.7.3 Flow Control

Instructions are numbered sequentially, and the current position in the code is represented by an instruction pointer, which is just an integer. In the main execution loop in sp_head::execute(), this instruction pointer is represented by the local variable ip.

When executing each instruction, the method sp_head::execute() is also responsible to return the address of the next instruction to execute. Most of the time, this corresponds to the next instruction (implemented by m_ip+1), except for absolute jumps (see sp_instr_jump::execute()) or conditional jumps (see sp_instr_jump_if_not::execute()).

Download this Manual
EPUB - 0.8Mb
User Comments
Sign Up Login You must be logged in to post a comment.