Staged allocation: a compositional technique for specifying and implementing procedure calling conventions