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

151 commits

Author SHA1 Message Date
Jim Blandy
132e5fac84 * boot-9.scm (and=>): Rename THUNK argument to PROCEDURE, 'cos
that's what it is.
1997-01-08 01:27:01 +00:00
Mikael Djurfeldt
33cf699f6e * * boot-9.scm (use-modules): New macro (from Marius Vollmer).
(use-modules <module name> ...) Put the the modules named by
	<module name> ... on the use list of the current module.
1997-01-05 23:38:10 +00:00
Jim Blandy
16050117fd * boot-9.scm (error-catching-loop): Remove message saying that
typing "$" will put you in the debugger.  This isn't implemented
yet.
1997-01-05 22:00:43 +00:00
Jim Blandy
ed440df5a9 * boot-9.scm (delq-all!): Function deleted; delq!'s semantics have
been fixed, so this function is superfluous.
(transform-usage-lambda): Use delq!, not delq-all!.
1996-12-23 04:38:04 +00:00
Marius Vollmer
0209ca9a14 * * boot-9.scm (resolve-module): New optional parameter that
controls whether autoloading is attempted or not. Default is #t.
	(process-define-module): Don't autoload the defined module.
	(try-module-autoload): Don't autoload the directory modules.

*	* boot-9.scm (process-define-module): Ensure that the-scm-module
 	is last in the `uses' list to allow shadowing builtin
 	bindings. All :use-module options are added in the order they
 	appear in the arguments but before anything already on the list
 	(such as the-scm-module).
1996-12-21 09:50:38 +00:00
Marius Vollmer
b1818df3c3 * boot-9.scm (macroexpand-1, macroexpand), slib.scm
(slib:features), r4rs.scm (%load-verbosely): "defined?" is now a
 function, use it accordingly.
1996-11-27 13:32:02 +00:00
Jim Blandy
31d50456c4 It's an "eval closure", not an "eval thunk." A thunk is a
function of no arguments.
* boot-9.scm (module-type): Rename module field.
(make-module, eval-in-module, make-root-module,
set-current-module): Uses changed.
(module-eval-closure, set-module-eval-closure!,
root-module-closure): Renamed from module-eval-thunk,
set-module-eval-thunk!, root-module-thunk.
(set-current-module): Change uses of *top-level-lookup-thunk* to
*top-level-eval-closure*.
1996-11-21 16:16:46 +00:00
Mikael Djurfeldt
21ed9efe51 * * boot-9.scm: The debugging evaluator and recording of positions
aren't enabled by default any longer (they are switched on in
	debug.scm).  But during development we want to have them also
	*inside* boot-9.scm.  Therefore, two lines are added at the
	beginning of boot-9.scm to enable these.
1996-11-02 20:51:30 +00:00
Jim Blandy
a06181a2d5 * boot-9.scm (load-from-path): New function.
* boot-9.scm (try-load, basic-try-load, try-load-module,
try-load): Deleted.  I don't think they're being used.
1996-10-29 03:59:35 +00:00
Jim Blandy
79451588c7 Get Guile to be a little less chatty by default. The new user
should see as little clutter as possible.
* r4rs.scm (%load-verbosely): Make this #f by default.
* boot-9.scm (scm-repl-verbose): Make this #f by default.
(scm-style-repl): Don't run 'pk' on the value passed to quit.

* r4rs.scm: New file.
* boot-9.scm: Load r4rs.scm, first thing.
(OPEN_READ, OPEN_WRITE, OPEN_BOTH, *null-device*, open-input-file,
open-output-file, open-io-file, close-input-port,
close-output-port, close-io-port, call-with-input-file,
call-with-output-file, with-input-from-port, with-output-to-port,
with-error-to-port, with-input-from-file, with-output-to-file,
with-error-to-file, with-input-from-string, with-output-to-string,
with-error-to-string, the-eof-object): Definitions moved to
r4rs.scm.  Not all of them are R4RS, but those that are use those
that are not.
(load, %load-verbosely, %load-announce): Moved, along with code to
set %load-hook, to r4rs.scm.

* boot-9.scm (integer?): Definition deleted, in favor of the one
present in libguile (which used to be called int?).  I have no
idea why integer? didn't just call int? to begin with.

* boot-9.scm (<, <=, =, >, >=): Definitions in terms of <?, <=?,
=?, >?, and >=? deleted; they're defined that way by libguile now.
1996-10-29 03:47:36 +00:00
Jim Blandy
d098b5d348 (load): Should call primitive-load-path, not primitive-load. Oops. 1996-10-28 23:15:34 +00:00
Jim Blandy
c368ffcff1 * boot-9.scm (load): Simplified; primitive-load does most of this
work now.
(%load-announce-win): Removed; no longer used.  Set %load-hook to
call %load-announce.
1996-10-28 23:00:25 +00:00
Gary Houston
3afb28ce85 * boot-9.scm (stat:dev etc.) accessor functions for stat components.
(file-is-directory?): use stat:type.
1996-10-27 23:26:35 +00:00
Jim Blandy
0464a0956f * boot-9.scm (%read-sharp): Don't recognize the `#!' syntax here;
that's now taken care of in libguile, and in a way compatible with
SCSH (which this isn't).
1996-10-25 08:35:36 +00:00
Jim Blandy
c7c03b9f87 * boot-9.scm: Formatting tweaks. 1996-10-21 23:53:01 +00:00
Mikael Djurfeldt
fdd649e1bf Adjustment of load-stack selection. 1996-10-18 00:15:09 +00:00
Mikael Djurfeldt
c27659c87d Bugfix: arg-list --> args in error handler. 1996-10-17 23:56:31 +00:00
Mikael Djurfeldt
1c6cd8e85e * boot-9.scm (handle-system-error): Added hooks before-error-hook,
after-error-hook, before-backtrace-hook and after-backtrace-hook
to the error handler.  E.g.: fancy emacs support could plug into
these.
(save-stack): New function.  The stack is now made differently
depending on the stack id.  (The motivation is to make a better
choice regarding what stack frames to present to the user.)
(error-catching-loop): Stack handling code moved outside into
save-stack.
1996-10-17 23:43:23 +00:00
Gary Houston
35c5db8731 Second thoughts, keep handle-system-error but call it from
error-catching-loop.
1996-10-17 21:56:22 +00:00
Gary Houston
9a0d70e21e * boot-9.scm: remove handle-system-error, after moving the code into
error-catching-loop.
Don't set 'throw-handler-default property on error keys.
Just interpret (almost) any throw with 4 args as an error throw.
Delete some try-load stuff that was already commented out.
1996-10-17 21:45:04 +00:00
Jim Blandy
44cf1f0f8c Formatting niggles. 1996-10-16 22:29:19 +00:00
Jim Blandy
8b718458f3 * boot-9.scm: Doc fixes.
(make-module): Rework for readability.
(make-root-module, make-scm-module): USES argument to make-module
should be '(), not #f.
1996-10-16 02:18:33 +00:00
Jim Blandy
352a1ccedb * boot-9.scm (try-load): %sys-load-path has been renamed to
primitive-load-path; adjust call here.
1996-10-15 22:29:46 +00:00
Mikael Djurfeldt
fcd69146b1 *** empty log message *** 1996-10-15 14:06:29 +00:00
Mikael Djurfeldt
5f771ab149 * boot-9.scm ((signal-handler n)): Bugfix: Moved the recording of
the stack to the correct place: when it is decided to generate an
error-signal.
1996-10-15 12:26:49 +00:00
Mikael Djurfeldt
4cdee789b7 * boot-9.scm (error-catching-loop, signal-handler,
handle-system-error): Backtracing now works for signals aswell;
Backtracing mechanism can now identify the stack root created by
start-stack so that the user isn't exposed to system stack frames.
1996-10-14 20:28:39 +00:00
Mikael Djurfeldt
9b7def6677 * boot-9.scm: Renamed %%throw-handler-default -->
throw-handler-default.
((handle-system-error key . arg-list)): Changed the way errors are
reported.
((scm-style-repl)): Wrap up the call to eval in a start-stack
acro.
((error-catching-loop thunk)): Introduce a lazy-catch into
error-catching-loop so that the stack can be captured.
1996-10-14 03:28:26 +00:00
Jim Blandy
95b6af86e8 * mapping.scm (hash-table-mapping): Explicitly request that
make-vector fill new vectors with '(); this will make it easier to
port Guile Scheme code to other Schemes.
* boot-9.scm (make-print-style, make-print-table): Same.
1996-10-11 07:54:02 +00:00
Gary Houston
6fa8995c39 * boot-9.scm (load): rewritten again.
Append "." to the default %load-path.
(feature?): new function: checks for a symbol in the features list.
(module-local-variable): remove apparently useless (caddr (list m v
...))
(%load-announce): minor formatting change.
(file-exists?): use access? if posix is featured.
(file-is-directory?): use stat if i/o-extensions is featured.
(try-module-autoload module-name): use file-exists? before
file-is-directory?
1996-10-06 06:33:11 +00:00
Mikael Djurfeldt
90895e5c8f * boot-9.scm: Added conditional loading of threads.scm. 1996-10-05 17:47:59 +00:00
Mikael Djurfeldt
1349bd530e * boot-9.scm (error-catching-loop): Added handling of key
`switch-repl'.

* boot-9.scm: Name change %%bad-throw --> bad-throw.
1996-10-05 16:55:06 +00:00
Jim Blandy
8e69342425 * boot-9.scm (make-record-type, record-constructor): Don't assume
the empty list is false when parsing the argument list.
1996-10-03 05:47:12 +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
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
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
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
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
Gary Houston
234f2da620 * boot-9.scm (%%handle-system-error key): set args and rest to
the empty list if they are #f.
Initialize out-of-range as an error key.
1996-09-15 06:36:11 +00:00
Gary Houston
e1724d200d * numbers.c: use SCM_NUM_OVERFLOW instead of scm_wta or ASSERT.
* error.c, error.h: setup scm_num_overflow key.

* __scm.h: SCM_NUM_OVERFLOW: macro for reporting numerical overflow.
Remove definition of SCM_OVSCM_FLOW.

* fports.c (scm_open_file): use SCM_SYSERROR_M.

* __scm.h: SCM_SYSERROR_M: new macro for system errors with an
explicit message and args.

* error.c, error.h, __scm.h: change system_error_sym to
scm_system_error.

* error.c (system_error_sym): remove leading %% from the Scheme name
"%%system-error".

* __scm.h (SCM_SYSMISSING): Redefine using lgh_error.

* boot-9.scm: remove leading %% from references to '%%system-error.
(%%handle-system-error): don't pass all the thrown arguments when
aborting, just the key and subr.
Remove the code to "Install default handlers for built-in errors."
Remove the definition of the syserror procedure.
Associate 'numerical-overflow with default handler.
1996-09-14 07:47:50 +00:00
Mikael Djurfeldt
0dd5491c17 * boot-9.scm: Name change: value-ref --> local-ref
resolved-ref --> nested-ref  Motivation: conformance to the other
dictionary operators: list-ref operates on list, vector-ref
operates on vector, nested-ref operates on nested namespace,
local-ref operates on the local nested namespace.
1996-09-13 03:02:38 +00:00
Gary Houston
a949b3f2c4 (fill-message): bug fix and check that args is a list. 1996-09-07 21:49:23 +00:00
Gary Houston
9561554c13 (fill-message): check first whether args is null. 1996-09-07 21:34:09 +00:00
Gary Houston
7cb1d4d305 * error.c (scm_error): declare scm_error_callback.
* error.h: prototype for scm_error_callback.

	* __scm.h: define lgh_error.
 	(SCM_SYSERROR): redefine using lgh_error.

	* boot-9.scm (%%handle-system-error): recognise errors thrown
	by lgh-error (fill-message etc.)
1996-09-07 20:48:45 +00:00
Jim Blandy
3cab839236 * boot-9.scm: %load-path is initialized in C code now.
(implementation-vicinity, parse-path): Deleted, along with code to
initialize %load-path.

* boot-9.scm (in-vicinity): If the vicinity doesn't end with a
"/", use one to separate it from the file.
1996-09-05 16:33:42 +00:00
Jim Blandy
02ceadb86c * boot-9.scm (%load-path): Add the site directory.
Add the directory named after the version number.
Prepend the version number to the other directories in the path.
Simplify by mapping the common prefix onto each item.
* Makefile.in (datadir, pkgdatadir, pkgverdatadir, subpkgdatadir,
sitedatadir): New definitions.
(libparent, libdir, install_path): Replaced by above.
(install): Create the above directories.
Put the source files into subpkgdatadir.
(uninstall): Remove the above directories.
1996-08-30 21:09:23 +00:00
Mikael Djurfeldt
c56634ba1a * boot-9.scm: Preliminary solution: optionally load the debug
module.
1996-08-23 04:54:23 +00:00
Mikael Djurfeldt
074fa9cff4 * boot-9.scm (print-vector): Renamed weak-hash-table? -->
weak-key-hash-table?.  (Again!)
1996-08-21 11:11:38 +00:00
Mikael Djurfeldt
9591db8710 * boot-9.scm (print-vector, macro-table, xformer-table):
Renamed weak-hash-table --> weak-key-hash-table.
1996-08-20 16:54:53 +00:00
Gary Houston
8b13c6b392 a few fixups to primitive functions 1996-08-04 22:32:07 +00:00
Gary Houston
02b754d3a6 make C system primitives throw exceptions 1996-08-02 23:26:33 +00:00