[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 289/437: Remove the global but not advertised jit_progna
From: |
Andy Wingo |
Subject: |
[Guile-commits] 289/437: Remove the global but not advertised jit_progname variable |
Date: |
Mon, 2 Jul 2018 05:14:38 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit a8c180a926638ba6a4967b2a60dbea994c1f15cc
Author: pcpa <address@hidden>
Date: Sun Jul 27 16:48:52 2014 -0300
Remove the global but not advertised jit_progname variable
* include/lightning/jit_private.h, lib/jit_disasm.c,
lib/lightning.c: Remove the global jit_progname variable.
It was being only used in jit_init_debug, that is called
from init_jit, so, just pass an argument.
---
ChangeLog | 7 +++++++
include/lightning/jit_private.h | 3 +--
lib/jit_disasm.c | 4 ++--
lib/lightning.c | 4 +---
4 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index af99cd7..ea59d29 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2014-07-27 Paulo Andrade <address@hidden>
+ * include/lightning/jit_private.h, lib/jit_disasm.c,
+ lib/lightning.c: Remove the global jit_progname variable.
+ It was being only used in jit_init_debug, that is called
+ from init_jit, so, just pass an argument.
+
+2014-07-27 Paulo Andrade <address@hidden>
+
* doc/body.texi: Add note that jit_set_memory_functions
should be called before init_jit, because init_jit
itself may call the memory wrappers.
diff --git a/include/lightning/jit_private.h b/include/lightning/jit_private.h
index c208456..8de2c8b 100644
--- a/include/lightning/jit_private.h
+++ b/include/lightning/jit_private.h
@@ -582,7 +582,7 @@ _emit_ldxi_d(jit_state_t*, jit_int32_t, jit_int32_t,
jit_word_t);
extern void
_emit_stxi_d(jit_state_t*, jit_word_t, jit_int32_t, jit_int32_t);
-extern void jit_init_debug(void);
+extern void jit_init_debug(char*);
extern void jit_finish_debug(void);
extern void jit_init_note(void);
@@ -620,6 +620,5 @@ jit_get_max_instr(void);
* Externs
*/
extern jit_register_t _rvs[];
-extern const char *jit_progname;
#endif /* _jit_private_h */
diff --git a/lib/jit_disasm.c b/lib/jit_disasm.c
index a54bc25..a56e8b6 100644
--- a/lib/jit_disasm.c
+++ b/lib/jit_disasm.c
@@ -57,12 +57,12 @@ static jit_state_t *disasm_jit;
* Implementation
*/
void
-jit_init_debug(void)
+jit_init_debug(char *progname)
{
#if DISASSEMBLER
bfd_init();
- disasm_bfd = bfd_openr(jit_progname, NULL);
+ disasm_bfd = bfd_openr(progname, NULL);
assert(disasm_bfd);
bfd_check_format(disasm_bfd, bfd_object);
bfd_check_format(disasm_bfd, bfd_archive);
diff --git a/lib/lightning.c b/lib/lightning.c
index fa77430..9a6d16f 100644
--- a/lib/lightning.c
+++ b/lib/lightning.c
@@ -170,7 +170,6 @@ _patch_register(jit_state_t *jit, jit_node_t *node,
jit_node_t *link,
/*
* Initialization
*/
-const char *jit_progname;
#if !defined(__sgi)
#define mmap_fd -1
#endif
@@ -181,9 +180,8 @@ const char *jit_progname;
void
init_jit(char *progname)
{
- jit_progname = progname;
jit_get_cpu();
- jit_init_debug();
+ jit_init_debug(progname);
jit_init_size();
}
- [Guile-commits] 380/437: ppc: Add initial jit_va_ calls to ppc, (continued)
- [Guile-commits] 380/437: ppc: Add initial jit_va_ calls to ppc, Andy Wingo, 2018/07/02
- [Guile-commits] 239/437: Avoid possible problem if built with gcc 4.8 or newer., Andy Wingo, 2018/07/02
- [Guile-commits] 347/437: S390: Add support for 32 bit., Andy Wingo, 2018/07/02
- [Guile-commits] 428/437: Further lightning integration work, Andy Wingo, 2018/07/02
- [Guile-commits] 420/437: Strip "get-jit-size" feature from lightning., Andy Wingo, 2018/07/02
- [Guile-commits] 434/437: Remove unused AM_CONDITIONAL statements from lightning configure, Andy Wingo, 2018/07/02
- [Guile-commits] 390/437: Correct make check for systems without gcc., Andy Wingo, 2018/07/02
- [Guile-commits] 388/437: sparc: Add initial jit_va_ calls to sparc, Andy Wingo, 2018/07/02
- [Guile-commits] 319/437: Properly handle jit_tramp and function descriptors, Andy Wingo, 2018/07/02
- [Guile-commits] 414/437: Always set t12 to address of called function, Andy Wingo, 2018/07/02
- [Guile-commits] 289/437: Remove the global but not advertised jit_progname variable,
Andy Wingo <=
- [Guile-commits] 334/437: ARM: Correct several inconsistencies with ldrd and strd, Andy Wingo, 2018/07/02
- [Guile-commits] 210/437: Correct all ldst test cases., Andy Wingo, 2018/07/02
- [Guile-commits] 252/437: GNU lightning 2.0.1 release, Andy Wingo, 2018/07/02
- [Guile-commits] 327/437: Force creation of the m4 directory on a clean checkout, Andy Wingo, 2018/07/02
- [Guile-commits] 314/437: Add back files missed when reapplying patches, Andy Wingo, 2018/07/02
- [Guile-commits] 354/437: Implement the jit_arg_register_p predicate., Andy Wingo, 2018/07/02
- [Guile-commits] 381/437: Remove wrong comment after cut and paste, Andy Wingo, 2018/07/02
- [Guile-commits] 209/437: Correct float division and LX with stop code generation., Andy Wingo, 2018/07/02
- [Guile-commits] 280/437: Implement the new jit_set_code interface., Andy Wingo, 2018/07/02
- [Guile-commits] 284/437: ARM: Do not emit a nop stack adjust instruction., Andy Wingo, 2018/07/02