]> code.delx.au - gnu-emacs/commit
Rely on conservative stack scanning to find "emacs_value"s
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 30 Nov 2015 19:34:42 +0000 (14:34 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 30 Nov 2015 19:34:42 +0000 (14:34 -0500)
commit3eb93c07f7a60ac9ce8a16f10c3afd5a3a31243a
tree3ac52925ea81e1f3119f0582d7aa011310140afe
parent17fa6ba8245010f2e2eaa7918a1343b9b07f3c56
Rely on conservative stack scanning to find "emacs_value"s

* src/emacs-module.c (struct emacs_value_tag)
(struct emacs_value_frame, struct emacs_value_storage): Remove.
(value_frame_size): Remove constant.
(struct emacs_env_private): Use Lisp_Object for non_local_exit info.
(lisp_to_value): Remove first arg.
(module_nil): New constant.
Use it instead of NULL when returning an emacs_value.
(module_make_function): Adjust to new calling convention of
Qinternal_module_call.
(DEFUN): Receive args in an array rather than a list.
Use SAFE_ALLOCA rather than xnmalloc.  Skip the lisp_to_value loop when
we don't have WIDE_EMACS_INT.  Adjust to new type of non_local_exit info.
(module_non_local_exit_signal_1, module_non_local_exit_throw_1):
Adjust to new type of non_local_exit info.
(ltv_mark) [WIDE_EMACS_INT]: New constant.
(value_to_lisp, lisp_to_value): Rewrite.
(initialize_frame, initialize_storage, finalize_storage): Remove functions.
(allocate_emacs_value): Remove function.
(mark_modules): Gut it.
(initialize_environment): Don't initialize storage any more.
Keep the actual env object on Vmodule_environments.
(finalize_environment): Don't finalize storage any more.
(syms_of_module): Initialize ltv_mark and module_nil.

* src/emacs-module.h (emacs_value): Make it more clear that this type
is really opaque, including the fact that NULL may not be valid.

* modules/mod-test/mod-test.c (Fmod_test_signal, Fmod_test_throw):
Don't assume that NULL is a valid emacs_value.
modules/mod-test/mod-test.c
src/emacs-module.c
src/emacs-module.h