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

9141 commits

Author SHA1 Message Date
Mikael Djurfeldt
4cbdf5ccfc * debug.c, eval.c, evalext.c, stacks.c: #include "modules.h".
* modules.c, modules.h, eval.c, eval.h (scm_env_top_level,
scm_top_level_env, scm_system_module_env_p): Moved to modules.c.
1999-03-19 02:28:23 +00:00
Mikael Djurfeldt
d164a5af5c * modules.c: #include "procprop.h"
(scm_system_module_env_p): Assume root environment is no lookup
closure is found.
* modules.c, modules.h, eval.c, eval.h (scm_env_top_level,
scm_top_level_env, scm_system_module_env_p): Moved to modules.c.
1999-03-19 02:28:09 +00:00
Mikael Djurfeldt
bedec8037a * modules.c, modules.h, eval.c, eval.h (scm_env_top_level,
scm_top_level_env, scm_system_module_env_p): Moved to modules.c.
* eval.c, eval.h (scm_top_level_lookup_closure): Removed.
1999-03-19 02:27:41 +00:00
Mikael Djurfeldt
185905af69 * debug.c, eval.c, evalext.c, stacks.c: #include "modules.h".
* modules.c, modules.h, eval.c, eval.h (scm_env_top_level,
scm_top_level_env, scm_system_module_env_p): Moved to modules.c.
* eval.c, eval.h (scm_top_level_lookup_closure): Removed.
1999-03-19 02:27:12 +00:00
Mikael Djurfeldt
cd713a0622 *** empty log message *** 1999-03-18 12:49:49 +00:00
Mikael Djurfeldt
26a4f923bc * error.c (scm_wta): Pass SCM_LIST1 (arg) instead of SCM_EOL to
scm_misc_error when pos is a string.  This allows for dispatching
arbitrary error messages with one argument via SCM_ASSERT:
SCM_ASSERT (<cond>, obj, "Undigestable object: %S", <subr>);
1999-03-18 12:48:55 +00:00
Mikael Djurfeldt
64af44a3f3 *** empty log message *** 1999-03-16 16:38:48 +00:00
Mikael Djurfeldt
3946f0ded4 * list.c (scm_reverse): Report an error if given a circular list
instead of filling memory.
* list.c (scm_reverse_x): Check args.
1999-03-16 16:37:51 +00:00
Mikael Djurfeldt
547e65b5df #include "keywords.h" 1999-03-14 18:51:45 +00:00
Mikael Djurfeldt
dbc4ad3dbe * keywords.c, keywords.h: Files renamed from kw.c, kw.h. 1999-03-14 16:58:24 +00:00
Mikael Djurfeldt
6ee350ad3f *** empty log message *** 1999-03-14 16:55:01 +00:00
Mikael Djurfeldt
f7da61905e Regenerated 1999-03-14 16:53:39 +00:00
Mikael Djurfeldt
6decd505c5 * struct.h (SCM_STRUCT_TABLE_NAME, SCM_SET_STRUCT_TABLE_NAME,
SCM_STRUCT_TABLE_CLASS, SCM_SET_STRUCT_TABLE_CLASS): New macros.
Used for access of struct table entries.
1999-03-14 16:52:56 +00:00
Mikael Djurfeldt
98d5f6018a * struct.c: #include "alist.h", "weaks.h", "hashtab.h";
(scm_struct_table): Weak key table with auxilliary information for
struct types.  Currently used for names and wrapper classes.
(scm_struct_ihashq): Hash function for structs.
(scm_struct_create_handle): Get/create entry in scm_struct_table.
(scm_struct_vtable_name, scm_set_struct_vtable_name_x): Procedures
for accessing names of vtables.  The record implementation in
boot-9.scm currently uses the setter to record the name of record
types.  When the object system is initialized, it can use this
information to create wrapper classes with suitable names.
(scm_init_struct): Allocate scm_struct_table.
(scm_alloc_struct): Don't initialize scm_struct_i_tag here.
(struct tags are a finite resource and we might want to restrict
the use of tags to vtables only.  E.g., Goops only uses tags for
classes.)
(scm_make_struct): Use scm_struct_entity_n_extra_words instead of
magic number 5.
(scm_struct_vtable_tag): Use scm_struct_i_tag instead of magic
number -1.
1999-03-14 16:52:32 +00:00
Mikael Djurfeldt
da61c37a08 * objects.c: #include "smob.h";
(scm_class_keyword): Removed.  (Class is automatically created by
make_smob_classes.)
(scm_smob_class): Array of smob classes indexed by smobnum.
(scm_make_extended_class): "Plugin" function pointer for creation
of wrapper classes for smob and struct types.
(scm_class_of): Handle compiled closures.  (Currently regarded as
<procedure>.);
Use scm_smob_class to handle smob types;
Handle scm_tc16_bigpos, scm_tc16_bigneg, and, scm_tc16_keyword
through scm_smob_class;
Handle structs.
* smob.h (SCM_TC2SMOBNUM): New macro for conversion between tc16
type code and smobnum.
1999-03-14 16:52:15 +00:00
Mikael Djurfeldt
d7ec6b9f78 * smob.c (scm_newsmob): Also create a wrapper class if
scm_smob_class has been initialized.
1999-03-14 16:51:55 +00:00
Mikael Djurfeldt
0e76bf6680 * Makefile.am, init.c, libguile.h, objects.c, root.h: Replaced
"kw" --> "keywords" everywhere.
(I doubt that this will cause big compatibility problems since the
application interface is unaffected.)
1999-03-14 16:51:37 +00:00
Mikael Djurfeldt
ed6e0c83f5 * objects.c: #include "smob.h";
(scm_class_keyword): Removed.  (Class is automatically created by
make_smob_classes.)
(scm_smob_class): Array of smob classes indexed by smobnum.
(scm_make_extended_class): "Plugin" function pointer for creation
of wrapper classes for smob and struct types.
(scm_class_of): Handle compiled closures.  (Currently regarded as
<procedure>.);
Use scm_smob_class to handle smob types;
Handle scm_tc16_bigpos, scm_tc16_bigneg, and, scm_tc16_keyword
through scm_smob_class;
Handle structs.
* Makefile.am, init.c, libguile.h, objects.c, root.h: Replaced
"kw" --> "keywords" everywhere.
(I doubt that this will cause big compatibility problems since the
application interface is unaffected.)
1999-03-14 16:50:47 +00:00
Mikael Djurfeldt
fca7570884 * keywords.c, keywords.h: Files renamed from kw.c, kw.h. 1999-03-14 16:50:01 +00:00
Mikael Djurfeldt
c7df61cd7f * hashtab.c, hashtab.h (scm_internal_hash_fold): New function.
(scm_hash_fold): New procedure.  Used to process all entries in a
hash table (in no particular order).
1999-03-14 16:48:50 +00:00
Mikael Djurfeldt
efdfceeabe *** empty log message *** 1999-03-12 10:26:46 +00:00
Mikael Djurfeldt
a9dbb9fd43 * srcprop.c (scm_set_source_property_x): Bugfix: Convert line and
column inums to native form.
1999-03-12 10:26:26 +00:00
Mikael Djurfeldt
71c7d7d68a *** empty log message *** 1999-03-12 08:51:30 +00:00
Mikael Djurfeldt
c3a6c6f928 * stacks.c: #include "eval.h"; #include "procprop.h";
(narrow_stack): Handle new narrowing specifier #t.
1999-03-12 08:51:08 +00:00
Mikael Djurfeldt
c083a5295b * procprop.c, procprop.h (scm_sym_system_procedure): New symbol.
* eval.c, procs.c, procs.h, procprop.c: Renamed getter ->
procedure throughout.
1999-03-12 08:17:50 +00:00
Mikael Djurfeldt
7c6e9dae27 * eval.c, eval.h (scm_top_level_lookup_closure): New function:
Extract the lookup closure from an environment.
(scm_system_module_env_p): New function: Return non-#f if MODULE
is a system module.
1999-03-12 08:16:40 +00:00
Mikael Djurfeldt
6bcb086819 * eval.c (scm_sym_system_module): New symbol.
* eval.c, eval.h (scm_top_level_lookup_closure): New function:
Extract the lookup closure from an environment.
(scm_system_module_env_p): New function: Return non-#f if MODULE
is a system module.
* eval.c, procs.c, procs.h, procprop.c: Renamed getter ->
procedure throughout.
1999-03-12 08:16:26 +00:00
Mikael Djurfeldt
a726dd9da5 * debug.c (scm_procedure_name): Use name property in the default
case.
1999-03-12 08:06:49 +00:00
Mikael Djurfeldt
963561f780 (correction of previous commit) 1999-03-11 12:06:16 +00:00
Mikael Djurfeldt
d34ec6a749 * Makefile.in: Regenerated. 1999-03-11 11:50:47 +00:00
Mikael Djurfeldt
fde61308d3 *** empty log message *** 1999-03-11 11:48:23 +00:00
Mikael Djurfeldt
37581b1154 * tags.h (scm_tc7_pws): New procedure type. Four representations
for procedure-with-setters were considered before selecting this
one:
* eval.c, debug.c, tags.h (SCM_IM_SET_X): Renamed from SCM_IM_SET.
1999-03-11 11:48:07 +00:00
Mikael Djurfeldt
7ee70a2659 * struct.h (scm_struct_i_setter): New constant. 1999-03-11 11:47:58 +00:00
Mikael Djurfeldt
25c9482661 * struct.c (scm_make_struct): Allocate one word more for
entities and initialize the new slot.
1999-03-11 11:47:49 +00:00
Mikael Djurfeldt
64c4580bd8 * eval.c, procs.c, procs.h, procprop.c: Renamed getter ->
procedure throughout.
* procs.c, procs.h (SCM_PROCEDURE_WITH_SETTER_P, SCM_GETTER,
SCM_SETTER): New macros.
(scm_procedure_with_setter_p, scm_make_procedure_with_setter,
scm_getter, scm_setter): New procedures.
1999-03-11 11:47:40 +00:00
Mikael Djurfeldt
b4cd6492af * eval.c, procs.c, procs.h, procprop.c: Renamed getter ->
procedure throughout.
* procs.c (scm_procedure, scm_setter): Handle entity and operator
setter slots.
* procs.c, procs.h (SCM_PROCEDURE_WITH_SETTER_P, SCM_GETTER,
SCM_SETTER): New macros.
(scm_procedure_with_setter_p, scm_make_procedure_with_setter,
scm_getter, scm_setter): New procedures.
* procprop.c (scm_i_procedure_arity), procs.c (scm_thunk_p): Added
entry for scm_tc7_pws.
* procs.c (scm_procedure_p): Added case label for scm_tc7_pws.
1999-03-11 11:47:31 +00:00
Mikael Djurfeldt
dec118c8c7 * eval.c, procs.c, procs.h, procprop.c: Renamed getter ->
procedure throughout.
* procprop.c (scm_i_procedure_arity), procs.c (scm_thunk_p): Added
entry for scm_tc7_pws.
1999-03-11 11:47:22 +00:00
Mikael Djurfeldt
c180dfd39d * print.c (scm_iprin1): Removed extraneous space when printing
procedure-with-setters.
* print.c (scm_iprin1): Use scm_procedure_name instead of
scm_procedure_property for compiled closures.
* eval.c, print.c (scm_iprin1): Added entries for scm_tc7_pws.
1999-03-11 11:47:10 +00:00
Mikael Djurfeldt
dae5a1e96f * objects.h (scm_si_redefined, scm_si_hashsets): Shifted.
* objects.h (SCM_OPERATOR_SETTER, SCM_ENTITY_SETTER): New macros.
(struct scm_metaclass_operator): New setter slot.
* objects.h (SCM_OBJ_CLASS_REDEF): New macro: Find class slots
directly through the instance.
* objects.c, objects.h (scm_class_of,
scm_class_procedure_with_setter): Added.
* objects.c, objects.h (SCM_CLASS_REDEF): Renamed from CLASS_REDEF.
1999-03-11 11:47:00 +00:00
Mikael Djurfeldt
ab7288bca0 * objects.c (scm_class_of): Use SCM_OBJ_CLASS_REDEF.
* objects.c, objects.h (scm_class_of,
scm_class_procedure_with_setter): Added.
* objects.c, objects.h (SCM_CLASS_REDEF): Renamed from CLASS_REDEF.
1999-03-11 11:46:45 +00:00
Mikael Djurfeldt
fa1f483e9a Declare scm_list_star 1999-03-11 11:46:35 +00:00
Mikael Djurfeldt
a610b8d970 * list.c (scm_list_star): New procedure. 1999-03-11 11:46:16 +00:00
Mikael Djurfeldt
8163d1e493 * gc.c, gc.h (scm_object_address): Renamed from scm_object_addr (). 1999-03-11 11:46:07 +00:00
Mikael Djurfeldt
e641afaf8c * gc.c, gc.h (scm_object_address): Renamed from scm_object_addr ().
* gc.c (scm_gc_mark): Mark struct setter slot.
* gc.c (scm_gc_sweep): Bugfix: Look for SCM_STRUCT_F_LIGHT flag at
scm_struct_i_flags instead of scm_vtable_index_layout!
* gc.c (scm_gc_mark, scm_gc_sweep): Added case labels for
scm_tc7_pws.
1999-03-11 11:45:58 +00:00
Mikael Djurfeldt
a70fb265a2 * evalext.c, evalext.h (scm_m_generalized_set_x): New memoizing
macro.
(scm_init_evalext): Call scm_make_gsubr for
scm_m_generalized_set_x.
1999-03-11 11:45:34 +00:00
Mikael Djurfeldt
79dc2f37e9 * eval.h: Declare scm_s_set_x, scm_sym_set_x; 1999-03-11 11:45:16 +00:00
Mikael Djurfeldt
89efbff42e * eval.c, procs.c, procs.h, procprop.c: Renamed getter ->
procedure throughout.
* eval.c, print.c (scm_iprin1): Added entries for scm_tc7_pws.
* eval.c, debug.c, tags.h (SCM_IM_SET_X): Renamed from SCM_IM_SET.
* eval.c: Renamed "set" --> "set_x" in various names for
consistency of name correspondence between Scheme and C;
Renamed scm_i_set_x --> scm_sym_set_x and made global.
Renamed s_set_x --> scm_s_set_x and made global.
* eval.c (SCM_CEVAL): Added ENTER_APPLY in code for SCM_IM_APPLY.
(Thanks to Eric Hanchrow.)
1999-03-11 11:45:06 +00:00
Mikael Djurfeldt
bbab09f6f1 * debug.c (scm_init_debug): Added scheme level constant
SCM_IM_DISPATCH.
* eval.c, debug.c, tags.h (SCM_IM_SET_X): Renamed from SCM_IM_SET.
1999-03-11 11:44:41 +00:00
Mikael Djurfeldt
76b7d6a167 * Makefile.in: Regenerated. 1999-03-04 04:45:34 +00:00
Mikael Djurfeldt
f7c4cfdd66 * Makefile.in, qt/Makefile.in, time/Makefile.in: Regenerated.
* Makefile.in: Regenerated.
* Makefile.in: Regenerated.
* Makefile.in: Regenerated.
1999-03-04 02:35:44 +00:00