fix scm_setter
[bpt/guile.git] / libguile / eval.h
CommitLineData
0f2d19dd
JB
1/* classes: h_files */
2
22a52da1
DH
3#ifndef SCM_EVAL_H
4#define SCM_EVAL_H
8c494e99 5
cc00f447 6/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2003,2004,2008,2009,2010
434f2f7a 7 * Free Software Foundation, Inc.
8c494e99 8 *
73be1d9e 9 * This library is free software; you can redistribute it and/or
53befeb7
NJ
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.
8c494e99 13 *
53befeb7
NJ
14 * This library is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
73be1d9e
MV
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
8c494e99 18 *
73be1d9e
MV
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
53befeb7
NJ
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 * 02110-1301 USA
73be1d9e 23 */
8c494e99 24
0f2d19dd
JB
25\f
26
b4309c3c 27#include "libguile/__scm.h"
0f2d19dd 28
9981de3a 29#include "libguile/struct.h"
b7742c6b 30#include "libguile/memoize.h"
37607b5a 31
0f2d19dd
JB
32\f
33
33b97402
MD
34/* {Options}
35 */
36
33b97402
MD
37
38\f
39
0f2d19dd
JB
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)
0f2d19dd
JB
46
47\f
48
8d1e7f8c 49/* {Evaluator}
8d1e7f8c 50 */
0f2d19dd 51
756414cf 52typedef SCM (*scm_t_trampoline_0) (SCM proc);
504d99c5
MD
53typedef SCM (*scm_t_trampoline_1) (SCM proc, SCM arg1);
54typedef SCM (*scm_t_trampoline_2) (SCM proc, SCM arg1, SCM arg2);
55
0f2d19dd
JB
56\f
57
e2806c10 58#define SCM_EXTEND_ENV scm_acons
0f2d19dd 59
37607b5a 60/*fixme* This should probably be removed throught the code. */
a0ea2bf0 61
86d31dfe 62#define SCM_TOP_LEVEL_LOOKUP_CLOSURE (scm_current_module_lookup_closure())
37607b5a 63
0f2d19dd 64\f
a98e8e98 65
33b001fd
MV
66SCM_API SCM scm_call_0 (SCM proc);
67SCM_API SCM scm_call_1 (SCM proc, SCM arg1);
68SCM_API SCM scm_call_2 (SCM proc, SCM arg1, SCM arg2);
69SCM_API SCM scm_call_3 (SCM proc, SCM arg1, SCM arg2, SCM arg3);
70SCM_API SCM scm_call_4 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM arg4);
86fd6dff 71SCM_API SCM scm_call_n (SCM proc, SCM *argv, size_t nargs);
33b001fd
MV
72SCM_API SCM scm_apply_0 (SCM proc, SCM args);
73SCM_API SCM scm_apply_1 (SCM proc, SCM arg1, SCM args);
74SCM_API SCM scm_apply_2 (SCM proc, SCM arg1, SCM arg2, SCM args);
75SCM_API SCM scm_apply_3 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM args);
76SCM_API SCM scm_nconc2last (SCM lst);
77SCM_API SCM scm_apply (SCM proc, SCM arg1, SCM args);
b7742c6b 78#define scm_dapply(proc,arg1,args) scm_apply (proc, arg1, args)
33b001fd
MV
79SCM_API SCM scm_map (SCM proc, SCM arg1, SCM args);
80SCM_API SCM scm_for_each (SCM proc, SCM arg1, SCM args);
33b001fd 81SCM_API SCM scm_primitive_eval (SCM exp);
b7742c6b 82#define scm_primitive_eval_x(exp) scm_primitive_eval (exp)
33b001fd 83SCM_API SCM scm_eval (SCM exp, SCM module);
b7742c6b 84#define scm_eval_x(exp, module) scm_eval (exp, module)
083629be 85
102dbb6f 86SCM_INTERNAL void scm_init_eval (void);
0f2d19dd 87
f58c472a 88
22a52da1 89#endif /* SCM_EVAL_H */
89e00824
ML
90
91/*
92 Local Variables:
93 c-file-style: "gnu"
94 End:
95*/