[virtmach] Your VM

Thaddaeus Frogley virtmach@iecc.com
Wed, 30 May 2001 13:36:45 +0100


> apart from speed considerations, i recently came across a useful reason
> for implementing as an array of function pointers rather than a switch
> statement: the core execution loop is very small, so it's possible to
> have alternative execution loops for very little cost.
> 
> the Inferno VM uses this to implement single-step/breakpoint debugging
> - a process being debugged uses an alternative core execution function;
> others use the usual one (which is only 22 lines of code).

Exactly!  :)

The Beasts VM has 3 core loops, one each for "standard", "debug" and
"profile"!

Thad

---
Thaddaeus Frogley
thaddaeus.frogley@creaturelabs.com
http://www.photo.net/users/Thad
Beasts Team, Creature Labs Ltd
http://www.creaturelabs.com/