A Contextual Account of Staged Computations