UnwindDoc.tioga
Copyright Ó 1990 by Xerox Corporation. All rights reserved.
Chauser, May 21, 1990 3:57 pm PDT
Portable Cedar Runtime Support Documentation
CEDAR 7.0 — FOR INTERNAL XEROX USE ONLY
PCedar Unwind Support Documentation
Carl Hauser
© Copyright 1987 Xerox Corporation. All rights reserved.
Abstract: Fast, general, interoperable handling of active UNWIND processing for programs running on the PCedar RuntimeSupport layer.
Created by: Carl Hauser, Pavel Curtis
Maintained by: Carl Hauser <CHauser.pa>
Keywords: Exceptions, UNWIND
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
1. Introduction
Languages other than Cedar may require exception handling. Mixed Cedar and other language calling requires a common exception handler stack to make it work right. We think we understand the UNWIND component of this sufficiently well that we can define it as a common mechanism for all languages. What is not clear is how it integrates, in general, with the other parts of various language's exception mechanisms.
The operations are:
extern void
XR←PushUnwinder(XR←MesaProc);
/*
 Push the given proc onto the unwinder stack.
*/

extern void
XR←PopUnwinder(XR←MesaProc);
/*
 Remove and discard the top element of the unwinder stack.
 Signal an error if it is not the given proc.
*/

extern XR←UnwindCookie
XR←GetUnwinderContext();
/*
 Returns a magic cookie representing the current stack of unwinders.
*/

extern void
XR←UnwindTo(XR←UnwindCookie);
/*
 Invokes all of the unwinders in [XR←GetUnwinderContext()..argument)
 Each unwinder is removed the stack just before it is invoked.
*/