Commit | Line | Data |
---|---|---|
486013d6 AW |
1 | /* Copyright (C) 2013 Free Software Foundation, Inc. |
2 | * | |
3 | * This library is free software; you can redistribute it and/or | |
4 | * modify it under the terms of the GNU Lesser General Public License | |
5 | * as published by the Free Software Foundation; either version 3 of | |
6 | * the License, or (at your option) any later version. | |
7 | * | |
8 | * This library is distributed in the hope that it will be useful, but | |
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
11 | * Lesser General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU Lesser General Public | |
14 | * License along with this library; if not, write to the Free Software | |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | |
16 | * 02110-1301 USA | |
17 | */ | |
18 | ||
19 | #ifndef _SCM_VM_BUILTINS_H_ | |
20 | #define _SCM_VM_BUILTINS_H_ | |
21 | ||
22 | #ifdef BUILDING_LIBGUILE | |
23 | ||
24 | #define FOR_EACH_VM_BUILTIN(M) \ | |
9f309e2c AW |
25 | M(apply, APPLY, 2, 0, 1) \ |
26 | M(values, VALUES, 0, 0, 1) \ | |
27 | M(abort_to_prompt, ABORT_TO_PROMPT, 1, 0, 1) \ | |
28 | M(call_with_values, CALL_WITH_VALUES, 2, 0, 0) \ | |
29 | M(call_with_current_continuation, CALL_WITH_CURRENT_CONTINUATION, 1, 0, 0) | |
486013d6 | 30 | |
827c2c26 | 31 | /* These enumerated values are embedded in VM code, and as such are |
486013d6 AW |
32 | part of Guile's ABI. */ |
33 | enum scm_vm_builtins | |
34 | { | |
9f309e2c | 35 | #define ENUM(builtin, BUILTIN, req, opt, rest) SCM_VM_BUILTIN_##BUILTIN, |
486013d6 AW |
36 | FOR_EACH_VM_BUILTIN(ENUM) |
37 | #undef ENUM | |
38 | SCM_VM_BUILTIN_COUNT | |
39 | }; | |
40 | ||
41 | SCM_INTERNAL SCM scm_vm_builtin_name_to_index (SCM name); | |
42 | SCM_INTERNAL SCM scm_vm_builtin_index_to_name (SCM idx); | |
9f309e2c | 43 | SCM_INTERNAL void scm_init_vm_builtin_properties (void); |
486013d6 AW |
44 | |
45 | #endif /* BUILDING_LIBGUILE */ | |
46 | ||
47 | #endif /* _SCM_VM_BUILTINS_H_ */ |