Go to the first, previous, next, last section, table of contents.

Stacks and Frames

When a running program is interrupted, usually upon reaching an error or breakpoint, its state is represented by a stack of suspended function calls, each of which is called a frame. The programmer can learn more about the program's state at the point of interruption by inspecting and modifying these frames.

primitive: stack? obj
Return #t if obj is a calling stack.

primitive: make-stack

syntax: start-stack id exp
Evaluate exp on a new calling stack with identity id. If exp is interrupted during evaluation, backtraces will not display frames farther back than exp's top-level form. This macro is a way of artificially limiting backtraces and stack procedures, largely as a convenience to the user.

primitive: stack-id stack
Return the identifier given to stack by start-stack.

primitive: stack-ref

primitive: stack-length

primitive: frame?

primitive: last-stack-frame

primitive: frame-number

primitive: frame-source

primitive: frame-procedure

primitive: frame-arguments

primitive: frame-previous

primitive: frame-next

primitive: frame-real?

primitive: frame-procedure?

primitive: frame-evaluating-args?

primitive: frame-overflow

Go to the first, previous, next, last section, table of contents.