aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrea Corallo2019-06-12 03:36:46 +0200
committerAndrea Corallo2020-01-01 11:33:41 +0100
commit203b6ce9fa148ca05fc2688a8a1a607dc922acd7 (patch)
tree539c2c7ad432acf756e86215725d7535a75499f4 /src
parentedcadf5c440a95c0c6a564d89eb9beac64e229fc (diff)
downloademacs-203b6ce9fa148ca05fc2688a8a1a607dc922acd7.tar.gz
emacs-203b6ce9fa148ca05fc2688a8a1a607dc922acd7.zip
improve comp_lisp_obj_as_ptr_from_ptr generated var naming
Diffstat (limited to 'src')
-rw-r--r--src/comp.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/comp.c b/src/comp.c
index 5fd11e7a7ee..a14056e4c58 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -379,10 +379,18 @@ comp_make_fixnum (gcc_jit_block *block, gcc_jit_rvalue *obj)
379static gcc_jit_rvalue * 379static gcc_jit_rvalue *
380comp_lisp_obj_as_ptr_from_ptr (basic_block_t *bblock, void *p) 380comp_lisp_obj_as_ptr_from_ptr (basic_block_t *bblock, void *p)
381{ 381{
382 static unsigned i;
383 char ptr_var_name[40];
384
385 int res = snprintf (ptr_var_name, sizeof (ptr_var_name),
386 "lisp_obj_from_ptr_%u", i++);
387 if (res >= sizeof (ptr_var_name))
388 error ("Internal error, truncating temporary variable");
389
382 gcc_jit_lvalue *lisp_obj = gcc_jit_function_new_local (comp.func, 390 gcc_jit_lvalue *lisp_obj = gcc_jit_function_new_local (comp.func,
383 NULL, 391 NULL,
384 comp.lisp_obj_type, 392 comp.lisp_obj_type,
385 "lisp_obj_from_ptr"); 393 ptr_var_name);
386 gcc_jit_lvalue *lisp_obj_as_ptr = 394 gcc_jit_lvalue *lisp_obj_as_ptr =
387 gcc_jit_lvalue_access_field (lisp_obj, 395 gcc_jit_lvalue_access_field (lisp_obj,
388 NULL, 396 NULL,