ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/microscheme/opdefines.h
Revision: 1.3
Committed: Thu Nov 26 21:17:11 2015 UTC (8 years, 6 months ago) by root
Content type: text/plain
Branch: MAIN
Changes since 1.2: +32 -15 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 OP_DEF (opexe_0, "load", 1, 1, TST_STRING, OP_LOAD)
2 OP_DEF (opexe_0, 0, 0, 0, 0, OP_T0LVL)
3 OP_DEF (opexe_0, 0, 0, 0, 0, OP_T1LVL)
4 OP_DEF (opexe_0, 0, 0, 0, 0, OP_READ_INTERNAL)
5 OP_DEF (opexe_0, "gensym", 0, 0, 0, OP_GENSYM)
6 OP_DEF (opexe_0, 0, 0, 0, 0, OP_VALUEPRINT)
7 OP_DEF (opexe_0, 0, 0, 0, 0, OP_EVAL)
8 #if USE_TRACING
9 OP_DEF (opexe_0, 0, 0, 0, 0, OP_REAL_EVAL)
10 #endif
11 OP_DEF (opexe_0, 0, 0, 0, 0, OP_E0ARGS)
12 OP_DEF (opexe_0, 0, 0, 0, 0, OP_E1ARGS)
13 OP_DEF (opexe_0, 0, 0, 0, 0, OP_APPLY)
14 #if USE_TRACING
15 OP_DEF (opexe_0, 0, 0, 0, 0, OP_REAL_APPLY)
16 OP_DEF (opexe_0, "tracing", 1, 1, TST_NATURAL, OP_TRACING)
17 #endif
18 OP_DEF (opexe_0, 0, 0, 0, 0, OP_DOMACRO)
19 OP_DEF (opexe_0, 0, 0, 0, 0, OP_LAMBDA)
20 OP_DEF (opexe_0, 0, 0, 0, 0, OP_LAMBDA1)
21 OP_DEF (opexe_0, "make-closure", 1, 2, TST_PAIR TST_ENVIRONMENT, OP_MKCLOSURE)
22 OP_DEF (opexe_0, 0, 0, 0, 0, OP_QUOTE)
23 OP_DEF (opexe_0, 0, 0, 0, 0, OP_DEF0)
24 OP_DEF (opexe_0, 0, 0, 0, 0, OP_DEF1)
25 OP_DEF (opexe_0, "defined?", 1, 2, TST_SYMBOL TST_ENVIRONMENT, OP_DEFP)
26 OP_DEF (opexe_0, 0, 0, 0, 0, OP_BEGIN)
27 OP_DEF (opexe_0, 0, 0, 0, 0, OP_IF0)
28 OP_DEF (opexe_0, 0, 0, 0, 0, OP_IF1)
29 OP_DEF (opexe_0, 0, 0, 0, 0, OP_SET0)
30 OP_DEF (opexe_0, 0, 0, 0, 0, OP_SET1)
31 OP_DEF (opexe_0, 0, 0, 0, 0, OP_LET0)
32 OP_DEF (opexe_0, 0, 0, 0, 0, OP_LET1)
33 OP_DEF (opexe_0, 0, 0, 0, 0, OP_LET2)
34 OP_DEF (opexe_0, 0, 0, 0, 0, OP_LET0AST)
35 OP_DEF (opexe_0, 0, 0, 0, 0, OP_LET1AST)
36 OP_DEF (opexe_0, 0, 0, 0, 0, OP_LET2AST)
37 OP_DEF (opexe_0, 0, 0, 0, 0, OP_LET0REC)
38 OP_DEF (opexe_0, 0, 0, 0, 0, OP_LET1REC)
39 OP_DEF (opexe_0, 0, 0, 0, 0, OP_LET2REC)
40 OP_DEF (opexe_0, 0, 0, 0, 0, OP_COND0)
41 OP_DEF (opexe_0, 0, 0, 0, 0, OP_COND1)
42 OP_DEF (opexe_0, 0, 0, 0, 0, OP_DELAY)
43 OP_DEF (opexe_0, 0, 0, 0, 0, OP_AND0)
44 OP_DEF (opexe_0, 0, 0, 0, 0, OP_AND1)
45 OP_DEF (opexe_0, 0, 0, 0, 0, OP_OR0)
46 OP_DEF (opexe_0, 0, 0, 0, 0, OP_OR1)
47 OP_DEF (opexe_0, 0, 0, 0, 0, OP_C0STREAM)
48 OP_DEF (opexe_0, 0, 0, 0, 0, OP_C1STREAM)
49 OP_DEF (opexe_0, 0, 0, 0, 0, OP_MACRO0)
50 OP_DEF (opexe_0, 0, 0, 0, 0, OP_MACRO1)
51 OP_DEF (opexe_0, 0, 0, 0, 0, OP_CASE0)
52 OP_DEF (opexe_0, 0, 0, 0, 0, OP_CASE1)
53 OP_DEF (opexe_0, 0, 0, 0, 0, OP_CASE2)
54 OP_DEF (opexe_0, "eval", 1, 2, TST_ANY TST_ENVIRONMENT, OP_PEVAL)
55 OP_DEF (opexe_0, "apply", 1, INF_ARG, TST_NONE, OP_PAPPLY)
56 OP_DEF (opexe_0, "call-with-current-continuation", 1, 1, TST_NONE, OP_CONTINUATION)
57 #if USE_MATH
58 OP_DEF (opexe_2, "inexact->exact", 1, 1, TST_NUMBER, OP_INEX2EX)
59 OP_DEF (opexe_2, "exp", 1, 1, TST_NUMBER, OP_EXP)
60 OP_DEF (opexe_2, "log", 1, 1, TST_NUMBER, OP_LOG)
61 OP_DEF (opexe_2, "sin", 1, 1, TST_NUMBER, OP_SIN)
62 OP_DEF (opexe_2, "cos", 1, 1, TST_NUMBER, OP_COS)
63 OP_DEF (opexe_2, "tan", 1, 1, TST_NUMBER, OP_TAN)
64 OP_DEF (opexe_2, "asin", 1, 1, TST_NUMBER, OP_ASIN)
65 OP_DEF (opexe_2, "acos", 1, 1, TST_NUMBER, OP_ACOS)
66 OP_DEF (opexe_2, "atan", 1, 2, TST_NUMBER, OP_ATAN)
67 OP_DEF (opexe_2, "sqrt", 1, 1, TST_NUMBER, OP_SQRT)
68 OP_DEF (opexe_2, "expt", 2, 2, TST_NUMBER, OP_EXPT)
69 OP_DEF (opexe_2, "floor", 1, 1, TST_NUMBER, OP_FLOOR)
70 OP_DEF (opexe_2, "ceiling", 1, 1, TST_NUMBER, OP_CEILING)
71 OP_DEF (opexe_2, "truncate", 1, 1, TST_NUMBER, OP_TRUNCATE)
72 OP_DEF (opexe_2, "round", 1, 1, TST_NUMBER, OP_ROUND)
73 #endif
74 OP_DEF (opexe_2, "+", 0, INF_ARG, TST_NUMBER, OP_ADD)
75 OP_DEF (opexe_2, "-", 1, INF_ARG, TST_NUMBER, OP_SUB)
76 OP_DEF (opexe_2, "*", 0, INF_ARG, TST_NUMBER, OP_MUL)
77 OP_DEF (opexe_2, "/", 1, INF_ARG, TST_NUMBER, OP_DIV)
78 OP_DEF (opexe_2, "quotient", 1, INF_ARG, TST_INTEGER, OP_INTDIV)
79 OP_DEF (opexe_2, "remainder", 2, 2, TST_INTEGER, OP_REM)
80 OP_DEF (opexe_2, "modulo", 2, 2, TST_INTEGER, OP_MOD)
81 OP_DEF (opexe_2, "car", 1, 1, TST_PAIR, OP_CAR)
82 OP_DEF (opexe_2, "cdr", 1, 1, TST_PAIR, OP_CDR)
83 OP_DEF (opexe_2, "cons", 2, 2, TST_NONE, OP_CONS)
84 OP_DEF (opexe_2, "set-car!", 2, 2, TST_PAIR TST_ANY, OP_SETCAR)
85 OP_DEF (opexe_2, "set-cdr!", 2, 2, TST_PAIR TST_ANY, OP_SETCDR)
86 OP_DEF (opexe_2, "char->integer", 1, 1, TST_CHAR, OP_CHAR2INT)
87 OP_DEF (opexe_2, "integer->char", 1, 1, TST_NATURAL, OP_INT2CHAR)
88 OP_DEF (opexe_2, "char-upcase", 1, 1, TST_CHAR, OP_CHARUPCASE)
89 OP_DEF (opexe_2, "char-downcase", 1, 1, TST_CHAR, OP_CHARDNCASE)
90 OP_DEF (opexe_2, "symbol->string", 1, 1, TST_SYMBOL, OP_SYM2STR)
91 OP_DEF (opexe_2, "atom->string", 1, 2, TST_ANY TST_NATURAL, OP_ATOM2STR)
92 OP_DEF (opexe_2, "string->symbol", 1, 1, TST_STRING, OP_STR2SYM)
93 OP_DEF (opexe_2, "string->atom", 1, 2, TST_STRING TST_NATURAL, OP_STR2ATOM)
94 OP_DEF (opexe_2, "make-string", 1, 2, TST_NATURAL TST_CHAR, OP_MKSTRING)
95 OP_DEF (opexe_2, "string-length", 1, 1, TST_STRING, OP_STRLEN)
96 OP_DEF (opexe_2, "string-ref", 2, 2, TST_STRING TST_NATURAL, OP_STRREF)
97 OP_DEF (opexe_2, "string-set!", 3, 3, TST_STRING TST_NATURAL TST_CHAR, OP_STRSET)
98 OP_DEF (opexe_2, "string-append", 0, INF_ARG, TST_STRING, OP_STRAPPEND)
99 OP_DEF (opexe_2, "substring", 2, 3, TST_STRING TST_NATURAL, OP_SUBSTR)
100 OP_DEF (opexe_2, "vector", 0, INF_ARG, TST_NONE, OP_VECTOR)
101 OP_DEF (opexe_2, "make-vector", 1, 2, TST_NATURAL TST_ANY, OP_MKVECTOR)
102 OP_DEF (opexe_2, "vector-length", 1, 1, TST_VECTOR, OP_VECLEN)
103 OP_DEF (opexe_2, "vector-ref", 2, 2, TST_VECTOR TST_NATURAL, OP_VECREF)
104 OP_DEF (opexe_2, "vector-set!", 3, 3, TST_VECTOR TST_NATURAL TST_ANY, OP_VECSET)
105 OP_DEF (opexe_r, "=", 2, INF_ARG, TST_NUMBER, OP_NUMEQ)
106 OP_DEF (opexe_r, "<", 2, INF_ARG, TST_NUMBER, OP_LESS)
107 OP_DEF (opexe_r, ">", 2, INF_ARG, TST_NUMBER, OP_GRE)
108 OP_DEF (opexe_r, "<=", 2, INF_ARG, TST_NUMBER, OP_LEQ)
109 OP_DEF (opexe_r, ">=", 2, INF_ARG, TST_NUMBER, OP_GEQ)
110 OP_DEF (opexe_3, "not", 1, 1, TST_NONE, OP_NOT)
111 OP_DEF (opexe_3, "boolean?", 1, 1, TST_NONE, OP_BOOLP)
112 OP_DEF (opexe_3, "eof-object?", 1, 1, TST_NONE, OP_EOFOBJP)
113 OP_DEF (opexe_3, "null?", 1, 1, TST_NONE, OP_NULLP)
114 OP_DEF (opexe_3, "symbol?", 1, 1, TST_ANY, OP_SYMBOLP)
115 OP_DEF (opexe_3, "number?", 1, 1, TST_ANY, OP_NUMBERP)
116 OP_DEF (opexe_3, "string?", 1, 1, TST_ANY, OP_STRINGP)
117 OP_DEF (opexe_3, "integer?", 1, 1, TST_ANY, OP_INTEGERP)
118 OP_DEF (opexe_3, "real?", 1, 1, TST_ANY, OP_REALP)
119 OP_DEF (opexe_3, "char?", 1, 1, TST_ANY, OP_CHARP)
120 #if USE_CHAR_CLASSIFIERS
121 OP_DEF (opexe_3, "char-alphabetic?", 1, 1, TST_CHAR, OP_CHARAP)
122 OP_DEF (opexe_3, "char-numeric?", 1, 1, TST_CHAR, OP_CHARNP)
123 OP_DEF (opexe_3, "char-whitespace?", 1, 1, TST_CHAR, OP_CHARWP)
124 OP_DEF (opexe_3, "char-upper-case?", 1, 1, TST_CHAR, OP_CHARUP)
125 OP_DEF (opexe_3, "char-lower-case?", 1, 1, TST_CHAR, OP_CHARLP)
126 #endif
127 #if USE_PORTS
128 OP_DEF (opexe_3, "port?", 1, 1, TST_ANY, OP_PORTP)
129 OP_DEF (opexe_3, "input-port?", 1, 1, TST_ANY, OP_INPORTP)
130 OP_DEF (opexe_3, "output-port?", 1, 1, TST_ANY, OP_OUTPORTP)
131 #endif
132 OP_DEF (opexe_3, "procedure?", 1, 1, TST_ANY, OP_PROCP)
133 OP_DEF (opexe_3, "pair?", 1, 1, TST_ANY, OP_PAIRP)
134 OP_DEF (opexe_3, "list?", 1, 1, TST_ANY, OP_LISTP)
135 OP_DEF (opexe_3, "environment?", 1, 1, TST_ANY, OP_ENVP)
136 OP_DEF (opexe_3, "vector?", 1, 1, TST_ANY, OP_VECTORP)
137 OP_DEF (opexe_3, "eq?", 2, 2, TST_ANY, OP_EQ)
138 OP_DEF (opexe_3, "eqv?", 2, 2, TST_ANY, OP_EQV)
139 OP_DEF (opexe_4, "force", 1, 1, TST_ANY, OP_FORCE)
140 OP_DEF (opexe_4, 0, 0, 0, 0, OP_SAVE_FORCED)
141 #if USE_PORTS
142 OP_DEF (opexe_4, "write", 1, 2, TST_ANY TST_OUTPORT, OP_WRITE)
143 OP_DEF (opexe_4, "write-char", 1, 2, TST_CHAR TST_OUTPORT, OP_WRITE_CHAR)
144 OP_DEF (opexe_4, "display", 1, 2, TST_ANY TST_OUTPORT, OP_DISPLAY)
145 OP_DEF (opexe_4, "newline", 0, 1, TST_OUTPORT, OP_NEWLINE)
146 #endif
147 OP_DEF (opexe_4, "error", 1, INF_ARG, TST_NONE, OP_ERR0)
148 OP_DEF (opexe_4, 0, 0, 0, 0, OP_ERR1)
149 OP_DEF (opexe_4, "reverse", 1, 1, TST_LIST, OP_REVERSE)
150 OP_DEF (opexe_4, "list*", 1, INF_ARG, TST_NONE, OP_LIST_STAR)
151 OP_DEF (opexe_4, "append", 0, INF_ARG, TST_NONE, OP_APPEND)
152 #if USE_PLIST
153 OP_DEF (opexe_4, "put", 3, 3, TST_NONE, OP_PUT)
154 OP_DEF (opexe_4, "get", 2, 2, TST_NONE, OP_GET)
155 #endif
156 OP_DEF (opexe_4, "quit", 0, 1, TST_NUMBER, OP_QUIT)
157 OP_DEF (opexe_4, "gc", 0, 0, 0, OP_GC)
158 OP_DEF (opexe_4, "gc-verbose", 0, 1, TST_NONE, OP_GCVERB)
159 OP_DEF (opexe_4, "new-segment", 0, 1, TST_NUMBER, OP_NEWSEGMENT)
160 OP_DEF (opexe_4, "oblist", 0, 0, 0, OP_OBLIST)
161 #if USE_PORTS
162 OP_DEF (opexe_4, "current-input-port", 0, 0, 0, OP_CURR_INPORT)
163 OP_DEF (opexe_4, "current-output-port", 0, 0, 0, OP_CURR_OUTPORT)
164 OP_DEF (opexe_4, "open-input-file", 1, 1, TST_STRING, OP_OPEN_INFILE)
165 OP_DEF (opexe_4, "open-output-file", 1, 1, TST_STRING, OP_OPEN_OUTFILE)
166 OP_DEF (opexe_4, "open-input-output-file", 1, 1, TST_STRING, OP_OPEN_INOUTFILE)
167 # if USE_STRING_PORTS
168 OP_DEF (opexe_4, "open-input-string", 1, 1, TST_STRING, OP_OPEN_INSTRING)
169 OP_DEF (opexe_4, "open-input-output-string", 1, 1, TST_STRING, OP_OPEN_INOUTSTRING)
170 OP_DEF (opexe_4, "open-output-string", 0, 1, TST_STRING, OP_OPEN_OUTSTRING)
171 OP_DEF (opexe_4, "get-output-string", 1, 1, TST_OUTPORT, OP_GET_OUTSTRING)
172 # endif
173 OP_DEF (opexe_4, "close-input-port", 1, 1, TST_INPORT, OP_CLOSE_INPORT)
174 OP_DEF (opexe_4, "close-output-port", 1, 1, TST_OUTPORT, OP_CLOSE_OUTPORT)
175 #endif
176 OP_DEF (opexe_4, "interaction-environment", 0, 0, 0, OP_INT_ENV)
177 OP_DEF (opexe_4, "current-environment", 0, 0, 0, OP_CURR_ENV)
178 #if USE_PORTS
179 OP_DEF (opexe_5, "read", 0, 1, TST_INPORT, OP_READ)
180 OP_DEF (opexe_5, "read-char", 0, 1, TST_INPORT, OP_READ_CHAR)
181 OP_DEF (opexe_5, "peek-char", 0, 1, TST_INPORT, OP_PEEK_CHAR)
182 OP_DEF (opexe_5, "char-ready?", 0, 1, TST_INPORT, OP_CHAR_READY)
183 OP_DEF (opexe_5, "set-input-port", 1, 1, TST_INPORT, OP_SET_INPORT)
184 OP_DEF (opexe_5, "set-output-port", 1, 1, TST_OUTPORT, OP_SET_OUTPORT)
185 #endif
186 OP_DEF (opexe_5, 0, 0, 0, 0, OP_RDSEXPR)
187 OP_DEF (opexe_5, 0, 0, 0, 0, OP_RDLIST)
188 OP_DEF (opexe_5, 0, 0, 0, 0, OP_RDDOT)
189 OP_DEF (opexe_5, 0, 0, 0, 0, OP_RDQUOTE)
190 OP_DEF (opexe_5, 0, 0, 0, 0, OP_RDQQUOTE)
191 OP_DEF (opexe_5, 0, 0, 0, 0, OP_RDQQUOTEVEC)
192 OP_DEF (opexe_5, 0, 0, 0, 0, OP_RDUNQUOTE)
193 OP_DEF (opexe_5, 0, 0, 0, 0, OP_RDUQTSP)
194 OP_DEF (opexe_5, 0, 0, 0, 0, OP_RDVEC)
195 OP_DEF (opexe_5, 0, 0, 0, 0, OP_P0LIST)
196 OP_DEF (opexe_5, 0, 0, 0, 0, OP_P1LIST)
197 OP_DEF (opexe_5, 0, 0, 0, 0, OP_PVECFROM)
198 OP_DEF (opexe_6, "length", 1, 1, TST_LIST, OP_LIST_LENGTH)
199 OP_DEF (opexe_6, "assq", 2, 2, TST_NONE, OP_ASSQ)
200 OP_DEF (opexe_6, "get-closure-code", 1, 1, TST_NONE, OP_GET_CLOSURE)
201 OP_DEF (opexe_6, "closure?", 1, 1, TST_NONE, OP_CLOSUREP)
202 OP_DEF (opexe_6, "macro?", 1, 1, TST_NONE, OP_MACROP)
203 #undef OP_DEF