/* set rest size so that total footprint = COMPILED_JIT_CLOSURE + 1 */
XSETPVECTYPESIZE (p, PVEC_COMPILED, size, COMPILED_JIT_CLOSURE + 1 - size);
+ p->contents[COMPILED_INTERPRETER] = (Lisp_Object )exec_byte_code;
p->contents[COMPILED_JIT_CTXT] = (Lisp_Object )NULL;
p->contents[COMPILED_JIT_CLOSURE] = (Lisp_Object )NULL;
XSETCOMPILED (val, p);
jit_context_build_end (ctxt.libjit_ctxt);
if (err)
emacs_abort ();
+ ASET (byte_code, COMPILED_INTERPRETER, (Lisp_Object )jit_exec);
ASET (byte_code, COMPILED_JIT_CTXT, (Lisp_Object )ctxt.libjit_ctxt);
ASET (byte_code, COMPILED_JIT_CLOSURE,
(Lisp_Object )jit_function_to_closure (ctxt.func));
ptrdiff_t nargs, Lisp_Object *args)
{
#ifdef HAVE_LIBJIT
- if (AREF (byte_code, COMPILED_JIT_CTXT) != (Lisp_Object )NULL)
- return jit_exec (byte_code, args_template, nargs, args);
- else if (byte_code_jit_on)
+ if (byte_code_jit_on)
{
jit_byte_code__ (byte_code);
return jit_exec (byte_code, args_template, nargs, args);
and constants vector yet, fetch them from the file. */
if (CONSP (AREF (fun, COMPILED_BYTECODE)))
Ffetch_bytecode (fun);
- return exec_byte_code (fun, syms_left,
- nargs, arg_vector);
+ Lisp_Object (*interpreter)(Lisp_Object, Lisp_Object,
+ ptrdiff_t, Lisp_Object *) =
+ (void *)AREF (fun, COMPILED_INTERPRETER);
+ return interpreter (fun, syms_left,
+ nargs, arg_vector);
}
lexenv = Qnil;
}
and constants vector yet, fetch them from the file. */
if (CONSP (AREF (fun, COMPILED_BYTECODE)))
Ffetch_bytecode (fun);
- val = exec_byte_code (fun, Qnil, 0, 0);
+ Lisp_Object (*interpreter)(Lisp_Object, Lisp_Object,
+ ptrdiff_t, Lisp_Object *) =
+ (void *)AREF (fun, COMPILED_INTERPRETER);
+ val = interpreter (fun, Qnil, 0, 0);
}
return unbind_to (count, val);
COMPILED_STACK_DEPTH = 3,
COMPILED_DOC_STRING = 4,
COMPILED_INTERACTIVE = 5,
- COMPILED_JIT_CTXT = 6,
- COMPILED_JIT_CLOSURE = 7
+ COMPILED_INTERPRETER = 6,
+ COMPILED_JIT_CTXT = 7,
+ COMPILED_JIT_CLOSURE = 8
};
/* Flag bits in a character. These also get used in termhooks.h.