[vm] Re-do the vm statics in C++.

Otherwise, they mess up stack traces.