>>4
I thought of something. The compiler should be able to determine a lower bound for how many stack slots will be popped, and how many will be pushed, for any word defined in terms of primitives with known variable stack effects. It could do something as simple as inserting runtime checks before and after these primitives based on the requirements of whatever precedes and follows the variable effect. Not foolproof, but at least it moves a stack underflow error closer to the word that causes it.