diff options
Diffstat (limited to 'src/comp.c')
| -rw-r--r-- | src/comp.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/comp.c b/src/comp.c index 545d13b6bfd..b2b4fb6f222 100644 --- a/src/comp.c +++ b/src/comp.c @@ -827,10 +827,10 @@ freloc_check_fill (void) eassert (!NILP (Vcomp_subr_list)); - if (ARRAYELTS (helper_link_table) > F_RELOC_MAX_SIZE) + if (countof (helper_link_table) > F_RELOC_MAX_SIZE) goto overflow; memcpy (freloc.link_table, helper_link_table, sizeof (helper_link_table)); - freloc.size = ARRAYELTS (helper_link_table); + freloc.size = countof (helper_link_table); Lisp_Object subr_l = Vcomp_subr_list; FOR_EACH_TAIL (subr_l) @@ -1510,7 +1510,7 @@ emit_slow_eq (gcc_jit_rvalue *x, gcc_jit_rvalue *y) return emit_call (intern_c_string ("slow_eq"), comp.bool_type, - ARRAYELTS (args), + countof (args), args, false); } @@ -2154,7 +2154,7 @@ emit_setjmp (gcc_jit_rvalue *buf) gcc_jit_context_new_function (comp.ctxt, NULL, GCC_JIT_FUNCTION_IMPORTED, comp.int_type, STR (SETJMP_NAME), - ARRAYELTS (params), params, + countof (params), params, false); return gcc_jit_context_new_call (comp.ctxt, NULL, f, 1, args); @@ -2182,7 +2182,7 @@ emit_setjmp (gcc_jit_rvalue *buf) gcc_jit_context_new_function (comp.ctxt, NULL, GCC_JIT_FUNCTION_IMPORTED, comp.int_type, STR (SETJMP_NAME), - ARRAYELTS (params), params, + countof (params), params, false); return gcc_jit_context_new_call (comp.ctxt, NULL, f, 2, args); @@ -2231,7 +2231,7 @@ emit_limple_insn (Lisp_Object insn) ptrdiff_t i = 0; FOR_EACH_TAIL (p) { - if (i == ARRAYELTS (arg)) + if (i == countof (arg)) break; arg[i++] = XCAR (p); } @@ -2732,7 +2732,7 @@ emit_static_object (const char *name, Lisp_Object obj) gcc_jit_context_new_struct_type (comp.ctxt, NULL, format_string ("%s_struct", name), - ARRAYELTS (fields), fields)); + countof (fields), fields)); gcc_jit_lvalue *data_struct = gcc_jit_context_new_global (comp.ctxt, @@ -2807,7 +2807,7 @@ emit_static_object (const char *name, Lisp_Object obj) gcc_jit_block_add_eval (block, NULL, gcc_jit_context_new_call (comp.ctxt, NULL, comp.memcpy, - ARRAYELTS (args), + countof (args), args)); gcc_jit_block_add_assignment (block, NULL, ptrvar, gcc_jit_lvalue_get_address ( @@ -2975,7 +2975,7 @@ emit_ctxt_code (void) Fcons (Qnative_comp_debug, make_fixnum (comp.debug)), Fcons (Qgccjit, Fcomp_libgccjit_version ()) }; - emit_static_object (TEXT_OPTIM_QLY_SYM, Flist (ARRAYELTS (opt_qly), opt_qly)); + emit_static_object (TEXT_OPTIM_QLY_SYM, Flist (countof (opt_qly), opt_qly)); emit_static_object (TEXT_FDOC_SYM, CALLNI (comp-ctxt-function-docs, Vcomp_ctxt)); @@ -3113,7 +3113,7 @@ define_lisp_cons (void) gcc_jit_context_new_union_type (comp.ctxt, NULL, "comp_cdr_u", - ARRAYELTS (cdr_u_fields), + countof (cdr_u_fields), cdr_u_fields); comp.lisp_cons_u_s_car = gcc_jit_context_new_field (comp.ctxt, @@ -3132,7 +3132,7 @@ define_lisp_cons (void) gcc_jit_context_new_struct_type (comp.ctxt, NULL, "comp_cons_s", - ARRAYELTS (cons_s_fields), + countof (cons_s_fields), cons_s_fields); comp.lisp_cons_u_s = gcc_jit_context_new_field (comp.ctxt, @@ -3155,7 +3155,7 @@ define_lisp_cons (void) gcc_jit_context_new_union_type (comp.ctxt, NULL, "comp_cons_u", - ARRAYELTS (cons_u_fields), + countof (cons_u_fields), cons_u_fields); comp.lisp_cons_u = @@ -3234,7 +3234,7 @@ define_memcpy (void) comp.memcpy = gcc_jit_context_new_function (comp.ctxt, NULL, GCC_JIT_FUNCTION_IMPORTED, comp.void_ptr_type, "memcpy", - ARRAYELTS (params), params, false); + countof (params), params, false); } /* struct handler definition */ @@ -3294,7 +3294,7 @@ define_handler_struct (void) "pad2") }; gcc_jit_struct_set_fields (comp.handler_s, NULL, - ARRAYELTS (fields), + countof (fields), fields); } @@ -3338,7 +3338,7 @@ define_thread_state_struct (void) gcc_jit_context_new_struct_type (comp.ctxt, NULL, "comp_thread_state", - ARRAYELTS (fields), + countof (fields), fields); comp.thread_state_ptr_type = gcc_jit_type_get_pointer (gcc_jit_struct_as_type (comp.thread_state_s)); @@ -4141,7 +4141,7 @@ declare_lex_function (Lisp_Object func) GCC_JIT_FUNCTION_EXPORTED, comp.lisp_obj_type, SSDATA (c_name), - ARRAYELTS (params), params, 0); + countof (params), params, 0); } SAFE_FREE (); return res; @@ -4471,7 +4471,7 @@ DEFUN ("comp--install-trampoline", Fcomp__install_trampoline, subr_name); Lisp_Object subr_l = Vcomp_subr_list; - ptrdiff_t i = ARRAYELTS (helper_link_table); + ptrdiff_t i = countof (helper_link_table); FOR_EACH_TAIL (subr_l) { Lisp_Object subr = XCAR (subr_l); |
