1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

15149 commits

Author SHA1 Message Date
Mikael Djurfeldt
42db06f0c0 * gc.c (scm_igc): Added SCM_THREAD_CRITICAL_SECTION_START and
SCM_THREAD_CRITICAL_SECTION_END.  Moved marking of root data to
root.c:mark_root.
1996-10-01 03:18:43 +00:00
Mikael Djurfeldt
a6cba733bc * feature.c (scm_init_feature): Added threads feature (needs to be
initialized here, since features doesn't exist when
scm_init_threads is called).
1996-10-01 03:18:32 +00:00
Mikael Djurfeldt
027fde3970 * configure.in, acconfig.h: Added flags for thread support. 1996-10-01 03:16:21 +00:00
Mikael Djurfeldt
1764973d10 * _scm.h: Added conditional #include "threads.h" 1996-10-01 03:15:33 +00:00
Mikael Djurfeldt
8233909404 * __scm.h (SCM_ASYNC_TICK): Added call to macro
SCM_THREADS_SWITCHING_CODE.
1996-10-01 03:15:04 +00:00
Mikael Djurfeldt
9bdb1ea5b9 Added dependency root.o: root.x. 1996-10-01 03:10:11 +00:00
Mikael Djurfeldt
e5e0f394f6 *** empty log message *** 1996-10-01 03:00:09 +00:00
Mikael Djurfeldt
8484d069c0 * configure.in: Added some configuration magic from the Cygnus
distribution.
1996-10-01 02:58:50 +00:00
Mikael Djurfeldt
0a5d3f87e1 * configure: Updated. 1996-10-01 02:58:39 +00:00
Mikael Djurfeldt
ebf5083348 * aclocal.m4: New file. For now used for thread support
configuration.
1996-10-01 02:57:50 +00:00
Gary Houston
dbece3a204 * strings.c, strings.h: (scm_makfrom0str, scm_makefrom0str_opt:
declare the char * to be const.  Avoids a warning in rgx.c.

* ports.h: spelling fix.

* filesys.c (scm_sys_stat, scm_sys,lstat): include file name in
error messages.

* load.c (scm_sys_try_load_path): throw an error if file not found
(like it says it in NEWS).
1996-09-28 19:40:54 +00:00
Gary Houston
5552355a7b * boot-9.scm (error): replace another throw with scm-error. Throw
to 'misc-error instead of 'error (no need to distinguish these.)
Don't set up 'error as a key.
Set up regex-error as a key, if regex is available.
(signal-handler): use scm-error, not throw.

(%try-load, try-load-with-path, %load, load-with-path,
basic-try-load-with-path, basic-load-with-path,
try-load-module-with-path,load-module-with-path): deleted, since
they seem redundant.
(try-load): define using %try-load, not try-load-with-path.
(load): rewritten.  load tries to open the file directly and
with a .scm extension before searching the library directories
(should "." be added to %load-path?  then load could still open
directly files starting with "/").
(try-module-autoload): use load, not load-with-path.
(%load-indent): deleted, -2 was causing errors.

(%read-sharp): use port-line, not line-number.
1996-09-28 19:38:45 +00:00
Jim Blandy
1d1cf2bf14 . 1996-09-28 02:02:40 +00:00
Jim Blandy
d6c7f2deab * throw.h, throw.c: Use SCM_P instead of #if hair. 1996-09-28 00:04:22 +00:00
Jim Blandy
32f7b3a1b1 * throw.h, throw.c: Use SCM_P instead of #if hair.
Remove special support for uncaught throws; see throw.c for
rationale.
* throw.c (unhandled_throw): New function.
(scm_ithrow): Call unhandled_throw if we don't find a throw
target; don't mess with scm_bad_throw_vcell.
(scm_bad_throw_vcell): Variable deleted.
(scm_init_throw): Don't initialize it.

* throw.c (scm_ithrow): Don't let outer key matches shadow inner
#t catches.
1996-09-28 00:01:40 +00:00
Gary Houston
b59b97ba3a * load.c (scm_sys_try_load): don't check whether value returned
by scm_open_file is #f, it won't be.  Always return SCM_UNSPECIFIED.
Change the Scheme name from %try-load to primitive-load.

* error.c (scm_error): convert a NULL message to SCM_BOOL_F.
Can avoid passing a message, allowing it to be derived in the
error handler (e.g., if we want to throw to the key both from
Scheme and C).
1996-09-24 07:21:17 +00:00
Gary Houston
855c0eacc8 * boot-9.scm (%try-load): define using primitive-load. Previously
%try-load itself was the primitive.
(load-with-path): use scm-error instead of %load-announce-lossage.
Errors are thrown to 'misc-error instead of 'could-not-load.
(%load-announce-lossage): deleted.
1996-09-24 07:19:51 +00:00
Mikael Djurfeldt
a0c976972a *** empty log message *** 1996-09-22 22:51:18 +00:00
Mikael Djurfeldt
6355358ad9 * boot-9.scm (warn, scm-style-repl): Use C printer instead of `print'.
(make-record-type type-name fields): Temporarily remove support
for printing of records (not possible yet with C printer).
1996-09-22 22:51:01 +00:00
Mikael Djurfeldt
8ab4a274e8 * print.h: Modified prototypes for scm_iprlist, scm_prin1 and
scm_iprin1.  Removed prototype for scm_prlist.

	* print.c, print.h: Closures now print like #<procedure foo (x)>.
	People who whish to see the source can do `(print-enable 'source)'.
	Removed #ifdef DEBUG_EXTENSIONS.
1996-09-22 22:47:10 +00:00
Mikael Djurfeldt
c62fbfe1a8 * * print.c (scm_iprin1, scm_prin1, scm_iprlist): Circular
references now have a new appearance which is more compact and
	also gives a clue about what the target of the reference is.
	By setting parameters in the print state, more fancy printing can
	be achieved.  This is used by the (not yet commited) backtrace
	code.

	* print.c: Added #include "struct.h".  Removed function
	scm_prlist.

	* print.c (scm_prin1): Print states are now allocated when calling
 	scm_prin1 and then passed around to all printing functions as an
 	argument.  A cache `print_state_pool' enables reuse of print
 	states.
	(scm_make_print_state): New function.
	(scm_iprin1): Adaption to print states.
	(scm_iprlist): An initial "hare and tortoise" scan brings down
	time complexity to O (depth * N).  (Better time complexity will be
	achieved when the printing code is completely rewritten.)

	* print.c, print.h: Closures now print like #<procedure foo (x)>.
	People who whish to see the source can do `(print-enable 'source)'.
	Removed #ifdef DEBUG_EXTENSIONS.
1996-09-22 22:46:31 +00:00
Mikael Djurfeldt
9882ea1991 * arbiters.c (prinarb),
async.c (print_async),
debug.c (prindebugobj, prinmemoized),
eval.c (prinprom, prinmacro),
filesys.c (scm_fd_print, scm_dir_print),
kw.c (print_kw),
mallocs.c (prinmalloc),
numbers.c, numbers.h (scm_floprint, scm_bigprint),
smob.h (scm_smobfuns),
srcprop.c (prinsrcprops),
throw.c (prinjb),
unif.c, unif.h (scm_raprin1, rapr1),
variable.c (prin_var): Changed argument `int writing' to
`scm_print_state *pstate'.
1996-09-22 22:41:40 +00:00
Mikael Djurfeldt
1940267936 * eval.c, numbers.h, unif.h, smob.h, srcprop.c: Added #include
"print.h"

* arbiters.c (prinarb),
async.c (print_async),
debug.c (prindebugobj, prinmemoized),
eval.c (prinprom, prinmacro),
filesys.c (scm_fd_print, scm_dir_print),
kw.c (print_kw),
mallocs.c (prinmalloc),
numbers.c, numbers.h (scm_floprint, scm_bigprint),
smob.h (scm_smobfuns),
srcprop.c (prinsrcprops),
throw.c (prinjb),
unif.c, unif.h (scm_raprin1, rapr1),
variable.c (prin_var): Changed argument `int writing' to
`scm_print_state *pstate'.
1996-09-22 22:41:10 +00:00
Mikael Djurfeldt
2c36c351d0 * struct.c (scm_make_struct_layout, init_struct, scm_struct_ref,
scm_struct_set_x), struct.h, gc.c (scm_gc_mark): Completed Tom
Lord's implementation of structs, allowing for tail arrays as
described in the manual. Also fixed some bugs. (Both the interface
and the implementation should be improved.)
1996-09-22 22:38:56 +00:00
Mikael Djurfeldt
90b826c925 * init.c (scm_boot_guile): Moved scm_init_struct upwards so
that it will be called before scm_init_print.
1996-09-22 22:33:44 +00:00
Mikael Djurfeldt
ad75306c4f * struct.c (scm_make_struct_layout, init_struct, scm_struct_ref,
scm_struct_set_x), struct.h, gc.c (scm_gc_mark): Completed Tom
Lord's implementation of structs, allowing for tail arrays as
described in the manual. Also fixed some bugs. (Both the interface
and the implementation should be improved.)
1996-09-22 22:33:09 +00:00
Mikael Djurfeldt
ec98b5046c *** empty log message *** 1996-09-22 22:28:11 +00:00
Gary Houston
be2d2c708b * boot-9.scm (file-exists?, file-is-directory): catch only
system-error, not every kind of error.
(scm-error): new procedure.
1996-09-20 09:02:14 +00:00
Jim Blandy
434bf5ce78 . 1996-09-19 21:03:43 +00:00
Jim Blandy
151e0ee5ff . 1996-09-19 20:35:22 +00:00
Jim Blandy
3db587763b *** empty log message *** 1996-09-19 20:32:33 +00:00
Mikael Djurfeldt
bf39f34275 * read.c (scm_init_read): Removed #ifdef READER_EXTENSIONS 1996-09-19 14:17:27 +00:00
Mikael Djurfeldt
84f6a34a80 * print.c, print.h: Closures now print like #<procedure foo (x)>.
People who whish to see the source can do `(print-enable 'source)'.
Removed #ifdef DEBUG_EXTENSIONS.
1996-09-19 14:17:01 +00:00
Mikael Djurfeldt
d99bcec4ac *** empty log message *** 1996-09-19 14:16:25 +00:00
Gary Houston
f5bf2977c6 * filesys.c (scsm_sys_stat): don't SIGSEGV if argument is an
integer (assuming for now accepting an integer is a good thing).

	* error.c, fports.c: replace use of %S in lgh_error args with %s.
	%S will be used instead for write'ing arguments.

	* unif.c (scm_transpose_array): change arguments in the SCM_WNA
	asserts.  fix a few other asserts.
	(scm_aind, scm_enclose_array, scm_array_in_bounds_p,
	scm_uniform_vector_ref,	scm_array_set_x,
	scm_dimensions_to_unform_array): change args in
	SCM_WNA SCM_ASSERTS and change scm_wta's to scm_wrong_num_args.
	strop.c (scm_substring_move_left_x, scm_substring_move_right_x,
	scm_substring_fill_x): likewise.
	gsubr.c (scm_gsubr_apply): likewise.
	eval.c (SCM_APPLY): likewise.

	* eval.c (4 places): replace scm_everr with lgh_error or
	scm_wrong_num_args.

	* error.c, error.h (scm_wrong_num_args, scm_wrong_type_arg,
	scm_memory_error): new procedures.
*	scm_everr: deleted.  can use scm_wta, dropping first two args.
	scm_error: convert NULL subr to SCM_BOOL_F.

	* __scm.h: don't define SCM_STACK_OVFLOW, SCM_EXIT, SCM_ARG6, SCM_ARG7,
	SCM_ARGERR.

	* stackchk.c (scm_report_stack_overflow): use lgh_error instead
	of scm_wta.

	* error.c, error.h: new error keys: scm_arg_type_key,
	scm_args_number_key, scm_memory_alloc_key, scm_stack_overflow_key,
	scm_misc_error_key.
	scm_wta: reimplement using lgh_error instead of scm_everr.
1996-09-19 09:08:07 +00:00
Gary Houston
2194b6f00e * boot-9.scm (%%handle-system-error key): remove the code for
SCM-style errors.  handle the case that an unexpected number
	of args are supplied.
	(%%system-errors): removed.
	(error): redefine using a throw with key and 4 args.
	('error): associate 'error, 'error-signal keys with
	%%handle-system-error.
	(%%default-error-handler): removed.
	(signal-handler): throw with 4 args and use the error-signal key.
	Create an error message instead of using numerical codes.
	(%%bad-throw): call error instead of throw if key not found.

	* boot-9.scm: initialize new error keys (see libguile/ChangeLog).
	(%%handle-system-error key): check subr is not #f before printing.
	Recognize %s (embed an argument using "display") and
	%S (embed an argument using "write").
1996-09-19 09:04:55 +00:00
Mikael Djurfeldt
9fec1f77c3 * srcprop.h: Name changes: tc16_srcprops --> scm_tc16_srcprops,
_scm_make_srcprops --> scm_make_srcprops; Remove one layer of
function calls in the definition of the whash access macros.
1996-09-18 19:36:44 +00:00
Mikael Djurfeldt
5c5549cbca * srcprop.c (scm_finish_srcprop): Bugfix: update ptr.
(scm_init_srcprop): Adjusted size of initial source-whash.  Name
changes: tc16_srcprops --> scm_tc16_srcprops, _scm_make_srcprops
--> scm_make_srcprops
1996-09-18 19:36:29 +00:00
Mikael Djurfeldt
7e763bfcba * read.h: Added prototype for scm_lreadrecparen 1996-09-18 19:36:09 +00:00
Mikael Djurfeldt
09a4f0393d * read.c: Added code for recording of positions of source code
expressions; New functions: recsexpr, scm_lreadrecparen;
_scm_make_srcprops --> scm_make_srcprops
(scm_flush_ws): Removed updating of positions counters.  This work
is already done by scm_gen_getc
1996-09-18 19:35:48 +00:00
Mikael Djurfeldt
dbef8851ac * print.c: Added #include "alist.h" 1996-09-18 19:35:21 +00:00
Mikael Djurfeldt
d14af9f2d3 * ports.c, ports.h: Name change: scm_\(line\|column\)_number -->
scm_port_\1; Added mutator scm_set_port_filename_x (used when
loading source from non-file ports, which, e. g., happens when
using the Emacs interface).
1996-09-18 19:34:58 +00:00
Mikael Djurfeldt
a0fcb30863 * options.c: Documentation fixes. 1996-09-18 19:34:14 +00:00
Mikael Djurfeldt
65fddfc000 * gdbint.c: scm_lread now has one more argument. 1996-09-18 19:33:58 +00:00
Mikael Djurfeldt
96937708a9 * fports.c (scm_open_file): Don't call scm_makfrom0str on a scheme
object.
1996-09-18 19:33:43 +00:00
Mikael Djurfeldt
ac46ab165a * eval.c: Added #include "hash.h" 1996-09-18 19:33:22 +00:00
Mikael Djurfeldt
f23641a9d3 * eq.c: Added #include "ramap.h" 1996-09-18 19:32:40 +00:00
Mikael Djurfeldt
7dd604b948 *** empty log message *** 1996-09-18 19:32:24 +00:00
Gary Houston
ebf7394e72 * ports.h (scm_port_table): put back file_name, it will be used to
support debugging.  Undo related changes in fports.c, ioext.c,
ports.c, gc.c.
1996-09-17 02:09:50 +00:00
Gary Houston
19639113d1 * ports.h (scm_port_table): remove file_name member for now, it seems
undesirable.
	* fports.c (scm_open_file): don't set file_name in PTAB.
	(prinfport): don't use file_name in PTAB.
	* ioext.c (scm_sys_duplicate_port): don't set file_name in PTAB.
	* ports.c (scm_add_to_port_table): don't intialize file_name.
	(scm_port_file_name): remove for now.
	* gc.c (scm_gc_mark): don't mark PTAB file_name.

	* fports.h (scm_mkfile): prototype deleted.
	* fports.c (scm_mkfile): merged into scm_open_file to simplify.
1996-09-16 03:32:26 +00:00