From 11561496bad94481cc2b3d8acba1a154e3c052fc Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sun, 1 Nov 2009 19:46:27 +0100 Subject: remove support for "entities" -- a form of applicable struct Entities were meant to be a form of applicable struct. Unfortunately, the implementation is intertwingled with generics. Removing them, for now, will make it possible to cleanly re-add applicable struct support. * libguile/struct.h (SCM_STRUCTF_ENTITY): Remove. (SCM_STRUCTF_GOOPS_HACK): New flag; sigh. * libguile/struct.c (scm_make_struct): We make "entity" structs if the GOOPS_HACK flag is set. This will be fixed when we rework flags and remove hidden words. * libguile/goops.c (scm_class_of): Structs are not applicable, for now at least. (scm_sys_inherit_magic_x, scm_basic_basic_make_class) (scm_sys_allocate_instance, scm_sys_set_object_setter_x): (make_struct_class): Adapt for no more entities (and thus no entity flag). (create_standard_classes): For some reason, generic functions were getting the LIGHT flag set, after the ENTITY flag was removed; so for now explicitly clear that flag. * libguile/goops.h (SCM_GENERIC_SETTER, SCM_SET_GENERIC_SETTER): New macros. * libguile/objects.h: * libguile/objects.c: Remove code for entities. * libguile/debug.c: (scm_procedure_source): Only work with generics. * libguile/eval.c (scm_trampoline_0, scm_trampoline_1) (scm_trampoline_2): Only handle generics. * libguile/eval.i.c (CEVAL): #ifdef out the pieces about entities. * libguile/procprop.c (scm_i_procedure_arity): Remove support for entities. * libguile/procs.c (scm_procedure_p, scm_procedure, scm_setter): Remove entity support. --- libguile/eval.i.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libguile/eval.i.c') diff --git a/libguile/eval.i.c b/libguile/eval.i.c index 15107c51d..ccb612611 100644 --- a/libguile/eval.i.c +++ b/libguile/eval.i.c @@ -1031,6 +1031,7 @@ dispatch: arg1 = SCM_EOL; goto type_dispatch; } +#if 0 else if (SCM_I_ENTITYP (proc)) { arg1 = proc; @@ -1041,6 +1042,7 @@ dispatch: #endif goto evap1; } +#endif else goto badfun; case scm_tc7_subr_1: @@ -1162,6 +1164,7 @@ dispatch: #endif goto type_dispatch; } +#if 0 else if (SCM_I_ENTITYP (proc)) { arg2 = arg1; @@ -1173,6 +1176,7 @@ dispatch: #endif goto evap2; } +#endif else goto badfun; case scm_tc7_subr_2: @@ -1241,6 +1245,7 @@ dispatch: #endif goto type_dispatch; } +#if 0 else if (SCM_I_ENTITYP (proc)) { operatorn: @@ -1258,6 +1263,7 @@ dispatch: SCM_EOL)); #endif } +#endif else goto badfun; case scm_tc7_subr_0: @@ -1467,8 +1473,10 @@ dispatch: x = SCM_GENERIC_METHOD_CACHE (proc); goto type_dispatch; } +#if 0 else if (SCM_I_ENTITYP (proc)) goto operatorn; +#endif else goto badfun; case scm_tc7_subr_2: @@ -1772,6 +1780,7 @@ tail: #endif RETURN (scm_apply_generic (proc, args)); } +#if 0 else if (SCM_I_ENTITYP (proc)) { /* operator */ @@ -1791,6 +1800,7 @@ tail: else goto badproc; } +#endif else goto badproc; default: -- cgit v1.2.3