diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2015-11-30 14:34:42 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2015-11-30 14:34:42 -0500 |
commit | 3eb93c07f7a60ac9ce8a16f10c3afd5a3a31243a (patch) | |
tree | 3ac52925ea81e1f3119f0582d7aa011310140afe /modules/mod-test | |
parent | 17fa6ba8245010f2e2eaa7918a1343b9b07f3c56 (diff) | |
download | emacs-3eb93c07f7a60ac9ce8a16f10c3afd5a3a31243a.tar.gz emacs-3eb93c07f7a60ac9ce8a16f10c3afd5a3a31243a.tar.bz2 emacs-3eb93c07f7a60ac9ce8a16f10c3afd5a3a31243a.zip |
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.
Diffstat (limited to 'modules/mod-test')
-rw-r--r-- | modules/mod-test/mod-test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/mod-test/mod-test.c b/modules/mod-test/mod-test.c index 184c737652a..862bb81288b 100644 --- a/modules/mod-test/mod-test.c +++ b/modules/mod-test/mod-test.c @@ -61,7 +61,7 @@ Fmod_test_signal (emacs_env *env, ptrdiff_t nargs, emacs_value args[], assert (env->non_local_exit_check (env) == emacs_funcall_exit_return); env->non_local_exit_signal (env, env->intern (env, "error"), env->make_integer (env, 56)); - return NULL; + return env->intern (env, "nil"); } @@ -73,7 +73,7 @@ Fmod_test_throw (emacs_env *env, ptrdiff_t nargs, emacs_value args[], assert (env->non_local_exit_check (env) == emacs_funcall_exit_return); env->non_local_exit_throw (env, env->intern (env, "tag"), env->make_integer (env, 65)); - return NULL; + return env->intern (env, "nil"); } |