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

9023 commits

Author SHA1 Message Date
Mikael Djurfeldt
03d1ed6f37 * procprop.h (scm_i_procedure_arity): Added declaration. 1998-11-26 07:44:53 +00:00
Mikael Djurfeldt
089067091c * procprop.c (scm_i_procedure_arity): Made global; New code to
handle operators and entities.
(scm_procedure_property): No need to call scm_procedure_p since
scm_i_procedure_arity now does all necessary type checking.
Added #include "objects.h".
1998-11-26 07:44:35 +00:00
Mikael Djurfeldt
e845cb8486 * feature.c, feature.h (scm_reset_hook_x): New procedure.
(scm_make_hook): Optional argument defines number of arguments to
the hook.
(scm_make_named_hook): Take number of args as second arg.
(scm_run_hook): Renamed from scm_run_hooks (old name kept for a
while); First arg is the hook.  The rest are arguments passed on
to the hook procedures.
1998-11-26 07:44:22 +00:00
Mikael Djurfeldt
b90d369ecf * feature.c (scm_remove_hook_x): Bugfix: Changed reference to
s_add_hook_x --> s_remove_hook_x.
(scm_add_hook_x, scm_remove_hook_x): Hooks now takes arguments.
Added #include "procprop.h"
* feature.c, feature.h (scm_reset_hook_x): New procedure.
(scm_make_hook): Optional argument defines number of arguments to
the hook.
(scm_make_named_hook): Take number of args as second arg.
(scm_run_hook): Renamed from scm_run_hooks (old name kept for a
while); First arg is the hook.  The rest are arguments passed on
to the hook procedures.
1998-11-26 07:44:09 +00:00
Mikael Djurfeldt
7a79c6b4d3 *** empty log message *** 1998-11-25 15:17:41 +00:00
Mikael Djurfeldt
d1406b6a40 * boot-9.scm (run-hooks, add-hook!, remove-hook!): Added temporary
code for backward compatibility until people have had time to
adapt to the new hooks.
1998-11-25 15:17:12 +00:00
Jim Blandy
69c6acbb74 *** empty log message *** 1998-11-23 10:27:27 +00:00
Jim Blandy
7217f8167c * numbers.c (scm_logand, scm_logior, scm_logxor, scm_logtest,
scm_logbit_p): Do the computation in ulongs.  This is not as nice
as doing it in bignums, but at least it's good enough for
manipulating flags in 32-bit words.  (Thanks to Jim Wilson.)
1998-11-23 10:24:35 +00:00
Jim Blandy
7c7471d93b * regex-posix.c (scm_regexp_exec): Reliably mark unmatched
subexpressions.  (Thanks to Charbel Jacquin.)
1998-11-23 10:24:09 +00:00
Mikael Djurfeldt
c04e89c78a Fix 1998-11-23 03:05:57 +00:00
Mikael Djurfeldt
a56eeb4674 *** empty log message *** 1998-11-23 02:39:47 +00:00
Mikael Djurfeldt
3e3cec458e * boot-9.scm (beautify-user-module!): Beautify also if public
interface is set to the module itself.  In this way we can use
beautify-user-module! to beautify a module prepared for object
code.
(process-define-module): Special case: Try to load object code as
well if a module does :use-module on itself.
* boot-9.scm: Bugfix: Since boot-9.scm is now loaded from
invoke_main_func, we can no longer be sure that all modules have
been registered when boot-9.scm is loaded.
(register-modules): New function: Register and tag modules
registered by scm_register_module_xxx since last call to this
function.  Modules are tagged with the dynamic object passed as
argument.  (Already linked modules should be tagged with #f.)
(init-dynamic-module, link-dynamic-module): Call register-modules
first to register linked modules.
* boot-9.scm (init-dynamic-module): Remove module from
registered-modules as soon as possible in case we are recursively
invoked; Set public interface before doing the dynamic-call.
* boot-9.scm (map-in-order): Removed (replaced by scm_serial_map).
(abort-hook, before-error-hook, after-error-hook,
before-backtrace-hook, after-backtrace-hook, before-read-hook,
after-read-hook, exit-hook): Make hooks with `make-hook'.
* boot-9.scm: Make hooks first class citizens and make them easier
to use from C:
(make-hook, add-hook!, remove-hook!, run-hooks): Moved to
libguile/feature.c.
* boot-9.scm: Added warnings about bindings used in
libguile/modules.c: the-module, set-current-module,
make-modules-in, beautify-user-module!, module-eval-closure.
1998-11-23 02:36:43 +00:00
Mikael Djurfeldt
281004cc98 * modules.c (scm_make_module): Beautify the module. 1998-11-23 02:35:11 +00:00
Mikael Djurfeldt
1330700c7d * feature.c, feature.h (scm_make_hook, scm_add_hook_x,
scm_remove_hook_x, scm_run_hooks): Moved from ice-9/boot-9.scm.
(scm_make_named_hook): New function.
* feature.c: Added #include "eval.h".
1998-11-23 02:34:49 +00:00
Mikael Djurfeldt
7e41462735 *** empty log message *** 1998-11-22 12:06:41 +00:00
Mikael Djurfeldt
4b07a787e3 Updated 1998-11-22 12:05:35 +00:00
Mikael Djurfeldt
1ffa265b7c * modules.c, modules.h: New files: C interface to modules. (This
is necessary in order to interface the object system to Guile
properly.  The guts of these modules will be replaced by the new
module system in the future.)
1998-11-22 12:05:14 +00:00
Mikael Djurfeldt
345acb3967 * init.c: Added #include "modules.h"
(scm_boot_guile_1): Call scm_init_modules.
(invoke_main_func): Call scm_post_boot_init_modules.
1998-11-22 12:04:27 +00:00
Mikael Djurfeldt
bafece68d3 * Makefile.am: Added modules.c, modules.x, modules.h. 1998-11-22 12:04:00 +00:00
Mikael Djurfeldt
631c1902df * boot-9.scm: Added warnings about bindings used in
libguile/modules.c: the-module, set-current-module,
make-modules-in, module-eval-closure.
1998-11-22 12:03:34 +00:00
Jim Blandy
bd0a8b6566 *** empty log message *** 1998-11-21 19:19:15 +00:00
Mikael Djurfeldt
17621f3e37 *** empty log message *** 1998-11-21 17:02:36 +00:00
Mikael Djurfeldt
bdc88419bd * procs.c: #include "objects.h"
(scm_procedure_p): Return #t also on structs which are operators.
1998-11-21 17:01:48 +00:00
Mikael Djurfeldt
af3645c52b * objects.c (scm_init_objects): Renamed <standard-metaclass>,
<operator-metaclass> and <entity-class> to <standard-class>,
<operator-class> and <entity> in order to conform with STKlos
naming conventions.
1998-11-21 17:01:33 +00:00
Mikael Djurfeldt
9b07e212d5 * eval.c (SCM_CEVAL): Jump to badfun if trying to apply a struct
which isn't an operator.
(SCM_APPLY): Ditto, but jump to badproc.
1998-11-21 17:00:44 +00:00
Mikael Djurfeldt
b325a6c8ac * evalext.c (scm_definedp): Removed check for isyms; Added a
second optional argument: It is now possible to supply an
evaluation environment in which to look for the symbol.
1998-11-20 17:14:41 +00:00
Mikael Djurfeldt
aa00bd1e54 * eval.c (SCM_CEVAL): Allow structs implanted in code.
Previously, structs implanted in code were interpreted as forms
the operator of which was a gloc.  We solve this by checking for
the zero in the emulated vcell in the struct vtable.  Since
implanted structs always will look like forms with a gloc
operator, execution will only be slowed down by maximally one
extra test-and-branch per application.
1998-11-20 17:14:07 +00:00
Mikael Djurfeldt
dc61592f84 * boot-9.scm (the-environment): New special form: Returns an
object representing the current local evaluation environment.
This object can be used in `local-eval' and `defined?'.
1998-11-20 17:12:45 +00:00
Mikael Djurfeldt
b322f09ab8 * coop.c (coop_condition_variable_wait): Removed
(coop_condition_variable_wait_mutex): Folded logic of
coop_mutex_unlock into coop_condition_variable_wait_mutex to
prevent condvar signal lossage.  Previously, another thread could
start to run after unlocking the mutex but before putting the
current thread on the wait queue.  If that thread then would
signal the first, the signal would be lost.  (Thanks to Christian
Lynbech.)
1998-11-19 08:15:22 +00:00
Mikael Djurfeldt
3b2ee8bcdf * readline.c (scm_init_readline): Set
rl_basic_word_break_characters.  (Thanks to Ian Grant.)
1998-11-19 04:48:50 +00:00
Mikael Djurfeldt
224822be69 * eval.c (SCM_CEVAL): Added missing case for cclo. (Thanks to
Christian Lynbech.)
1998-11-17 08:03:18 +00:00
Mikael Djurfeldt
036737fce8 * objects.c (scm_i_make_class_object): Renamed from
make_class_object; exported; error checking moved to
scm_make_class_object and scm_make_subclass_object.
(scm_make_class_object, scm_make_subclass_object): Use
scm_i_make_class_object.
(scm_make_subclass_object): Let the subclass have same metaclass
as the superclass.
1998-11-15 16:16:06 +00:00
Mikael Djurfeldt
a6e350ddef * debug.c (scm_debug_options): Bugfix: Set the value of
scm_stack_checking_enabled_p after setting debug options;
#include "stackchk.h".  (Thanks to Richard Polton.)
1998-11-13 15:58:00 +00:00
Radey Shouman
9879d0f19f *** empty log message *** 1998-11-12 22:52:45 +00:00
Radey Shouman
467b7f18a2 (scm_array_contents): removed unnecessary test for 0 base. 1998-11-12 22:47:18 +00:00
Mikael Djurfeldt
cf7132b32a Renamed sequence->list --> collect 1998-11-12 16:05:57 +00:00
Mikael Djurfeldt
7398c2c2b5 * boot-9.scm (collect): New syntax. Similar to begin but returns
a list of the results of all forms in the sequence instead of the
result of the last form.
1998-11-12 16:03:11 +00:00
Mikael Djurfeldt
88be72acb3 * evalext.c, evalext.h (scm_m_sequence_to_list): Removed.
Replaced by macro `collect' in boot-9.scm.
1998-11-12 16:00:41 +00:00
Jim Blandy
4085a3daf0 *** empty log message *** 1998-11-11 09:00:39 +00:00
Mikael Djurfeldt
00f4b2e864 *** empty log message *** 1998-11-10 14:42:04 +00:00
Mikael Djurfeldt
f086d19d77 * syncase.scm (values, call-with-values): Moved to boot-9.scm. 1998-11-10 14:41:40 +00:00
Mikael Djurfeldt
1729d8ff31 * boot-9.scm (values, call-with-values): Moved here from
syncase.scm.
1998-11-10 14:40:28 +00:00
Mikael Djurfeldt
ad3ff75be8 *** empty log message *** 1998-11-10 14:18:42 +00:00
Mikael Djurfeldt
067affe319 * eval.c (scm_copy_tree): Copy source properties if existent. 1998-11-10 14:17:24 +00:00
Mikael Djurfeldt
cb412265a7 * debug.c (scm_start_stack): Copy source when evaluating. (If we
don't, we may end up passing memoized source to a transformer.)
1998-11-10 14:16:55 +00:00
Mikael Djurfeldt
26e1985495 Removed last change. (Replaced by a better change.) 1998-11-10 07:58:32 +00:00
Mikael Djurfeldt
7a13c3ae7b * stacks.c (read_frame): Bugfix: Removed lingering `else'
statement.
(read_frames): Use SCM_MACROEXPP.
1998-11-10 07:57:51 +00:00
Mikael Djurfeldt
e40a5fc8ce * backtrace.c (get_applybody): Help function which lookups the
first body form of the apply closure.
(display_error_body): Prevent the source of the first form of the
apply closure from being printed in error messages.
1998-11-10 07:41:35 +00:00
Mikael Djurfeldt
29672a5c18 *** empty log message *** 1998-11-10 06:12:12 +00:00
Mikael Djurfeldt
6629eb1ca7 * stacks.c (read_frame): Bugfix: Removed lingering `else'
statement.
(read_frames): Use SCM_MACROEXPP.
1998-11-10 06:10:33 +00:00