[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, goops-cleanup, created. release_1-9-5-

From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, goops-cleanup, created. release_1-9-5-24-g6d40619
Date: Fri, 20 Nov 2009 16:25:03 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

The branch, goops-cleanup has been created
        at  6d406197039f3c4ebe7a458bb2c27cfb7fa9c4a3 (commit)

- Log -----------------------------------------------------------------
commit 6d406197039f3c4ebe7a458bb2c27cfb7fa9c4a3
Author: Andy Wingo <address@hidden>
Date:   Fri Nov 20 17:25:13 2009 +0100

    push goops compile delay out to 30 invocations, for great justice
    * module/oop/goops/dispatch.scm (timer-init): Init to 30 for faster
      goops load time.

commit 624c5c7c8870baf610785a821e8bb40d41db2051
Author: Andy Wingo <address@hidden>
Date:   Fri Nov 20 17:24:40 2009 +0100

    fix version-etc for older autoconf
    * lib/version-etc.c: Don't reference the undefined PACKAGE if
      PACKAGE_URL is undefined. Probably should go upstream.

commit dc3ed2844356dbb475dada463ee2571a2710d710
Author: Andy Wingo <address@hidden>
Date:   Fri Nov 20 13:42:13 2009 +0100

    generic method cache begone
    * libguile/goops.h (SCM_GENERIC_METHOD_CACHE)
      (SCM_SET_GENERIC_METHOD_CACHE, scm_si_generic_cache)
    * libguile/goops.c (create_standard_classes): Remove slot for generic
      method cache. Yay!

commit e940a34af02c6e4a0b0760b5a33ef9dbc87a245a
Author: Andy Wingo <address@hidden>
Date:   Fri Nov 20 13:31:07 2009 +0100

    remove code that manages the method cache
    * libguile/goops.h (SCM_MCACHE_N_SPECIALIZED)
      (scm_make_method_cache, scm_memoize_method, scm_mcache_lookup_cmethod)
    * libguile/goops.c: Remove these procedures which managed the method
      cache. There's still a slot there but it's not initialized. The method
      cache is no longer necessary.
    * module/oop/goops/dispatch.scm (memoize-method!): Change to not take a
      "cache" argument.
    * libguile/eval.i.c:
    * libguile/vm-i-system.c: Remove dispatch via the method cache.

commit 6b5fb63f747d002da29157ef7ac991b5ca25388a
Author: Andy Wingo <address@hidden>
Date:   Fri Nov 20 13:18:07 2009 +0100

    remove method cache management code from (oop goops dispatch)
    * module/oop/goops/dispatch.scm: Remove old method cache things.

commit 296c0fd04f00a0c59fff3094f19cdabade9fe85c
Author: Andy Wingo <address@hidden>
Date:   Fri Nov 20 13:12:44 2009 +0100

    better printing of procedures with keyword arguments
    * module/system/vm/program.scm (arguments->lambda-list): Print keyword
      arguments more sensibly.

commit a8b4bfdd19b7eadb9745bc83cb715ff9506a7bd8
Author: Andy Wingo <address@hidden>
Date:   Fri Nov 20 13:11:52 2009 +0100

    generics now dispatch as applicable structs
    * libguile/eval.i.c (CEVAL, SCM_APPLY): Dispatch applicable structs
      before pure generics. In practice what this means is that we never hit
      the mcache case, because all pure generics are applicable structs.
      We're moving over to having generics dispatch themselves. Also, they
      don't prepend the struct as an arg; in order to have that effect, the
      user has closures.
    * libguile/goops.c (scm_apply_generic, scm_call_generic_0):
      (scm_call_generic_1, scm_call_generic_2, scm_call_generic_3): Dispatch
      directly to the struct procedures.
      (scm_var_make_extended_generic): Remove a duplicate definition for
      (create_standard_classes): Mark all instances of
      <applicable-struct-class> (themselves classes) as applicable classes.
      Meaning: generics are now applicable structs.
    * libguile/goops.h (SCM_CLASS_CLASS_LAYOUT): The hashsets are actually
      uw slots -- or at least, making subclasses maps the int slots to be uw
    * libguile/vm-i-system.c (call, goto/args, mv-call): Dispatch applicable
      structs in the VM.
    * module/oop/goops/dispatch.scm (emit-linear-dispatch): Fix bug in the
      non-rest cache miss case.
      (delayed-compile): Rework to avoid fluids.
      (cache-dispatch): Don't call `equal?', it causes bootstrapping
      problems with the primitive-generic equal?. Using our own version is
      faster anyway.

commit ab803b70a85f9707ee36b1ee13bb64629adbdba0
Author: Andy Wingo <address@hidden>
Date:   Sun Nov 8 11:49:06 2009 +0100

    make sure that when equal? is extended, that the generic has a method
    * libguile/goops.h:
    * libguile/goops.c (scm_set_primitive_generic_x): New function, for now
      local to the goops module.
    * module/oop/goops.scm (equal?): Make sure that when equal? is extended,
      that the generic already has a default method.

commit f07fe570e00e7121b7e9af18537198b87915051e
Author: Andy Wingo <address@hidden>
Date:   Sun Nov 8 11:34:30 2009 +0100

    remove cache-mutex slot from generics
    * libguile/goops.c:
    * libguile/goops.h: Remove cache-mutex slot from generics, and renumber
      other slots.

commit dc364169c49fd310e1975e0929b0d0c8a7cfaae1
Author: Andy Wingo <address@hidden>
Date:   Sun Nov 8 11:29:48 2009 +0100

    remove locking in method memoization
    * libguile/goops.c (scm_memoize_method): Don't lock around method
      memoization, as the new protocol will be reeentrant and lock-free.

commit 144943e881f51e5b2b0865bfb31b48c79df0ef96
Author: Andy Wingo <address@hidden>
Date:   Sun Nov 8 11:24:23 2009 +0100

    limn goops flags, remove foreign objs, rename entity to applicable-struct
    * libguile/goops.c (scm_class_applicable_struct)
      (scm_class_applicable_struct_class): Rename from
      scm_class_entity, scm_class_entity_with_setter, and
      (scm_class_simple_method): Removed; this abstraction is not used.
      (scm_class_foreign_class, scm_class_foreign_object): Remove these,
      they are undocumented and unused. They might come back later.
      (scm_sys_inherit_magic_x): Simply inherit the vtable flags from the
      class's class. Flags are about layout, and it is the class that
      determines the layout of the instance.
      (scm_basic_basic_make_class): Don't bother setting GOOPS_OR_VALID,
      inherit-magic will do that.
      (scm_basic_make_class): Inherit magic after setting the layout. Allows
      the struct magic checker to do its job.
      (scm_accessor_method_slot_definition): Move implementation to Scheme.
      Removes the need for the accessor flag.
      (scm_sys_allocate_instance): Adapt to scm_i_alloc_struct name change,
      and that alloc-struct will handle finalization.
      (scm_compute_applicable_methods): Remove accessor check, as it's
      (scm_make): Adapt to new generic slot order, and no more
      (create_standard_classes): What was the GF slot "dispatch-procedure"
      is now the applicable-struct slot "procedure". No more foreign class,
      foreign object, or simple method. Rename <entity> and friends to
      <applicable-struct> and friends. No more entity-with-setter -- though
      perhaps it will come back too. Instead generic-with-setter is its own
    * libguile/goops.h (SCM_CLASSF_METACLASS): "A goops class that is a
      vtable" -- no need for a separate flag.
      (SCM_CLASSF_ACCESSOR_METHOD): Removed these unused flags.
      (SCM_ACCESSORP): Removed.
      Renumber generic slots, rename entity classes, and remove the foreign
      class, foreign object, and simple method classes.
    * libguile/struct.c (scm_i_struct_inherit_vtable_magic): New function,
      called when making new vtables.applicable structs
      (scm_i_alloc_struct): Remove 8-bit alignment check, as libGC
      guarantees this for us. Handle finalizer registration here.
      (scm_make_struct): Factor some things to scm_i_alloc_struct and
      (scm_make_vtable_vtable): Adapt to scm_i_alloc_struct name change.
    * libguile/struct.h (scm_i_alloc_struct): Change name from
      scm_alloc_struct, and make internal.
    * module/oop/goops.scm (oop): Don't declare #:replace <class> et al,
      because <class> isn't defined in the core any more.
      (accessor-method-slot-definition): Defined in Scheme now.
      Remove <foreign-object> methods.
      (initialize on <class>): Prep layout before inheriting magic, as in
    * module/oop/goops/dispatch.scm (delayed-compile)
      (memoize-effective-method!): Adapt to 'procedure slot name change.

commit d6ad1f6c71d657ef5253e5df231125f7ccf18146
Author: Andy Wingo <address@hidden>
Date:   Fri Nov 6 17:17:33 2009 +0100

    %invalidate-method-cache invalidates the dispatch procedure too
    * libguile/goops.c (make_dispatch_procedure, clear_method_cache):
      Properly reset the dispatch procedure.

commit 4b9e450537fd43d2111d180350f688729ef3008e
Author: Andy Wingo <address@hidden>
Date:   Fri Nov 6 11:25:50 2009 +0100

    generic dispatch protocol in scheme, not yet wired up
    * module/oop/goops/dispatch.scm: Add a dispatch protocol in Scheme. The
      idea is that instead of using a hardcoded C protocol, we compile
      dispatch procedures at runtime. To avoid too much thrashing at bootup,
      there is a simple JIT mechanism -- dispatch will be data-driven,
      through the cache, for the first 5 invocations, then a dispatch
      procedure will be compiled from the cache.
      My initial timings indicate that interpreted dispatch takes about
      100us, and that compiled dispatch takes about 60us. Compilation itself
      takes about 16000us (16 ms). The compiled procedure dispatch times
      will improve soon, hopefully.

commit ef7effe83ca05cb32477ac65b83ea3476b1a1d7e
Author: Andy Wingo <address@hidden>
Date:   Fri Nov 6 10:27:19 2009 +0100

    eqv? not a generic, equal? dispatches to generic only for objects
    * libguile/eq.c (scm_eqv_p): Not a generic any more. Since eqv? is used
      by e.g. `case', which should be able to compile into dispatch tables,
      it really doesn't make sense to dispatch out to a generic.
      (scm_equal_p): So it was always the case that (equal? 'foo "foo") =>
      #f. But (equal? 'foo 'bar) could actually be extended by a generic.
      This was a bug, if you follow the other logic of the code. Changed so
      that generic functions can only extend the domain of equal? when
      operating on goops objects.
    * oop/goops.scm: No more eqv? generic.
    * test-suite/tests/goops.test: Remove eqv? tests.

commit f342f1d870b966d099289af950375adef009d491
Author: Andy Wingo <address@hidden>
Date:   Thu Nov 5 17:35:44 2009 +0100

    generic tweaks; realizing what the setter slot actually is
    * libguile/goops.h (scm_si_dispatch_procedure)
      (scm_si_effective_methods): Rename the new generics slots to
      "effective-methods" and "dispatch-procedure".
      (scm_si_generic_setter): Rename this one from "%setter" to "setter",
      and it's not a cache -- it's a pointer to the setter, which is also a
      generic. I didn't realize that before. It's better this way (like it
      always was.)
    * libguile/goops.c (clear_method_cache): Clear the new dispatch
      procedure and the effective methods as well.
      (create_standard_classes): Rename slots, and fix the setter slots.

commit 84c2828011c24edbff03dc831b232aa4e4fc3278
Author: Andy Wingo <address@hidden>
Date:   Thu Nov 5 13:16:40 2009 +0100

    more clarity in (oop goops dispatch)
    * module/oop/goops/dispatch.scm (memoize-method!): If we don't have a
      no-applicable-method, just call no-applicable-method directly.
    * test-suite/tests/goops.test ("no-applicable-method"): Add some tests.

commit 462f3e621374b1e8ba70a56b3dd3ed40fd1b30e9
Author: Andy Wingo <address@hidden>
Date:   Thu Nov 5 12:54:41 2009 +0100

    remove code-table slot from methods
    * libguile/goops.c (scm_sys_invalidate_method_cache_x, scm_make)
      (create_standard_classes): Remove code-table slot from methods. The
      generic cache completely does its job, afaict.
    * libguile/goops.h (scm_si_formals, scm_si_body, scm_si_make_procedure):
      Renumber slots.
    * module/oop/goops.scm (initialize on <method>): No more code-table
    * module/oop/goops/compile.scm: Always "compile" a method, instead of
      looking for a hit in an always-empty cache.

commit 50bba96bc524451892f6b080a9c0f393d7a7d7e4
Author: Andy Wingo <address@hidden>
Date:   Thu Nov 5 12:41:54 2009 +0100

    remove used-by slot from generics
    * libguile/goops.c (clear_method_cache)
      (scm_sys_invalidate_method_cache_x, scm_make)
      (create_standard_classes): Remove the used-by method from generics, as
      it is not used at all.
    * libguile/goops.h: Renumber generic slots.
    * module/oop/goops/dispatch.scm (memoize-method!): No more used-by slot.

commit 918897bf0b8bd49600a3dbb03f2a9c321404dac4
Author: Andy Wingo <address@hidden>
Date:   Thu Nov 5 11:32:16 2009 +0100

    first step towards effective methods
    * libguile/goops.c (create_standard_classes):
    * libguile/goops.h *scm_si_applicable_methods, scm_si_effective_method)
      (scm_si_applicable_setter_methods, scm_si_effective_setter_method):
      Add space for the new form of the generic cache and effective method.

commit a2016746b1257a666a548198c4cde6bf163b35a0
Author: Andy Wingo <address@hidden>
Date:   Tue Nov 3 23:59:51 2009 +0100

    a very big commit cleaning up structs & goops. also applicable structs.
    I tried to split this one, and I know it's a bit disruptive, but this
    stuff really is one big cobweb. So instead we'll pretend like these are
    separate commits, by separating the changelog.
    Applicable struct runtime support.
    * libguile/debug.c (scm_procedure_source):
    * libguile/eval.c (scm_trampoline_0, scm_trampoline_1)
    * libguile/eval.i.c (CEVAL):
    * libguile/goops.c (scm_class_of):
    * libguile/procprop.c (scm_i_procedure_arity):
    * libguile/procs.c (scm_procedure_p, scm_procedure, scm_setter): Allow
      for applicable structs. Whee!
    * libguile/deprecated.h (scm_vtable_index_vtable): Define as a synonym
      for scm_vtable_index_self.
      (scm_vtable_index_printer): Alias scm_vtable_index_instance_printer.
      (scm_struct_i_free): Alias scm_vtable_index_instance_finalize.
      (scm_struct_i_flags): Alias scm_vtable_index_flags.
      (SCM_STRUCTF_FLAGS): Be a -1 mask, we have a whole word now.
      (SCM_SET_VTABLE_DESTRUCTOR): Implement by hand.
    Hidden slots.
    * libguile/struct.c (scm_make_struct_layout): Add support for "hidden"
      fields, writable fields that are not visible to make-struct. This
      allows us to add fields to vtables and not break existing make-struct
      (scm_struct_ref, scm_struct_set_x): Always get struct length from the
      vtable. Support hidden fields.
    * libguile/goops.c (scm_class_hidden, scm_class_protected_hidden): New
      slot classes, to correspond to the new vtable slots.
      (scm_sys_prep_layout_x): Turn hidden slots into 'h'.
      (build_class_class_slots): Reorder the class slots to account for
      vtable fields coming out of negative-land, for name as a vtable slot,
      and for hidden fields.
      (create_standard_classes): Define <hidden-slot> and
    Clean up struct.h.
    * libguile/struct.h: Lay things out cleaner. There are no more hidden
      (negative) words. Names are nicer. The exposition is nicer. But the
      basics are the same. The incompatibilities are that <vtable> has more
      slots now, and that scm_alloc_struct's signature has changed. The
      former is ameliorated by the "hidden" slots mentioned before, and the
      latter, well, it was always a very internal thing...
    * libguile/struct.c: (scm_vtable_p): Now we keep flags on
      vtable-vtables, so this check is cheaper.
      (scm_alloc_struct): No hidden words. Yippee.
      (struct_finalizer_trampoline): Entersify.
      (scm_make_struct): No need to babysit extra words, though now we have
      to babysit flags. Propagate the vtable, applicable, and setter flags
      (scm_make_vtable_vtable): Update for new simplicity.
      (scm_print_struct): A better printer.
      (scm_init_struct): Define <applicable-struct-vtable>, a magical vtable
      like CL's funcallable-standard-class. Also define
    Remove foreign object implementation.
    * libguile/goops.h:
    * libguile/goops.c (scm_make_foreign_object, scm_make_class)
      (scm_add_slot, scm_wrap_object, scm_wrap_component): Remove, these
      were undocumented and unworking.
    Clean up goops.h, a little.
    * libguile/goops.h:
    * libguile/goops.c: Also clean up.
    * module/oop/goops/dispatch.scm (hashset-index): Adapt for new hashset


GNU Guile

reply via email to

[Prev in Thread] Current Thread [Next in Thread]