remove @call-with-current-continuation memoizer
[bpt/guile.git] / libguile / memoize.h
1 /* classes: h_files */
2
3 #ifndef SCM_MEMOIZE_H
4 #define SCM_MEMOIZE_H
5
6 /* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2004,2008,2009,2010,2011,2013
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
32 SCM_API SCM scm_sym_and;
33 SCM_API SCM scm_sym_begin;
34 SCM_API SCM scm_sym_case;
35 SCM_API SCM scm_sym_cond;
36 SCM_API SCM scm_sym_define;
37 SCM_API SCM scm_sym_do;
38 SCM_API SCM scm_sym_if;
39 SCM_API SCM scm_sym_lambda;
40 SCM_API SCM scm_sym_let;
41 SCM_API SCM scm_sym_letstar;
42 SCM_API SCM scm_sym_letrec;
43 SCM_API SCM scm_sym_quote;
44 SCM_API SCM scm_sym_quasiquote;
45 SCM_API SCM scm_sym_unquote;
46 SCM_API SCM scm_sym_uq_splicing;
47 SCM_API SCM scm_sym_with_fluids;
48
49 SCM_API SCM scm_sym_at;
50 SCM_API SCM scm_sym_atat;
51 SCM_API SCM scm_sym_at_call_with_values;
52 SCM_API SCM scm_sym_delay;
53 SCM_API SCM scm_sym_at_dynamic_wind;
54 SCM_API SCM scm_sym_eval_when;
55 SCM_API SCM scm_sym_arrow;
56 SCM_API SCM scm_sym_else;
57 SCM_API SCM scm_sym_apply;
58 SCM_API SCM scm_sym_set_x;
59 SCM_API SCM scm_sym_args;
60
61 /* {Memoized Source}
62 */
63
64 SCM_INTERNAL scm_t_bits scm_tc16_memoized;
65
66 #define SCM_MEMOIZED_P(x) (SCM_SMOB_PREDICATE (scm_tc16_memoized, (x)))
67 #define SCM_MEMOIZED_TAG(x) (SCM_SMOB_FLAGS (x))
68 #define SCM_MEMOIZED_ARGS(x) (SCM_SMOB_OBJECT (x))
69
70 enum
71 {
72 SCM_M_SEQ,
73 SCM_M_IF,
74 SCM_M_LAMBDA,
75 SCM_M_LET,
76 SCM_M_QUOTE,
77 SCM_M_DEFINE,
78 SCM_M_DYNWIND,
79 SCM_M_WITH_FLUIDS,
80 SCM_M_APPLY,
81 SCM_M_CONT,
82 SCM_M_CALL_WITH_VALUES,
83 SCM_M_CALL,
84 SCM_M_LEXICAL_REF,
85 SCM_M_LEXICAL_SET,
86 SCM_M_TOPLEVEL_REF,
87 SCM_M_TOPLEVEL_SET,
88 SCM_M_MODULE_REF,
89 SCM_M_MODULE_SET,
90 SCM_M_CALL_WITH_PROMPT
91 };
92
93
94 \f
95
96 SCM_INTERNAL SCM scm_memoize_expression (SCM exp);
97 SCM_INTERNAL SCM scm_unmemoize_expression (SCM memoized);
98 SCM_INTERNAL SCM scm_memoized_expression_typecode (SCM memoized);
99 SCM_INTERNAL SCM scm_memoized_expression_data (SCM memoized);
100 SCM_INTERNAL SCM scm_memoized_typecode (SCM sym);
101 SCM_INTERNAL SCM scm_memoize_variable_access_x (SCM memoized, SCM module);
102 SCM_API SCM scm_memoized_p (SCM obj);
103
104 SCM_INTERNAL void scm_init_memoize (void);
105
106
107 #endif /* SCM_MEMOIZE_H */
108
109 /*
110 Local Variables:
111 c-file-style: "gnu"
112 End:
113 */