I wanted to do something like playback::context::compile, but in my project I can't really reuse all the JIT code -- really I just wanted to be able to use toplev_main and toplev_finalize.
Looking into the code, though, I saw a few spots that could be cleaned up a little, so I wouldn't have to worry as much about keeping my hacks in sync with the JIT branch. The first patch here changes the toplev code into a class and arranges for the timevars to be managed there. The second patch just introduces scoped timevars to make them less error-prone to use. I built and tested this using the JIT test suite. Let me know what you think, Tom