summaryrefslogtreecommitdiff
path: root/libguile/objects.c
AgeCommit message (Collapse)AuthorFilesLines
2000-12-16Some GOOPS cleanup.Keisuke Nishida1-2/+5
2000-11-17* alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,Marius Vollmer1-0/+2
continuations.c, debug-malloc.c, debug.c, dynl.c, dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c, feature.c, filesys.c, fluids.c, fports.c, gc.c, goops.c, guardians.c, hash.c, hashtab.c, hooks.c, ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c, modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c, pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c, properties.c, ramap.c, random.c, read.c, regex-posix.c, root.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c, srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c, strorder.c, strports.c, struct.c, symbols.c, tag.c, threads.c, throw.c, unif.c, variable.c, vectors.c, version.c, vports.c, weaks.c: Makes sure the snarfer output inclusion is disabled when the snarfer is run on the file. Thanks to Lars J. Aas! * Makefile.am: Install guile-procedures.txt in version-specific directory to enable multiple installed guile versions. Suggested by Karl M. Hegbloom <karlheg@debian.org, patch by Matthias Koeppe.
2000-11-07* eval.c (SCM_IM_DISPATCH), objects.c (scm_mcache_lookup_cmethod):Mikael Djurfeldt1-2/+2
Count n_specialized + 1 turns before letting a match through.
2000-11-02* Get rid of calls to SCM_ROSTRINGP.Dirk Herrmann1-1/+1
* Fix some string/symbol output problems with regards to substrings. * Fix error output to prefer procedure name parameters over stack data. * Use SCM_(SET_)?FILENAME where appropriate. * Prefer calling scm_remember over scm_protect/unprotect_object calls.
2000-10-25* goops.c, objects.c, objects.h, eval.c (scm_make_extended_class,Mikael Djurfeldt1-4/+0
scm_make_port_classes, scm_change_object_class, scm_memoize_method): Changed to ordinary functions (was plugin slots).
2000-10-09* Replace a bunch of calls to SCM_LENGTH.Dirk Herrmann1-2/+2
2000-09-26* Replaced a lot of references to SCM_CHARS.Dirk Herrmann1-1/+1
2000-09-12* Unified ssymbols and msymbols to a single symbol type 'scm_tc7_symbol'.Dirk Herrmann1-1/+1
* Added scm_string_hash and deprecated scm_strhash.
2000-08-27* objects.c (scm_init_objects), print.c (scm_init_print), struct.cMikael Djurfeldt1-4/+2
(scm_init_struct): First arg to scm_make_vtable_vtable should be a string, not a symbol. (`make-vtable-vtable' needs to append this string to another string and then pass it through `make-struct-layout'.)
2000-05-23* Replace SCM_UNPACK_CAR appropriately.Dirk Herrmann1-2/+2
2000-04-21* Makefile.am (DEFS): Added. automake adds -I options to DEFS,Mikael Djurfeldt1-16/+16
and we don't want that. (INCLUDES): Removed all -I options except for the root source directory and the root build directory. * *.*: Change includes so that they always use the "prefixes" libguile/, qt/, guile-readline/, or libltdl/. (Thanks to Tim Mooney.)
2000-04-12The struct data is now an array of scm_bits_t variables.Dirk Herrmann1-4/+4
2000-04-03Lots of fixes to make guile (at some time) compile with strict typing.Dirk Herrmann1-3/+3
2000-03-19 * *.[hc]: add Emacs magic at the end of file, to ensure GNUMichael Livshin1-0/+6
indentation style.
2000-03-17Only include strings.h where it is actually needed.Dirk Herrmann1-0/+1
2000-03-17Only include ports.h where it is actually needed.Dirk Herrmann1-0/+1
2000-03-17Only include vectors.h in those files, where it is actually needed.Dirk Herrmann1-0/+1
2000-03-14* __scm.h eq.c, eval.c, gc.c, hc.h, gh_data, hash.c, numbers.c,Mikael Djurfeldt1-9/+2
numbers.h, objects.c, ramap.c, random.c, unif.c, unif.h: Extensive rewrite of handling of real and complex numbers. (SCM_FLOATS, SCM_SINGLES): These #ifdef conditionals have been removed along with the support for floats. (Float vectors are still supported.)
2000-03-12*** empty log message ***Mikael Djurfeldt1-4/+4
2000-03-12* async.c, boolean.h, debug.c, dynl.c, dynwind.c, eval.c, eval.h,Mikael Djurfeldt1-4/+4
feature.h, filesys.h, fluids.h, fports.c, fports.h, gc.c, gc.h, hash.c, keywords.h, macros.c, numbers.c, numbers.h, objects.c, objects.h, options.c, pairs.h, ports.c, ports.h, print.c, procs.h, ramap.c, read.c, smob.c, smob.h, srcprop.h, stacks.c, stacks.h, strports.c, struct.c, struct.h, tag.c, tags.h, throw.c, unif.c, unif.h, variable.h, vectors.h, weaks.c, weaks.h (SCM_SCM, SCM_BITS, SCM_CARBITS): Renamed from SCM_ASSCM, SCM_ASWORD, SCM_CARW).
2000-03-09*.[ch]: make a distinction between SCM as a genericGreg J. Badros1-5/+5
name for a Scheme object (now a void*), and SCM as 32 bit word for storing tags and immediates (now a long int). Introduced SCM_ASWORD and SCM_ASSCM for conversion. Fixed various dubious code in the process: arbiter.c (use macros), unif.c (scm_array_p),
2000-03-03* error.h, error.c: Added `scm_wrong_type_arg_msg' to supportGreg J. Badros1-1/+1
displaying the expected type. Use SCM_LISTn in a couple places instead of scm_cons-ing by hand. * __scm.h: Added SCM_ASSERT_TYPE macro. * validate.h, scm_validate.h: Added the former, as a renamed version of the latter with SCM_ASSERT_TYPE used in SCM_MAKE_VALIDATE (instead of just SCM_ASSERT) * Makefile.am: Rename scm_validate.h to validate.h. * *.c, *.h: Include validate.h, not scm_validate.h (old name's prefix was superfluous).
2000-03-02* list.c: Moved append docs to append! Thanks Dirk Hermann. Also,Greg J. Badros1-1/+1
added append docs from R4RS. * strings.c: Docstring typo fix, + eliminate unneeded IMP tests. Thanks Dirk Hermann! * chars.h: Provide SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR and deprecate SCM_ICHRP, SCM_ICHR, SCM_MAKICHR. Thanks Dirk Hermann! * *.h, *.c: Use SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR throughout. Drop use of SCM_P for function prototypes... assume an ANSI C compiler. Thanks Dirk Hermann!
2000-01-05* *.[ch]: Whitespace changes -- added space after SCM_VALIDATE_*Greg J. Badros1-5/+5
macros and SCM_DEFINE macros to match GNU coding standards.
2000-01-05*.[ch]: Replace GUILE_PROC w/ SCM_DEFINE.Greg J. Badros1-6/+6
2000-01-04* options.c, objects.c, keywords.c, gc.c: Some redundant SCM_NIMPGreg J. Badros1-2/+1
removals from Dirk Hermann. * alist.c: Rename formals to match the parameter names in the documentation, updates to documentation. Thanks Dirk Hermann!
1999-12-19* objects.c (scm_class_of): Bugfix: Inserted missing SCM_CDRMikael Djurfeldt1-1/+1
setting struct table class.
1999-12-16* coop-threads.c: Remove K&R function headers.Greg J. Badros1-3/+3
* scm_validate.h: Added SCM_VALIDATE_THREAD. * *.c: Remove SCM_NIMP(X) when it is an extraneous pre-test given that SCM_FOOP macros all now include SCM_NIMP in their expansion. This simplifies lots of code, making it far more readable.
1999-12-13Remove leading whitespace before empty docstrings.Greg J. Badros1-6/+6
1999-12-12* *.c: Pervasive software-engineering-motivated rewrite ofGreg J. Badros1-49/+47
function headers and argument checking. Switched SCM_PROC, SCM_PROC1 macros to be GUILE_PROC, GUILE_PROC1 (may change names later, but was useful to keep old versions around while migrate) that has docstrings and argument lists embedded in the GUILE_PROC macro invocations that expand into a function header. Use lots of new SCM_VALIDATE_* macros to simplify error checking and reduce tons of redundancy. This is very similar to what I did for Scwm. Note that none of the extraction of the docstrings, nor software engineering checks of Scwm is yet added to Guile. I'll work on that tomorrow, I expect. * Makefile.am: Added scm_validate.h to modinclude_HEADERS. * chars.c: Added docstrings for the primitives defined in here. * snarf.h: Added GUILE_PROC, GUILE_PROC1. Added SCM_REGISTER_PROC to be like old SCM_PROC, though old SCM_PROC still remains for now. Changed naming convention for the s_foo string name of the primitive to be s_scm_foo for ease of use with the macro. * scm_validate.h: Lots of new SCM_VALIDATE macros to simplify argument checking through guile. Maybe some of these should be folded into the header file for the types they check, but for now it was easiest to just stick them all in one place.
1999-11-19 * acconfig.h: add HAVE_ARRAYS.Gary Houston1-0/+2
* configure.in: add --disable-arrays option, probably temporary. * the following changes allow guile to be built with the array "module" omitted. some of this stuff is just tc7 type support, which wouldn't be needed if uniform array types were converted to smobs. * tag.c (scm_utag_bvect ... scm_utag_cvect): don't define unless HAVE_ARRAYS. (scm_tag): don't check array types unless HAVE_ARRAYS. * sort.c (scm_restricted_vector_sort_x, scm_sorted_p): remove the unused array types. * (scm_stable_sort, scm_sort): don't support vectors if not HAVE_ARRAYS. a bit excessive. * random.c (vector_scale, vector_sum_squares, scm_random_solid_sphere_x, scm_random_hollow_sphere_x, scm_random_normal_vector_x): don't define unless HAVE_ARRAYS. * gh_data.c (makvect, gh_chars2byvect, gh_shorts2svect, gh_longs2ivect, gh_ulongs2uvect, gh_floats2fvect, gh_doubles2dvect, gh_uniform_vector_length, gh_uniform_vector_ref): don't define unless HAVE_ARRAYS. (gh_scm2chars, gh_scm2shorts, gh_scm2longs, gh_scm2floats, gh_scm2doubles): don't check vector types if not HAVE_ARRAYS. * eq.c (scm_equal_p), eval.c (SCM_CEVAL), print.c (scm_iprin1), gc.c (scm_gc_mark, scm_gc_sweep), objects.c (scm_class_of): don't support the array types unless HAVE_ARRAYS is defined. * tags.h: make nine tc7 types conditional on HAVE_ARRAYS. * read.c (scm_lreadr): don't check for #* unless HAVE_ARRAYS is defined (this should use read-hash-extend). * ramap.c, unif.c: don't check whether ARRAYS is defined. * vectors.c (scm_vector_set_length_x): moved here from unif.c. call scm_uniform_element_size if HAVE_ARRAYS. vectors.h: prototype too. * unif.c (scm_uniform_element_size): new procedure. * init.c (scm_boot_guile_1): don't call scm_init_ramap or scm_init_unif unless HAVE_ARRAYS is defined. * __scm.h: don't define ARRAYS. * Makefile.am (EXTRA_libguile_la_SOURCES): unif.c and ramap.c moved here from libguile_la_SOURCES. * Makefile.am (ice9_sources): add arrays.scm. * boot-9.scm: load arrays.scm if 'array is provided. * arrays.scm: new file with stuff from boot-9.scm.
1999-09-12* __scm.h, backtrace.c, backtrace.h, debug.c, debug.h, dynl-dld.c,Mikael Djurfeldt1-1/+1
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-08-30Moved scm_memoize_method back to eval.c.Mikael Djurfeldt1-3/+1
1999-08-29* objects.c, objects.h (scm_mcache_lookup_cmethod): Moved hereMikael Djurfeldt1-166/+82
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-26* procs.c, procs.h (scm_subr_entry): New type: Stores dataMikael Djurfeldt1-1/+150
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-24* objects.c (scm_class_of): Treat scm_tc16_port_with_ps as ports.Mikael Djurfeldt1-7/+9
1999-08-16* objects.c (scm_set_object_procedure_x): Disallow setting ofMikael Djurfeldt1-30/+5
procedures for pure generic functions.
1999-08-06* objects.h, objects.c (scm_apply_generic_env): Added (used byMikael Djurfeldt1-3/+67
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-04* objects.c (scm_class_of): Use the new SCM_CLASSF_GOOPS_VALIDMikael Djurfeldt1-1/+3
flag which combines type and status info so that the class redefinition protocol has zero cost during normal execution.
1999-07-24* objects.c (scm_make_port_classes): New function ptr.Mikael Djurfeldt1-2/+3
1999-07-24* objects.c, objects.h (scm_port_class): Added.Mikael Djurfeldt1-1/+6
(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-06-23* objects.c (scm_init_objects): Initialize destructor slot of theMikael Djurfeldt1-0/+1
primordial entity class.
1999-03-14#include "keywords.h"Mikael Djurfeldt1-1/+1
1999-03-14* objects.c: #include "smob.h";Mikael Djurfeldt1-14/+37
(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-11* objects.c (scm_class_of): Use SCM_OBJ_CLASS_REDEF.Mikael Djurfeldt1-0/+123
* 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-01-05Correction of mistake (should have committed onto a branch...)Mikael Djurfeldt1-120/+0
1999-01-05*** empty log message ***Mikael Djurfeldt1-0/+120
1998-11-26* objects.c, objects.h (scm_entity_p): New procedure. TogetherMikael Djurfeldt1-1/+11
with the predicates scm_procedure_p and scm_struct_p, this predicate makes it possible to differ between structs, entities and operators.
1998-11-21* objects.c (scm_init_objects): Renamed <standard-metaclass>,Mikael Djurfeldt1-3/+3
<operator-metaclass> and <entity-class> to <standard-class>, <operator-class> and <entity> in order to conform with STKlos naming conventions.
1998-11-15* objects.c (scm_i_make_class_object): Renamed fromMikael Djurfeldt1-22/+18
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.