From ca2e32dcc4ed8bba25a700cd7c8fa8aba6c94ae5 Mon Sep 17 00:00:00 2001 From: Nickolas Lloyd Date: Thu, 22 Dec 2016 20:05:16 -0500 Subject: ; Minor reorg of bytecode interpreter/JIT compiler ; * src/bytecode.c (exec_byte_code, exec_byte_code__): Use exec_byte_code as the single entrypoint for both the interpreter and JIT compiler. ; * src/bytecode-jit.c (jit_byte_code): Remove jit_byte_code to be replaced by exec_byte_code. ; * src/bytecode.h: Add function prototypes. ; * src/eval.c (funcall_lambda): Use exec_byte_code instead of jit_byte_code. ; * src/lisp.h: Update function prototypes. --- src/bytecode-jit.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'src/bytecode-jit.c') diff --git a/src/bytecode-jit.c b/src/bytecode-jit.c index 095892d067c..734371dc772 100644 --- a/src/bytecode-jit.c +++ b/src/bytecode-jit.c @@ -605,7 +605,7 @@ emacs_jit_init (void) JIT_SIG (native_integer_p, jit_type_Lisp_Object, jit_type_Lisp_Object); } -static Lisp_Object +Lisp_Object jit_exec (Lisp_Object byte_code, Lisp_Object args_template, ptrdiff_t nargs, Lisp_Object *args) { Lisp_Object *top; @@ -668,7 +668,7 @@ jit_exec (Lisp_Object byte_code, Lisp_Object args_template, ptrdiff_t nargs, Lis } } -static void +void jit_byte_code__ (Lisp_Object byte_code) { ptrdiff_t count = SPECPDL_INDEX (); @@ -2094,24 +2094,6 @@ jit_byte_code__ (Lisp_Object byte_code) } } -Lisp_Object -jit_byte_code (Lisp_Object byte_code, Lisp_Object args_template, - ptrdiff_t nargs, Lisp_Object *args) -{ - if (AREF (byte_code, COMPILED_JIT_ID)) - return jit_exec (byte_code, args_template, nargs, args); - else if (!byte_code_jit_on) - return exec_byte_code (AREF (byte_code, COMPILED_BYTECODE), - AREF (byte_code, COMPILED_CONSTANTS), - AREF (byte_code, COMPILED_STACK_DEPTH), - args_template, nargs, args); - else - { - jit_byte_code__ (byte_code); - return jit_exec (byte_code, args_template, nargs, args); - } -} - DEFUN ("jit-compile", Fjit_compile, Sjit_compile, 1, 1, 0, doc: /* Function used internally in byte-compiled code. The first argument, BYTECODE, is a compiled byte code object. */) -- cgit v1.2.1