1999-12-20 Mikael Djurfeldt * 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 * 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 * 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 * goops.c (SCM_GOOPS_UNBOUND): Define as SCM_UNBOUND if existent. 1999-12-12 Mikael Djurfeldt * 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 * 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 * 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 * 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 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 * dispatch.scm (memoize-method!): Bugfix: Handle no-applicable cases with zero arguments. 1999-09-20 Mikael Djurfeldt * 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 * 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 * 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 * goops.scm (primitive-generic-generic): Exported. 1999-09-02 Mikael Djurfeldt * 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 * 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 * 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 . * 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 * goops.c (scm_sys_allocate_instance): Rewritten. * dispatch.scm (memoize-method!): Mark as system-procedure. * describe.scm (describe): Say # 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 * 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 * 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 * 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 . * goops.scm (initialize generic): Removed a few slot initializations (now done by %initialize-object). 1999-08-18 Mikael Djurfeldt * goops.scm (define-class): Prevent redefinition of non-object classes. (make-class): More correct (and heavier) condition for adding as a default super class: Add last in supers if isn't present in any of the class-precedence-lists of supers. 1999-08-10 Mikael Djurfeldt * dispatch.scm (method-cache-install!): Bugfix: Handle fewer args than n-specialized. 1999-08-09 Mikael Djurfeldt * Makefile.am, compile.scm, util.scm: New files. * goops.c, goops.h: Added n-specialized slot in generics. 1999-08-05 Mikael Djurfeldt * 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 * 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 * goops.c (create_standard_classes): New slot in : code-table. 1999-07-27 Mikael Djurfeldt * configure.in: Check that libguile is fresh enough. 1999-07-25 Mikael Djurfeldt * 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 * goops.scm (define-method): Made possible to define setter methods. 1999-06-23 Mikael Djurfeldt * 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 :s. 1999-06-18 Mikael Djurfeldt * goops.h (STKLOS_VERSION, scm_stklos_version): Removed. 1999-06-17 Mikael Djurfeldt * goops.scm (add-method!): Made generic => added to the MOP. 1999-06-15 Mikael Djurfeldt * 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 * 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 * 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 * 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 * 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 * 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 * 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 and . 1999-03-16 Mikael Djurfeldt * 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 * Makefile.am: oop directory removed. * goops.scm, describe.scm: Moved here from old directory oop. 1999-03-15 Mikael Djurfeldt * 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 and 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 ): 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- 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 . (make_standard_classes): Removed `name' slot in . (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 es would be to turn `setter' into a 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 's or 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 with a as setter. (make-accessor, ensure-accessor): New procedures. 1999-03-08 Mikael Djurfeldt * 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 * goops/goops.scm (initialize ): 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * goops/goops.scm (change-object-class): Only copy slot values if slot has allocation instance. 1998-12-08 Christian Lynbech * 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 * 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 * goops/goops.scm (goops-error): Call scm-error with correct arguments. 1998-12-04 Christian Lynbech * 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 . * 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 * 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 * Makefile.am (subpkgdata_DATA): Added goops/describe.scm. Renamed libgoops --> libgoopscore. * goops/goops.scm: Use module (goops goopscore). (initialize ): %inherit-magic! before initializing layout slot. (initialize ): Let instances of subclasses of 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 * 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 * 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 * goops/goops.scm: Added to list of print slot initializations. (compute-getters-n-setters): Use `(procedure-property '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 * Makefile.am (install-exec-hook): Don't exit with an error if we haven't created libgoops.so.0 1998-11-23 Mikael Djurfeldt * 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 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 * goops.c: Added #include (scm_init_goops): Use the new C interface to modules. 1998-11-22 Mikael Djurfeldt * 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 * goops.h, goops.c: New files. Port of stklos from STk-3.99.3 * goops: New directory: Contains the scheme part of stklos.