File: stack.h

package info (click to toggle)
rscheme 0.7.2-1.1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 10,672 kB
  • ctags: 12,430
  • sloc: lisp: 37,104; ansic: 29,763; cpp: 2,630; sh: 1,677; makefile: 568; yacc: 202; lex: 175; perl: 33
file content (37 lines) | stat: -rw-r--r-- 1,221 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*-----------------------------------------------------------------*-C-*---
 * File:    handc/runtime/stack.h
 *
 *          Copyright (C)1997 Donovan Kolbly <d.kolbly@rscheme.org>
 *          as part of the RScheme project, licensed for free use.
 *          See <http://www.rscheme.org/> for the latest information.
 *
 * File version:     1.4
 * File mod date:    1997.11.29 23:10:49
 * System build:     v0.7.2, 97.12.21
 *
 * Purpose:          continuation stack interface
 *------------------------------------------------------------------------*/

#ifndef _H_STACK
#define _H_STACK

/************************ NOT using a stack cache ************************/

CIH_DECL bool in_stack_cache( obj value );
CIH_DECL void flush_stack_cache( void );
CIH_DECL void init_stack_cache( void );

void push_cont( jump_addr label, unsigned reg_space );

#define SET_PARTCONT_REG(reg,value) gvec_write_fresh( \
			continuation_reg, SLOT((reg)+CONT_FIXED), value )
#define PUSH_PARTCONT_ADDR(addr,space) push_cont(addr,space)
#define PARTCONT_REF(i) gvec_read(continuation_reg,SLOT(i))

unsigned restore_arb( void );		/* restore run-time dep't # regs */

#ifdef INLINES
#include <rscheme/stack.ci>
#endif

#endif /* _H_STACK */