1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-04 14:20:26 +02:00
Commit graph

7169 commits

Author SHA1 Message Date
Mikael Djurfeldt
fe6ee0528b * boot-9.scm (ipow-by-squaring): Removed.
(default-duplicate-binding-handler): Set default to
'(replace warn last)
2003-03-12 16:52:07 +00:00
Mikael Djurfeldt
0c160c7339 Adjusted warning message 2003-03-12 14:40:19 +00:00
Mikael Djurfeldt
8d8dac1f2f * boot-9.scm (module-duplicates-info, set-module-duplicates-info!): Removed.
(module-duplicates-handlers, module-duplicates-interface): New.
(module-type): Added duplicates-handlers and duplicates-interface.
2003-03-12 14:30:03 +00:00
Mikael Djurfeldt
d57da08b6d * srfi-13.scm: Mark replacements.
* srfi-17.scm: Mark replacements.

* boot-9.scm (module-make-local-var!): Use module-add!.
(module-primitive-add!): New function.
(resolve-interface): Use
(call-with-deferred-observers, module-call-observers): New
functions.
(module-defer-observers, module-defer-observers-mute,
module-defer-observers-table): New variables.
(process-define-module, process-use-modules, export, re-export):
Use call-with-deferred-observers.

* syncase.scm (eval): Mark as replacement.

* boot-9.scm (defmacro-public): Use export-syntax instead of export.
2003-03-12 14:11:42 +00:00
Mikael Djurfeldt
70a9dc9cde *** empty log message *** 2003-03-12 10:04:35 +00:00
Mikael Djurfeldt
70a459e3f8 * slib.scm (*features*): Set the core variable instead of defining
a local version.
(provide, provided?): Mark as replacements.

* boot-9.scm (beautify-user-module!): Don't install the duplicates
handler here.
(default-duplicate-binding-handler): Renamed from
default-module-duplicates-handler; Removed converter.
(process-duplicates): Lookup default duplicates handler dynamically.
(default-duplicate-binding-procedures): New parameter.
2003-03-12 10:03:25 +00:00
Mikael Djurfeldt
509a787a4c * slib.scm (identity): Removed. (Provided by core.) 2003-03-12 09:28:20 +00:00
Mikael Djurfeldt
8dd18ceaf5 Adjustments of error messages 2003-03-11 20:11:20 +00:00
Mikael Djurfeldt
c614a00b8c * srfi-1.scm (filter, filter!): Removed. (Now implemented in the core.)
* goops/util.scm (filter): Removed.  (Now supplied by core.)

* list.c, list.h (scm_filter, scm_filter_x): New functions.

* debugger/command-loop.scm: Prefix all commands imported from
(ice-9 debugger command-loop) with debugger:.

* boot-9.scm (resolve-interface): Process #:hide; Name custom interfaces
appropriately.
(module-use!, module-use-interfaces!): Remove existing interfaces
on the use-list based on module name rather than interface
identity so that custom interfaces truly replaces their previous
version.
2003-03-11 19:58:14 +00:00
Mikael Djurfeldt
b0dff01890 Indentation 2003-03-11 19:55:00 +00:00
Mikael Djurfeldt
109c2c9f29 * modules.c (scm_module_import_interface): New function.
* boot-9.scm (process-duplicates): Use module-import-interface.
(module-symbol-interface): Removed.
2003-03-11 15:58:02 +00:00
Mikael Djurfeldt
f8af5c6d35 * goops.scm (define-extended-generics): New syntax.
(<class> <operator-class> <entity-class> <entity>): Marked as
replacements.
(upgrade-accessor): Renamed from upgrade-generic-with-setter.
(ensure-accessor, upgrade-accessor): Rewritten to accomodate the
new <accessor> class.
(merge-accessors): Provide for merging of accessors imported from
different modules under the same name.

