REPL Server: Don't establish a SIGINT handler.
[bpt/guile.git] / libguile / memoize.h
CommitLineData
b7742c6b
AW
1/* classes: h_files */
2
3#ifndef SCM_MEMOIZE_H
4#define SCM_MEMOIZE_H
5
d69531e2 6/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2004,2008,2009,2010
b7742c6b
AW
7 * Free Software Foundation, Inc.
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 3 of
12 * the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 * 02110-1301 USA
23 */
24
25\f
26
27#include "libguile/__scm.h"
28
29
30\f
31
32SCM_API SCM scm_sym_and;
33SCM_API SCM scm_sym_begin;
34SCM_API SCM scm_sym_case;
35SCM_API SCM scm_sym_cond;
36SCM_API SCM scm_sym_define;
37SCM_API SCM scm_sym_do;
38SCM_API SCM scm_sym_if;
39SCM_API SCM scm_sym_lambda;
40SCM_API SCM scm_sym_let;
41SCM_API SCM scm_sym_letstar;
42SCM_API SCM scm_sym_letrec;
43SCM_API SCM scm_sym_quote;
44SCM_API SCM scm_sym_quasiquote;
45SCM_API SCM scm_sym_unquote;
46SCM_API SCM scm_sym_uq_splicing;
bb0229b5 47SCM_API SCM scm_sym_with_fluids;
b7742c6b
AW
48
49SCM_API SCM scm_sym_at;
50SCM_API SCM scm_sym_atat;
51SCM_API SCM scm_sym_atapply;
52SCM_API SCM scm_sym_atcall_cc;
53SCM_API SCM scm_sym_at_call_with_values;
747022e4 54SCM_API SCM scm_sym_at_prompt;
b7742c6b 55SCM_API SCM scm_sym_delay;
d69531e2 56SCM_API SCM scm_sym_at_dynamic_wind;
b7742c6b
AW
57SCM_API SCM scm_sym_eval_when;
58SCM_API SCM scm_sym_arrow;
59SCM_API SCM scm_sym_else;
60SCM_API SCM scm_sym_apply;
61SCM_API SCM scm_sym_set_x;
62SCM_API SCM scm_sym_args;
63
64/* {Memoized Source}
65 */
66
67SCM_INTERNAL scm_t_bits scm_tc16_memoized;
68
69#define SCM_MEMOIZED_P(x) (SCM_SMOB_PREDICATE (scm_tc16_memoized, (x)))
70#define SCM_MEMOIZED_TAG(x) (SCM_SMOB_FLAGS (x))
71#define SCM_MEMOIZED_ARGS(x) (SCM_SMOB_OBJECT (x))
72
73enum
74 {
75 SCM_M_BEGIN,
76 SCM_M_IF,
77 SCM_M_LAMBDA,
78 SCM_M_LET,
79 SCM_M_QUOTE,
80 SCM_M_DEFINE,
d69531e2 81 SCM_M_DYNWIND,
bb0229b5 82 SCM_M_WITH_FLUIDS,
b7742c6b
AW
83 SCM_M_APPLY,
84 SCM_M_CONT,
85 SCM_M_CALL_WITH_VALUES,
86 SCM_M_CALL,
87 SCM_M_LEXICAL_REF,
88 SCM_M_LEXICAL_SET,
89 SCM_M_TOPLEVEL_REF,
90 SCM_M_TOPLEVEL_SET,
91 SCM_M_MODULE_REF,
747022e4
AW
92 SCM_M_MODULE_SET,
93 SCM_M_PROMPT
b7742c6b
AW
94 };
95
96
97\f
98
99SCM_INTERNAL SCM scm_memoize_expression (SCM exp);
100SCM_INTERNAL SCM scm_unmemoize_expression (SCM memoized);
3149a5b6
AW
101SCM_INTERNAL SCM scm_memoized_expression_typecode (SCM memoized);
102SCM_INTERNAL SCM scm_memoized_expression_data (SCM memoized);
103SCM_INTERNAL SCM scm_memoized_typecode (SCM sym);
104SCM_INTERNAL SCM scm_memoize_variable_access_x (SCM memoized, SCM module);
b7742c6b
AW
105SCM_API SCM scm_memoized_p (SCM obj);
106
107SCM_INTERNAL void scm_init_memoize (void);
108
109
110#endif /* SCM_MEMOIZE_H */
111
112/*
113 Local Variables:
114 c-file-style: "gnu"
115 End:
116*/