diff options
author | Andy Wingo <wingo@pobox.com> | 2009-02-03 21:13:01 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-02-03 21:13:01 +0100 |
commit | ef7e18683c06a3a1524787becd29b8c11dbc5674 (patch) | |
tree | 8a4b4f4bbc34b9a126d44cf432373ab127910cb8 /libguile/objects.c | |
parent | e94ecc68c285426544c195dc6d388e3ff0c87dd4 (diff) | |
download | guile-ef7e18683c06a3a1524787becd29b8c11dbc5674.tar.gz |
inline dispatch to program cmethods, tick in return, remove old goops methods
* libguile/objects.c (scm_apply_generic): Inline the case when the
generic is a program.
* libguile/vm-i-system.c (return): Tick when functions return.
* module/oop/goops.scm (object-eqv?, object-equal?): Remove these
historical methods.
Diffstat (limited to 'libguile/objects.c')
-rw-r--r-- | libguile/objects.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libguile/objects.c b/libguile/objects.c index e4a3d2a3a..e68ed37ef 100644 --- a/libguile/objects.c +++ b/libguile/objects.c @@ -39,6 +39,8 @@ #include "libguile/ports.h" #include "libguile/strings.h" #include "libguile/vectors.h" +#include "libguile/programs.h" +#include "libguile/vm.h" #include "libguile/validate.h" #include "libguile/objects.h" @@ -162,7 +164,9 @@ SCM scm_apply_generic (SCM gf, SCM args) { SCM cmethod = scm_mcache_compute_cmethod (SCM_ENTITY_PROCEDURE (gf), args); - if (scm_is_pair (cmethod)) + if (SCM_PROGRAM_P (cmethod)) + return scm_vm_apply (scm_the_vm (), cmethod, args); + else if (scm_is_pair (cmethod)) return scm_eval_body (SCM_CDR (SCM_CMETHOD_CODE (cmethod)), SCM_EXTEND_ENV (SCM_CAR (SCM_CMETHOD_CODE (cmethod)), args, |