aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrea Corallo2019-12-28 11:39:29 +0100
committerAndrea Corallo2020-01-01 11:38:18 +0100
commit00f7fd7d427b85e69a53403a1d10ac122a92a95d (patch)
tree7f312465bb019bcf113311da03806d82b64ea1da /src
parent0bb5a47402313634b0e8654355e519388851e07f (diff)
downloademacs-00f7fd7d427b85e69a53403a1d10ac122a92a95d.tar.gz
emacs-00f7fd7d427b85e69a53403a1d10ac122a92a95d.zip
fix non local propagation handling
Diffstat (limited to 'src')
-rw-r--r--src/comp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/comp.c b/src/comp.c
index 5ef09086407..df841a66fd1 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -146,6 +146,7 @@ typedef struct {
146 gcc_jit_field *cast_union_as_lisp_obj; 146 gcc_jit_field *cast_union_as_lisp_obj;
147 gcc_jit_field *cast_union_as_lisp_obj_ptr; 147 gcc_jit_field *cast_union_as_lisp_obj_ptr;
148 gcc_jit_function *func; /* Current function being compiled. */ 148 gcc_jit_function *func; /* Current function being compiled. */
149 bool func_has_non_local; /* From comp-func has-non-local slot. */
149 gcc_jit_block *block; /* Current basic block being compiled. */ 150 gcc_jit_block *block; /* Current basic block being compiled. */
150 gcc_jit_lvalue **frame; /* Frame for the current function. */ 151 gcc_jit_lvalue **frame; /* Frame for the current function. */
151 gcc_jit_lvalue **f_frame; /* "Floating" frame for the current function. */ 152 gcc_jit_lvalue **f_frame; /* "Floating" frame for the current function. */
@@ -355,7 +356,11 @@ get_slot (Lisp_Object mvar)
355 } 356 }
356 EMACS_INT slot_n = XFIXNUM (mvar_slot); 357 EMACS_INT slot_n = XFIXNUM (mvar_slot);
357 gcc_jit_lvalue **frame = 358 gcc_jit_lvalue **frame =
358 (CALL1I (comp-mvar-ref, mvar) || SPEED < 2) 359 /* Disable floating frame for functions with non local jumps.
360 This is probably overkill cause we could do it just for blocks
361 dominated by push-handler. */
362 comp.func_has_non_local
363 || (CALL1I (comp-mvar-ref, mvar) || SPEED < 2)
359 ? comp.frame : comp.f_frame; 364 ? comp.frame : comp.f_frame;
360 return frame[slot_n]; 365 return frame[slot_n];
361} 366}
@@ -2824,6 +2829,8 @@ compile_function (Lisp_Object func)
2824 comp.func = xmint_pointer (Fgethash (CALL1I (comp-func-name, func), 2829 comp.func = xmint_pointer (Fgethash (CALL1I (comp-func-name, func),
2825 comp.exported_funcs_h, Qnil)); 2830 comp.exported_funcs_h, Qnil));
2826 2831
2832 comp.func_has_non_local = !NILP (CALL1I (comp-func-has-non-local, func));
2833
2827 gcc_jit_lvalue *frame_array = 2834 gcc_jit_lvalue *frame_array =
2828 gcc_jit_function_new_local ( 2835 gcc_jit_function_new_local (
2829 comp.func, 2836 comp.func,