summaryrefslogtreecommitdiff
path: root/libguile/modules.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2012-05-23 12:11:08 +0200
committerAndy Wingo <wingo@pobox.com>2012-05-23 12:29:15 +0200
commit2de74cb56e3af44ce624638facfa061603d39c0d (patch)
tree2e3619ce57be8d5009c1d63a28075e865d88fbdc /libguile/modules.c
parent3f48638c8c82d7839b75204e475af691fcd67c33 (diff)
downloadguile-2de74cb56e3af44ce624638facfa061603d39c0d.tar.gz
finish deprecating eval closures
* libguile/deprecated.h: * libguile/deprecated.c (scm_eval_closure_lookup) (scm_standard_eval_closure, scm_standard_interface_eval_closure) (scm_eval_closure_module): Deprecate these, as they are unused. * libguile/modules.h: * libguile/modules.c: Remove deprecated code. * module/oop/goops/util.scm (top-level-env, top-level-env?): Deprecate. * module/ice-9/deprecated.scm (set-system-module!): Deprecate. (module-eval-closure): Deprecate, by overriding the core definition to return a fresh eval closure. * module/ice-9/boot-9.scm (make-module): Don't set an eval closure on the module. (the-root-module, the-scm-module): Don't call set-system-module!.
Diffstat (limited to 'libguile/modules.c')
-rw-r--r--libguile/modules.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/libguile/modules.c b/libguile/modules.c
index a7c0c0ce9..7b42a3d43 100644
--- a/libguile/modules.c
+++ b/libguile/modules.c
@@ -519,66 +519,6 @@ scm_module_ensure_local_variable (SCM module, SCM sym)
}
#undef FUNC_NAME
-scm_t_bits scm_tc16_eval_closure;
-
-#define SCM_F_EVAL_CLOSURE_INTERFACE (1<<0)
-#define SCM_EVAL_CLOSURE_INTERFACE_P(e) \
- (SCM_SMOB_FLAGS (e) & SCM_F_EVAL_CLOSURE_INTERFACE)
-
-/* NOTE: This function may be called by a smob application
- or from another C function directly. */
-SCM
-scm_eval_closure_lookup (SCM eclo, SCM sym, SCM definep)
-{
- SCM module = SCM_PACK (SCM_SMOB_DATA (eclo));
- if (scm_is_true (definep))
- {
- if (SCM_EVAL_CLOSURE_INTERFACE_P (eclo))
- return SCM_BOOL_F;
- return scm_call_2 (SCM_VARIABLE_REF (module_make_local_var_x_var),
- module, sym);
- }
- else
- return scm_module_variable (module, sym);
-}
-
-SCM_DEFINE (scm_standard_eval_closure, "standard-eval-closure", 1, 0, 0,
- (SCM module),
- "Return an eval closure for the module @var{module}.")
-#define FUNC_NAME s_scm_standard_eval_closure
-{
- SCM_RETURN_NEWSMOB (scm_tc16_eval_closure, SCM_UNPACK (module));
-}
-#undef FUNC_NAME
-
-
-SCM_DEFINE (scm_standard_interface_eval_closure,
- "standard-interface-eval-closure", 1, 0, 0,
- (SCM module),
- "Return a interface eval closure for the module @var{module}. "
- "Such a closure does not allow new bindings to be added.")
-#define FUNC_NAME s_scm_standard_interface_eval_closure
-{
- SCM_RETURN_NEWSMOB (scm_tc16_eval_closure | (SCM_F_EVAL_CLOSURE_INTERFACE<<16),
- SCM_UNPACK (module));
-}
-#undef FUNC_NAME
-
-SCM_DEFINE (scm_eval_closure_module,
- "eval-closure-module", 1, 0, 0,
- (SCM eval_closure),
- "Return the module associated with this eval closure.")
-/* the idea is that eval closures are really not the way to do things, they're
- superfluous given our module system. this function lets mmacros migrate away
- from eval closures. */
-#define FUNC_NAME s_scm_eval_closure_module
-{
- SCM_MAKE_VALIDATE_MSG (SCM_ARG1, eval_closure, EVAL_CLOSURE_P,
- "eval-closure");
- return SCM_SMOB_OBJECT (eval_closure);
-}
-#undef FUNC_NAME
-
SCM_SYMBOL (sym_macroexpand, "macroexpand");
SCM_DEFINE (scm_module_transformer, "module-transformer", 1, 0, 0,
@@ -936,9 +876,6 @@ scm_init_modules ()
#include "libguile/modules.x"
module_make_local_var_x_var = scm_c_define ("module-make-local-var!",
SCM_UNDEFINED);
- scm_tc16_eval_closure = scm_make_smob_type ("eval-closure", 0);
- scm_set_smob_apply (scm_tc16_eval_closure, scm_eval_closure_lookup, 2, 0, 0);
-
the_module = scm_make_fluid ();
}