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

23 commits

Author SHA1 Message Date
Mikael Djurfeldt
78a0461a6f * __scm.h, backtrace.c, backtrace.h, debug.c, debug.h, dynl-dld.c,
dynwind.c, dynwind.h, eval.h, evalext.c, evalext.h, feature.c,
feature.h, hashtab.c, hashtab.h, objects.c, objects.h, print.c,
procs.c, procs.h, smob.c, smob.h, srcprop.c, strorder.c, struct.c,
struct.h: Updated copyrigth notices.
1999-09-12 11:16:13 +00:00
Mikael Djurfeldt
0824bbb3f5 Moved scm_memoize_method back to eval.c. 1999-08-30 02:18:35 +00:00
Mikael Djurfeldt
a12be5461e * objects.c, objects.h (scm_mcache_lookup_cmethod): Moved here
from eval.c; Support 0 arity methods.
(scm_set_object_procedure_x): Removed scm_sym_atdispatch;
(scm_apply_generic_env): Removed.
Replaced slots proc0-3 with procedure.
1999-08-29 03:26:38 +00:00
Mikael Djurfeldt
9de33deb2e * procs.c, procs.h (scm_subr_entry): New type: Stores data
associated with subrs.
(SCM_SUBRNUM, SCM_SUBR_ENTRY, SCM_SUBR_GENERIC, SCM_SUBR_PROPS,
SCM_SUBR_DOC): New macros.
(scm_subr_table): New variable.
(scm_mark_subr_table): New function.

* init.c (scm_boot_guile_1): Call scm_init_subr_table.

* gc.c (scm_gc_mark): Don't mark subr names here.
(scm_igc): Call scm_mark_subr_table.

* snarf.h (SCM_GPROC, SCM_GPROC1): New macros.

* procs.c, procs.h (scm_subr_p): New function (used internally).

* gsubr.c, gsubr.h (scm_make_gsubr_with_generic): New function.

* objects.c, objects.h (scm_primitive_generic): New class.

* objects.h (SCM_CMETHOD_CODE, SCM_CMETHOD_ENV): New macros.

* print.c (scm_iprin1): Print primitive-generics.

* __scm.h (SCM_WTA_DISPATCH_1, SCM_GASSERT1,
SCM_WTA_DISPATCH_2, SCM_GASSERT2): New macros.

* eval.c (SCM_CEVAL, SCM_APPLY): Replace scm_wta -->
SCM_WTA_DISPATCH_1 for scm_cxr's (unary floating point
primitives).  NOTE: This means that it is now *required* to use
SCM_GPROC1 when creating float scm_cxr's (float scm_cxr's is an
obscured representation that will be removed in the future anyway,
so backward compatibility is no problem here).

* numbers.c: Converted most numeric primitives (all but bit
comparison operations and bit operations) to dispatch on generic
if args don't match.

* eval.c, eval.h (scm_eval_body): New function.

* objects.c (scm_call_generic_0, scm_call_generic_1,
scm_call_generic_2, scm_call_generic_3, scm_apply_generic): New
functions.

* eval.c (SCM_CEVAL): Apply the cmethod directly after having
called scm_memoize_method instead of doing a second lookup.

* objects.h (scm_memoize_method): Now returns the memoized cmethod.

* procs.c (scm_make_subr_opt): Use scm_sysintern0 instead of
scm_sysintern so that the binding connected with the subr name
isn't cleared when we give set = 0.
1999-08-26 04:24:42 +00:00
Mikael Djurfeldt
55d5475044 * objects.c (scm_class_of): Treat scm_tc16_port_with_ps as ports. 1999-08-24 02:10:47 +00:00
Mikael Djurfeldt
c1a6fd8f8a * objects.c (scm_set_object_procedure_x): Disallow setting of
procedures for pure generic functions.
1999-08-16 15:18:54 +00:00
Mikael Djurfeldt
a43a8375d8 * objects.h, objects.c (scm_apply_generic_env): Added (used by
apply).
(scm_operator_p): Added.
(scm_sym_atdispatch): Added.
(scm_set_object_procedure_x): Modified to handle the new style
generic functions.
(scm_object_procedures): New debugging procedure.
1999-08-06 19:39:07 +00:00
Mikael Djurfeldt
7151229df3 * objects.c (scm_class_of): Use the new SCM_CLASSF_GOOPS_VALID
flag which combines type and status info so that the class
redefinition protocol has zero cost during normal execution.
1999-08-04 11:28:08 +00:00
Mikael Djurfeldt
c163662710 * objects.c (scm_make_port_classes): New function ptr. 1999-07-24 23:09:48 +00:00
Mikael Djurfeldt
d0efbe6199 * objects.c, objects.h (scm_port_class): Added.
(scm_class_of): Look up port class in scm_port_class.
(SCM_IN_PCLASS_INDEX, SCM_OUT_PCLASS_INDEX,
SCM_INOUT_PCLASS_INDEX): Added.
1999-07-24 11:36:30 +00:00
Mikael Djurfeldt
135e76f876 * objects.c (scm_init_objects): Initialize destructor slot of the
primordial entity class.
1999-06-23 11:16:28 +00:00
Mikael Djurfeldt
547e65b5df #include "keywords.h" 1999-03-14 18:51:45 +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
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
7688430d05 Correction of mistake (should have committed onto a branch...) 1999-01-05 09:40:49 +00:00
Mikael Djurfeldt
98fae09612 *** empty log message *** 1999-01-05 09:25:59 +00:00
Mikael Djurfeldt
19c0dec231 * objects.c, objects.h (scm_entity_p): New procedure. Together
with the predicates scm_procedure_p and scm_struct_p, this
predicate makes it possible to differ between structs, entities
and operators.
1998-11-26 18:03:02 +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
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
3b7284cd0e Fix 1998-05-04 12:05:37 +00:00
Mikael Djurfeldt
47b210500b * objects.c (scm_set_object_procedure_x): New procedure: Use this
to set the dispatch procedure of an operator or entity object.
1998-05-04 11:32:30 +00:00
Mikael Djurfeldt
da7f71d7d5 * eval.c (SCM_CEVAL, scm_apply): Completed GOOPS support code;
Some indentation fixes.

* objects.h (SCM_METACLASS_STANDARD_LAYOUT): Printer field is no
longer a user field; New field: class_flags.

* objets.c, objects.h: New metaclass: scm_metaclass_operator.
1997-10-12 12:54:54 +00:00
Mikael Djurfeldt
1d9ee7c788 * init.c (scm_boot_guile_1): Added scm_init_objects ().
Added #include "objects.h"

* Makefile.am (libguile_la_SOURCES): Added objects.c.
(modinclude_HEADERS): Added objects.h.
1997-09-22 00:45:19 +00:00