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

311 commits

Author SHA1 Message Date
Mikael Djurfeldt
65bed4aa84 * boot-9.scm (duplicate-handlers): Make sure the merge-generics
and merge-accessors handlers are available also before (oop goops)
has been loaded.  This is so that people can put them as default
handlers without worrying about availability.
2003-03-12 19:27:15 +00:00
Mikael Djurfeldt
6496a6638b * boot-9.scm (default-duplicate-binding-handler): Set default to
'(replace warn last)
2003-03-12 17:16:36 +00:00
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
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
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
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
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
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
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
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
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
cf743aeae6 * boot-9.scm (use-syntax): Return *unspecified*.
* syncase.scm: (syncase): Set expansion-eval-closure.
2003-01-15 20:35:25 +00:00
Neil Jerram
db85376112 Add a hook that is run whenever a new module is defined. 2002-12-28 20:14:21 +00:00
Dirk Herrmann
f2cbc0e567 * boot-9.scm (re-export-syntax): Re-introduced after accidentally
removing it in my patch from 2002-11-16.
2002-11-24 08:28:05 +00:00
Dirk Herrmann
9123414ee0 Thanks to Mikael Djurfeldt for a bugreport which led to the
following changes:

* slib.scm (%system-define): Removed.

(define): Changed to use define-private instead of
%system-define.

* boot-9.scm (define-private): Undid my changes from 2002-11-16
until Guile supports hygienic macros.
2002-11-24 08:18:19 +00:00
Dirk Herrmann
6aa9ea7c90 * boot-9.scm (define-private, export-syntax, export-syntax):
Fixed my previous fix (blush).
2002-11-16 15:40:27 +00:00
Dirk Herrmann
ab382f5204 * boot-9.scm (define-private, export-syntax, export-syntax):
Changed definitions to form 'real' macro definitions.
2002-11-16 15:05:29 +00:00
Neil Jerram
3f619266b1 Fix error in recent define-option-interface "simplification".
Fix source breakpoints to cope with port whose filename is #f.
Ensure that position recording is enabled when source breakpoint module loaded.
2002-11-06 00:29:24 +00:00
Neil Jerram
0983f67f09 Simplify code for define-option-interface. 2002-11-04 19:40:49 +00:00
Mikael Djurfeldt
454b82f41f * boot-9.scm (top-repl): Look for use-emacs-interface in
guile-user-module (should it be there?) instead of
the-root-module.
2002-10-20 21:51:16 +00:00
Marius Vollmer
bb00edfa92 (top-repl): Use 2 as the limit when saving the stack.
(error-catching-loop): use call-with-blocked-asyncs and
call-with-unblocked-asyncs instead of mask-signals and unmask-signals.
2002-10-09 22:47:34 +00:00
Rob Browning
0ad7cc4f97 * boot-9.scm (expt): switch if sense and use negative? rather than
>= 0.
2002-10-05 04:10:48 +00:00
Marius Vollmer
f823f7e774 (top-repl): Use "1" instead of "%deliver-signals" to limit the signal
stack.
2002-10-04 13:09:30 +00:00
Marius Vollmer
f4232aa664 (feature?): Added deprecation message. 2002-09-15 21:30:39 +00:00
Rob Browning
0ac6420c88 * boot-9.scm (sqrt): minor indentation fix. 2002-09-15 01:19:17 +00:00
Dirk Herrmann
7c38399f30 * now using mmacros instead of macros at some places. 2002-07-07 05:18:17 +00:00
Gary Houston
1334c61ab0 * boot-9.scm (file-set-position): use seek, not fseek. Make
third argument optional, for better SCM compatibility.
	(file-position): simplify definition.
2002-06-01 17:14:17 +00:00
Marius Vollmer
f68acbb4b4 (file-set-position): Use seek instead of fseek. 2002-06-01 16:16:49 +00:00
Marius Vollmer
5c1254dae0 (unsetenv): New, for completeness. 2002-05-09 19:36:30 +00:00
Thien-Thi Nguyen
4eecfeb796 Comment grammar fixes; nfc. 2002-02-26 10:57:54 +00:00
Marius Vollmer
482a28f90a Added comments to functions that are used by "modules.c". 2001-11-23 21:43:44 +00:00
Marius Vollmer
eef6519bde (turn-on-debugging): New function, to be used by
scm_compile_shell_switches.
2001-11-05 23:09:10 +00:00
Mikael Djurfeldt
39819fa9e4 * boot-9.scm (process-define-module): New options: :export-syntax,
:re-export-syntax
2001-10-17 12:02:13 +00:00
Mikael Djurfeldt
5d20b8c7fe * boot-9.scm (process-define-module): Added :re-export. 2001-09-24 11:12:23 +00:00
Thien-Thi Nguyen
bd83482d50 (process-use-modules): Fix typo. 2001-09-19 12:56:28 +00:00
Dirk Herrmann
8c494e9973 * Removed lots of deprecated stuff. 2001-08-31 14:42:31 +00:00
Thien-Thi Nguyen
bbf5a91367 (resolve-interface): When returning a custom
interface, also consult source module's entire binding set,
not just its exported bindings, before throwing error.
2001-08-30 23:25:34 +00:00
Marius Vollmer
0005eb7c2d (resolve-interface): Get variables from the public interface of a
module instead of from the module itselfs.
2001-08-25 16:12:09 +00:00
Keisuke Nishida
88c4ba2aef * boot-9.scm (process-define-module): Bug fixed. 2001-07-31 14:08:04 +00:00
Marius Vollmer
6672871b9e (compile-interface-spec): Bug fix: the keyword argument is "renamer"
not "rename".
2001-07-12 23:26:52 +00:00
Rob Browning
71335c0d9d * boot-9.scm: Fixed the sense of the error message when read-eval?
is #f.  Thanks to Matthias for catching this.
2001-07-09 14:28:03 +00:00
Rob Browning
600c958485 * boot-9.scm: added fix suggested by Matthias for #. read
extension -- now only works if read-eval? is not #f.
2001-07-06 17:38:40 +00:00
Neil Jerram
d95c0b76d6 * Handle evaluator traps by calling trap handlers directly rather than
by scm_ithrow and a lazy catch handler.
2001-06-26 21:55:45 +00:00
Marius Vollmer
e6b748a832 (re-export-syntax): New. 2001-06-25 01:06:33 +00:00
Marius Vollmer
019ac1c987 (system-error-errno): New. 2001-06-16 20:14:24 +00:00
Marius Vollmer
de698bfa26 Use `begin-deprecated' instead of testing
`include-deprecated-features' when conditionally using the (ice-9
rdelim) module.  See below.
2001-06-11 17:23:42 +00:00