2001-03-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu> * Version 1.0.2 released. * GOOPS-VERSION (GOOPS_MINOR_VERSION): Bumped to 0.2. * goops.scm (define-method): Only accept new syntax. * Makefile.am (goops_sources): Added old-define-method.scm. * old-define-method.scm: New file. * goops.texi (VERSION): Bumped to version 0.3. * goops-tutorial.texi, goops.texi: Updated to reflect new define-method syntax. * NEWS: Updated with some lacking history. * save.scm, goops.scm, composite-slot.scm, active-slot.scm: Use new method syntax. * configure.in: Don't remove -lqthreads from LIBS until all checks involving linking with libguile has been performed. 2001-03-05 Mikael Djurfeldt <mdj@linnaeus.mit.edu> * THANKS: Flushed. * GOOPS-VERSION (GOOPS_MINOR_VERSION): Bumped to 0.1. * Version 1.0 released. * Makefile.am (man_MANS): Install manpage. * guile-oops.1: Manpage from Guile distribution. * relpath: New script. * configure.in (GUILEVERSION): Set to version of Guile. * Makefile.am: Use GUILEVERSION in installpaths. Use relpath to install relative links for libgoopscore. 2001-03-04 Mikael Djurfeldt <mdj@linnaeus.mit.edu> * GOOPS-VERSION (GOOPS_MAJOR_VERSION, GOOPS_MINOR_VERSION): Bumed to 1.0. (LIBGOOPSCORE_MAJOR_VERSION): Bumbed to 5. * goops.c, goops.h (scm_sys_tag_body): Added. * dispatch.scm (method-cache-install!): Fixed n-specializers. * compile.scm (compile-method): Tag method closure for body expansion. * goops.scm (change-object-class): Quote empty list constants. (method): Reverted previous change (enclosing body); Quote empty list. (initialize <method>): Supply `dummy-procedure' as default instead of creating a new closure. * internal.scm: Re-export (oop goops) without copying bindings. * configure.in: Test for GOOPS in libguile. * goops.h: Renamed class --> cls, new --> newinst in order to accomodate C++. * configure.in, Makefile.am: Added kludge to prevent libgoopscore.so to be linked with libqthreads.so (which strangely generates a lintian shlib-with-non-pic-code error). 2000-10-21 Mikael Djurfeldt <mdj@linnaeus.mit.edu> * goops.scm (min-fixum, max-fixnum): New constants. 2000-08-26 Mikael Djurfeldt <mdj@linnaeus.mit.edu> * goops.c (create_basic_classes): Pass a string, not a symbol, to scm_make_vtable_vtable. 2000-08-09 Mikael Djurfeldt <mdj@linnaeus.mit.edu> * goops.c (scm_sys_modify_instance, scm_sys_modify_class): Rewritten (In Guile-1.4, we can no longer rely on SCM_REDEFER/REALLOW_INTS.) (scm_wrap_init, scm_wrap_object): Adapt to recent change to structs in guile. 2000-08-08 Mikael Djurfeldt <mdj@linnaeus.mit.edu> * goops.c (sort_applicable_methods): Changed SCM_CAR (X) = Y to SCM_SETCAR (X, Y) + code layout. 2000-07-02 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * dispatch.scm (memoize-method!): Reimplemented the previous change on the scheme level. * goops.c (call_memoize_method): Reverted previous change. * goops.c (call_memoize_method): Made thread safe. Method memoization is synchronized between threads via a mutex, but the case where one thread is dispatching using the method cache being altered by another thread was not handled correctly. 2000-06-30 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * Version 0.9.0 released. * GOOPS-VERSION: Bumped to GOOPS version 0.9.0 and LIBGOOPSCORE version 4.0.0. * configure.in: Substitute LIBGOOPSCORE version variables. * Makefile.am (libgoopscore_la_LDFLAGS): Use LIBGOOPSCORE version numbers. * GOOPS-VERSION: Updated for shell compatibility, and added LIBGOOPSCORE versions. (Thanks to Karl M. Hegbloom.) * goops-snarf.h: Updated for Guile-1.4 snarf.h. * goops.h, goops.c (scm_module_goops): New variable. * goops.c (scm_sys_invalidate_method_cache_x): Strip rest args flag. (Thanks to Nicolas Neuss.) (scm_init_goops, make_class_from_template): Use scm_module_goops. 2000-06-21 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * goops.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE): Conditionally provide for backward compatibility. * goops.c: Use SCM_TOP_LEVEL_LOOKUP_CLOSURE instead of SCM_CDR (scm_top_level_lookup_closure_var). 2000-06-21 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * Version 0.1.8 released. (This is a quick release in order to avoid lot's a bug-reports due to 0.1.6's incompatibility with Guile-1.4.) * goops-snarf.h (SCM_SLOT_SCM): scm_class_SCM --> scm_class_scm. (Thanks to Maurizio Vitale.) 2000-06-04 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * goops.scm (internal-add-method!): Bugfix: n-specialized must be larger than the longest specializer list if any specializer list contains a rest argument. The fact that a method with rest arguments has been added is now coded in the sign of n-specialized. (Thanks to Nicolas Neuss.) * dispatch.scm (method-cache-install!): Use the magnitude of the n-specialized slot. * goops.c (go_to_hell): Cast object to SCM. 2000-04-19 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * goops.c (scm_sys_allocate_instance): Bugfix: Initialize setter and procedure in entities before doing things which can cause GC. Give more specific about information "what" to scm_must_malloc. (scm_sys_inherit_magic_x): Make 0-slot instances have standard (non-light) allocation. This fixes a memory leak. 2000-04-15 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * save.scm: Rewritten in a more sensible way. Added support for arrays and shared arrays. (write-readably <pair>): Bugfix: Consider bindings when computing properness of a list. (restore, write-readably <object>): New restore syntax. Added support for excluded references. Fixed multiple top-level references to same object. Fixed printing of literals. 2000-04-13 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * configure.in: Check for scm_shared_array_root. * goops.c (scm_shared_array_root, scm_shared_array_offset, scm_shared_array_increments): New primities. (These are provided by newer Guile versions.) 2000-04-13 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * save.scm (enumerate!, write-readably): Handle uniform vectors. 2000-04-12 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * save.scm (enumerate!): Bugfix: Make sure that enumeration of the cdr happens! (get-set-for-each, access-for-each): Exclude class slots. (load-objects): New method. 2000-04-12 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * save.scm (write-readably): Make default behaviour be to write the object using `write'. * goops.scm (define-method): Added new, alternative, syntax which probably will supercede the old. [This is added so that people can experiment with it a little.] * save.scm: New file. * Makefile.am (goops_sources): Added save.scm. 2000-03-23 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops.c (wrap_init): Cast second arg to SETCDR to SCM. (create_smob_classes): Initialize the new real and complex smobs with their correct classes. 2000-03-14 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * goops.c (create_smob_classes): Adaptations to reorganization of types in Guile-1.3.5. 2000-03-13 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * goops.scm (compute-std-cpl): Modified to linearize according to the C3 algorithm in http://www.webcom.com/haahr/dylan/linearization-oopsla96.html. (Thanks to Michael Livshin.) * util.scm (any, every, filter): New procedures. * goops.c, goops.h: Adapt GOOPS to new definition of the SCM type. 2000-03-08 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops.texi: Updated. 2000-02-11 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops.c (scm_sloppy_num2ulong): Added. (scm_sys_logand): Rewritten. 2000-02-10 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops.c (scm_accessor_method_slot_definition): New selector. (Will soon be rewritten together with the others.) * goops.scm (compute-getter-method, compute-setter-method): Add initialization argument for slot-definition. * goops.c (create_standard_classes): New slot in <accessor-method>: slot-definition. 2000-01-12 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops.scm (goops-error): Use `oldfmt'. * goops.c, goops.h (scm_oldfmt): New procedure. (scm_c_oldfmt, scm_c_oldfmt0): New functions. Inserted SCM_OLDFMT around all format strings with ~S. * configure.in: Added test for scm_simple_format. * goops.c, goops.scm, composite-slot.scm, stklos.scm: Replace %S with ~S everywhere. 2000-01-11 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * goops.texi: Updated reference manual with Neil's work. 2000-01-10 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * goops.scm (make-generic-bound-check-getter): Inserted missing comma which ties down the value of `assert-bound' in the compiled closure. (Thanks to Thierry Bezecourt.) 2000-01-07 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * goops.h, goops.c: Export the C variables for all classes defined in libgoopscore. 2000-01-04 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * README, BUGS: Added note about generic function application MOP not yet implemented. * goops-tutorial.texi (Class precedence list): Removed paragraph about difference between GOOPS and CLOS with regard to the cpl. * README, goops.texi, goops-tutorial.texi: Fixed typos. 2000-01-03 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * Makefile.am: Added variable `miscdocs' and removed a couple of left-over lines. * COPYRIGHTS, goops-tutorial.texi: Technically, GOOPS is now derived from STk-4.0.1, so we use the STk-4.0.1 copyright. 1999-12-24 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * goops.scm (shallow-clone, deep-clone): Added new arg in call to %allocate-instance. 1999-12-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * Version 0.1.6 released. (Sigh...) * goops.scm (make-closure-variable): Makes the primitive getter, which shouldn't have boundness checking. (slot-definition-init-form): New procedure; exported. (compute-getter-method, compute-setter-method): New generic functions. * Version 0.1.4 released. * Makefile.am (libgoopscore_la_LDFLAGS): Bumped version number. * stklos.scm (write-object): Exported. (define-method): STKlos version. * goops.c (scm_sys_logand): Temporary replacement for the INUM-only libguile version. * goops.scm (%logand): Exported. * dispatch.scm (cache-try-hash!): Use %logand. 1999-12-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops.scm (make-bound-check-get): New procedure. Uses `@assert-bound-ref'. (bound-check-get): New procedure. * goops.c (scm_init_goops): Conditionally add extra arg to scm_mutex_init. (scm_at_assert_bound_ref): New function. * configure.in: Define SCM_MUTEX_INIT_TWO_ARGS if scm_mutex_init takes an extra attributes arg. * goops.scm (method-source): Bugfix. * Makefile.am (.c.x): Remove .x-file on failure. (DISTCLEANFILES): Added *.x. (Thanks to Anders Holst.) * goops.c (scm_assert_bound): New function. * goops.scm (compute-slot-accessors): Only use boundness checking if necessary. (make-closure-variable): New procedure. Only use boundness checking if necessary. (compute-get-n-set): Use `make-closure-variable'. 1999-12-15 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops.c (scm_compute_applicable_methods): Bugfix: An accessor is only applicable if the argument matches the formal exactly in its first argument. * goops.scm (make-accessor): Make it possible to create accessors without names. (Thanks to Eric Moore.) * goops.c (change_class): Renamed from change_object_class. Change-class protocol now fixed: Keep objects in hell before they receive their new bodies. (hell): New data structure. (burnin, go_to_hell, go_to_heaven, purgatory): New functions. 1999-12-14 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops.c (SCM_GOOPS_UNBOUND): Define as SCM_UNBOUND if existent. 1999-12-12 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops.c (set_slot_value_if_unbound): Removed. (slot_definition_using_name): New function. (get_slot_value, set_slot_value): Now takes a slot definition instead of name as third (fourth) arg. (get_slot_value_using_name, set_slot_value_using_name): Same signature as old versions of get/set_slot_value. (scm_sys_initialize_object): Use get/set_slot_value directly and using the slot definition so that initialization becomes O(n_slots) instead of O(n_slots^2). Initialization also becomes independent of slot naming. 1999-12-08 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops.scm (compute-slots): New generic function in the MOP. (initialize): Use `compute-slots' when computing slots for a new class. 1999-12-04 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * dispatch.scm (cache-try-hash!): Bugfix: Measure max number of cache misses for any method instead of the sum of cache misses for all methods. 1999-10-13 Christian Lynbech <chl@tbit.dk> * goops.scm (export): Added 'update-instance-for-different-class'. (change-object-class): Added call to 'update-instance-for-different-class'. (update-instance-for-different-class): New generic function. * mop.text: Added 'update-instance-for-different-class' 1999-10-08 Mikael Djurfeldt <mdj@mdj.nada.kth.se> Bugfix: Given method M1 with specializers S1, ..., Sk and M2 with specializers S1, ..., Sk, Sk+1, ... (specializers S1, ..., Sk same as for M1), a call to M2 got a cache hit on M1 if M1 had been used before. This is fixed with the following changes: * dispatch.scm (method-cache-install!): Don't initialize n-specialized here. * goops.scm (internal-add-method!): Set n-specialized to the number of specializers + 1 for rest arg specializers. * goops.c (scm_sys_invalidate_method_cache_x): Initialize n-specialized in the method cache here. 1999-09-21 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * dispatch.scm (memoize-method!): Bugfix: Handle no-applicable cases with zero arguments. 1999-09-20 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se> * goops.c, goops.h (scm_generic_capability_p): New procedure. * goops.scm (add-method!): Use `generic-capability?' to generate nice error message in case we try to add a method to a procedure which can't be upgraded to a primitive-generic. 1999-09-19 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * goops.scm (define-method): Don't automatically pick up a pre-existing procedure as default method if a binding with the same name as the generic function referred to exists. Instead require that it really is a generic function, or equivalent. 1999-09-15 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * README, goops.texi (Introduction): Revised the presentation of GOOPS in line with suggestion from Per Bothner. * describe.scm (safe-class-name): New procedure: Checks that the class has a name before calling class-name. Use it throughout instead of class-name. (Thanks to Bernard Urban.) * goops.scm, goops.c, goops.texi, README (write-object, display-object): Removed. Instead use the new primitive generics `display' and `write'. 1999-09-07 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se> * goops.scm (primitive-generic-generic): Exported. 1999-09-02 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se> * Makefile.am (install-exec-hook): Use `dlname' in libgoopscore.la to determine the system dependent name of the library link. 1999-08-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * goops.c (create_standard_classes): scm_class_foreign_object made a subclass to scm_class_object. (get_slot_value, set_slot_value): Use scm_eval_body. 1999-08-26 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * configure.in: GOOPS is now dependent on Guile >= 1.3.3. * goops.h: Representation of GOOPS objects modified: Only one entity and operator procedure now. * goops.c (create_standard_classes): New class <primitive-generic>. * goops.scm (define-primitive-generic): New special form. * goops.c (scm_init_goops): Create and define generic scm_no_applicable_method. * goops.c (memoize_method): Now returns the cmethod to evaluate. (call_memoize_method): Bugfix: Check that another thread hasn't inserted a method between the cache miss and locking the mutex. (This bug wouldn't have shown itself until POSIX threads.) * dispatch.scm (method-entry): Moved to compile.scm. * compile.scm (make-make-next-method): Use compute-cmethod. (compute-cmethod): New procedure: Uses code-table if possible. 1999-08-23 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * goops.c (scm_sys_allocate_instance): Rewritten. * dispatch.scm (memoize-method!): Mark as system-procedure. * describe.scm (describe): Say #<unbound> instead of #[unbound]. * goops.scm (compute-slot-accessors): Bugfix: The slots argument is the direct-slots. The old code assumed all slots. 1999-08-22 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * stklos.scm: New file: STKlos compatibility module. * Makefile.am (goopsdata_DATA): Added stklos.scm. * compile.scm (next-method?): Temporary predicate to check if the method might be using next-methods. (compile-method): Use next-method?. * goops.scm (slot-unbound, slot-missing, no-next-method): Mark as system procedures so that they won't turn up in backtraces; Moved some utilities over to util.scm; Better error checking in class macro. * composite-slot.scm (compute-propagated-get-n-set): Removed some remnant code. 1999-08-21 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * dispatch.scm (method-cache-insert!): Grow cache in multiples of 2 starting with 1. (hash-threshold): Decreased to 3. * goops.c, goops.h (SCM_INITIAL_MCACHE_SIZE): Renamed from SCM_INITIAL_HASH_SIZE and set to 1. * goops.scm (class-slot-ref, class-slot-set!): New public procedures. * goops.c (scm_goops_version): Version information. * versiondat.h.in: New file. * Makefile.am: Install versiondat.h under $(includedir)/goops. * goops.scm (goops-version): Exported. * goops.scm, dispatch.scm, compile.scm: Removed debugging code and disabled backtracing. 1999-08-20 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * goops.c (scm_add_slot): Conform to new-style methods (no next-method argument). (get_slot_value, set_slot_value): Expand bodies; Allow primitive getters and setters. * goops.scm (compute-slot-accessors): Use new-style standard accessor forms when possible, otherwise use low-level getter or setter directly. * dispatch.scm (make-apply-generic apply-0-arity-method make-method-cache): Removed. (Have been moved to C level.) (method-entry): Insert the cmethod entry into code-table before compiling the method. * goops.c (compute_getters_n_setters): Pay attention to keywords #:init-value and #:init-thunk (memoize_method): Lock method cache mutex during method memoization. * goops.c, goops.h (cache-mutex): New slot in class <generic>. * goops.scm (initialize generic): Removed a few slot initializations (now done by %initialize-object). 1999-08-18 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * goops.scm (define-class): Prevent redefinition of non-object classes. (make-class): More correct (and heavier) condition for adding <object> as a default super class: Add <object> last in supers if <object> isn't present in any of the class-precedence-lists of supers. 1999-08-10 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * dispatch.scm (method-cache-install!): Bugfix: Handle fewer args than n-specialized. 1999-08-09 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * Makefile.am, compile.scm, util.scm: New files. * goops.c, goops.h: Added n-specialized slot in generics. 1999-08-05 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * goops.c: Removed old apply generic protocol. * goops.h (scm_si_code_table): New method slot. * goops.c: Updated Copyright notice. (scm_make): Initialize code table slot for methods. 1999-08-04 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * dispatch.scm, Makefile.am: Added dispatch.scm. * goops.c, goops.h (scm_sys_invalidate_class): Added; (default-slot-definition-class, keyword-access): New slots; Rearranged slots. (scm_m_atslot_ref, scm_m_atslot_set_x, scm_m_dispatch, scm_m_hash_dispatch): New macros. (memoize_method): Dispatcher for the generic function `memoize-method!'. Plugs into scm_memoize_method in eval.c. * goops.scm (class-redefinition): Call %invalidate-class; Use new method dipatch protocol. * goops.c, goops.h: Renamed SCM_METACLASS_GOOPS_LAYOUT --> SCM_CLASS_CLASS_LAYOUT; SCM_CLASSF_ACCESSOR --> SCM_CLASSF_ACCESSOR_METHOD 1999-08-03 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * goops.c (create_standard_classes): New slot in <method>: code-table. 1999-07-27 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * configure.in: Check that libguile is fresh enough. 1999-07-25 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> * goops.c (prep_hashsets): Added. (scm_sys_inherit_magic): Call prep_hashsets. * goops.scm (compute-std-cpl): Compute cpl correctly. (Topological sort from tiny clos.) * goops.c (scm_class_port, scm_class_input_port, scm_class_output_port, scm_class_input_output_port): Added. (make_standard_classes): Initialize new classes. (make_class_from_template): Added. (make_extended_class): Use make_class_from_template. (local_make_port_classes): Added. Plugs into objects.c:scm_make_port_classes. (make_port_classes): Make port classes corresponding to all existing port types. (scm_init_goops): Call make_port_classes. * describe.scm: Use Guile's format instead of slib's. 1999-06-24 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se> * goops.scm (define-method): Made possible to define setter methods. 1999-06-23 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se> * configure.in, Makefile.am: Added a configure option --enable-fdi-example which causes fdi.c to be compiled and linked into guile-oops. A "foreign data interface" which is supposed to make it easy to interface to application data structures has been added. This is very experimental and perhaps not very nice. I hope that people will get better ideas. :) * goops.c (scm_load_goops, scm_make_foreign_object, scm_free_foreign_object, scm_make_class, scm_add_slot, scm_wrap_object, scm_wrap_component, scm_ensure_accessor, scm_add_method): New functions. (scm_sys_allocat_instance): Now takes a second arg (just as the corresponding method in the MOP). It is used by scm_make_foreign_object. (map, filter_cpl, compute_cpl): Better initial approximation to cpl computation (we use multiple inheritance already during bootstrap). (scm_class_foreign_class): New class: The foreign object meta class. (scm_class_foreign_object): New class: The foreign object class. (scm_class_self, scm_class_protected, scm_class_opaque, scm_class_read_only, scm_class_protected_opaque, scm_class_protected_read_only, scm_class_scm, scm_class_int, scm_class_float, scm_class_double): Slot classes. (scm_sys_prep_layout_x): Largely rewritten: Now uses slot types to build the layout. (scm_makekey): Removed. (Replaced by scm_c_make_keyword in libguile.) (scm_basic_basic_make_class): Guts of old scm_basic_make_class which has been split in order to be more useful. (scm_build_class_class_slots): Build slot definitions for class class. (Torn out of create_basic_classes.) * goops.h (SCM_METACLASS_GOOPS_LAYOUT): Noe includes the required fields. (SCM_CLASSF_FOREIGN): New class flag: Indicates that the instance is a foreign object. (SCM_IS_A_P): New macro. Corresponds to the scheme predicate. (scm_si_constructor, scm_si_destructor): New slots of foreign classes. * fdi.c: New file: Foreign data interface example. * guile-oops.c: Conditionally use scm_init_fdi. * goops-snarf.h: Snarf macros for the foreign data interface. * goops.scm (initialize, write-object): New methods for <foreign-object>:s. 1999-06-18 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se> * goops.h (STKLOS_VERSION, scm_stklos_version): Removed. 1999-06-17 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se> * goops.scm (add-method!): Made generic => added to the MOP. 1999-06-15 Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se> * goops.scm (method): Allow empty method bodies. * goops.c (scm_sys_prep_layout_x): Handle empty layouts correctly. (Don't call scm_must_malloc.) (scm_sys_allocate_instance): Don't allow empty instances. (Maybe this should be changed.) 1999-04-12 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops.scm (slot-definition-init-value): Renamed from slot-definition-init; Replaced #:init keyword with #:init-value. (class): Re-introduce #:init-form. 1999-03-22 Mikael Djurfeldt <mdj@barbara.nada.kth.se> * New libtool: 1.2f * ltmain.sh, ltconfig, config.guess, config.sub: New versions. * README: Mention new version number of libtool. 1999-03-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops.c (make_struct_classes): New argument order in scm_internal_hash_fold: Moved table argument last. * goops.scm (define-class, class): Change in syntax: Removed the redundant pair of parenthesis around the slot definitions. (We anyway need to go through the list of slots in both macros, so this change in syntax doesn't introduce any extra cost.) * active-slot.scm, composite-slot.scm: Changed to new class syntax. 1999-03-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops.scm (write-object): New method: More informative printing of methods. (make-method): Exported. * Makefile.am (internal.scm, active-slot.scm, composite-slot.scm): Added. * internal.scm (oop goops internal): New module. Exports all internal bindings in (oop goops). * active-slot.scm (oop goops active-slot), composite-slot.scm (oop goops composite-slot): New modules. Ported from STKlos. 1999-03-18 Mikael Djurfeldt <mdj@barbara.nada.kth.se> * goops.scm, Makefile.am, goops.c, goops.h, guile-oops.c: Renamed module (oop goopscore) --> (oop goops goopscore). describe.scm: Renamed module (oop describe) --> (oop goops describe). * goops.c (create_basic_classes): Renamed from create_Top_Object_class. (scm_basic_make_class, create_basic_classes): Use maplist. (compute_getters_n_setters): Assume alist slot lists. (scm_get_keyword): Improved error messages. 1999-03-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops.c (maplist): Utility used to construct slot lists. (remove_duplicate_slots, scm_sys_initialize_object): Simplify by assuming that slot lists are proper alists. * goops.scm (compute-std-cpl): Compute a CLOS-style cpl. (define-class): Bugfix: Added `new' as alternative in the redefinition condition; Added write-object in the print slot of builtin classes <operator-class> and <operator-with-setter-class>. 1999-03-16 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops.scm (define-class-pre-definition): Bugfix: Pass name to accessor constructors. (define-class): Skip options with non-symbolic arg, don't terminate scan! (compute-cpl): Made a generic. 1999-03-15 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * Makefile.am: oop directory removed. * goops.scm, describe.scm: Moved here from old directory oop. 1999-03-15 Mikael Djurfeldt <mdj@barbara.nada.kth.se> * oop: New directory. Renamed from goops. * Makefile.am: Renamed goops --> oop. * oop/goops.scm (make-class): Now demands that slot definitions always are lists. (The `class' macro does the conversion so that the user of those macros still can use simple symbols as slot definitions.) * oop/goops.scm (define-class, class): A major new thing is that all slot options are evaluated, i.e. also #:getter, #:setter, and, #:accessor options. Because of this, the corresponding <generic> and <generic-with-setter>s must exist before creating the class. `define-class' does this automatically if they don't exist beforehand. * oop/goops.scm (slot-definition-init, slot-definition-init-thunk): New selectors for the new slot options #:init and #:init-thunk. (compute-getters-n-setters): Handle new selectors. (slot-definition-init-form): Removed. (class-slot-definition): Use assq instead of assoc. (slot-definition-init-form): Removed #:init-form alternative. goops/goops.scm (initialize <operator-class>): Accept #:procedure keyword. * oop/goops.scm (method-source): Renamed from method-body; Use map* instead of map. (is-a?): Use memq instead of memv. (map*, for-each*): Moved here from compat.scm. * oop/goops.scm, oop/describe.scm: Replaced use of when and unless everywhere. * oop/goops.scm (define-module): Added #:no-backtrace option; Set the system-procedure property on apply-generic-<n> in order that these should not turn up at the end of backtraces. (goops-error): Call `save-stack'. * goops.c (make_extended_class): New function: Creates wrapper classes for smob and struct types. (make_smob_classes, make_struct_classes): Creates smob and struct wrapper classes upon initialization of Goops. (Wrapper classes continue to be created when new smobs and structs are loaded/accessed.) * goops.c (scm_make): Set the name property of generics. (make_stdcls): Allow for multiple inheritance by passing a list of supers as fourth arg. (Note that the cpl gets screwed up in this case and has to be patched.) This is currently used for initialization of <generic-with-setter>. (make_standard_classes): Removed `name' slot in <generic>. (scm_generic_function_name): Use scm_procedure_name. New class redefinition protocol: In the old protocol new class objects got a new heap header but instances retained their old header. The new protocol keeps the old header also for redefined classes. * goops.c (TEST_CHANGE_CLASS): Rewritten in order to comply with the new class redefinition protocol. (SCM_OBJ_CLASS_REDEF): New macro which accesses the `redefined' slot via the instance. (scm_sys_modify_class): New function. Swaps headers between two class objects. * oop/goops.scm: Corrected bugs in the class redefinition protocol. * goops.c: New setter slot in classes: (scm_sys_prep_layout_x): Modified class layout. (create_Top_Object_Class): setter slot name. * goops.h (struct scm_metaclass_goops): New setter slot (scm_si_methods): Shifted (to 0); Shifted slot numbers. * goops.c (scm_class_entity, scm_class_entity_with_setter, scm_class_generic_with_setter, scm_class_operator_with_setter_class): New basic classes. An alternative to <operator-with-setter-class>es would be to turn `setter' into a <generic> and create a higher-order method which returns the apropriate setter method. Although this might be neat theoretically, I judged it to be too inefficient. (It doesn't seem like a good idea to create a closure for every `set!' operation.); (make_standard_classes): Initialize scm_class_procedure_with_setter. (scm_sys_set_object_setter_x): New procedure. Sets setter slot of <entity-with-setter>'s or <operator-with-setter-class>es. * goops.c (scm_sys_inherit_magic_x): Set struct flag SCM_STRUCTF_LIGHT for classes which aren't meta or entity classes. This allows for a much more efficient allocation of instances, both with regard to speed and memory. (scm_sys_allocate_instance): Use scm_alloc_struct (or scm_must_malloc directly for "light" objects) when allocating instances. * goops/oop (define-accessor): New macro. Creates a <generic-with-setter> with a <generic> as setter. (make-accessor, ensure-accessor): New procedures. 1999-03-08 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops/goops.scm (class-redefinition): Export. (define-generic): Use make-generic. (make-generic): New procedure. (make-generic-function, ensure-generic-function): Removed. (define-generic): Rewritten. (define-method): Rewritten. (make-method): Now a procedure. (ensure-method): Removed. (method): Rewritten. (add-method!): Renamed from add-method. (transform-specializers): Replaces `specializers'. 1999-03-06 Mikael Djurfeldt <mdj@barbara.nada.kth.se> * goops/goops.scm (initialize <class>): Convert all slot definitions to lists; Simplified code dealing with slot definitions throughout since slot definitions can no longer be simple symbols. (slot-init-function): Only take slot names as second arg. (class): New special form. (ensure-class): Removed. (make-class): Remade into a procedure. (define-class): Now uses the procedure `make-class'. 1999-03-01 Mikael Djurfeldt <mdj@barbara.nada.kth.se> * guile-oops.c (inner_main): Renamed scm_init_goops_goopscore_module () --> scm_init_oop_goopscore_module (). * config.guess, config.sub, install-sh, mdate-sh, missing, mkinstalldirs: New versions from automake-1.4. * goops/compat.scm, goops/describe.scm: Renamed goops --> oop. 1999-02-20 Mikael Djurfeldt <mdj@barbara.nada.kth.se> * config.guess, config.sub, ltconfig, ltmain.sh: New versions from libtool-1.2. * goops.c, goops.h (scm_i_get_keyword): Added const. 1999-01-30 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops/goops.scm: Don't use module (ice-9 setf). * goops.c, goops.h, goops/goops.scm: Changed module name from (goops *) to (oop *). 1999-01-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops.c (scm_class_of, CLASS_REDEF): Moved to libguile/objects.[hc]. * goops.h (scm_si_hashsets): New slots. Hashvalues for fast multimethod lookup. 1999-01-21 Mikael Djurfeldt <mdj@barbara.nada.kth.se> * goops.c (scm_init_goops_goopscore_module): Added cast for scm_init_goops. * goops/goops.scm (change-object-class): Only copy slots with instance allocation. (Thanks to Christian Lynbech.) * goops.c: Renamed class Xxx --> scm_class_xxx. * goops.c, goops.h: Renamed and moved C globals containing basic classes to libguile/objects.c; Substituted class flags for object flags. * goops.c (scm_sys_inherit_magic_x): Mask flags with SCM_CLASSF_INHERIT. * goops.h (SCM_CLASSF_INHERIT): New constant: Selects which flags to inherit. 1998-12-20 Mikael Djurfeldt <mdj@barbara.nada.kth.se> * goops.h, goops.c: Renamed classe --> class everywhere. (ANSI C differs between Class and class, so there'll be no conflict.) * goops.c (scm_sys_prep_layout_x): Removed label exit_err. (scm_basic_make_class): Removed setting of object accessors slot. (That slot doesn't exist in Goops.) 1998-12-15 Mikael Djurfeldt <mdj@barbara.nada.kth.se> * goops.h (scm_si_methods): Changed from 5 to 1. * goops.c (make_standard_classes): Remove procedure slots for generic functions. (scm_sys_prep_layout_x): No special treatment of entity classes any longer. 1998-12-21 Christian Lynbech <chl@tbit.dk> * goops/goops.scm (change-object-class): Only copy slot values if slot has allocation instance. 1998-12-08 Christian Lynbech <chl@tbit.dk> * goops/goops.scm (change-object-class): Attempt initialization from init function even if slot was present (but unbound) in old class. 1998-12-05 Christian Lynbech <chl@tbit.dk> * goops/goops.scm: Reexport setf! and setter. * goops/goops.scm (compute-slot-accessors): Changed handling of :accessor option to use new setf functionality for setter. Added import of module (ice-9 setf). 1998-12-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops/goops.scm (goops-error): Call scm-error with correct arguments. 1998-12-04 Christian Lynbech <chl@tbit.dk> * goops/goops.scm (goops-error): New function. Changed usage of `error' into `goops-error' to get error message formatting and changed directive from "~" to "%". * goops.h: Added missing prototypes for a nunch of functions. Added #include <guile/gh.h>. * goops.c (sort_applicable_methods): Initialize `vector' to the empty list. (scm_sys_prep_layout_x): Removed local variale `layout'. 1998-12-01 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops.c (apply_generic_0, apply_generic_1, apply_generic_2, apply_generic_3): Pass SCM_BOOL_F instead of SCM_UNDEFINED as next-method argument. Otherwise scm_apply will get the wrong impression of number of arguments. 1998-11-27 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * Makefile.am (subpkgdata_DATA): Added goops/describe.scm. Renamed libgoops --> libgoopscore. * goops/goops.scm: Use module (goops goopscore). (initialize <class>): %inherit-magic! before initializing layout slot. (initialize <generic>): Let instances of subclasses of <generic> use apply-generic. * goops.c (CLASSP): Use the metaclass flag to determine if the object is a class. This is faster than looking in the supers slot. (scm_prep_layout_x): Make procedure slots opaque. (scm_basic_make_class): Prep layout *after* inheriting magic, so that we can use the flags for information; Set the SCM_OBJF_GOOPS flag here. scm_sys_inherit_magic_x uses it for argument checking. (scm_class_of): Don't presume that all structs are Goops objects! (scm_sys_allocate_instance): Major rewrite of the class/object flag logic. (scm_make): Use scm_set_object_procedure_x to set the procedures. (scm_init_goops): Use a new scheme for loading bindings into the same module (goops goops) as the scheme code: We pretend that we are the module (goops goopscore) but switch to (goops goops) when creating bindings. (The old scheme had big problems since the current module system isn't designed for having both scheme and object code in the same module.) * goops.h, goops.c: Renamed SCM_OBJF_GENERIC --> SCM_OBJF_PURE_GENERIC. (SCM_OBJ_FLAGS, SCM_SET_OBJ_FLAGS): New macros. (scm_init_goops_goopscore_module): Renamed from scm_init_goops_goops_module. * guile-oops.c (inner_main): Call scm_init_goops_goopscore_module. * goops.h (SCM_INST_TYPE): Use SCM_OBJ_FLAGS. (scm_si_print): New slot index. * goops/describe.scm: New file. * TODO: New file. 1998-11-26 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops.c (scm_sys_inherit_magic_x): Return SCM_UNSPECIFIED. * goops.c, goops.h: Position of procedure slots moved in class objects. 1998-11-25 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops/goops.scm: Moved STk compatibility code to goops/compat.scm. * goops/compat.scm: New file. * Makefile.am (subpkgdata_DATA): Added goops/compat.scm. * goops.c (Operator_class): New metaclass: This is the class of operator classes. While an entity class keeps its procedure in the object itself, an operator class keeps it in the class object. (scm_basic_make_class): Set operator class flag for operator classes. (scm_sys_allocate_instance): Set entity and operator class flags for entities (check superclasses too!) and operators. (make_standard_classes): Initialize Operator_class. * goops/goops.scm (*unbound*, make-unbound, unbound?): Replaced by primitives. (compute-get-n-set): Use an ordinary scheme variable for slots with class and each-subclass allocation. * goops.c (SCM_GOOPS_UNBOUND, SCM_GOOPS_UNBOUNDP): New macros: Implements an unbound value internal to goops. We can't use SCM_UNDEFINED since that value can't be handled by scheme code; Replaced SCM_UNDEFINED --> SCM_UNBOUNDP and SCM_UNBNDP --> SCM_GOOPS_UNBOUNDP on suitable places. (scm_goops_the_unbound_value): Holds the unbound value. (Later we may choose to implement this as an ISYM or for efficiency.) (scm_init_goops): Initialize the unbound value. (scm_make_unbound, scm_unbound_p): New primitives. 1998-11-24 Mikael Djurfeldt <mdj@mdj.nada.kth.se> * goops/goops.scm: Added <complex> to list of print slot initializations. (compute-getters-n-setters): Use `(procedure-property <proc> 'arity)' instead of `%procedure-arity' in `verify-accessors'. * goops.c (scm_class_of): Use TEST_CHANGE_CLASS to check for class redefinition if argument is a goops instance. * goops/goops.scm (ensure-class): Handle supers passed as meta-objects. * goops.c (set_slot_value_if_unbound): Apply init closure to an empty list, not a list containing an empty list. * Makefile.am (install-exec-hook): Do test -r instead of test -e in order to be backward compatible. 1998-11-24 Mikael Djurfeldt <mdj@barbara.nada.kth.se> * Makefile.am (install-exec-hook): Don't exit with an error if we haven't created libgoops.so.0 1998-11-23 Mikael Djurfeldt <mdj@barbara.nada.kth.se> * goops/goops.scm: Removed module workaround; Added :use-module on the module itself to load object code (which was what the workaround did); Export public primitives defined by the object code. * goops.h: Added declaration of scm_init_goops_goops_module. * goops.c: Use new C level module interface <libguile/modules.h> to define and get bindings in the correct module. (Now the full MOP should work!) * guile-oops.c: Call scm_init_goops_goops_module instead of scm_init_goops in order to postpone module creation until requested. * configure.in: Use aggressive warning messages if CC=gcc. 1998-11-22 Mikael Djurfeldt <mdj@barbara.nada.kth.se> * goops.c: Added #include <libguile/modules.h> (scm_init_goops): Use the new C interface to modules. 1998-11-22 Mikael Djurfeldt <mdj@kenneth> * Makefile.am (install-exec-hook): Added: Puts symbolic links to the dynamically linked library into the goops module directory. * configure.in: Removed unneccesary lines; Added AC_PROG_LN_S. * goops/goops.scm: Added workaround so that compiled code and interpreted code can coexist in the same module. 1998-11-22 Mikael Djurfeldt <mdj@barbara.nada.kth.se> * goops.h, goops.c: New files. Port of stklos from STk-3.99.3 * goops: New directory: Contains the scheme part of stklos.