mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 15:40:19 +02:00
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.
This commit is contained in:
parent
e94ecc68c2
commit
ef7e18683c
3 changed files with 7 additions and 8 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue