[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 330/437: Resync with new patch to make functions receive
From: |
Andy Wingo |
Subject: |
[Guile-commits] 330/437: Resync with new patch to make functions receive a const argument |
Date: |
Mon, 2 Jul 2018 05:14:48 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit 85ab988cd14233f431a9065633c0de81bca65250
Author: pcpa <address@hidden>
Date: Sat Nov 1 22:32:23 2014 -0200
Resync with new patch to make functions receive a const argument
---
include/lightning.h | 8 ++------
include/lightning/jit_private.h | 10 +++++++---
lib/jit_disasm.c | 2 +-
lib/jit_memory.c | 4 ++--
lib/jit_note.c | 2 +-
lib/lightning.c | 8 ++++----
6 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/include/lightning.h b/include/lightning.h
index ad48af8..461661a 100644
--- a/include/lightning.h
+++ b/include/lightning.h
@@ -120,7 +120,6 @@ typedef jit_uint64_t jit_uword_t;
typedef float jit_float32_t;
typedef double jit_float64_t;
typedef void* jit_pointer_t;
-typedef const void* jit_const_pointer_t;
typedef jit_int32_t jit_bool_t;
typedef jit_int32_t jit_gpr_t;
typedef jit_int32_t jit_fpr_t;
@@ -175,7 +174,6 @@ typedef struct jit_node jit_node_t;
typedef struct jit_state jit_state_t;
typedef enum {
-#define jit_data(u,v,w) _jit_data(_jit,u,v,w)
jit_code_data,
#define jit_live(u) jit_new_node_w(jit_code_live, u)
#define jit_align(u) jit_new_node_w(jit_code_align, u)
@@ -846,7 +844,7 @@ typedef void (*jit_free_func_ptr) (void*);
/*
* Prototypes
*/
-extern void init_jit(char*);
+extern void init_jit(const char*);
extern void finish_jit(void);
extern jit_state_t *jit_new_state(void);
@@ -857,9 +855,7 @@ extern void _jit_destroy_state(jit_state_t*);
#define jit_address(node) _jit_address(_jit, node)
extern jit_pointer_t _jit_address(jit_state_t*, jit_node_t*);
-extern jit_node_t *_jit_data(jit_state_t*, jit_const_pointer_t,
- jit_word_t, jit_int32_t);
-extern jit_node_t *_jit_name(jit_state_t*, char*);
+extern jit_node_t *_jit_name(jit_state_t*, const char*);
extern jit_node_t *_jit_note(jit_state_t*, const char*, int);
extern jit_node_t *_jit_label(jit_state_t*);
extern jit_node_t *_jit_forward(jit_state_t*);
diff --git a/include/lightning/jit_private.h b/include/lightning/jit_private.h
index a92a69a..2a48fec 100644
--- a/include/lightning/jit_private.h
+++ b/include/lightning/jit_private.h
@@ -127,6 +127,10 @@ typedef jit_uint32_t jit_regset_t;
typedef jit_uint64_t jit_regset_t;
#endif
+#define jit_data(u,v,w) _jit_data(_jit,u,v,w)
+extern jit_node_t *_jit_data(jit_state_t*, const void*,
+ jit_word_t, jit_int32_t);
+
#define jit_size(vector) (sizeof(vector) / sizeof((vector)[0]))
#define jit_reg_free_p(regno) \
@@ -601,7 +605,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(char*);
+extern void jit_init_debug(const char*);
extern void jit_finish_debug(void);
extern void jit_init_note(void);
@@ -611,8 +615,8 @@ extern void _jit_set_note(jit_state_t*, jit_note_t*, char*,
int, jit_int32_t);
#define jit_annotate() _jit_annotate(_jit)
extern void _jit_annotate(jit_state_t*);
-extern jit_pointer_t jit_memcpy(jit_pointer_t,jit_const_pointer_t,jit_word_t);
-extern jit_pointer_t jit_memmove(jit_pointer_t,jit_const_pointer_t,jit_word_t);
+extern jit_pointer_t jit_memcpy(jit_pointer_t,const void*,jit_word_t);
+extern jit_pointer_t jit_memmove(jit_pointer_t,const void*,jit_word_t);
extern void jit_alloc(jit_pointer_t*, jit_word_t);
extern void jit_realloc(jit_pointer_t*, jit_word_t, jit_word_t);
void jit_free(jit_pointer_t*);
diff --git a/lib/jit_disasm.c b/lib/jit_disasm.c
index 31480af..6f9227d 100644
--- a/lib/jit_disasm.c
+++ b/lib/jit_disasm.c
@@ -57,7 +57,7 @@ static jit_state_t *disasm_jit;
* Implementation
*/
void
-jit_init_debug(char *progname)
+jit_init_debug(const char *progname)
{
#if DISASSEMBLER
bfd_init();
diff --git a/lib/jit_memory.c b/lib/jit_memory.c
index 491a42f..bcf3da0 100644
--- a/lib/jit_memory.c
+++ b/lib/jit_memory.c
@@ -39,7 +39,7 @@ static jit_free_func_ptr jit_free_ptr = jit_default_free_func;
* Implementation
*/
jit_pointer_t
-jit_memcpy(jit_pointer_t dst, jit_const_pointer_t src, jit_word_t size)
+jit_memcpy(jit_pointer_t dst, const void * src, jit_word_t size)
{
if (size)
return (memcpy(dst, src, size));
@@ -47,7 +47,7 @@ jit_memcpy(jit_pointer_t dst, jit_const_pointer_t src,
jit_word_t size)
}
jit_pointer_t
-jit_memmove(jit_pointer_t dst, jit_const_pointer_t src , jit_word_t size)
+jit_memmove(jit_pointer_t dst, const void *src , jit_word_t size)
{
if (size)
return (memmove(dst, src, size));
diff --git a/lib/jit_note.c b/lib/jit_note.c
index b8a18ce..160551e 100644
--- a/lib/jit_note.c
+++ b/lib/jit_note.c
@@ -47,7 +47,7 @@ jit_finish_note(void)
}
jit_node_t *
-_jit_name(jit_state_t *_jit, char *name)
+_jit_name(jit_state_t *_jit, const char *name)
{
jit_node_t *node;
diff --git a/lib/lightning.c b/lib/lightning.c
index 883d652..8f892da 100644
--- a/lib/lightning.c
+++ b/lib/lightning.c
@@ -44,7 +44,7 @@
/*
* Prototypes
*/
-static jit_word_t hash_data(jit_const_pointer_t, jit_word_t);
+static jit_word_t hash_data(const void*, jit_word_t);
#define new_pool() _new_pool(_jit)
static void _new_pool(jit_state_t*);
@@ -178,7 +178,7 @@ _patch_register(jit_state_t *jit, jit_node_t *node,
jit_node_t *link,
* Implementation
*/
void
-init_jit(char *progname)
+init_jit(const char *progname)
{
jit_get_cpu();
jit_init_debug(progname);
@@ -536,7 +536,7 @@ _jit_load(jit_state_t *_jit, jit_int32_t reg)
}
static jit_word_t
-hash_data(jit_const_pointer_t data, jit_word_t length)
+hash_data(const void *data, jit_word_t length)
{
const jit_uint8_t *ptr;
jit_word_t i, key;
@@ -558,7 +558,7 @@ _jit_address(jit_state_t *_jit, jit_node_t *node)
}
jit_node_t *
-_jit_data(jit_state_t *_jit, jit_const_pointer_t data,
+_jit_data(jit_state_t *_jit, const void *data,
jit_word_t length, jit_int32_t align)
{
jit_word_t key;
- [Guile-commits] 357/437: Make more readable always true test, (continued)
- [Guile-commits] 357/437: Make more readable always true test, Andy Wingo, 2018/07/02
- [Guile-commits] 311/437: Implement jit_frame and jit_tramp interfaces, Andy Wingo, 2018/07/02
- [Guile-commits] 312/437: Use jit_code_last_code as symbolic name of last enum, Andy Wingo, 2018/07/02
- [Guile-commits] 293/437: Do not have assertions with a long type test, Andy Wingo, 2018/07/02
- [Guile-commits] 384/437: ia64: Do not use a dangling pointer for double to integer copy, Andy Wingo, 2018/07/02
- [Guile-commits] 203/437: Make it simpler to add support for more than 64 registers., Andy Wingo, 2018/07/02
- [Guile-commits] 415/437: Build and pass all test cases on Alpha Linux, Andy Wingo, 2018/07/02
- [Guile-commits] 142/437: Make current test cases pass in armv7l., Andy Wingo, 2018/07/02
- [Guile-commits] 188/437: Add framework for sparc port., Andy Wingo, 2018/07/02
- [Guile-commits] 227/437: Cosmetic removal of unused macros., Andy Wingo, 2018/07/02
- [Guile-commits] 330/437: Resync with new patch to make functions receive a const argument,
Andy Wingo <=
- [Guile-commits] 185/437: Store all annotation information in the read only data buffer., Andy Wingo, 2018/07/02
- [Guile-commits] 170/437: Test and correct test cases in all current backends., Andy Wingo, 2018/07/02
- [Guile-commits] 368/437: Implement jit_allocar for dynamic stack allocation, Andy Wingo, 2018/07/02
- [Guile-commits] 355/437: Update documentation on jit_frame and jit_tramp, Andy Wingo, 2018/07/02
- [Guile-commits] 323/437: misc: Make jit_note and related functions take a const argument, Andy Wingo, 2018/07/02
- [Guile-commits] 429/437: Remove disassembler support from lightning, Andy Wingo, 2018/07/02
- [Guile-commits] 346/437: PPC: Build and pass all tests in powerpcle, Andy Wingo, 2018/07/02
- [Guile-commits] 180/437: Correct C sequence point problem., Andy Wingo, 2018/07/02
- [Guile-commits] 370/437: Add missing ellipsis in allocar.tst, Andy Wingo, 2018/07/02
- [Guile-commits] 337/437: Remove a wrong optimization of callee save registers, Andy Wingo, 2018/07/02