[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 249/437: Make jit_get_note a public interface.
From: |
Andy Wingo |
Subject: |
[Guile-commits] 249/437: Make jit_get_note a public interface. |
Date: |
Mon, 2 Jul 2018 05:14:30 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit 948315f45ebc6c378354d26738b376e87a1cb343
Author: pcpa <address@hidden>
Date: Fri Sep 13 18:57:32 2013 -0300
Make jit_get_note a public interface.
* include/lightning.h, include/lightning/jit_private.h,
lib/jit_note.c: Change the code argument of jit_get_note
to a jit_pointer_t and make jit_get_note a public interface.
It was intended so since start, as a way to map an offset
in the code to a function name, file name and line number
mapping.
---
ChangeLog | 9 +++++++++
include/lightning.h | 3 +++
include/lightning/jit_private.h | 2 --
lib/jit_note.c | 9 +++++----
4 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8119011..ec642cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-10-13 Paulo Andrade <address@hidden>
+
+ * include/lightning.h, include/lightning/jit_private.h,
+ lib/jit_note.c: Change the code argument of jit_get_note
+ to a jit_pointer_t and make jit_get_note a public interface.
+ It was intended so since start, as a way to map an offset
+ in the code to a function name, file name and line number
+ mapping.
+
2013-10-10 Paulo Andrade <address@hidden>
* doc/body.texi: Correct reversed arguments in example of
diff --git a/include/lightning.h b/include/lightning.h
index f1fb1f9..3466c4a 100644
--- a/include/lightning.h
+++ b/include/lightning.h
@@ -954,6 +954,9 @@ extern jit_node_t *_jit_new_node_pwd(jit_state_t*,
jit_code_t,
#define jit_callee_save_p(u) _jit_callee_save_p(_jit,u)
extern jit_bool_t _jit_callee_save_p(jit_state_t*, jit_int32_t);
+#define jit_get_note(n,u,v,w) _jit_get_note(_jit,n,u,v,w)
+extern jit_bool_t _jit_get_note(jit_state_t*,jit_pointer_t,char**,char**,int*);
+
#define jit_disassemble() _jit_disassemble(_jit)
extern void _jit_disassemble(jit_state_t*);
diff --git a/include/lightning/jit_private.h b/include/lightning/jit_private.h
index 90d340a..f260da2 100644
--- a/include/lightning/jit_private.h
+++ b/include/lightning/jit_private.h
@@ -550,8 +550,6 @@ extern void jit_init_note(void);
extern void jit_finish_note(void);
#define jit_set_note(n,u,v,w) _jit_set_note(_jit, n, u, v, w)
extern void _jit_set_note(jit_state_t*, jit_note_t*, char*, int, jit_int32_t);
-#define jit_get_note(n,u,v,w) _jit_get_note(_jit, n, u, v, w)
-extern jit_bool_t _jit_get_note(jit_state_t*,jit_uint8_t*,char**,char**,int*);
#define jit_annotate() _jit_annotate(_jit)
extern void _jit_annotate(jit_state_t*);
diff --git a/lib/jit_note.c b/lib/jit_note.c
index fdcc23d..474a8db 100644
--- a/lib/jit_note.c
+++ b/lib/jit_note.c
@@ -213,7 +213,7 @@ _jit_set_note(jit_state_t *_jit, jit_note_t *note,
}
jit_bool_t
-_jit_get_note(jit_state_t *_jit, jit_uint8_t *code,
+_jit_get_note(jit_state_t *_jit, jit_pointer_t code,
char **name, char **file, jit_int32_t *lineno)
{
jit_note_t *note;
@@ -221,12 +221,13 @@ _jit_get_note(jit_state_t *_jit, jit_uint8_t *code,
jit_int32_t index;
jit_int32_t offset;
- if ((index = note_search_index(code)) >= _jit->note.length)
+ if ((index = note_search_index((jit_uint8_t *)code)) >= _jit->note.length)
return (0);
note = _jit->note.ptr + index;
- if (code < note->code || code >= note->code + note->size)
+ if ((jit_uint8_t *)code < note->code ||
+ (jit_uint8_t *)code >= note->code + note->size)
return (0);
- offset = code - note->code;
+ offset = (jit_uint8_t *)code - note->code;
if ((index = line_search_index(note, offset)) >= note->length)
return (0);
if (index == 0 && offset < note->lines[0].offsets[0])
- [Guile-commits] 129/437: Remove previous macro files as they are no longer used., (continued)
- [Guile-commits] 129/437: Remove previous macro files as they are no longer used., Andy Wingo, 2018/07/02
- [Guile-commits] 09/437: add autotools-generated files, Andy Wingo, 2018/07/02
- [Guile-commits] 69/437: implement long mul/div/mod for x86-64, Andy Wingo, 2018/07/02
- [Guile-commits] 162/437: Correct regressions with --with-float={soft, softfp} in the arm backend, Andy Wingo, 2018/07/02
- [Guile-commits] 377/437: aarch64: Add initial jit_va_ calls to aarch64, Andy Wingo, 2018/07/02
- [Guile-commits] 298/437: ARM: Correct wrong table of instruction sizes in software float, Andy Wingo, 2018/07/02
- [Guile-commits] 99/437: always set and replace lightning_frag, Andy Wingo, 2018/07/02
- [Guile-commits] 336/437: Correct bogus git entry, Andy Wingo, 2018/07/02
- [Guile-commits] 282/437: Document the lightning customization functions., Andy Wingo, 2018/07/02
- [Guile-commits] 290/437: Do not pass null for free, memcpy and memmove, Andy Wingo, 2018/07/02
- [Guile-commits] 249/437: Make jit_get_note a public interface.,
Andy Wingo <=
- [Guile-commits] 299/437: ALPHA: Correct class of argument float registers, Andy Wingo, 2018/07/02
- [Guile-commits] 426/437: Remove empty lightning m4 directory, Andy Wingo, 2018/07/02
- [Guile-commits] 379/437: s390: Add initial jit_va_ calls to s390, Andy Wingo, 2018/07/02
- [Guile-commits] 431/437: Always enable assertions in embedded lightning, Andy Wingo, 2018/07/02
- [Guile-commits] 365/437: X86: Correct load and store in the x32 abi, Andy Wingo, 2018/07/02
- [Guile-commits] 190/437: Finish sparc port., Andy Wingo, 2018/07/02
- [Guile-commits] 436/437: Wire JIT availability check into Guile configure, Andy Wingo, 2018/07/02
- [Guile-commits] 350/437: Correct typo., Andy Wingo, 2018/07/02
- [Guile-commits] 424/437: Beginnings of build integration of lightning and guile, Andy Wingo, 2018/07/02
- [Guile-commits] 204/437: Add basic Itanium port infrastructure., Andy Wingo, 2018/07/02