* eval.c (SCM_APPLY), sort.c (closureless): Expand body when
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
162d88ca
GH
11999-08-18 Gary Houston <ghouston@easynet.co.uk>
2
3 * fports.c (fport_write): use memcpy instead of strncpy, in case
4 the data contains NUL.
5
cce0d8d0
MD
61999-08-17 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
7
59c49e10
MD
8 * gh.h (gh_vector_to_list): Bugfix. (Thanks to Frank Cieslok.)
9
cce0d8d0
MD
10 * backtrace.c, debug.c, eval.c, eval.h, gsubr.c, procprop.h,
11 read.c, srcprop.c, srcprop.h (scm_i_filename, scm_i_line,
12 scm_i_column, scm_i_copy, scm_i_name, scm_i_lambda, scm_i_source,
13 scm_i_more, scm_i_procname, scm_i_dot, scm_i_arrow, scm_i_else,
14 scm_i_unquote, scm_i_uq_splicing, scm_i_apply, scm_i_enter_frame,
15 scm_i_apply_frame, scm_i_exit_frame, scm_i_trace, scm_i_quote,
16 scm_i_begin, scm_i_if, scm_i_and, scm_i_or, scm_i_case,
17 scm_i_cond, scm_i_letstar, scm_i_do, scm_i_quasiquote,
18 scm_i_define, scm_i_letrec, scm_i_let, scm_i_atapply,
19 scm_i_atcall_cc, scm_i_breakpoint): Renamed: Consequently use
20 scm_sym_ as prefix for symbols.
21
22 * debug.c (scm_i_proc, scm_i_args, scm_i_eval_args): Removed.
23
24 * eval.c, eval.h (scm_sym_begin, scm_sym_if, scm_sym_and,
25 scm_sym_case, scm_sym_cond, scm_sym_letstar, scm_sym_do,
26 scm_sym_define, scm_sym_letrec, scm_sym_atapply,
27 scm_sym_atcall_cc): Made global.
28
8b7840b9
MD
291999-08-16 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
30
31 * eval.c (scm_sym_args): Made global.
32
33 * objects.c (scm_set_object_procedure_x): Disallow setting of
34 procedures for pure generic functions.
35
c94577b4
GH
361999-08-12 Gary Houston <ghouston@easynet.co.uk>
37
38 * ports.c (scm_seek): one more: was scm_lseek. Also changed the
39 Scheme name from lseek to seek, but lseek was added recently so
40 it shouldn't be a big problem.
41 * ports.c, gdbint.c, ioext.c: changed callers.
42
affc96b5
GH
431999-08-11 Gary Houston <ghouston@easynet.co.uk>
44
45 * fports.c (fport_input_waiting): if select is used, return 1
46 instead of whatever FD_ISSET expands to. maybe it will be useful
47 to interpret the value from the input_waiting ptob procedure as a
48 lower bound on the number of bytes available.
49
50 * Mikael asked for a few names to be changed...
51
52 * ports.c (scm_make_port_type): take the write procedure as the
53 second argument instead of the flush procedure.
54 * ports.h (scm_ptob_descriptor): rename the ptob procedures:
55 fflush -> flush, read_flush -> end_input, fclose -> close,
56 fill_buffer -> fill_input, ftruncate -> truncate,
57 input_waiting_p -> input_waiting.
58
59 * ports.c (end_input_void_port): was read_flush_void_port.
60 (scm_set_port_end_input): was scm_set_port_flush_input.
61 (scm_set_port_flush): was scm_set_port_write.
62 (scm_set_port_input_waiting): was scm_set_port_input_waiting_p
63 (scm_end_input): was scm_read_flush.
64 (scm_fill_input): was scm_fill_buffer.
65 (scm_flush): was scm_fflush.
66 * fports.c (fport_input_waiting): renamed from fport_input_waiting_p.
67 (fport_end_input): was local_read_flush.
68 (fport_flush): was local_fflush.
69 (fport_close): was local_fclose.
70 (fport_truncate): was local_ftruncate.
71 (fport_seek): was local_seek.
72 (fport_free): was local_free.
73 (fport_fill_input): was fport_fill_buffer.
74 * strports.c (st_end_input): was st_read_flush.
75 (st_truncate): was st_ftruncate.
76 * vports.c: (sf_flush): was sfflush.
77 (sf_close): was sfclose.
78 (sf_fill_input): was sf_fill_buffer.
79
80 * ports.c, fports.c, strports, vports.c, ioext.c, unif.c, filesys.c:
81 change callers.
82
8b7840b9 83>>>>>>> 1.602
df061ffc
MD
841999-08-06 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
85
86 * eval.c (SCM_IM_DISPATCH): Rewrote dispatch protocol. Dispatch
87 forms now contain the expressions to be dispatched upon instead of
88 depending on a surrounding lambda or let; Generic function
89 dispatch has been optimized; `apply' on a generic function now
90 works a little bit strangely. It uses a trick so that the type
91 dispatch code in SCM_CEVAL can be reused.
92
93 * objects.h, objects.c (scm_apply_generic_env): Added (used by
94 apply).
95 (scm_operator_p): Added.
96 (scm_sym_atdispatch): Added.
97 (scm_set_object_procedure_x): Modified to handle the new style
98 generic functions.
99 (scm_object_procedures): New debugging procedure.
100
524da6b9
MD
1011999-08-05 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
102
df061ffc
MD
103 * eval.c, eval.h (scm_sym_args): Added.
104
105 * objects.h (SCM_CLASSF_PURE_GENERIC): Added.
106
eba96884
MD
107 * feature.c, feature.h (scm_c_run_hook): Added.
108
524da6b9
MD
109 * eval.c (SCM_CEVAL:SCM_IM_DISPATCH): Bugfix: Jump back to
110 cdrxnoap and loopnoap instead of begin and loop.
111
265e6a4d
GH
1121999-08-04 Gary Houston <ghouston@easynet.co.uk>
113
114 * ports.c (scm_putc, scm_puts),
115 * unif.c (scm_uniform_array_write): use scm_lfwrite.
116 * ports.c (scm_putc): change type of first argument from int to char.
117
82cc1b11
MD
1181999-08-04 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
119
120 * eval.c (SCM_CEVAL): Improvements to SCM_IM_DISPATCH and
121 SCM_IM_HASH_DISPATCH.
122
123 * objects.h (SCM_CLASSF_GOOPS_VALID): Added.
124 (scm_si_redfined, scm_si_hashsets): Moved.
125
126 * objects.c (scm_class_of): Use the new SCM_CLASSF_GOOPS_VALID
127 flag which combines type and status info so that the class
128 redefinition protocol has zero cost during normal execution.
129
31703ab8
GH
1301999-08-03 Gary Houston <ghouston@easynet.co.uk>
131
132 * ports.h (scm_ptob_descriptor): include a write procedure again.
133 it's more efficient for unbuffered fports (e.g., sockets.)
134
135 * ports.c (scm_puts): use ptob->write.
136 * vports.c (scm_make_sfptob): set write proc in ptob.
137 * strports.c (scm_make_stptob): set write proc in ptob.
138 * ports.c (write_void_port): new procedure.
139 * vports.c (sf_write): new procedure.
140 * ports.c (scm_lfwrite): use ptob->write.
141 * strports.c (st_write): new procedure.
142 * fports.c (fport_write): new procedure.
143 (scm_make_fptob): set write in ptob to fport_write.
144 * ports.h: prototype for scm_set_port_write.
145 * ports.c (scm_make_port_type): initialise ptob write procedure.
146 (scm_set_port_write): new proc.
147
769f054d
JB
1481999-08-01 Jim Blandy <jimb@savonarola.red-bean.com>
149
150 * ports.c (scm_char_ready_p): Don't try to find PORT's ptab entry
151 until we've verified that it is actually a port. (Thanks to
152 Lorentey Karoly.)
153
5678aae0
MD
1541999-07-31 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
155
9ffdde1c
MD
156 * gc.c (scm_must_malloc, scm_must_realloc): Removed unnecessary
157 code, particularly an unnecessary test (len != size, where len ==
158 size). (Was this leftovers from debugging code, or have I missed
159 something profound?)
160
5678aae0
MD
161 * hashtab.c: Bugfix: Don't declare s_hash_fold without storage
162 size. (Thanks to James Dean Palmer.)
163
164 * numbers.c (scm_makdbl): Bugfix: Initialize imaginary part.
165 (Thanks to Lorentey Karoly.)
166
6e1fd264
MD
1671999-07-30 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
168
169 * eval.c (scm_m_expand_body): Use scm_cons_source.
170
171 * struct.c (scm_print_struct): Use vtable name.
172
173 * print.c (scm_init_print): Set name of print state type.
174
175 * stacks.c (scm_init_stacks): Set name of stack type.
176
b09ef679
MD
1771999-07-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
178
cb4832ae
MD
179 * eval.c (SCM_CEVAL): Removed old implementation of internal
180 define.
181
182 * gsubr.c, procprop.h (scm_i_inner_name): Removed.
183
184 * debug.c, debug.h (scm_reverse_lookup): Added.
185 (scm_procedure_name): Use scm_reverse_lookup to lookup the name of
186 internal procedure definitions; Don't use scm_i_inner_name.
187
2a52b429
MD
188 * eval.c, tags.h, print.c (SCM_IM_SLOT_REF, SCM_IM_SLOT_SET_X):
189 New isym operations.
190
b09ef679
MD
191 * eval.h: Added prototypes for multi language support functions.
192
193 * eval.c (SCM_IM_DISPATCH, SCM_IM_HASH_DISPATCH): Don't use
194 improper lists in the low-level representation, since that will
195 cause a begin to be prepended at macro expansion.
196
2a52b429
MD
197 * eval.c (scm_cons_source): Version of cons which copies source
198 properties from an existing cell.
6e1fd264 199 (scm_copy_tree, SCM_CEVAL): Use scm_cons_source.
2a52b429
MD
200
201 * debug.c (scm_procedure_source): Cons SCM_IM_LAMBDA onto
202 procedure source before calling scm_unmemocopy instead of faking
203 an environment.
204
2051998-10-25 Marius Vollmer <mvo@zagadka.ping.de>
206
207 Ported `internal defines' fix from SCM. Original ChangeLog entry:
208
209 1998-07-09 Radey Shouman <radey@colorage.com>
210
211 * eval.c (ceval_1): Modifications to allow rewriting of interal
212 DEFINE to LETREC: If an ISYM is evaluated in non-tail position the
213 body of which it is the CAR is macro expanded by m_expand_body,
214 which rewrites internal DEFINE.
215
216 (m_expand_body): Added.
217
218 (m_macroexp1): Added argument to control error checking:
219 m_expand_body may speculatively expand forms in the wrong
220 environments. Made argument number checks conditional on
221 RECKLESS.
222
223 (m_body): Added, error checks bodies and inserts the ISYM tokens.
224
225 (m_lambda): (m_letstar): (m_letrec1): (m_letrec): (m_let): Now
226 call m_body.
227
228 (m_cond): (m_case): (m_quote): Modified to avoid destructively
229 changing their argument forms. Since m_expand_body
230 speculatively macro expands forms the process must be
231 reversible.
232
233 (m_ident_eqp): Fixed to use proper environment.
234
235 (renamed_ident): Added DEFER_INTS_EGC.
236
237 Added prototypes for static functions.
238
239 * eval.c
240
241 (undef_cell): New.
242
243 (scm_lookupcar1, scm_lookupcar): Added CHECK argument. When CHECK
244 is false, do not produce an error for unbound variables, return a
245 pointer to cell_undef instead.
246
247 (EVALCELLCAR, XEVALCAR): Call scm_lookupcar with check=1.
248
249 (scm_m_body): New.
250
251 (scm_m_cond, scm_m_case, scm_m_quote): Modified to avoid
252 destructively changing their argument forms. Since m_expand_body
253 speculatively macro expands forms the process must be reversible.
254
255 (scm_m_lambda): Use scm_m_body instead of bodycheck. Account for
256 SCM_IM_LET introduced by named lets.
257
258 (scm_m_letstar): Use scm_m_body instead of bodycheck.
259
260 (scm_m_letrec1, scm_letrec): Split scm_letrec into scm_letrec1 and
261 scm_letrec. scm_letrec1 does not check for a null binding and
262 takes an additional argument to specify the ISYM of the body. Use
263 scm_m_body instead of bodycheck.
264
265 (scm_m_let): Use scm_m_body instead of bodycheck.
266
267 (scm_m_expand_body, scm_macroexp): New.
268
269 (unmemocopy): Account for ISYMs introduced by scm_m_body.
270
271 (ceval, deval): Call scm_m_expand_body. Call scm_lookupcar with
272 check=1. Throw error for internal defined that have not been
273 rewritten by scm_m_expand_body.
274
275 * eval.h: Added prototypes for scm_m_expand_body and scm_macroexp.
276 Removed prototype for SCM_APPLY.
277
278 * tags.h: Added extern declaration of scm_isymnames.
b09ef679 279
a6ba4ef8
MD
2801999-07-27 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
281
282 * Makefile.am (EXTRA_libguile_la_SOURCES): Added lang.c.
283
284 * lang.c: New file: Beginning of multi-language support.
285
286 * init.c (scm_boot_guile_1): Added call to scm_init_lang ().
287
288 * dynwind.c (scm_dowinds): Removed obsolete wind_key #f case.
289 (scm_dynamic_wind): Added argument checking for the after guard so
290 that we don't add garbage on the dynwind chain.
291 (scm_swap_bindings): Added.
292
293 * tags.h, print.c (SCM_IM_NIL_COND, SCM_IM_NIL_IFY, SCM_IM_T_IFY,
294 SCM_IM_0_COND, SCM_IM_0_IFY, SCM_IM_1_IFY), print.c
295 (scm_isymnames): New isyms for multi-language support.
296
297 * eval.c (scm_nil, scm_t): New symbols.
298 (nil-cond, nil-ify, t-ify, 0-cond, 0-ify, 1-ify): New special
299 forms for multi-language support.
300
259529f2
MD
3011999-07-25 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
302
303 * random.c, random.h (scm_c_default_rstate, scm_c_uniform32):
304 Added.
305 Renamed functions in the random function library interface
306 from scm_i_XXX --> scm_c_XXX.
307
1b9c3dae
GH
3081999-07-25 Gary Houston <ghouston@easynet.co.uk>
309
310 * ports.c (scm_putc): fix line-buffering.
311
544e9093
MD
3121999-07-25 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
313
314 * ports.c, ports.h, fports.c, strports.c, vports.c: Renamed
315 scm_set_ptob_XXX --> scm_set_port_XXX.
316
f15913d0
MD
3171999-07-24 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
318
319 * ports.c, ports.h (scm_make_port_type): New interface for
320 creation of port types (replaces scm_newptob). Just as for the
321 smobs, we need to separate the internal representation of smob
322 types from the interface, so that we easily can add new fields and
323 rearrange things without caring about backward compatibility.
324 This change was forced by the need in GOOPS to create classes
325 representing port types.
326 (scm_set_ptob_mark, scm_set_ptob_free, scm_set_ptob_print,
327 scm_set_ptob_equalp, scm_set_ptob_flush_input, scm_set_ptob_close,
328 scm_set_ptob_seek, scm_set_ptob_truncate,
329 scm_set_ptob_input_waiting_p): New setters.
330 (scm_newptob): Rewritten to use scm_make_port_type. For backward
331 compatibility.
332 (scm_ptobs): Changed type scm_ptobfuns --> scm_ptob_descriptor.
333 (scm_prinport): Removed.
334 (scm_port_print): Added.
335 (scm_print_port_mode): Added.
336 (void_port_ptob, print_void_port, close_void_port, noop0):
337 Removed. Removed #include "genio.h" Added #include "objects.h",
338 #include "smobs.h"
339
340 * fports.c (prinfport): Moved code from ports.c.
341 (local_free): Added.
342 (scm_fptob): Removed. Instead use new interface.
343 (scm_make_fptob): Added. (Need to create basic ports in a
344 specific order in ports.c.)
345
346 * strports.c (scm_stptob, prinstpt, noop0): Removed
347 (scm_make_stptob): Added.
348
349 * vports.c (scm_sfport, prinsfpt, sf_read_flush, noop0): Removed.
350 (scm_make_sfport): Added.
351
352 * filesys.c (scm_dir_print): Don't use the port printing code.
353 Instead provide specific directory printer.
354
355 * gc.c (scm_gc_sweep): Use value returned from scm_ptobs[].free.
356
357 * ioext.c (scm_redirect_port): Replaced scm_ptobfuns -->
358 scm_ptob_descriptor.
359
360 * smob.c (scm_smob_print): Handle non-existing type name nicely.
361 Removed #include "genio.h"
362
363 * objects.c (scm_make_port_classes): New function ptr.
364
69bc9ff3
GH
3651999-07-24 Gary Houston <ghouston@easynet.co.uk>
366
367 * gdbint.c (gdb_print, gdb_read): call scm_truncate_file.
368
369 * ports.c (scm_truncate_file): renamed from scm_ftruncate.
370 allow the 1st argument to be a fdes or filename as well as a
371 port (as in the filesys.c version).
372
373 * filesys.c (scm_truncate_file): removed.
374
096d0b15
MD
3751999-07-24 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
376
377 * readline.c, readline.h: Removed.
378
379 * objects.c, objects.h (scm_port_class): Added.
380 (scm_class_of): Look up port class in scm_port_class.
381 (SCM_IN_PCLASS_INDEX, SCM_OUT_PCLASS_INDEX,
382 SCM_INOUT_PCLASS_INDEX): Added.
383
f15913d0
MD
384
385 * Makefile.am: Removed genio.c, genio.x.
386
387 * genio.c: Removed.
388
aafe2718
MD
3891999-07-23 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
390
391 * init.c: Make sure that scm_post_boot_init_modules is called only
392 once. (Important when using a dumped image.; Thanks to Bernard
393 Urban.)
394
3144e1a9
JB
3951999-07-19 Jim Blandy <jimb@savonarola.red-bean.com>
396
8e1e60f1
JB
397 * guardians.c (scm_guardian_zombify): Separate scanning for
398 zombies from marking the pairs of the free list.
399
a825bb0e
JB
400 * guardians.c (scm_guardian_zombify): Don't set marks manually ---
401 use the macros. (Thanks to Michael Livshin.)
402
4d4c53ac
JB
403 * eval.c (scm_m_lambda): Let bodycheck check the body of the
404 lambda. Let your sins be purified by the blood of the lambda.
405 (Thanks to Eric Hanchrow.)
406
d9ad6919
JB
407 * net_db.c (h_errno): Don't declare this if it's #defined. Eew.
408 (Thanks to Valdis Kletnieks.)
409
3144e1a9 410