(byte-save-excursion
(comp-emit '(call record_unwind_protect_excursion)))
(byte-save-window-excursion-OBSOLETE)
- (byte-save-restriction)
- (byte-catch)
+ (byte-save-restriction
+ '(call helper-save-restriction))
+ (byte-catch) ;; Obsolete
(byte-unwind-protect
(comp-emit `(call helper_unwind_protect ,(comp-slot-next))))
- (byte-condition-case)
+ (byte-condition-case) ;; Obsolete
(byte-temp-output-buffer-setup-OBSOLETE)
(byte-temp-output-buffer-show-OBSOLETE)
- (byte-unbind-all)
+ (byte-unbind-all) ;; Obsolete
(byte-set-marker auto)
(byte-match-beginning auto)
(byte-match-end auto)
bool helper_PSEUDOVECTOR_TYPEP_XUNTAG (const union vectorlike_header *a,
enum pvec_type code);
+void helper_emit_save_restriction (void);
+
\f
static char * ATTRIBUTE_FORMAT_PRINTF (1, 2)
format_string (const char *format, ...)
emit_simple_limple_call_lisp_ret);
register_emitter (Qrecord_unwind_protect_excursion,
emit_simple_limple_call_void_ret);
+ register_emitter (Qhelper_save_restriction,
+ emit_simple_limple_call_void_ret);
}
comp.ctxt = gcc_jit_context_acquire();
/******************************************************************************/
/* Helper functions called from the runtime. */
/* These can't be statics till shared mechanism is used to solve relocations. */
+/* Note: this are all potentially definable directly to gcc and are here just */
+/* for lazyness. Change this if a performance impact is measured. */
/******************************************************************************/
Lisp_Object
return v1;
}
-void helper_unwind_protect (Lisp_Object handler)
+void
+helper_unwind_protect (Lisp_Object handler)
{
/* Support for a function here is new in 24.4. */
record_unwind_protect (FUNCTIONP (handler) ? bcall0 : prog_ignore,
code);
}
+void
+helper_emit_save_restriction (void)
+{
+ record_unwind_protect (save_restriction_restore,
+ save_restriction_save ());
+}
+
+\f
void
syms_of_comp (void)
{
DEFSYM (Qrecord_unwind_protect_excursion, "record_unwind_protect_excursion");
DEFSYM (Qhelper_unbind_n, "helper_unbind_n");
DEFSYM (Qhelper_unwind_protect, "helper_unwind_protect");
+ DEFSYM (Qhelper_save_restriction, "helper_save_restriction")
defsubr (&Scomp_init_ctxt);
defsubr (&Scomp_release_ctxt);