let compute f cc =
    try push f ; cc f ; pop f ;
    with error -> pop f ; raise error