diff options
| author | Andrea Corallo | 2019-08-15 21:19:24 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2020-01-01 11:34:00 +0100 |
| commit | b72d1c5b157214bc8feb4e6364ba624f9feae271 (patch) | |
| tree | 4100aac623610ae4f5542590dfebdd4c5ef3c431 /src | |
| parent | 4ed657604d669b4ba05a9280734c5f006939cdab (diff) | |
| download | emacs-b72d1c5b157214bc8feb4e6364ba624f9feae271.tar.gz emacs-b72d1c5b157214bc8feb4e6364ba624f9feae271.zip | |
remove duplicate code
Diffstat (limited to 'src')
| -rw-r--r-- | src/comp.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/comp.c b/src/comp.c index 6aa86e37a1c..4838160d40f 100644 --- a/src/comp.c +++ b/src/comp.c | |||
| @@ -339,7 +339,7 @@ emit_call (const char *f_name, gcc_jit_type *ret_type, unsigned nargs, | |||
| 339 | } | 339 | } |
| 340 | 340 | ||
| 341 | static gcc_jit_rvalue * | 341 | static gcc_jit_rvalue * |
| 342 | emit_call_n_ref (const char *f_name, unsigned nargs, | 342 | emit_call_ref (const char *f_name, unsigned nargs, |
| 343 | gcc_jit_lvalue *base_arg) | 343 | gcc_jit_lvalue *base_arg) |
| 344 | { | 344 | { |
| 345 | gcc_jit_rvalue *args[] = | 345 | gcc_jit_rvalue *args[] = |
| @@ -1092,13 +1092,7 @@ emit_limple_call_ref (Lisp_Object args) | |||
| 1092 | char *callee = (char *) SDATA (SYMBOL_NAME (FIRST (args))); | 1092 | char *callee = (char *) SDATA (SYMBOL_NAME (FIRST (args))); |
| 1093 | EMACS_UINT nargs = XFIXNUM (SECOND (args)); | 1093 | EMACS_UINT nargs = XFIXNUM (SECOND (args)); |
| 1094 | EMACS_UINT base_ptr = XFIXNUM (THIRD (args)); | 1094 | EMACS_UINT base_ptr = XFIXNUM (THIRD (args)); |
| 1095 | gcc_jit_rvalue *gcc_args[2] = | 1095 | return emit_call_ref (callee, nargs, comp.frame[base_ptr]); |
| 1096 | { gcc_jit_context_new_rvalue_from_int (comp.ctxt, | ||
| 1097 | comp.ptrdiff_type, | ||
| 1098 | nargs), | ||
| 1099 | gcc_jit_lvalue_get_address (comp.frame[base_ptr], NULL) }; | ||
| 1100 | |||
| 1101 | return emit_call (callee, comp.lisp_obj_type, 2, gcc_args); | ||
| 1102 | } | 1096 | } |
| 1103 | 1097 | ||
| 1104 | /* Register an handler for a non local exit. */ | 1098 | /* Register an handler for a non local exit. */ |
| @@ -2146,7 +2140,7 @@ define_negate (void) | |||
| 2146 | emit_make_fixnum (inline_res)); | 2140 | emit_make_fixnum (inline_res)); |
| 2147 | 2141 | ||
| 2148 | comp.block = fcall_block; | 2142 | comp.block = fcall_block; |
| 2149 | gcc_jit_rvalue *call_res = emit_call_n_ref ("Fminus", 1, n); | 2143 | gcc_jit_rvalue *call_res = emit_call_ref ("Fminus", 1, n); |
| 2150 | gcc_jit_block_end_with_return (fcall_block, | 2144 | gcc_jit_block_end_with_return (fcall_block, |
| 2151 | NULL, | 2145 | NULL, |
| 2152 | call_res); | 2146 | call_res); |