Commit | Line | Data |
---|---|---|
ec9709f0 MV |
1 | 2001-02-11 Marius Vollmer <mvo@zagadka.ping.de> |
2 | ||
3 | Fix evaluator so that top-level expressions are correctly | |
4 | evaluated with respect to the module system. | |
5 | ||
6 | * modules.h. modules.c (scm_current_module_lookup_closure): New | |
7 | function. | |
8 | ||
9 | * eval.h (scm_primitive_eval, scm_primitive_eval_x): New | |
10 | prototypes. | |
11 | (scm_i_eval, scm_i_eval_x, scm_eval, scm_eval_x): Changed argument | |
12 | names to better reflect their meaning. | |
13 | ||
14 | * eval.c (scm_ceval, scm_deval): Recognize when `begin' is being | |
15 | evaluated at top-level and synronize lookup closure before | |
16 | executing every subform. | |
17 | (scm_primitve_eval_x, scm_primitive_eval): New functions. | |
18 | (scm_eval_x, scm_eval): Reimplement in terms of | |
19 | scm_primitive_eval_x and scm_primitive_eval, respectively. | |
20 | ||
21 | 2001-02-09 Marius Vollmer <mvo@zagadka.ping.de> | |
22 | ||
23 | * macros.c (scm_macro_name, scm_macro_transformer): Use | |
24 | SCM_SMOB_DATA instead of SCM_CDR. Provided by Martin Grabmueller. | |
25 | Thanks! | |
26 | ||
42417394 KN |
27 | 2001-02-10 Keisuke Nishida <kxn30@po.cwru.edu> |
28 | ||
29 | * dump.c (scm_store_bytes): Store data size before data. | |
30 | (scm_restore_bytes): Restore data size. Takes a pointer to size. | |
31 | * dump.h (scm_restore_bytes): Updated. | |
32 | ||
bf942687 KN |
33 | 2001-02-09 Keisuke Nishida <kxn30@po.cwru.edu> |
34 | ||
35 | * dump.c: Use double cells for update schedule. | |
36 | ||
1be4270a KN |
37 | 2001-02-08 Keisuke Nishida <kxn30@po.cwru.edu> |
38 | ||
39 | * ports.c (scm_unread_char): Take an optional argument. | |
40 | ||
548728ea MV |
41 | 2001-02-08 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
42 | ||
43 | * modules.h (scm_selected_module, scm_current_module): Renamed | |
44 | scm_selected_module to scm_current_module to synchronize Scheme | |
45 | and C names. | |
46 | (scm_select_module, scm_set_current_module): Likewise. Changed | |
47 | all uses. | |
48 | ||
49 | * ports.c (scm_port_for_each): Make a snapshot of the port table | |
50 | before iterating over it. The table might change while the user | |
51 | code is running. With the snapshot, the user can depend on the | |
c5408bc3 | 52 | fact that each port that existed at the start of the iteration is |
548728ea MV |
53 | encountered exactly once. (ice-9 popen) depends on this. |
54 | ||
cb0d8be2 DH |
55 | 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de> |
56 | ||
57 | * strings.h (SCM_STRING_MAX_LENGTH): New macro. | |
58 | ||
59 | * strings.c (scm_makstr, scm_take_str, scm_make_string): Added | |
60 | range checking for the size parameter. Thanks to Martin | |
61 | Grabmueller for the hint. | |
62 | ||
63 | (scm_makstr): Reordered string initialization to make interrupt | |
64 | deferring unnecessary. | |
65 | ||
66 | * vectors.c (scm_make_vector): Fixed range checking. | |
67 | ||
e382fdbe DH |
68 | 2001-02-08 Dirk Herrmann <D.Herrmann@tu-bs.de> |
69 | ||
70 | * vectors.h (SCM_VECTOR_MAX_LENGTH): New macro. | |
71 | ||
72 | * vectors.c (scm_make_vector, scm_c_make_vector): Improved the | |
73 | checking of the size parameter for type correctness and valid | |
74 | range. Thanks to Rob Browning for reporting the problem. Instead | |
75 | of deferring interrupts, scm_remember_upto_here_1 is used. | |
76 | ||
bf8f0922 KN |
77 | 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu> |
78 | ||
79 | * dump.c (scm_store_cell_object, scm_restore_cell_object): Removed. | |
80 | (scm_dump_cell_update): Removed. | |
81 | (scm_dump_update): Renamed from scm_dump_object_update. | |
82 | (scm_restore_string, scm_restore_bytes, scm_restore_word): Takes | |
83 | a pointer instead of returning a value. | |
84 | * keywords.c (keyword_undump): Updated. | |
85 | ||
914cceec KN |
86 | 2001-02-05 Keisuke Nishida <kxn30@po.cwru.edu> |
87 | ||
88 | * dump.c, dump.h: Modified a lot. | |
5f17c66f | 89 | (SCM_DUMP_COOKIE): Version 0.1 |
914cceec KN |
90 | (scm_dump_mark): Removed. |
91 | (scm_restore_cell_object, scm_store_cell_object): New functions. | |
92 | ||
93 | * smob.h (scm_smob_descriptor): Removed slots: dump_mark, | |
94 | dump_dealloc, dump_store, undump_alloc, undump_restore, undump_init. | |
95 | New slots: dump, undump. | |
96 | * smob.c (scm_make_smob_type, scm_set_smob_dump, scm_set_smob_undump): | |
97 | Updated. | |
98 | ||
99 | * keywords.c (keyword_dump): Renamed from keyword_dealloc. | |
100 | (keyword_undump): Renamed from keyword_alloc. | |
101 | (scm_init_keywords): Set keyword_dump and keyword_undump. | |
102 | ||
ecf470a2 ML |
103 | 2001-02-03 Michael Livshin <mlivshin@bigfoot.com> |
104 | ||
105 | * gc.c (DOUBLECELL_ALIGNED_P): new macro, a better-named analog of | |
106 | the deprecated SCM_DOUBLE_CELLP. | |
107 | ||
108 | * tags.h (SCM_DOUBLE_CELLP): deprecated. | |
109 | ||
03416a99 KN |
110 | 2001-02-02 Keisuke Nishida <kxn30@po.cwru.edu> |
111 | ||
112 | * dump.c, dump.h: New files. | |
113 | * Makefile.am: Added dump.c, dump.h, dump.x, dump.doc. | |
114 | * init.c: #include "libguile/dump.h". | |
115 | (scm_init_guile_1): Call scm_init_dump. | |
116 | * smob.h (scm_smob_descriptor): New slots: dump_mark, | |
117 | dump_dealloc, dump_store, undump_alloc, undump_restore, | |
118 | undump_init. | |
119 | * smob.c (scm_make_smob_type): Init the new slots. | |
120 | (scm_set_smob_dump, scm_set_smob_undump): New functions. | |
121 | * smob.h (scm_set_smob_dump, scm_set_smob_undump): Declared. | |
122 | ||
123 | * keywords.c: #include "libguile/dump.h". | |
124 | (keyword_dealloc, keyword_alloc): New functions. | |
125 | (scm_init_keywords): Set smob_dump and smob_undump. | |
126 | ||
00ffa0e7 KN |
127 | 2001-02-01 Keisuke Nishida <kxn30@po.cwru.edu> |
128 | ||
129 | * vectors.c (scm_c_make_vector): New function. | |
130 | * vectors.h (scm_c_make_vector): Declared. | |
131 | * eval.c (scm_copy_tree), filesys.c (scm_stat2scm), fluids.c | |
132 | (scm_make_initial_fluids, grow_fluids), gc.c (scm_init_storage), | |
133 | gh_data.c (gh_ints2scm, gh_doubles2scm): goops.c | |
134 | (scm_make_method_cache, scm_i_vector2list, | |
135 | scm_compute_applicable_methods, scm_sys_method_more_specific_p), | |
136 | init.c (start_stack), net_db.c (scm_gethost, scm_getnet, | |
137 | scm_getproto, scm_return_entry), posix.c (scm_getgroups, | |
138 | scm_getpwuid, scm_getgrgid, scm_uname), print.c (make_print_state, | |
139 | grow_ref_stack), regex-posix.c (scm_regexp_exec), scmsigs.c | |
140 | (scm_init_scmsigs), socket.c (scm_addr_vector, scm_addr_vector), | |
141 | stime.c (scm_times, filltime), unif.c (scm_make_uve), vectors.c | |
142 | (scm_vector, scm_make_vector): Use scm_c_make_vector. | |
143 | ||
144 | * hashtab.c (scm_c_make_hash_table): New function. | |
145 | * hashtab.h (scm_c_make_hash_table): Declared. | |
146 | * environments.c (scm_make_leaf_environment, | |
147 | scm_make_eval_environment), gc.c (scm_init_storage), | |
148 | keywords.c (scm_init_keywords), symbols.c (scm_builtin_bindings): | |
149 | Use scm_c_make_hash_table. | |
150 | ||
b8446ce8 MD |
151 | 2001-01-31 Mikael Djurfeldt <mdj@linnaeus.mit.edu> |
152 | ||
153 | * unif.c (rapr1): Don't apply scm_uniform_vector_length on arrays. | |
154 | ||
e3239868 DH |
155 | 2001-01-29 Martin Grabmueller <mgrabmue@cs.tu-berlin.de> |
156 | ||
157 | * struct.c (scm_make_vtable_vtable): Removed unnecessary "" from | |
158 | end of docstring. | |
159 | ||
160 | * struct.c (scm_struct_set_x, scm_struct_vtable_tag, | |
161 | scm_struct_vtable_name, scm_set_struct_vtable_name_x), weaks.c | |
162 | (scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table, | |
163 | scm_weak_value_hash_table_p, scm_doubly_weak_hash_table_p), | |
164 | srcprop.c (scm_source_properties, scm_set_source_properties_x, | |
165 | scm_source_property, scm_set_source_property_x), sort.c | |
166 | (scm_sort_list_x, scm_restricted_vector_sort_x, scm_sorted_p, | |
167 | scm_merge, scm_merge_x, scm_sort_x, scm_sort, scm_stable_sort_x, | |
168 | scm_stable_sort, scm_sort_list_x, scm_sort_list): Added | |
169 | docstrings. | |
170 | ||
41ee56dd MD |
171 | 2001-01-29 Mikael Djurfeldt <mdj@linnaeus.mit.edu> |
172 | ||
173 | * eval.c (SCM_APPLY): Check that primitives which take 1 arg | |
174 | really get that arg. | |
175 | ||
b6311c08 KN |
176 | 2001-01-26 Keisuke Nishida <kxn30@po.cwru.edu> |
177 | ||
178 | * goops.c (s_scm_get_keyword): Bug fix. | |
179 | ||
a49af0c0 DH |
180 | 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de> |
181 | ||
182 | The following patch was sent by Martin Grabmueller. It makes sure | |
183 | that in case of parameter errors the correct function name is | |
184 | shown, and that parameter types are only checked once. | |
185 | ||
186 | * strop.c (string_copy, string_upcase_x, string_downcase_x, | |
187 | string_capitalize_x): New functions. Each one performs the core | |
188 | functionality of the corresponding scm_* function. | |
189 | ||
190 | (scm_string_copy, scm_string_upcase_x, scm_string_upcase, | |
191 | scm_string_downcase_x, scm_string_downcase, | |
192 | scm_string_capitalize_x, scm_string_capitalize): Reduced to | |
193 | parameter checking wrappers of the above functions. | |
194 | ||
13070bd3 DH |
195 | 2001-01-26 Dirk Herrmann <D.Herrmann@tu-bs.de> |
196 | ||
197 | * continuations.c, dynl.c, keywords.c, load.c: Include | |
198 | strings.h. Thanks to Bill Schottstaedt for the bug report. | |
199 | ||
2f2b390c DH |
200 | 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de> |
201 | ||
202 | * backtrace.c (display_header): Make sure that line and column | |
203 | information is shown independent of whether the port the code was | |
204 | read from had an associated filename. Thanks to Martin | |
205 | Grabmueller for providing this patch. | |
206 | ||
efa40607 DH |
207 | 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de> |
208 | ||
209 | * fports.[ch] (scm_file_port_p): New primitive. | |
210 | ||
a98bddfd DH |
211 | 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de> |
212 | ||
213 | * tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport): | |
214 | These are now defined in fports.c, strports.c and vports.c. | |
215 | ||
216 | * fports.[ch] (scm_tc16_fport), strports.c (scm_tc16_strport), | |
217 | vports.c (scm_tc16_sfport): Made variables (were macros defined in | |
218 | tags.h). | |
219 | ||
220 | fports.c (scm_make_fptob), strports.c (scm_make_stptob), vports.c | |
221 | (scm_make_sfptob): Made static. These return a type code now. | |
222 | ||
223 | fports.c (scm_init_fports), strports.c (scm_init_strports), | |
224 | vports.c (scm_init_vports): Create the corresponding port types. | |
225 | ||
226 | * fports.h (SCM_FPORTP, SCM_OPFPORTP, SCM_OPINFPORTP, | |
227 | SCM_OPOUTFPORTP): Redefined in terms of scm_tc16_fport. | |
228 | ||
229 | * init.c (scm_init_guile_1): Make sure strports are initialized | |
230 | before gdbint. | |
231 | ||
232 | * ports.[ch] (scm_make_port_type): Changed the return type to | |
233 | scm_bits_t. | |
234 | ||
235 | * ports.c (scm_ports_prehistory): Don't create any port types | |
236 | here. | |
237 | ||
238 | * posix.c (scm_ttyname): Use SCM_FPORTP instead of comparing | |
239 | against scm_tc16_fport directly. | |
240 | ||
0419a528 DH |
241 | 2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de> |
242 | ||
243 | * srcprop.c (scm_set_source_property_x): Fix to handle | |
244 | (set-source-property! <obj> 'copy <datum>) correctly. | |
245 | ||
6d36532c GH |
246 | 2001-01-24 Gary Houston <ghouston@arglist.com> |
247 | ||
248 | * filesys.c (scm_link): docstring fix. | |
249 | * fports.h (scm_setfileno): obsolete declaration removed. | |
250 | * posix.c: bogus popen declaration removed. | |
251 | ||
252 | * rdelim.c: new file, split from ioext.c. | |
253 | * rdelim.h: new file, split from ioext.h | |
254 | * Makefile.am: add rdelim.c and related files. | |
255 | * init.c: call scm_init_rdelim. include rdelim.h. | |
256 | ||
3ba5a6c2 DH |
257 | 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de> |
258 | ||
259 | This patch was sent by Martin Grabmueller and makes sure that | |
260 | parameter errors are reported correctly by the lexicographic | |
261 | ordering predicates. | |
262 | ||
263 | * strorder.c (string_less_p, string_ci_less_p): New functions. | |
264 | ||
265 | (scm_string_less_p, scm_string_ci_less_p): Extracted the core | |
266 | functionality into string_less_p, string_ci_less_p respectively. | |
267 | The remaining code is just a wrapper to do the parameter | |
268 | checking. | |
269 | ||
270 | (scm_string_leq_p, scm_string_gr_p, scm_string_geq_p): Check the | |
271 | parameters and call string_less_p instead of scm_string_less_p. | |
272 | ||
273 | (scm_string_ci_leq_p, scm_string_ci_gr_p, scm_string_ci_geq_p): | |
274 | Check the parameters and call string_less_ci_p instead of | |
275 | scm_string_ci_less_p. | |
276 | ||
e40a4095 DH |
277 | 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de> |
278 | ||
ed6a2db9 DH |
279 | This patch modifies scm_display_error to perform parameter |
280 | checking. Thanks to Neil Jerram for the bug report. | |
281 | ||
e40a4095 DH |
282 | * backtrace.[ch] (scm_i_display_error): New function. |
283 | ||
284 | * backtrace.c (scm_display_error): Added parameter check and | |
285 | extracted the core functionality into function | |
286 | scm_i_display_error. | |
287 | ||
288 | * throw.c (handler_message): Call scm_i_display_error to display | |
289 | the error message. | |
290 | ||
f1e06a96 MD |
291 | 2001-01-23 Mikael Djurfeldt <mdj@linnaeus.mit.edu> |
292 | ||
293 | * eval.c (SCM_APPLY): Added # args check for application of | |
294 | procedures with arity 3. (Thanks to Anders Holst.) | |
295 | ||
30ea841d DH |
296 | 2001-01-24 Dirk Herrmann <D.Herrmann@tu-bs.de> |
297 | ||
298 | * filesys.h (SCM_DIR_FLAG_OPEN, SCM_DIR_OPEN_P): Added. | |
299 | ||
300 | (SCM_OPDIRP): Deprecated. | |
301 | ||
302 | * filesys.c (scm_opendir): Use SCM_DIR_FLAG_OPEN instead of | |
303 | SCM_OPN. | |
304 | ||
305 | (scm_readdir, scm_rewinddir): Don't use SCM_VALIDATE_OPDIR. | |
306 | Instead, give an explicit error message in case the directory is | |
307 | closed. | |
308 | ||
309 | (scm_closedir, scm_dir_print): Rewritten to use SCM_DIR_OPEN_P | |
310 | instead of SCM_OPENP and SCM_CLOSEDP. | |
311 | ||
312 | * validate.h (SCM_VALIDATE_OPDIR): Deprecated. | |
313 | ||
312ae976 DH |
314 | 2001-01-22 Dirk Herrmann <D.Herrmann@tu-bs.de> |
315 | ||
316 | * eval.c (inner_eval, scm_eval): Move all real functionality into | |
317 | inner_eval. Avoid to copy the expression twice by inlining some | |
318 | code from scm_i_eval. | |
319 | ||
4567ed78 DH |
320 | 2001-01-19 Dirk Herrmann <D.Herrmann@tu-bs.de> |
321 | ||
322 | * eval.c (scm_m_case): The 'else' clause of a 'case' statement | |
323 | now has to be the last clause, as required by R5RS. Thanks to | |
324 | Martin Grabmueller for the patch. | |
325 | ||
10288a09 GH |
326 | 2001-01-18 Gary Houston <ghouston@arglist.com> |
327 | ||
328 | * ioext.c: further simplify scm_read_string_x_partial by defining | |
329 | a macro SCM_EBLOCK. | |
330 | ||
8f379a8f DH |
331 | 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de> |
332 | ||
333 | * gh_data.c (gh_ints2scm): Simplified using SCM_FIXABLE. | |
334 | ||
5c75b29f DH |
335 | 2001-01-18 Dirk Herrmann <D.Herrmann@tu-bs.de> |
336 | ||
337 | * __scm.h: Added comment about architecture and compiler | |
338 | properties that are required by guile. | |
339 | ||
340 | (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM, | |
341 | SCM_MOST_NEGATIVE_FIXNUM): Moved to numbers.h. | |
342 | ||
343 | (SCM_CHAR_BIT, SCM_LONG_BIT): Moved here from numbers.h. | |
344 | ||
345 | * numbers.h (SCM_CHAR_BIT, SCM_LONG_BIT): Moved to __scm.h. | |
346 | ||
347 | (SCM_FIXNUM_BIT, SCM_MOST_POSITIVE_FIXNUM, | |
348 | SCM_MOST_NEGATIVE_FIXNUM): Moved here from __scm.h. | |
349 | ||
ac0c002c DH |
350 | 2001-01-17 Dirk Herrmann <D.Herrmann@tu-bs.de> |
351 | ||
352 | * __scm.h (SCM_FIXNUM_BIT): Added. The name is chosen in analogy | |
353 | to the names in limits.h. | |
354 | ||
355 | * numbers.c (abs_most_negative_fixnum): Added. | |
356 | ||
357 | (scm_quotient, scm_remainder): Fixed the fixnum-min / (abs | |
358 | fixnum-min) special case. | |
359 | ||
360 | (scm_big_and): Fix for negative first parameter. | |
361 | ||
362 | (scm_bit_extract): Fix for fixnum paramters. | |
363 | Thanks to Rob Browning for the bug report. | |
364 | ||
365 | (scm_init_numbers): Initialize abs_most_negative_fixnum. | |
366 | ||
debe0dc2 DH |
367 | 2001-01-16 Dirk Herrmann <D.Herrmann@tu-bs.de> |
368 | ||
369 | * symbols.c (scm_symbol_bound_p): Fixed comment. | |
370 | Thanks to Chris Cramer. | |
371 | ||
8a39e3fc DH |
372 | 2001-01-15 Dirk Herrmann <D.Herrmann@tu-bs.de> |
373 | ||
374 | * smob.[ch] (scm_make_smob_type): Return type is scm_bits_t now. | |
375 | Thanks to Bill Schottstaedt. | |
376 | ||
322ec19d ML |
377 | 2001-01-11 Michael Livshin <mlivshin@bigfoot.com> |
378 | ||
379 |