emacs/lisp/emacs-lisp
Vibhav Pant 88549ec38e Add new 'switch' byte-code.
'switch' takes two arguments from the stack: the variable to test, and
a jump table (implemented as a hash-table with the appropriate :test
function). By looking up the value of the variable in the hash table,
the interpreter can jump to the label pointed to by the value, if any.
This implementation can only be used for `cond' forms of the type
`(cond ((test x 'foo) 'bar) ...)`, such that the function `test` and
variable `x` is same for all clauses.

* lisp/emacs-lisp/bytecomp.el:

  * Add (byte-compile-cond-valid-obj2-p), (byte-compile-cond-vars),
    (byte-compile-cond-jump-table-info), (byte-compile-jump-table-add-tag),
    (byte-compile-cond-jump-table), byte-compile-jump-tables.

  * Add defcustom `byte-compile-cond-use-jump-table'.

  * (byte-compile-cond): Use them.

  * (byte-compile-lapcode): Patch tags present in jump tables, if any.

* lisp/emacs-lisp//byte-opt.el: (byte-optimize-lapcode): Add checks to
  some peephole optimizations to prevent them from messing up any code
  involving `byte-switch`.

* src/bytecode.c: (exec_byte_code): Add bytecode Bswitch.
2017-01-15 01:26:04 +05:30
..
advice.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
autoload.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
avl-tree.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
backquote.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
benchmark.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
bindat.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
byte-opt.el Add new 'switch' byte-code. 2017-01-15 01:26:04 +05:30
byte-run.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
bytecomp.el Add new 'switch' byte-code. 2017-01-15 01:26:04 +05:30
cconv.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
chart.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
check-declare.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
checkdoc.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
cl-extra.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
cl-generic.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
cl-indent.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
cl-lib.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
cl-macs.el (cl-defstruct): Improve error message for slots w/o value (bug#25312) 2017-01-03 16:07:44 -05:00
cl-preloaded.el Fix copyright years by hand 2017-01-01 04:01:41 +00:00
cl-seq.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
cl.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
copyright.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
crm.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
cursor-sensor.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
debug.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
derived.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
disass.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
easy-mmode.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
easymenu.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
edebug.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
eieio-base.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
eieio-compat.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
eieio-core.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
eieio-custom.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
eieio-datadebug.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
eieio-opt.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
eieio-speedbar.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
eieio.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
eldoc.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
elint.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
elp.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
ert-x.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
ert.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
ewoc.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
find-func.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
float-sup.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
generator.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
generic.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
gv.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
helper.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
inline.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
let-alist.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
lisp-mnt.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
lisp-mode.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
lisp.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
macroexp.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
map-ynp.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
map.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
nadvice.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
package-x.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
package.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
pcase.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
pp.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
radix-tree.el Update copyright year to 2017 in master 2017-01-01 01:48:59 -08:00
re-builder.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
regexp-opt.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
regi.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
ring.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
rx.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
seq.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
shadow.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
smie.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
subr-x.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
syntax.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
tabulated-list.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
tcover-ses.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
tcover-unsafep.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
testcover.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
thunk.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
timer-list.el Update copyright year to 2017 in master 2017-01-01 01:48:59 -08:00
timer.el Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
tq.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
trace.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
unsafep.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00
warnings.el Update copyright year to 2017 2016-12-31 19:42:26 -08:00