guile-commits
[Top][All Lists]
Advanced

[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-g0e17e17
Date: Sat, 21 Nov 2009 18:22:07 +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".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=0e17e17118df6c055a29db6eb39c06ee643d2ed1

The branch, goops-cleanup has been created
        at  0e17e17118df6c055a29db6eb39c06ee643d2ed1 (commit)

- Log -----------------------------------------------------------------
commit 0e17e17118df6c055a29db6eb39c06ee643d2ed1
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 61baac5fbab24fb92a4688e5c2b1b4e79f94ed63
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 4fe9f4ab042c637a502d143fc5cbb68292bfabf4
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_SET_MCACHE_N_SPECIALIZED, SCM_INITIAL_MCACHE_SIZE)
      (scm_make_method_cache, scm_memoize_method, scm_mcache_lookup_cmethod)
      (scm_mcache_compute_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 86324164edb507f43cc476491f748ce9e09bc0c2
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 3676520ec6e797c70cf0f32b25047bf5846296ac
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
      scm_var_make_extended_generic.
      (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
      slots
    
    * 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 3f37752eac3d80d87cad138b009adfdb5d74146f
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 13fe4d98968187c1ad789aa0ee47632300afdae9
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 8360989cb3d2202d95f8e4234bbd671bcec804e9
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 6aa07af927f82b96bacdae2f5e46748b88a169fd
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_with_setter)
      (scm_class_applicable_struct_class): Rename from
      scm_class_entity, scm_class_entity_with_setter, and
      scm_class_entity_class.
      (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
      unnecessary.
      (scm_make): Adapt to new generic slot order, and no more
      simple-method.
      (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
      thing.
    
    * libguile/goops.h (SCM_CLASSF_METACLASS): "A goops class that is a
      vtable" -- no need for a separate flag.
      (SCM_CLASSF_FOREIGN, SCM_CLASSF_SIMPLE_METHOD)
      (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_i_struct_inherit_vtable_magic.
      (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
      scm_basic_make_class.
    
    * module/oop/goops/dispatch.scm (delayed-compile)
      (memoize-effective-method!): Adapt to 'procedure slot name change.

commit 2a34963aa847d77460f24b598ed6df0f9efe4a5f
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 98731d258a85bebbf14eb5567dce94b0c7732f4e
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 bf8f3736e1bfc38c099e038ec94e6911f5d872ae
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 ff16f443471a35b28e34be79bf2f1bc4cad65433
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.)
      (SCM_SET_GENERIC_DISPATCH_PROCEDURE)
      (SCM_CLEAR_GENERIC_EFFECTIVE_METHODS): New helper macros.
    
    * 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 f7782ff8aeb5d69a74f53d461030eb532dee608a
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 bd59c1be94f94b54fb1d40282c128f5680e46094
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
      slot.
    
    * module/oop/goops/compile.scm: Always "compile" a method, instead of
      looking for a hit in an always-empty cache.

commit 77137123275859d9c2695527b91a0e8266879224
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 cbc201d453ef161c27656b188cd739fa26aa6479
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 cb15c8a2d220a0505b2ab90c1f97889c4c169e94
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)
      (scm_trampoline_2):
    * 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
      invocations.
      (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
      <protected-hidden-slot>.
    
    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
      appropriately.
      (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
      <applicable-struct-with-setter-vtable>.
    
    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
      index.

-----------------------------------------------------------------------


hooks/post-receive
-- 
GNU Guile




reply via email to

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