Add RC_FRAME type and properly restore RC on exception.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>