Structure of the Transterpreter (in brief)
Posted in Uncategorized on September 12th, 2011 by williaz – Be the first to commentAt the highest level a TVM is a very simple program. All it does is fetch the next tvm byte code (TBC) instruction from memory, call the corresponding c function, and increment the instruction counter. The whole system has several parts, one of these is the wrapper, which is the connection between the tvm and the current system. In the code a TVM is essentially just an execution context, which is a c struct initialized in the wrapper. The execution context holds pointers to many things including the instruction pointer, pointers to the scheduling queue, pointers to workspaces in memory, as well as many other necessary components. Once a context is initialized, which includes setting a pointer to the TBC in memory, the transterpreter enters a loop with with a given context and begins the fetch, call increment cycle.