summaryrefslogtreecommitdiff
path: root/libguile/objects.c
AgeCommit message (Collapse)AuthorFilesLines
2009-11-15fold objects.[ch] into goops.[ch]Andy Wingo1-212/+0
Remove objects.h #includes as appropriate.
2009-11-15remove support for "entities" -- a form of applicable structAndy Wingo1-69/+0
Entities were meant to be a form of applicable struct. Unfortunately, the implementation is intertwingled with generics. Removing them, for now, will make it possible to cleanly re-add applicable struct support. * libguile/struct.h (SCM_STRUCTF_ENTITY): Remove. (SCM_STRUCTF_GOOPS_HACK): New flag; sigh. * libguile/struct.c (scm_make_struct): We make "entity" structs if the GOOPS_HACK flag is set. This will be fixed when we rework flags and remove hidden words. * libguile/goops.c (scm_class_of): Structs are not applicable, for now at least. (scm_sys_inherit_magic_x, scm_basic_basic_make_class) (scm_sys_allocate_instance, scm_sys_set_object_setter_x): (make_struct_class): Adapt for no more entities (and thus no entity flag). (create_standard_classes): For some reason, generic functions were getting the LIGHT flag set, after the ENTITY flag was removed; so for now explicitly clear that flag. * libguile/goops.h (SCM_GENERIC_SETTER, SCM_SET_GENERIC_SETTER): New macros. * libguile/objects.h: * libguile/objects.c: Remove code for entities. * libguile/debug.c: (scm_procedure_source): Only work with generics. * libguile/eval.c (scm_trampoline_0, scm_trampoline_1) (scm_trampoline_2): Only handle generics. * libguile/eval.i.c (CEVAL): #ifdef out the pieces about entities. * libguile/procprop.c (scm_i_procedure_arity): Remove support for entities. * libguile/procs.c (scm_procedure_p, scm_procedure, scm_setter): Remove entity support.
2009-11-15SCM_GENERIC_METHOD_CACHE macro splits from SCM_ENTITY_PROCEDUREAndy Wingo1-3/+2
* libguile/goops.h (SCM_GENERIC_METHOD_CACHE) (SCM_SET_GENERIC_METHOD_CACHE): Two new macros; the same as SCM_[SET_]ENTITY_PROCEDURE, but more reflecting the reality of the generic hack. * libguile/eval.i.c: * libguile/goops.c: * libguile/objects.c: * libguile/vm-i-system.c: Use the new macros when it is appropriate to do so.
2009-11-15remove unused things from object.[ch]Andy Wingo1-62/+1
* libguile/objects.h: * libguile/objects.c (scm_object_procedure): Remove, it was only compiled with SCM_DEBUG. * libguile/objects.h: * libguile/objects.c (scm_make_class_object, scm_make_subclass_object, (scm_i_make_class_object, scm_metaclass_standard): Remove also. These implemented an undocumented object system, and are totally replaced by GOOPS.
2009-11-15remove operatorsAndy Wingo1-38/+10
2009-08-18Merge branch 'master' into boehm-demers-weiser-gcLudovic Courtès1-6/+7
Conflicts: lib/Makefile.am libguile/Makefile.am libguile/frames.c libguile/gc-card.c libguile/gc-freelist.c libguile/gc-mark.c libguile/gc-segment.c libguile/gc_os_dep.c libguile/load.c libguile/macros.c libguile/objcodes.c libguile/programs.c libguile/strings.c libguile/vm.c m4/gnulib-cache.m4 m4/gnulib-comp.m4 m4/inline.m4
2009-06-17Change Guile license to LGPLv3+Neil Jerram1-6/+7
(Not quite finished, the following will be done tomorrow. module/srfi/*.scm module/rnrs/*.scm module/scripts/*.scm testsuite/*.scm guile-readline/* )
2009-03-22Merge branch 'master' into boehm-demers-weiser-gcLudovic Courtès1-6/+14
Conflicts: libguile/continuations.c libguile/gc-freelist.c libguile/gc-mark.c libguile/symbols.c libguile/threads.c module/ice-9/boot-9.scm
2009-02-03inline dispatch to program cmethods, tick in return, remove old goops methodsAndy Wingo1-1/+5
* libguile/objects.c (scm_apply_generic): Inline the case when the generic is a program. * libguile/vm-i-system.c (return): Tick when functions return. * module/oop/goops.scm (object-eqv?, object-equal?): Remove these historical methods.
2008-10-30fix up some assumptions that cmethods were listsAndy Wingo1-2/+3
* libguile/eval.i.c (type_dispatch, apply_vm_cmethod) (apply_memoized_cmethod): Tweak the nastiness a bit more so as to deal with the '(no-method) empty entries. I would like to stop the search if the cdr isn't a pair, but currently with the inlined memoized bits, the cdr is a pair. The fix would be to make the memoizer return a procedure and not the already-inlined bits -- slightly slower but the vm will be faster anyway. * libguile/objects.c (scm_mcache_lookup_cmethod): Same fixes here. * oop/goops/dispatch.scm (cache-hashval, cache-try-hash!): Allow non-list cmethod tails.
2008-10-30runtime byte compilation of goops methods, whoooooAndy Wingo1-6/+9
* ice-9/boot-9.scm (make-modules-in): Change to make sure that we are making modules in modules; that is, that a global binding of `compile' doesn't prevent a module from importing a submodule named `compile'. (resolve-module): Clean up a bit, and serialize the logic. * libguile/objects.c (scm_mcache_lookup_cmethod, scm_apply_generic): * libguile/eval.i.c (CEVAL): Now that cmethod entries can have a program as their tail instead of a memoized proc, we have to change the halting condition on the method cache search, in both places: the one that's inlined into eval.i.c and the one in objects.c. If the cmethod isn't a pair, apply it. * libguile/goops.c (make): In the `make' procedure that's used before GOOPS is booted, bind #:formals, #:body, and #:compile-env on methods. * oop/goops/compile.scm (compute-entry-with-cmethod): There was a terrible trick here that involved putting a dummy pair in the cache, then modifying it in place with the result of memoization. The note claimed that this was to cut recursion short, or something. I can't see how it could recurse, given that `methods' is changing each time. Also, the pair trick doesn't work with byte-compiled methods. So, remove it. (compile-method): Dispatch to the appropriate method compiler, based on whether the method was defined with the interpreter or with the compiler. (make-next-method): New function, generically computes a `next-method' procedure, though the caller has to supply the arguments. (compile-method/vm): Exciting method byte compiler! (make-make-next-method/memoizer, compile-method/memoizer): Add the /memoizer suffix, and move all this code to the bottom of the file.
2008-09-13Merge branch 'master' into boehm-demers-weiser-gcLudovic Courtès1-1/+5
Conflicts: lib/Makefile.am libguile/gc-card.c libguile/gc-freelist.c libguile/gc-mark.c libguile/gc-segment.c libguile/gc.c libguile/gc.h libguile/gc_os_dep.c libguile/private-gc.h m4/.cvsignore m4/gnulib-cache.m4 m4/gnulib-comp.m4
2008-09-13Include <config.h> in all C files; use `#ifdef HAVE_CONFIG_H' rather than `#if'.Ludovic Courtès1-1/+5
2008-09-10Removed unnecessary uses of class destructors.Ludovic Courtes1-1/+0
* libguile/goops.c (scm_sys_inherit_magic_x): Don't invoke `SCM_SET_CLASS_DESTRUCTOR' for legacy destructors that are no longer needed (e.g., `scm_struct_free_entity ()', etc.). * libguile/objects.c (scm_init_objects): Likewise. git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-34
2006-04-17merge from 1.8 branchKevin Ryde1-1/+1
2005-05-23The FSF has a new address.Marius Vollmer1-1/+1
2005-01-20Include goops.h for the scm_class_of prototype.Marius Vollmer1-0/+2
2005-01-18* objects.h, objects.c, goops.c, goops.h (scm_class_boolean,Marius Vollmer1-147/+0
scm_class_char, scm_class_pair, scm_class_procedure, scm_class_string, scm_class_symbol, scm_class_procedure_with_setter, scm_class_primitive_generic, scm_class_vector, scm_class_null, scm_class_real, scm_class_complex, scm_class_integer, scm_class_fraction, scm_class_unknown, scm_port_class, scm_smob_class, scm_no_applicable_method, scm_class_of): Moved from objects to goops since they are only useable once goops has been loaded. (scm_classes_initialized): Removed. (scm_class_of): Do not check it. (create_standard_classes): Do not set it.
2005-01-17* objects.h, objects.c (scm_classes_initialized): New.Marius Vollmer1-0/+5
(scm_class_of): Signal error when scm_classes_initialized is zero. * goops.c (create_standard_classes): Set scm_classes_initialized to one.
2005-01-02Use new vector elements API or simple vector API, as appropriate.Marius Vollmer1-3/+3
Removed SCM_HAVE_ARRAYS ifdefery. Replaced all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2004-11-09Do no longer handle scm_tc7_bvect bitvectors.Marius Vollmer1-3/+0
2004-11-02Do no longer handle old-style uniform vectors.Marius Vollmer1-6/+0
2004-10-27* print.c (iprin1): Removed code for scm_tc7_byvect.Marius Vollmer1-1/+0
* objects.c (scm_class_of): Likewise. * gc-mark.c (scm_gc_mark_dependencies): Likewise. * gc-card.c (scm_i_sweep_card): Likewise. * evalext.c (scm_self_evaluating_p): Likewise. * eq.c (scm_equal_p): Likewise.
2004-09-22*** empty log message ***Marius Vollmer1-7/+7
2004-08-19* strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,Marius Vollmer1-7/+6
scm_i_string_writable_chars, scm_i_string_stop_writing): New, to replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all uses. (scm_i_make_string, scm_c_make_string): New, to replace scm_allocate_string. Updated all uses. (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Deprecated. (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string, scm_str2string, scm_makfrom0str, scm_makfrom0str_opt): Discouraged. Replaced all uses with scm_from_locale_string or similar, as appropriate. (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x, scm_c_substring, scm_c_substring_shared, scm_c_substring_copy, scm_substring_shared, scm_substring_copy): New. * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC, SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS, SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol, scm_str2symbol, scm_mem2uninterned_symbol): Discouraged. (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str): Deprecated. (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS, SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed. (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln): New, to replace scm_str2symbol and scm_mem2symbol, respectively. Updated all uses. (scm_gensym): Generate only the number suffix in the buffer, just string-append the prefix.
2004-07-27* tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it intoMarius Vollmer1-2/+2
deprecated.h. Replaced all uses with scm_is_eq.
2004-07-23* deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,Marius Vollmer1-12/+12
SCM_INUM): Deprecated by reenaming them to SCM_I_INUMP, SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated versions to deprecated.h and deprecated.c. Changed all uses to either use the SCM_I_ variants or scm_is_*, scm_to_*, or scm_from_*, as appropriate.
2004-07-06* deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,Marius Vollmer1-7/+7
SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into "deprecated.h". Replaced all uses with scm_is_false, scm_is_true, scm_from_bool, and scm_is_bool, respectively.
2003-11-18* print.c (scm_iprin1): Handle fractions.Marius Vollmer1-1/+3
* objects.h (scm_class_fraction): New. * objects.c (scm_class_fraction): New. (scm_class_of): Handle fractions. * hash.c (scm_hasher): Handle fractions. * numbers.c: New code for handling fraction all over the place. (scm_odd_p, scm_even_p): Handle inexact integers. (scm_rational_p): New function, same as scm_real_p. (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor): New exact functions that replace the inexact 'dsubr' implementations. (scm_numerator, scm_denominator): New. * numbers.h (SCM_NUMP): Recognize fractions. (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT, SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR, SCM_FRACTION_REDUCED): New. (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number): New prototypes. (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator, scm_rational_p): New prototypes. (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp, scm_i_print_fraction): New prototypes. * goops.c (create_standard_classes): Create "<fraction>" class. * gc-mark.c (scm_gc_mark_dependencies): Handle fractions. * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a case in the switch, but do nothing for now. * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions to doubles when calling 'dsubr' functions. * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
2003-09-18 This set of patches introduces a new tc7 code scm_tc7_number forDirk Herrmann1-0/+9
numbers. Bignums, reals and complex numbers are turned from smobs into subtypes of scm_tc7_number. * tags.h (scm_tc7_number): New. * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c (scm_class_of), print.c (scm_iprin1), smob.c (scm_smob_prehistory): Don't handle bignums, reals and complex numbers as subtypes of scm_tc7_smob any more. * numbers.h, tags.h (scm_tc16_big, scm_tc16_real, scm_tc16_complex): Moved definitions from tags.h to numbers.h.
2003-09-16 This set of patches eliminates the dependency between theDirk Herrmann1-12/+5
implementation of evaluator specific memoization codes and special constants like #f, '() etc. ('flags'), which are not evaluator specific. The goal is to remove definitions of evaluator memoization codes completely from the public interface. This will make it possible to experiment more freely with optimizations of guile's internal representation of memoized code. * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM. * print.c (iflagnames): New array, holding the printed names of guile's special constants ('flags'). (scm_isymnames): Now holds only the printed names of the memoization codes. (scm_iprin1): Separate the handling of memoization codes and guile's special constants. * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA, SCM_IFLAGNUM): new (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T, SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND, SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF, SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE, SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed values. (SCM_IFLAGP): SCM_IFLAGP now only tests for flags. (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the tc9 macros and scm_tc9_flag.
2003-06-01 This set of patches separates the representation of the cxr familyDirk Herrmann1-0/+1
of functions (car, cdr etc.) from the dsubr family of functions (i. e. functions that take a double precision floating point argument). Further, the algorithm for handling the cxr function is improved. * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor, ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh, cosh, tanh), objects.c (scm_class_of), procprop.c (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new typecode for the dsubr family of functions. * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to ramap_dsubr. * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c (scm_init_pairs): Make use of the (now usable) second cell element of a scm_tc7_cxr function to implement the cxr family of functions more efficiently.
2003-04-05Changed license terms to the plain LGPL thru-out.Marius Vollmer1-36/+12
2003-03-27* objects.c: fix various preprocessor usages of new publicRob Browning1-1/+1
symbols to expect 0 or 1 values rather than 1 or undefined. i.e. change #ifdef to #if, etc.
2003-03-25* objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.Rob Browning1-1/+1
2003-03-19* goops.c (make_class_from_template): New fourth arg:Mikael Djurfeldt1-2/+3
applicablep. (scm_class_extended_generic_with_setter, scm_class_self): Fixed cpls. * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable. * goops.c, objects.c, objects.h (scm_make_extended_class): New second arg: applicablep. (scm_i_inherit_applicable): New function. * goops.c, goops.h (scm_class_applicable, scm_class_extended_accessor): New classes.
2002-07-202002-07-20 Han-Wen <hanwen@cs.uu.nl>Han-Wen Nienhuys1-4/+4
* *.c: add space after commas everywhere. * *.c: use SCM_VECTOR_SET everywhere, where a vector is written. Document cases where SCM_WRITABLE_VELTS() is used. * vectors.h (SCM_VELTS): prepare for write barrier, and let SCM_VELTS() return a const pointer (SCM_VECTOR_SET): add macro. * autogen.sh (mscripts): find and check version number of autoconf. Complain if 2.53 is not found.
2002-03-14Retire inclusion guard macro SCM_MAGIC_SNARFER.Thien-Thi Nguyen1-2/+0
2001-08-31* Removed lots of deprecated stuff.Dirk Herrmann1-1/+0
2001-07-26* tags.h: Update tag system docs.Marius Vollmer1-3/+2
(scm_tc3_cons_gloc): Renamed to scm_tc3_struct. Changed all uses. (scm_tcs_cons_gloc): Renamed to scm_tcs_struct. Changed all uses. (SCM_ECONSP, SCM_NECONSP): Removed. Changed all uses to SCM_CONSP or SCM_NCONSP, respectively. * struct.c, struct.h, srcprop.c, procs.c, procprop.c, print.c, objects.c. modules.c, goops.c, eval.c, debug.c: Changed all uses of scm_tc3_cond_gloc and scm_tcs_cons_gloc. See above. * print.c (scm_iprin1): Remove printing of glocs. Do not try to tell glocs from structs. * gc.c (scm_gc_mark, scm_gc_sweep): Remove handling of glocs. * eval.c (scm_m_atbind): Make a list of variables, not glocs. (scm_ceval, scm_deval): For SCM_IM_BIND, fiddle with variables instead of with glocs. (EVALCAR): Do not test for glocs. (scm_lookupcar, scm_lookupcar1): Do not handle glocs in race condition. (scm_unmemocar): Do not handle glocs. (scm_m_atfop): Memoize as a variable, not as a gloc. (scm_eval_args, scm_deval_args): Do not handle glocs. (scm_ceval, scm_deval): Likewise. * eval.h (SCM_XEVALCAR): Do not test for glocs. (SCM_GLOC_VAR, SCM_GLOC_VAL, SCM_GLOC_SET_VAL, SCM_GLOC_VAL_LOC): Removed. * debug.h, debug.c (scm_make_gloc, scm_gloc_p): Removed. * dynwind.c (scm_swap_bindings): Likewise. (scm_dowinds): Updated to recognize lists of variables instead of lists of glocs. * __scm.h (SCM_CAUTIOS, SCM_RECKLESS): Update comments.
2001-07-09Remove "face-lift" comment.Thien-Thi Nguyen1-2/+0
2001-06-28 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,Keisuke Nishida1-8/+8
scm_list_n): New functions. (SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated. (lots of files): Use the new functions. * goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N. * strings.c: #include "libguile/deprecation.h".
2001-06-26* Deprecated scm_makfromstr and added scm_mem2string as a replacement.Dirk Herrmann1-1/+1
* Eliminated some potential gc problems. * Eliminated some signedness problems. * Minor changes.
2001-06-23* Various minor improvements, for example signedness fixes.Dirk Herrmann1-21/+25
2001-06-08* Fixed some bugs, some reported by Matthias Koeppe.Dirk Herrmann1-2/+3
2001-05-26revert the ill-considered part of the 2001-05-24 changesMichael Livshin1-7/+7
2001-05-24* validate.hMichael Livshin1-7/+7
(SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]): new macros. * unif.h: type renaming: scm_array -> scm_array_t scm_array_dim -> scm_array_dim_t the old names are deprecated, all in-Guile uses changed. * tags.h (scm_ubits_t): new typedef, representing unsigned scm_bits_t. * stacks.h: type renaming: scm_info_frame -> scm_info_frame_t scm_stack -> scm_stack_t the old names are deprecated, all in-Guile uses changed. * srcprop.h: type renaming: scm_srcprops -> scm_srcprops_t scm_srcprops_chunk -> scm_srcprops_chunk_t the old names are deprecated, all in-Guile uses changed. * gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c, rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c, strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c, vectors.c, vports.c, weaks.c: various int/size_t -> size_t/scm_bits_t changes. * random.h: type renaming: scm_rstate -> scm_rstate_t scm_rng -> scm_rng_t scm_i_rstate -> scm_i_rstate_t the old names are deprecated, all in-Guile uses changed. * procs.h: type renaming: scm_subr_entry -> scm_subr_entry_t the old name is deprecated, all in-Guile uses changed. * options.h (scm_option_t.val): unsigned long -> scm_bits_t. type renaming: scm_option -> scm_option_t the old name is deprecated, all in-Guile uses changed. * objects.c: various long -> scm_bits_t changes. (scm_i_make_class_object): flags: unsigned long -> scm_ubits_t * numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to SCM_I_FIXNUM_BIT. * num2integral.i.c: new file, multiply included by numbers.c, used to "templatize" the various integral <-> num conversion routines. * numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig, scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl): deprecated. (scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig, scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big, scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big, scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num, scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff, scm_num2size): new functions. * modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.x * load.c: change int -> size_t in various places (where the variable is used to store a string length). (search-path): call scm_done_free, not scm_done_malloc. * list.c (scm_ilength): return a scm_bits_t, not long. some other {int,long} -> scm_bits_t changes. * hashtab.c: various [u]int -> scm_bits_t changes. scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef). (scm_ihashx): n: uint -> scm_bits_t use scm_bits2num instead of scm_ulong2num. * gsubr.c: various int -> scm_bits_t changes. * gh_data.c (gh_scm2double): no loss of precision any more. * gh.h (gh_str2scm): len: int -> size_t (gh_{get,set}_substr): start: int -> scm_bits_t, len: int -> size_t (gh_<num>2scm): n: int -> scm_bits_t (gh_*vector_length): return scm_[u]size_t, not unsigned long. (gh_length): return scm_bits_t, not unsigned long. * fports.h: type renaming: scm_fport -> scm_fport_t the old name is deprecated, all in-Guile uses changed. * fports.c (fport_fill_input): count: int -> scm_bits_t (fport_flush): init_size, remaining, count: int -> scm_bits_t * debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed those prototypes, as the functions they prototype don't exist. * fports.c (default_buffer_size): int -> size_t (scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t default_size: int -> size_t (scm_setvbuf): csize: int -> scm_bits_t * fluids.c (n_fluids): int -> scm_bits_t (grow_fluids): old_length, i: int -> scm_bits_t (next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int -> scm_bits_t (scm_c_with_fluids): flen, vlen: int -> scm_bits_t * filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to the new and shiny SCM_NUM2INT. * extensions.c: extension -> extension_t (and made a typedef). * eval.h (SCM_IFRAME): cast to scm_bits_t, not int. just so there are no nasty surprises if/when the various deeply magic tag bits move somewhere else. * eval.c: changed the locals used to store results of SCM_IFRAME, scm_ilength and such to be of type scm_bits_t (and not int/long). (iqq): depth, edepth: int -> scm_bits_t (scm_eval_stack): int -> scm_bits_t (SCM_CEVAL): various vars are not scm_bits_t instead of int. (check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t i: int -> scm_bits_t * environments.c: changed the many calls to scm_ulong2num to scm_ubits2num. (import_environment_fold): proc_as_ul: ulong -> scm_ubits_t * dynwind.c (scm_dowinds): delta: long -> scm_bits_t * debug.h: type renaming: scm_debug_info -> scm_debug_info_t scm_debug_frame -> scm_debug_frame_t the old names are deprecated, all in-Guile uses changed. (scm_debug_eframe_size): int -> scm_bits_t * debug.c (scm_init_debug): use scm_c_define instead of the deprecated scm_define. * continuations.h: type renaming: scm_contregs -> scm_contregs_t the old name is deprecated, all in-Guile uses changed. (scm_contregs_t.num_stack_items): size_t -> scm_bits_t (scm_contregs_t.num_stack_items): ulong -> scm_ubits_t * continuations.c (scm_make_continuation): change the type of stack_size form long to scm_bits_t. * ports.h: type renaming: scm_port_rw_active -> scm_port_rw_active_t (and made a typedef) scm_port -> scm_port_t scm_ptob_descriptor -> scm_ptob_descriptor_t the old names are deprecated, all in-Guile uses changed. (scm_port_t.entry): int -> scm_bits_t. (scm_port_t.line_number): int -> long. (scm_port_t.putback_buf_size): int -> size_t. * __scm.h (long_long, ulong_long): deprecated (they pollute the global namespace and have little value besides that). (SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an SCM handle). (ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they exist (for size_t & ptrdiff_t) (scm_sizet): deprecated. * Makefile.am (noinst_HEADERS): add num2integral.i.c
2001-05-15Merge from mvo-vcell-cleanup-1-branch.Marius Vollmer1-3/+3
2001-05-05(scm_valid_object_procedure_p): New.Marius Vollmer1-2/+28
(scm_set_object_procedure_x): Use it to check argument. Fix docstring.
2001-02-16(scm_class_of, scm_entity_p, scm_operator_p,Martin Grabmüller1-7/+11
scm_set_object_procedure_x, scm_object_procedure, scm_make_class_object): Added docstrings.