Convert emit-linear-dispatch to use match
[bpt/guile.git] / libguile / eval.h
... / ...
CommitLineData
1/* classes: h_files */
2
3#ifndef SCM_EVAL_H
4#define SCM_EVAL_H
5
6/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2003,2004,2008,2009,2010,2011,2012
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#include "libguile/struct.h"
30#include "libguile/memoize.h"
31
32\f
33
34/* {Options}
35 */
36
37
38\f
39
40/* {Ilocs}
41 *
42 * Ilocs are relative pointers into local environment structures.
43 *
44 */
45#define SCM_ILOCP(n) (SCM_ITAG8(n)==scm_tc8_iloc)
46
47\f
48
49/* {Evaluator}
50 */
51
52typedef SCM (*scm_t_trampoline_0) (SCM proc);
53typedef SCM (*scm_t_trampoline_1) (SCM proc, SCM arg1);
54typedef SCM (*scm_t_trampoline_2) (SCM proc, SCM arg1, SCM arg2);
55
56\f
57
58#define SCM_EXTEND_ENV scm_acons
59
60\f
61
62SCM_API SCM scm_call_0 (SCM proc);
63SCM_API SCM scm_call_1 (SCM proc, SCM arg1);
64SCM_API SCM scm_call_2 (SCM proc, SCM arg1, SCM arg2);
65SCM_API SCM scm_call_3 (SCM proc, SCM arg1, SCM arg2, SCM arg3);
66SCM_API SCM scm_call_4 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM arg4);
67SCM_API SCM scm_call_5 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM arg4,
68 SCM arg5);
69SCM_API SCM scm_call_6 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM arg4,
70 SCM arg5, SCM arg6);
71SCM_API SCM scm_call_7 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM arg4,
72 SCM arg5, SCM arg6, SCM arg7);
73SCM_API SCM scm_call_8 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM arg4,
74 SCM arg5, SCM arg6, SCM arg7, SCM arg8);
75SCM_API SCM scm_call_9 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM arg4,
76 SCM arg5, SCM arg6, SCM arg7, SCM arg8, SCM arg9);
77SCM_API SCM scm_call_n (SCM proc, SCM *argv, size_t nargs);
78SCM_API SCM scm_call (SCM proc, ...);
79SCM_API SCM scm_apply_0 (SCM proc, SCM args);
80SCM_API SCM scm_apply_1 (SCM proc, SCM arg1, SCM args);
81SCM_API SCM scm_apply_2 (SCM proc, SCM arg1, SCM arg2, SCM args);
82SCM_API SCM scm_apply_3 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM args);
83SCM_API SCM scm_nconc2last (SCM lst);
84SCM_API SCM scm_apply (SCM proc, SCM arg1, SCM args);
85#define scm_dapply(proc,arg1,args) scm_apply (proc, arg1, args)
86SCM_API SCM scm_map (SCM proc, SCM arg1, SCM args);
87SCM_API SCM scm_for_each (SCM proc, SCM arg1, SCM args);
88SCM_API SCM scm_primitive_eval (SCM exp);
89#define scm_primitive_eval_x(exp) scm_primitive_eval (exp)
90SCM_API SCM scm_eval (SCM exp, SCM module);
91#define scm_eval_x(exp, module) scm_eval (exp, module)
92
93SCM_INTERNAL void scm_init_eval (void);
94
95
96#endif /* SCM_EVAL_H */
97
98/*
99 Local Variables:
100 c-file-style: "gnu"
101 End:
102*/