Replace frame pointers with a vector buffer.

This is a work in progress, and there are some bugs.