Not really. Naively doing something like that will kill performance, not to mention that you have to be really careful not to mess up inserting setTimeout calls.
Stopify reifies the runtime stack and occasionally yields to the browser through a setTimeout call. Once the yields back control, it can restore the stack and resume computation.
Just? What do you think the callbacks are that you supply to those calls?
evalNextLine which would call the interpreter.
Stopify is a JS-to-JS compiler. It performs a lot better than a JS-in-JS interpreter could.