From 7334f7fab3faeaa0b8257dea66bb0ba05b73e403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Wed, 4 Mar 2026 09:02:39 +0100 Subject: [PATCH] apply: generic functions are dispatched via the entry point Previously standard and restricted dispatch was dispatched via _ecl_standard_dispatch, but that adds a dependency on gfun.d. --- src/c/alloc_2.d | 1 + src/c/apply.d | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/c/alloc_2.d b/src/c/alloc_2.d index 57f945305..d40ebe385 100644 --- a/src/c/alloc_2.d +++ b/src/c/alloc_2.d @@ -393,6 +393,7 @@ ecl_alloc_instance(cl_index slots) i = ecl_alloc_object(t_instance); i->instance.slots = (cl_object *)ecl_alloc(sizeof(cl_object) * slots); i->instance.length = slots; + i->instance.isgf = ECL_NOT_FUNCALLABLE; i->instance.entry = FEnot_funcallable_vararg; i->instance.slotds = ECL_UNBOUND; return i; diff --git a/src/c/apply.d b/src/c/apply.d index 6851c95b8..f4d094bb9 100644 --- a/src/c/apply.d +++ b/src/c/apply.d @@ -90,13 +90,13 @@ ecl_apply_from_stack_frame(cl_object frame, cl_object x) break; case t_instance: switch (fun->instance.isgf) { - case ECL_STANDARD_DISPATCH: - case ECL_RESTRICTED_DISPATCH: - ret = _ecl_standard_dispatch(frame, fun); - break; case ECL_USER_DISPATCH: fun = fun->instance.slots[fun->instance.length - 1]; goto AGAIN; + case ECL_STANDARD_DISPATCH: + case ECL_RESTRICTED_DISPATCH: + /* ret = _ecl_standard_dispatch(frame, fun); */ + /* break; */ case ECL_READER_DISPATCH: case ECL_WRITER_DISPATCH: ret = APPLY(narg, fun->instance.entry, sp);