summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/memory-report-tests.el
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2021-02-11 17:34:17 +0100
committerMattias EngdegÄrd <mattiase@acm.org>2021-02-12 20:52:05 +0100
commitea29908c1870417eba98f27525a6f2f571d65396 (patch)
treef18b9ca13f2a19dd848b8c8edf95962aebfe29f4 /test/lisp/emacs-lisp/memory-report-tests.el
parentc4459a10a6962d90adc4cdfada36175aaed99dfc (diff)
downloademacs-ea29908c1870417eba98f27525a6f2f571d65396.tar.gz
emacs-ea29908c1870417eba98f27525a6f2f571d65396.tar.bz2
emacs-ea29908c1870417eba98f27525a6f2f571d65396.zip
Avoid traversing dead `if` branches in bytecode optimiser
There is no point in traversing conditional branches that are statically known never to be executed. This saves some optimisation effort, but more importantly prevents variable assignments and references in those branches from blocking effective constant propagation. Also attempt to traverse as much as possible in an unconditional context, which enables constant-propagation through (linear) assignments. * lisp/emacs-lisp/byte-opt.el (byte-optimize-form): Rewrite the (tail) recursion into an explicit loop. Normalise a return value of (quote nil) to nil, for easier subsequent optimisations. * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Don't traverse dead `if` branches. Use unconditional traversion context when possible.
Diffstat (limited to 'test/lisp/emacs-lisp/memory-report-tests.el')
0 files changed, 0 insertions, 0 deletions