* goops.c, goops.h (scm_class_accessor_method): Renamed from
scm_class_accessor.
(scm_class_accessor): New class.
2003-03-11 14:50:08 +00:00
Mikael Djurfeldt
70da0033f0 *** empty log message *** 2003-03-11 12:23:15 +00:00
Mikael Djurfeldt
f595ccfefc * srfi-1.scm (iota map for-each map-in-order list-index member
delete delete! assoc): Marked as replacements.

* goops.scm (define-extended-generics): New syntax.
(<class> <operator-class> <entity-class> <entity>): Marked as
replacements.

* boot-9.scm (module-override!, make-mutable-parameter,
lookup-duplicates-handlers, default-module-duplicates-handler):
New functions.
(process-duplicates): Don't call duplicates handlers for duplicate
bindings of the same variable.
(process-define-module): Process #:replace.
(compile-interface-spec, resolve-interface): Process #:prefix.

* format.scm (format): Marked as replacement.

* threads.scm (future, future-ref): Marked as replacements.
2003-03-10 23:18:05 +00:00
Rob Browning
dbd6bd2910 *** empty log message *** 2003-03-08 04:29:43 +00:00
Rob Browning
3b48e1143a * preface.texi: change MANUAL_EDITION to MANUAL-EDITION so we
don't choke TeX (thanks to Dale P. Smith).
2003-03-08 04:29:08 +00:00
Rob Browning
c73543afd7 * guile.texi: change MANUAL_EDITION to MANUAL-EDITION so we don't
choke TeX (thanks to Dale P. Smith).
2003-03-08 04:28:55 +00:00
Mikael Djurfeldt
7b07e5efb6 * boot-9.scm (process-define-module): Handle #:duplicates.
(module-use-interfaces! process-duplicates): New functions.
(duplicate-handlers): Dictionary of duplicate handlers.
(module-symbol-local-binding, module-symbol-binding): Bugfix.

* goops.scm (equal?): Define default method.
(merge-generics): Provide for merging of generic functions
imported into a module under the same name.
2003-03-07 13:12:47 +00:00
Mikael Djurfeldt
a48d60b1c0 * srfi-1.c (scm_init_srfi_1): Extend root module map and for-each
with the versions in this module using
scm_c_extend_primitive_generic.

* goops.scm (equal?): Define default method.

* goops.c (scm_primitive_generic_generic): Enable primitive
generic if not enabled.
(scm_sys_goops_loaded): Setup unextended primitive generics.

* goops.c, goops.h (scm_c_extend_primitive_generic): New function.

* snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
snarf macros.

* numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC.  (This is only a
testing example.  All uses of SCM_GPROC should be converted.)

* procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
scm_assoc.

* eq.c (scm_equal_p): Turned into a primitive generic.
2003-03-06 12:51:57 +00:00
Mikael Djurfeldt
1798b73dc4 * session.scm (apropos): Use hash-for-each instead of
array-for-each.
2003-03-04 11:56:10 +00:00
Mikael Djurfeldt
ea7f6344cf Added comments to scm_c_random_bignum 2003-03-03 13:19:46 +00:00
Rob Browning
25ad768128 *** empty log message *** 2003-02-27 07:20:33 +00:00
Rob Browning
8907576fb2 * configure.in (AC_CONFIG_SRCDIR): use GUILE-VERSION.
(AM_CONFIG_HEADER): change to config.h
2003-02-27 07:16:39 +00:00
Rob Browning
2cd04e9c36 * guile-aclocal.sh: deleted in favor of ACLOCAL_AMFLAGS in
Makefile.am.
2003-02-27 07:10:51 +00:00
Rob Browning
52588646e5 * Makefile.am (EXTRA_DIST): remove $(ACLOCAL).
(ACLOCAL_AMFLAGS): replaces ACLOCAL.
2003-02-27 07:09:41 +00:00
Rob Browning
549d7a55a0 * autogen.sh: switch to autoreconf -- see how it goes. remove
call to guile-aclocal.sh -- we now do the same thing with an
automake setting.
2003-02-27 07:08:28 +00:00
Rob Browning
1e6cb6e1e7 * autogen.sh: use autoreconf. 2003-02-27 07:04:57 +00:00
Rob Browning
84edc04952 *** empty log message *** 2003-02-27 07:04:25 +00:00
Rob Browning
93ff93f6f5 * Makefile.am (scmconfig.h): new target -- generate file from
../config.h.
(modinclude_HEADERS): remove version.h.
(nodist_modinclude_HEADERS): add version.h.
2003-02-27 07:04:16 +00:00
Mikael Djurfeldt
b4a1358cfb * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
SCM_EOL.
(scm_struct_prehistory): Move scm_free_structs to
scm_before_mark_c_hook.

