Commit | Line | Data |
---|---|---|
e6eb2467 | 1 | /* Copyright (C) 2001, 2009 Free Software Foundation, Inc. |
17e90c5e | 2 | * |
560b9c25 | 3 | * This library is free software; you can redistribute it and/or |
53befeb7 NJ |
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. | |
17e90c5e | 7 | * |
53befeb7 NJ |
8 | * This library is distributed in the hope that it will be useful, but |
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
560b9c25 AW |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
11 | * Lesser General Public License for more details. | |
17e90c5e | 12 | * |
560b9c25 AW |
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 | |
53befeb7 NJ |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
16 | * 02110-1301 USA | |
560b9c25 | 17 | */ |
17e90c5e | 18 | |
8f5cfc81 KN |
19 | #ifndef _SCM_INSTRUCTIONS_H_ |
20 | #define _SCM_INSTRUCTIONS_H_ | |
17e90c5e KN |
21 | |
22 | #include <libguile.h> | |
17e90c5e | 23 | |
e6eb2467 | 24 | #define SCM_VM_NUM_INSTRUCTIONS (1<<8) |
53e28ed9 AW |
25 | #define SCM_VM_INSTRUCTION_MASK (SCM_VM_NUM_INSTRUCTIONS-1) |
26 | ||
17e90c5e KN |
27 | enum scm_opcode { |
28 | #define VM_INSTRUCTION_TO_OPCODE 1 | |
aeeff258 AW |
29 | #include <libguile/vm-expand.h> |
30 | #include <libguile/vm-i-system.i> | |
31 | #include <libguile/vm-i-scheme.i> | |
32 | #include <libguile/vm-i-loader.i> | |
17e90c5e | 33 | #undef VM_INSTRUCTION_TO_OPCODE |
17e90c5e KN |
34 | }; |
35 | ||
560b9c25 AW |
36 | SCM_API SCM scm_instruction_list (void); |
37 | SCM_API SCM scm_instruction_p (SCM obj); | |
38 | SCM_API SCM scm_instruction_length (SCM inst); | |
39 | SCM_API SCM scm_instruction_pops (SCM inst); | |
40 | SCM_API SCM scm_instruction_pushes (SCM inst); | |
41 | SCM_API SCM scm_instruction_to_opcode (SCM inst); | |
42 | SCM_API SCM scm_opcode_to_instruction (SCM op); | |
fcd4901b | 43 | |
560b9c25 AW |
44 | SCM_INTERNAL void scm_bootstrap_instructions (void); |
45 | SCM_INTERNAL void scm_init_instructions (void); | |
17e90c5e | 46 | |
8f5cfc81 | 47 | #endif /* _SCM_INSTRUCTIONS_H_ */ |
17e90c5e KN |
48 | |
49 | /* | |
50 | Local Variables: | |
51 | c-file-style: "gnu" | |
52 | End: | |
53 | */ |