1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00
guile/module/oop/goops
Andy Wingo e177058bc4 don't re-enter the compiler during method dispatch
* libguile/goops.c (scm_make): In the pre-inst `make', default
  `procedure' to #f, and read a `make-procedure' instead of
  `compile-env'.

* libguile/goops.h (scm_si_make_procedure): This instead of
  scm_si_compile_env.

* module/oop/goops.scm (make-method): Remove this unused function. Users
  should use (make <method> ...) directly.
  (method): Capture `make-procedure' instead of `procedure' in the case
  that the body calls a next-method. Allows for the kind of
  "recompilation" that we were using before, but with closures instead of
  re-entering the compiler. Type-specific compilation is still
  interesting, but probably should be implemented in another way.
  (initialize): Default #:procedure to #f, and
  s/compile-env/make-procedure/.

* module/oop/goops/compile.scm (code-table-lookup): Just return the
  cmethod, not the entry -- since the entry is now just (append types
  cmethod).
  (compile-make-procedure): New procedure, returns a form that, when
  evaluated/compiled, will yield a procedure of one argument, the
  next-method. When called with a next-method, the procedure returns an
  actual method implementation. compile-make-procedure returns #f if the
  body doesn't call next-method.
  (compile-method): Unify to always return procedures. Much cleaner and
  *much* faster in the compiled case. In the interpreted case, there
  might be a slight slowdown, but if there is one it should be slight.

* module/oop/goops/dispatch.scm (method-cache-install!): Adapt to removal
  of compute-entry-with-cmethod.
2009-02-13 23:30:20 +01:00
..
accessors.scm move ice-9/ and oop/ under module/ 2008-11-01 12:44:21 +01:00
active-slot.scm move ice-9/ and oop/ under module/ 2008-11-01 12:44:21 +01:00
compile.scm don't re-enter the compiler during method dispatch 2009-02-13 23:30:20 +01:00
composite-slot.scm move ice-9/ and oop/ under module/ 2008-11-01 12:44:21 +01:00
describe.scm move ice-9/ and oop/ under module/ 2008-11-01 12:44:21 +01:00
dispatch.scm don't re-enter the compiler during method dispatch 2009-02-13 23:30:20 +01:00
internal.scm move ice-9/ and oop/ under module/ 2008-11-01 12:44:21 +01:00
Makefile.am move guilec.mk to am/guilec 2008-11-01 13:05:10 +01:00
save.scm move ice-9/ and oop/ under module/ 2008-11-01 12:44:21 +01:00
simple.scm move ice-9/ and oop/ under module/ 2008-11-01 12:44:21 +01:00
stklos.scm move ice-9/ and oop/ under module/ 2008-11-01 12:44:21 +01:00
util.scm move ice-9/ and oop/ under module/ 2008-11-01 12:44:21 +01:00