* gc-card.c (sweep_card): Check that we haven't swept structs on
this card before.  That can happen if scm_i_sweep_all_segments has
been called from some other place than scm_igc.
2003-02-24 19:21:56 +00:00
Mikael Djurfeldt
53af825522 * struct.c (scm_struct_prehistory): Move scm_free_structs to
scm_before_mark_c_hook.
2003-02-24 11:26:46 +00:00
Mikael Djurfeldt
ea5c928530 * struct.c (scm_struct_gc_init): Removed.
(scm_struct_prehistory): Init scm_i_structs_to_free to SCM_EOL.
(This fixes a serious GC bug, introduced during the latest
reorganization of the GC, preventing freeing of structs and GOOPS
objects.)
2003-02-24 10:46:29 +00:00
Mikael Djurfeldt
9358af6a3e Fix of previous change 2003-02-19 17:57:01 +00:00
Mikael Djurfeldt
231a4ea849 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
(since hash tables now adapt their size).

* modules.c (scm_modules_prehistory): Changed from 2001 to 1533
(current number of prehistory bindings; hashtable code will select
a prime which is greater than this value).

* symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
(current number of initial symbols).

* properties.c (scm_init_properties): Don't specify size of
scm_properties_whash.

* objprop.c (scm_init_objprop): Don't specify size of
scm_object_whash.

* keywords.c (scm_init_keywords): Don't specify a hash table size.
2003-02-19 16:16:46 +00:00
Mikael Djurfeldt
110beb83a5 Fix of last change. 2003-02-19 15:43:00 +00:00
Mikael Djurfeldt
cbbeea6603 * tests/elisp.test: Use module (ice-9 weak-vector).
* tests/weaks.test: Use module (ice-9 weak-vector).
2003-02-19 15:31:30 +00:00
Mikael Djurfeldt
0296763627 Added missing export 2003-02-19 15:31:05 +00:00
Mikael Djurfeldt
c35738c1ae * hooks.c (scm_c_hook_add): Fixed bug in append mode.
* environments.c (obarray_enter, obarray_retrieve, obarray_remove,
leaf_environment_fold, obarray_remove_all): Use hashtable
accessors.

* gc.c (scm_init_storage): Moved hook initialization to
scm_storage_prehistory.
(scm_storage_prehistory): New function.
(scm_igc): Added commentary about placement of
scm_after_sweep_c_hook.

