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;
}
}
-static void
+void
jit_byte_code__ (Lisp_Object byte_code)
{
ptrdiff_t count = SPECPDL_INDEX ();
}
}
-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. */)
If the third argument is incorrect, Emacs may crash. */)
(Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth)
{
- return exec_byte_code (bytestr, vector, maxdepth, Qnil, 0, NULL);
+ return exec_byte_code__ (bytestr, vector, maxdepth, Qnil, 0, NULL);
}
void
executing BYTESTR. */
Lisp_Object
-exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
- Lisp_Object args_template, ptrdiff_t nargs, Lisp_Object *args)
+exec_byte_code__ (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
+ Lisp_Object args_template, ptrdiff_t nargs, Lisp_Object *args)
{
#ifdef BYTE_CODE_METER
int volatile this_op = 0;
return result;
}
+Lisp_Object
+exec_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);
+ }
+}
+
/* `args_template' has the same meaning as in exec_byte_code() above. */
Lisp_Object
get_byte_code_arity (Lisp_Object args_template)
extern void
bcall0 (Lisp_Object f);
+
+extern void
+jit_byte_code__ (Lisp_Object);
+
+extern Lisp_Object
+jit_exec (Lisp_Object, Lisp_Object, ptrdiff_t, Lisp_Object *);
+
+extern Lisp_Object
+exec_byte_code__ (Lisp_Object, Lisp_Object, Lisp_Object,
+ Lisp_Object, ptrdiff_t, Lisp_Object *);
and constants vector yet, fetch them from the file. */
if (CONSP (AREF (fun, COMPILED_BYTECODE)))
Ffetch_bytecode (fun);
- return jit_byte_code (fun, syms_left,
- nargs, arg_vector);
+ return exec_byte_code (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 = jit_byte_code (fun, Qnil, 0, 0);
+ val = exec_byte_code (fun, Qnil, 0, 0);
}
return unbind_to (count, val);
/* Defined in bytecode.c. */
extern void syms_of_bytecode (void);
extern void relocate_byte_stack (struct byte_stack *);
-extern Lisp_Object exec_byte_code (Lisp_Object, Lisp_Object, Lisp_Object,
- Lisp_Object, ptrdiff_t, Lisp_Object *);
+extern Lisp_Object exec_byte_code (Lisp_Object, Lisp_Object, ptrdiff_t, Lisp_Object *);
extern Lisp_Object get_byte_code_arity (Lisp_Object);
/* Defined in bytecode-jit.c */
extern void syms_of_bytecode_jit (void);
-extern Lisp_Object jit_byte_code (Lisp_Object, Lisp_Object, ptrdiff_t, Lisp_Object *);
/* Defined in macros.c. */
extern void init_macros (void);