/* StackFrame.h             -*-objc-*-
 *
 * Copyright Niels Möller <nisse@lysator.liu.se> 1995
 *
 * Freely distributable under the terms and conditions of the
 * GNU General Public License.
 */

#ifndef STACKFRAME_H_INCLUDED
#define STACKFRAME_H_INCLUDED

#include <objc/Object.h>
#include <frame_stack.h>

@interface StackFrame : Object
{
  frame_id frame;
}
+ (void) c_init; /* Dummy method, used to make sure the stack is
		  * initialized. */
+ cleanupOnExit: (BOOL) flag;
+ (frame_id) pushCatch: object;  /* Requires a SETJMP() to take effect. */
+ (frame_id) pushCleanupSending: (SEL) selector to: reciever;
+ (frame_id) pushCleanupCall: (void (*)(void)) function;
+ (frame_id) pushCleanupCall: (void (*)(void *)) function with: (void *) arg;
+ (frame_id) pushCleanup_jmp;    /* Requires a SETJMP() to take effect. */
+ (void) unwindContinue: (frame_id) target;
+ (frame_id) findFrameMatching: object;
+ (void) unwind: (frame_id) target pleaseReturn: (BOOL) flag;
+ (void) freeFrame: (frame_id) frame;
+ (void) jumpToFrame: (frame_id) target;
- rawFree;     /* Just free, without any cleanup */
- (void) cleanup;

/* TRUE if this frame matches OBJECT, which is a catch tag or
 * an error object. That the frame type is appropriate is checked
 * before this message is sent. */
- (BOOL) matches: object;
@end /* StackFrame */

#endif STACKFRAME_H_INCLUDED