* gc-mark.c (scm_mark_all): Use hashtable accessors.
(scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
SCM_WVECT_WEAK_VALUE_P.

* hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
functions.
(scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
Removed.
(scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
scm_make_doubly_weak_hash_table): Moved here from weaks.c.

* init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
calls to scm_storage_prehistory and scm_hashtab_prehistory.

* modules.c (module-reverse-lookup): Use hashtable accessors.

* symbols.c, symbols.h (scm_i_hash_symbol): New function.

* weaks.c, weaks.h (scm_make_weak_key_alist_vector,
scm_make_weak_value_alist_vector,
scm_make_doubly_weak_alist_vector): New functions.

* weaks.c (scm_init_weaks_builtins): New function.

* weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
SCM_WVECT_NOSCAN_P): New macros.

* weaks.c (scm_scan_weak_vectors):  Use SCM_WVECT_WEAK_KEY_P
and SCM_WVECT_WEAK_VALUE_P.

* weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
allocate_weak_vector and exported.

* Makefile.am (ice9_sources): Added weak-vector.scm.

* weak-vector.scm: New file.

* boot-9.scm (module-clear!): Use hash-clear!.
(module-for-each): Use hash-for-each.
(module-map): Use hash-map.
2003-02-19 15:04:51 +00:00
Mikael Djurfeldt
0a4c135550 * hashtab.c: Undid thread safety. (We decided that it's better to
let the user explicitly protect the tables (or not) according what
is suitable for the application.)
2003-02-13 10:42:59 +00:00
Mikael Djurfeldt
87ca11ff19 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
thread safe and handle resizing tables.
(scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
SCM_DEFER/ALLOW_INTS.
2003-02-12 09:55:10 +00:00
Mikael Djurfeldt
f59a096e59 * hashtab.c (scm_vector_to_hash_table,
scm_c_make_resizing_hash_table, scm_make_hash_table): New
functions.
(scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
safe and handle resizing tables.

* weaks.c (scm_make_weak_key_hash_table,
scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
Size argument made optional.  Return resizable table if not
specified.

* boot-9.scm (make-hash-table): Turned primitive.
2003-02-11 13:49:32 +00:00
Mikael Djurfeldt
4b612c5be7 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
Fixed formals tests for closures.  (Thanks to Kevin Ryde.)
2003-02-10 12:39:11 +00:00
Mikael Djurfeldt
b3d7f6dfea * debug.c (scm_procedure_source): Handle all objects for which
procedure? is #t.  (Thanks to Bill Schottstaedt.)
2003-02-05 19:04:40 +00:00
Mikael Djurfeldt
f9ac1c2df8 * srfi-1.c (srfi1_for_each): Corrected argument checking for the
case of two argument lists.  (Thanks to Kevin Ryde.)
2003-02-03 14:48:25 +00:00
Mikael Djurfeldt
07a68d543f *** empty log message *** 2003-01-27 09:21:38 +00:00
Mikael Djurfeldt
e963ac2c54 * syncase.scm (guile-macro): Strip syntactic information from
expression before trying to treat it as a Guile macro call.
(Thanks to Kevin Ryde.)
2003-01-27 08:46:18 +00:00
Mikael Djurfeldt
c2950e36ef * threads.scm (parallel, letpar): Rewritten. 2003-01-24 10:32:13 +00:00
Mikael Djurfeldt
361d631fb7 * futures.c (mark_futures): Don't need to mark data of recycled
futures.
(scan_futures, cleanup_undead): Be smarter about marking
futures---avoid unnecessary passes through future lists.
2003-01-23 20:31:38 +00:00
Mikael Djurfeldt
6b468ba449 * futures.h, futures.c: New files; Introduced recycling of
futures.  For fine-grained threading this lifts performance to
another level.  We can now use parallelization in inner loops of
Guile programs without impossible overhead.
2003-01-23 16:13:13 +00:00
Mikael Djurfeldt
756414cf2c * threads.h, threads.c: Moved futures to their own file.
* Makefile.am (libguile_la_SOURCES): Added futures.c.
(DOT_X_FILES): Added futures.x.
(DOT_DOC_FILES): Added futures.doc.
(modinclude_HEADERS): Added futures.h.

* threads.c, threads.h (scm_i_create_thread): Renamed from
create_thread and made global.

* eval.c: #include "libguile/futures.h".

* init.c: #include "futures.h"
(scm_init_guile_1): Call scm_init_futures.

* stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.

* stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.

* eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
functions.

* eval.c (scm_trampoline_1): Fixed arguments test for closures.
2003-01-23 16:04:37 +00:00