1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-19 03:00:25 +02:00
Commit graph

334 commits

Author SHA1 Message Date
Marius Vollmer
4a276c08e3 (%cond-expand-features): Addef srfi-13 and srfi-14. 2004-08-24 22:20:47 +00:00
Kevin Ryde
018733ff9e (%cond-expand-features): Add srfi-6 which is in the core. 2004-07-09 23:44:48 +00:00
Dirk Herrmann
3d2ada2fbc * boot-9.scm: Reordered definitions such that macro definitions
preceed their first usage.  Include and define deprecated stuff
	late in the file to have a better change of detecting accidental
	uses of deprecated definitions. Further, unified the layout a
	little and grouped definitions more cleanly into topics.
2004-05-29 08:40:38 +00:00
Dirk Herrmann
9f84d6aac7 * boot-9.scm (resolve-module): Always start searching from the
root module.  This will allow the C equivalent scm_resolve_module
	to work, independent of what the current module is.
2004-05-03 22:42:09 +00:00
Marius Vollmer
fa2803b92b (top-repl): Make the (guile-user) module use the (ice-9 r5rs) module. 2004-02-18 22:29:45 +00:00
Mikael Djurfeldt
711a9fd7ee * unif.c (scm_make_uve): Removed local variable and simplified
code in order to avoid compiler used uninitialized warnings.

* hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
scm_hash_map.
(scm_hash_fold): Use scm_call_3 directly in the call to
scm_internal_hash_fold instead of going via fold_proc (which is
now removed).
(scm_hash_for_each): Use a trampoline +
scm_internal_hash_for_each_handle.
(scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
functions.
2004-02-13 23:15:37 +00:00
Neil Jerram
bb5ad88f27 Back out change to lazy-handler-dispatch lookup. 2004-01-20 22:38:39 +00:00
Kevin Ryde
2de97f05f0 Revert this, it breaks test-suite/tests/r5rs_pitfalls.test where
false-if-exception is used within syntax-rules.  (Suspect syntax-rules
	ought to support this sort of thing, but it doesn't right now.)

	* boot-9.scm (false-if-exception): Unquote catch and lambda, so as not
	to depend on expansion environment.
2004-01-11 00:01:48 +00:00
Marius Vollmer
062fccce79 (with-fluids): Use with-fluid* when only one fluid is being set. 2004-01-07 19:51:07 +00:00
Kevin Ryde
b83fc1070c (false-if-exception): Unquote catch and lambda, so as not
to depend on expansion environment.
2004-01-03 21:10:27 +00:00
Neil Jerram
64758fe259 Defer lookup of lazy-handler-dispatch. 2003-11-19 01:16:16 +00:00
Marius Vollmer
473687d130 (@, @@): New macros. 2003-11-17 00:28:03 +00:00
Dirk Herrmann
37f5dfe533 * boot-9.scm: Started comment about module system workings. 2003-11-16 13:54:26 +00:00
Kevin Ryde
f319727482 Add another comment to:
(file-exists?): Use stat rather than access?, ...
2003-09-15 22:29:32 +00:00
Kevin Ryde
833fc2f186 (file-exists?): Use stat rather than access?, so as to
follow the effective UID/GID not the real ID.  file-exists? is
normally be used as a prelude to opening or some other operation, and
it's the effective ID which will apply there.  Emacs file-exists-p
uses stat, presumably for the the same reason.
2003-09-12 23:35:54 +00:00
Marius Vollmer
eb84efa171 (make-autoload-interface): Use a proper hashtable as
the obarray, not an empty vector.
(make-module): Always construct a hashtable for the obarray, even
for empty ones.
2003-09-12 15:16:42 +00:00
Kevin Ryde
5578a53f9b * boot-9.scm (while): Use a new key dynamically for each loop, so
break and continue associate to their loop even when recursing.
2003-08-17 00:36:04 +00:00
Kevin Ryde
773abfbb81 (while): Rewrite, continue as proper escape, break
without return value, break and continue new for each while form,
don't depend on bindings in expansion environment.
2003-08-12 21:38:21 +00:00
Dirk Herrmann
42ad901d04 * benchmark-suite/lib.scm: Fix some typos in the documentation.
* doc/ref/scheme-compound.texi: Clarified that vectors need to
       be quoted.

       * doc/tutorial/guile-tut.texi: Fix example, where a vector
       constant is used without quoting.

       * ice-9/boot-9.scm (make-autoload-interface): Added missing
       quote around vector constant.

       * test-suite/tests/elisp.test: Added missing quote around vector
       constants.
2003-05-27 18:33:19 +00:00
Marius Vollmer
297775ce69 (display-usage-report): Use keyword->symbol instead of keyword-symbol,
which doesn't exist.  Thanks to Kevon Ryde.
2003-05-03 20:52:31 +00:00
Marius Vollmer
73be1d9e8e Changed license terms to the plain LGPL thru-out. 2003-04-05 19:15:35 +00:00
Marius Vollmer
48fdec2178 Load "ice-9/deprecated.scm" when appropriate.
(try-load-module): Also try the old deprecated method, maybe.
2003-03-26 17:59:22 +00:00
Marius Vollmer
e8ed460ec7 (call/cc): Added. 2003-03-22 00:34:34 +00:00
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