-
Notifications
You must be signed in to change notification settings - Fork 1
/
inline.c
299 lines (200 loc) · 7.77 KB
/
inline.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
/* -*- coding: utf-8 -*-
inline.c --- defines the inline functions of ISLisp processor KISS.
Copyright (C) 2017, 2018, 2019 Yuji Minejima <yuji@minejima.jp>
This file is part of ISLisp processor KISS.
KISS is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
KISS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
#include "kiss.h"
extern inline
void* Kiss_Malloc(size_t const size);
extern inline
void* Kiss_GC_Malloc(size_t const size);
extern inline
kiss_obj* kiss_make_integer(kiss_C_integer i);
extern inline
kiss_cons_t* Kiss_Cons(const kiss_obj* const obj);
extern inline
kiss_C_integer Kiss_Fixnum(const kiss_obj* obj);
extern inline
kiss_bignum_t* Kiss_Bignum(const kiss_obj* const obj);
extern inline
kiss_obj* Kiss_Integer(const kiss_obj* const obj);
extern inline
kiss_obj* Kiss_Non_Zero_Integer(const kiss_obj* const obj);
extern inline
kiss_obj* Kiss_Non_Negative_Integer(const kiss_obj* const obj);
extern inline
kiss_obj* Kiss_Number(const kiss_obj* const obj);
extern inline
kiss_obj* Kiss_Non_Zero_Number(const kiss_obj* const obj);
extern inline
kiss_obj* Kiss_Positive_Number(const kiss_obj* const obj);
extern inline
kiss_obj* Kiss_Non_Negative_Number(const kiss_obj* const obj);
extern inline
kiss_C_integer Kiss_Non_Negative_Fixnum(const kiss_obj* const obj);
extern inline
kiss_C_integer Kiss_Non_Zero_Fixnum(const kiss_obj* const obj);
extern inline
kiss_obj* Kiss_General_Array(const kiss_obj* const obj);
extern inline
kiss_hash_table_t* Kiss_Hash_Table(const kiss_obj* const obj);
extern inline
kiss_obj* Kiss_Sequence(const kiss_obj* const obj);
extern inline
kiss_ilos_obj_t* Kiss_ILOS_Obj(const kiss_obj* const obj);
extern inline
kiss_obj* Kiss_Basic_Array(const kiss_obj* const obj);
extern inline
kiss_obj* Kiss_List(const kiss_obj* const obj);
extern inline
kiss_obj* Kiss_Proper_List(const kiss_obj* const obj);
extern inline
kiss_cons_t* Kiss_Proper_List_2(const kiss_obj* const obj);
extern inline
kiss_float_t* Kiss_Float(const kiss_obj* const obj);
extern inline
wchar_t Kiss_Character(const kiss_obj* const obj);
extern inline
kiss_symbol_t* Kiss_Symbol(const kiss_obj* const obj);
extern inline
kiss_string_t* Kiss_String(const kiss_obj* const obj);
extern inline
kiss_stream_t* Kiss_Stream(const kiss_obj* const obj);
extern inline
kiss_general_vector_t* Kiss_General_Vector(const kiss_obj* const obj);
extern inline
kiss_general_array_t* Kiss_General_Array_S(const kiss_obj* const obj);
extern inline
kiss_function_t* Kiss_LFunction(const kiss_obj* const obj);
extern inline
kiss_function_t* Kiss_LMacro(const kiss_obj* const obj);
extern inline
kiss_cfunction_t* Kiss_CFunction(const kiss_obj* const obj);
extern inline
kiss_cfunction_t* Kiss_CSpecial(const kiss_obj* const obj);
extern inline
kiss_obj* kiss_not(const kiss_obj* const obj);
extern inline
kiss_obj* kiss_eq(const kiss_obj* const obj1, const kiss_obj* const obj2);
extern inline
kiss_obj* kiss_eql(const kiss_obj* const obj1, const kiss_obj* const obj2);
extern inline
kiss_obj* kiss_streamp(kiss_obj* obj);
extern inline
kiss_obj* kiss_input_stream_p(kiss_obj* p);
extern inline
kiss_obj* kiss_output_stream_p(kiss_obj* p);
extern inline
kiss_obj* kiss_standard_input(void);
extern inline
kiss_obj* kiss_standard_output(void);
extern inline
kiss_obj* kiss_error_output(void);
extern inline
kiss_obj* kiss_consp(const kiss_obj* const obj);
extern inline
kiss_obj* kiss_car(const kiss_obj* const p);
extern inline
kiss_obj* kiss_cdr(const kiss_obj* const p);
extern inline
kiss_obj* kiss_cadr(const kiss_obj* const p);
extern inline
kiss_obj* kiss_cddr(const kiss_obj* const p);
extern inline
kiss_obj* kiss_caddr(const kiss_obj* const p);
extern inline
kiss_obj* kiss_null(const kiss_obj* const p);
extern inline
kiss_obj* kiss_listp(const kiss_obj* const p);
extern inline
kiss_obj* kiss_nreverse(kiss_obj* p);
extern inline
kiss_obj* kiss_assoc(const kiss_obj* const obj, kiss_obj* const alist);
extern inline
kiss_obj* kiss_assoc_using(const kiss_obj* test, const kiss_obj* const obj, kiss_obj* const alist);
extern inline
kiss_obj* kiss_last(const kiss_obj* const list, const kiss_obj* const rest);
extern inline
kiss_obj* kiss_nconc(kiss_obj* const lists);
extern inline
kiss_cons_t* kiss_init_cons(kiss_cons_t* const p, const kiss_obj* const left, const kiss_obj* const right);
extern inline
kiss_obj* kiss_cons(const kiss_obj* const car, const kiss_obj* const cdr);
extern inline
void kiss_push(const kiss_obj* const elm, kiss_obj** const list);
extern inline
size_t kiss_c_length(const kiss_obj* const p);
extern inline
kiss_obj* kiss_set_car(const kiss_obj* const obj, kiss_obj* const cons);
extern inline
kiss_obj* kiss_set_cdr(const kiss_obj* const obj, kiss_obj* const cons);
extern inline
kiss_obj* kiss_create_list(const kiss_obj* const i, const kiss_obj* const rest);
extern inline
kiss_obj* kiss_copy_list(const kiss_obj* p);
extern inline
kiss_obj* kiss_list(kiss_obj* const p);
extern inline
kiss_obj* kiss_c_list(int nargs, ...);
extern inline
void kiss_copy_list_to_consarray(const kiss_obj* const list, kiss_cons_t* const pointer);
extern inline
kiss_obj* kiss_c_mapcar1(const kiss_cf1_t f, const kiss_obj* list);
extern inline
kiss_obj* kiss_c_mapc1(const kiss_cf1_t f, const kiss_obj* const list);
extern inline
kiss_obj* kiss_mapcar1(const kiss_obj* const f, const kiss_obj* const list);
extern inline
kiss_obj* kiss_mapcar(const kiss_obj* const function, const kiss_obj* const list1, const kiss_obj* const rest);
extern inline
kiss_obj* kiss_mapcan(const kiss_obj* const function, const kiss_obj* const list1, const kiss_obj* const rest);
extern inline
kiss_obj* kiss_mapc1(const kiss_obj* const function, const kiss_obj* const list);
extern inline
kiss_obj* kiss_mapc(const kiss_obj* const function, const kiss_obj* const list1, const kiss_obj* const rest);
extern inline
kiss_obj* kiss_maplist1(const kiss_obj* const function, const kiss_obj* const list);
extern inline
kiss_obj* kiss_maplist(const kiss_obj* const function, const kiss_obj* const list1, const kiss_obj* const rest);
extern inline
kiss_obj* kiss_mapcon(const kiss_obj* const function, const kiss_obj* const list1, const kiss_obj* const rest);
extern inline
kiss_obj* kiss_mapl1(const kiss_obj* const function, const kiss_obj* const list);
extern inline
kiss_obj* kiss_mapl(const kiss_obj* const function, const kiss_obj* const list1, const kiss_obj* const rest);
extern inline
kiss_obj* kiss_append_s(kiss_obj* p);
extern inline
kiss_obj* kiss_append(kiss_obj* const p);
extern inline
kiss_obj* kiss_c_append(int nargs, ...);
extern inline
kiss_obj* kiss_reverse(kiss_obj* p);
extern inline
kiss_obj* kiss_member(kiss_obj* const obj, kiss_obj* const list);
extern inline
kiss_obj* kiss_member_using(const kiss_obj* const predicate, kiss_obj* const obj, kiss_obj* const list);
extern inline
kiss_obj* kiss_plist_member (kiss_obj* plist, const kiss_obj* const property);
extern inline
kiss_obj* kiss_plist_remove(kiss_obj* plist, const kiss_obj* const property);
extern inline
kiss_obj* kiss_plist_get (kiss_obj* plist, const kiss_obj* const property);
extern inline
kiss_obj* kiss_plist_put(kiss_obj* plist, const kiss_obj* const property, const kiss_obj* const value);
extern inline
kiss_obj* kiss_plist_mapc(const kiss_obj* const function, const kiss_obj* const plist);
extern inline
kiss_obj* kiss_eval_compound_form(kiss_cons_t* p);
extern inline
kiss_obj* kiss_eval(const kiss_obj* const form);
extern inline
kiss_obj* kiss_eval_body(const kiss_obj* const body);