static void
native_unwind_protect (Lisp_Object handler)
{
- record_unwind_protect (NILP (Ffunctionp (handler))
- ? unwind_body : bcall0,
- handler);
+ record_unwind_protect (FUNCTIONP (handler) ? bcall0 : prog_ignore, handler);
}
jit_type_t native_temp_output_buffer_setup_sig;
}
{
- /* We don't actually need to use this structure to keep track of a
- stack, since our stack isn't GCed. We just need to use it as a
- placeholder in `byte_stack_list' to facilitate proper unwinding. */
- struct byte_stack stack = {};
- stack.next = byte_stack_list;
- byte_stack_list = &stack;
Lisp_Object (*func)(Lisp_Object *) =
(void *)AREF (byte_code, COMPILED_JIT_CLOSURE);
- Lisp_Object ret = func (top);
- byte_stack_list = byte_stack_list->next;
- return ret;
+ return func (top);
}
}
#endif /* BYTE_CODE_METER */
-\f
-/* Relocate program counters in the stacks on byte_stack_list. Called
- when GC has completed. */
-
-void
-relocate_byte_stack (struct byte_stack *stack)
-{
- for (; stack; stack = stack->next)
- {
-#ifdef HAVE_LIBJIT
- if (!stack->byte_string_start)
- continue;
-#endif
- if (stack->byte_string_start != SDATA (stack->byte_string))
- {
- ptrdiff_t offset = stack->pc - stack->byte_string_start;
- stack->byte_string_start = SDATA (stack->byte_string);
- stack->pc = stack->byte_string_start + offset;
- }
- }
-}
-
\f
/* Fetch the next byte from the bytecode stream. */
{
CHECK_TYPE (COMPILEDP (x), Qcompiledp, x);
}
-INLINE void
-CHECK_BOOL_VECTOR (Lisp_Object x)
-{
- CHECK_TYPE (BOOL_VECTOR_P (x), Qbool_vector_p, x);
-}
/* This is a bit special because we always need size afterwards. */
INLINE ptrdiff_t
CHECK_VECTOR_OR_STRING (Lisp_Object x)
/* 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, ptrdiff_t, Lisp_Object *);
extern Lisp_Object get_byte_code_arity (Lisp_Object);