]> git.eshelyaron.com Git - emacs.git/commit
Add bytecode JIT compilation capabilities
authorNickolas Lloyd <ultrageek.lloyd@gmail.com>
Sat, 12 Nov 2016 23:48:04 +0000 (18:48 -0500)
committerNickolas Lloyd <ultrageek.lloyd@gmail.com>
Thu, 22 Dec 2016 21:56:18 +0000 (16:56 -0500)
commite0b099f10d916396fc638c25c847ad82e500df69
tree0f352a2a8f179f8a4faa9c0a32405e426927a45a
parent21aa3f2d3ea904f09bb92b5b5c8471a80e385230
Add bytecode JIT compilation capabilities

This change adds several functions that utilize GNU libjit to compile
byte-compiled lisp functions to machine code.  The functionality is exposed
in two ways: specific functions can be JIT compiled from lisp with the
`jit-compile' function, or JIT compilation can be enabled globally by setting
`byte-code-jit-on' to non-nil.  Once the function has been JIT compiled, the
machine-code version will be executed in place of the bytecode version.

* src/bytecode-jit.c (native_varref, native_ifnil, native_ifnonnil)
(native_car, native_eq, native_memq, native_cdr, native_varset)
(native_unbind_to, byte_code_quit, native_save_excursion)
(native_save_restriction, native_save_window_excursion, native_catch)
(native_pophandler, native_pushhandler1, native_pushhandler2)
(native_unwind_protect, native_temp_output_buffer_setup, native_nth)
(native_symbolp, native_consp, native_stringp, native_listp, native_not)
(native_add1, native_eqlsign, native_negate, native_point, native_point_max)
(native_point_min, native_current_column, native_interactive_p)
(native_char_syntax, native_elt, native_car_safe, native_cdr_safe)
(native_number_p, native_integer_p, emacs_jit_init, jit_exec, jit_byte_code__)
(jit_byte_code, Fjit_compile, syms_of_bytecode_jit): New file encapsulating
JIT compilation functionality and execution functionality.
* src/bytecode.c:
* src/bytecode.h: Extract useful data structures and macro definitions into a
separate header to allow sharing between src/bytecode{,-jit}.c.
; * src/Makefile.in: Add src/bytecode-jit.o to Makefile recipe.
; * src/lisp.h: Add function prototypes for new JIT functions.
; * src/emacs.c: Call syms_of_bytecode_jit to initialize JIT-related symbols.
configure.ac
src/Makefile.in
src/bytecode-jit.c [new file with mode: 0644]
src/bytecode.c
src/bytecode.h [new file with mode: 0644]
src/data.c
src/emacs.c
src/eval.c
src/lisp.h