summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bindat.el
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2021-12-31 21:21:46 +0000
committerAlan Mackenzie <acm@muc.de>2021-12-31 21:21:46 +0000
commitff9af1f1f69264bcbb7b926363293e55a6b3f330 (patch)
tree0ec9f8ce5850d6f6fd1defe23b1a42f45cb2a795 /lisp/emacs-lisp/bindat.el
parent1cd188799f86bcb13ad76e82e3436b1b7e9f9e9f (diff)
downloademacs-ff9af1f1f69264bcbb7b926363293e55a6b3f330.tar.gz
emacs-ff9af1f1f69264bcbb7b926363293e55a6b3f330.tar.bz2
emacs-ff9af1f1f69264bcbb7b926363293e55a6b3f330.zip
Miscellaneous enhancements to scratch/correct-warning-pos.
1. Check the type (symbol with position) of the argument given to the native compiled version of SYMBOL_WITH_POS_SYM. 2. Handle infinite recursion caused by circular lists, etc., in macroexp-strip-symbol-positions by using hash tables. 3. Read byte compiled functions without giving symbols positions. * lisp/emacs-lisp/comp.el (comp-finalize-relocs): Add symbol-with-pos-p into the list of relocated symbols. * lisp/emacs-lisp/macroexp.el (macroexp--ssp-conses-seen) (macroexp--ssp-vectors-seen, macroexp--ssp-records-seen): Renamed, and animated as hash tables. (macroexp--strip-s-p-2): Optionally tests for the presence of an argument in one of the above hash tables, so as to handle otherwise infinite recursion. (byte-compile-strip-s-p-1): Add a condition-case to handle infinite recursion caused by circular lists etc., using the above hash tables as required. * src/comp.c (comp_t): New element symbol_with_pos_sym. (emit_SYMBOL_WITH_POS_SYM): Amend just to call the new SYMBOL_WITH_POS_SYM. (emit_CHECK_SYMBOL_WITH_POS, define_SYMBOL_WITH_POS_SYM): New functions. (Fcomp__init_ctxt): Register an emitter for Qsymbol_with_pos_p. (Fcomp__compile_ctxt_to_file): Call define_SYMBOL_WITH_POS_SYM. (syms_of_comp): Define Qsymbol_with_pos_p. * src/data.c (syms_of_data): Define a new error symbol Qrecursion_error, an error category for the new error symbols Qexcessive_variable_binding and Qexcessive_lisp_nesting. * src/eval.c (grow_specpdl): Change the signal_error call to an xsignal0 call using the new error symbol Qexcessive_variable_binding. (eval_sub, Ffuncall): Change the `error' calls to xsignal using the new error symbol Qexcessive_lisp_nesting. * src/lread.c (read1): When reading a compiled function, read the components of the vector without giving its symbols a position.
Diffstat (limited to 'lisp/emacs-lisp/bindat.el')
0 files changed, 0 insertions, 0 deletions