diff options
| author | Andrea Corallo | 2019-05-24 17:54:43 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2020-01-01 11:33:39 +0100 |
| commit | 15b4f9d8786d4ecc9eab81d114f09448de2b9ce9 (patch) | |
| tree | c0ea9cf45f0eb2c866564e74e590896837ed6f07 /src/comp.c | |
| parent | 68472f45a6a441b1436b5949c0384dd57111077c (diff) | |
| download | emacs-15b4f9d8786d4ecc9eab81d114f09448de2b9ce9.tar.gz emacs-15b4f9d8786d4ecc9eab81d114f09448de2b9ce9.zip | |
precompute nil
Diffstat (limited to 'src/comp.c')
| -rw-r--r-- | src/comp.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/comp.c b/src/comp.c index 8cb7cbf4ad6..9b4dea98d7f 100644 --- a/src/comp.c +++ b/src/comp.c | |||
| @@ -49,6 +49,8 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 49 | stack++; \ | 49 | stack++; \ |
| 50 | } while (0) | 50 | } while (0) |
| 51 | 51 | ||
| 52 | #define POP0 | ||
| 53 | |||
| 52 | #define POP1 \ | 54 | #define POP1 \ |
| 53 | do { \ | 55 | do { \ |
| 54 | stack--; \ | 56 | stack--; \ |
| @@ -120,6 +122,7 @@ typedef struct { | |||
| 120 | gcc_jit_type *void_ptr_type; | 122 | gcc_jit_type *void_ptr_type; |
| 121 | gcc_jit_type *ptrdiff_type; | 123 | gcc_jit_type *ptrdiff_type; |
| 122 | gcc_jit_function *func; /* Current function being compiled */ | 124 | gcc_jit_function *func; /* Current function being compiled */ |
| 125 | gcc_jit_rvalue *nil; | ||
| 123 | gcc_jit_rvalue *scratch; /* Will point to scratch_call_area */ | 126 | gcc_jit_rvalue *scratch; /* Will point to scratch_call_area */ |
| 124 | gcc_jit_block *block; /* Current basic block */ | 127 | gcc_jit_block *block; /* Current basic block */ |
| 125 | Lisp_Object func_hash; /* f_name -> gcc_func */ | 128 | Lisp_Object func_hash; /* f_name -> gcc_func */ |
| @@ -454,9 +457,7 @@ compile_f (const char *f_name, ptrdiff_t bytestr_length, | |||
| 454 | args[0] = gcc_jit_context_new_rvalue_from_ptr(comp.ctxt, | 457 | args[0] = gcc_jit_context_new_rvalue_from_ptr(comp.ctxt, |
| 455 | comp.lisp_obj_type, | 458 | comp.lisp_obj_type, |
| 456 | vectorp[op]); | 459 | vectorp[op]); |
| 457 | args[2] = gcc_jit_context_new_rvalue_from_ptr(comp.ctxt, | 460 | args[2] = comp.nil; |
| 458 | comp.lisp_obj_type, | ||
| 459 | Qnil); | ||
| 460 | args[3] = gcc_jit_context_new_rvalue_from_int (comp.ctxt, | 461 | args[3] = gcc_jit_context_new_rvalue_from_int (comp.ctxt, |
| 461 | comp.int_type, | 462 | comp.int_type, |
| 462 | SET_INTERNAL_SET); | 463 | SET_INTERNAL_SET); |
| @@ -674,7 +675,7 @@ compile_f (const char *f_name, ptrdiff_t bytestr_length, | |||
| 674 | CASE_CALL_NARGS (following_char, 0); | 675 | CASE_CALL_NARGS (following_char, 0); |
| 675 | 676 | ||
| 676 | case Bpreceding_char: | 677 | case Bpreceding_char: |
| 677 | res = jit_emit_call (Fprevious_char, comp.lisp_obj_type, 0, args); | 678 | res = jit_emit_call ("Fprevious_char", comp.lisp_obj_type, 0, args); |
| 678 | PUSH (gcc_jit_lvalue_as_rvalue (res)); | 679 | PUSH (gcc_jit_lvalue_as_rvalue (res)); |
| 679 | break; | 680 | break; |
| 680 | 681 | ||
| @@ -1089,6 +1090,10 @@ init_comp (void) | |||
| 1089 | 1090 | ||
| 1090 | comp.ptrdiff_type = gcc_jit_context_get_type(comp.ctxt, ptrdiff_t_gcc); | 1091 | comp.ptrdiff_type = gcc_jit_context_get_type(comp.ctxt, ptrdiff_t_gcc); |
| 1091 | 1092 | ||
| 1093 | comp.nil = gcc_jit_context_new_rvalue_from_ptr(comp.ctxt, | ||
| 1094 | comp.lisp_obj_type, | ||
| 1095 | Qnil); | ||
| 1096 | |||
| 1092 | comp.scratch = | 1097 | comp.scratch = |
| 1093 | gcc_jit_lvalue_get_address( | 1098 | gcc_jit_lvalue_get_address( |
| 1094 | gcc_jit_context_new_global (comp.ctxt, NULL, | 1099 | gcc_jit_context_new_global (comp.ctxt, NULL, |