Compute value stack sizes at compile time