3 ms·
It uses a small-step interpreter [1]. Rather than capturing the interpreter's state on the native call stack, small-step interpreters explicitly model said stat
by jaz303 12y ago
It uses a small-step interpreter [1]. Rather than capturing the interpreter's state on the native call stack, small-step interpreters explicitly model said state using stacks of objects - one per active AST node - and environments. Because they're no longer bound to the stack of the implementation language, execution may be cycled, paused and resumed at will.
[1] http://matt.might.net/articles/writing-an-interpreter-substitution-denotational-big-step-small-step/ http://matt.might.net/articles/writing-an-interpreter-substi...