mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-26 05:00:28 +02:00
Add filename and line number annotation abstraction.
* lib/jit_note.c: New file implementing a simple string+integer annotation, that should be used to map filename and line number to offsets in the generated jit. * include/lightning.h, lib/lightning.c: Update for the new note code. Add an extra mandatory argument to init_jit, that is used as argument to bfd_openr. Change from generic void* to char* the argument to jit_note and add an extra integer argument, to map to filename and line number. * check/ccall.c, check/lightning.c, include/lightning/jit_private.h, lib/jit_arm.c, lib/jit_disasm.c, lib/jit_mips.c, lib/jit_ppc.c, lib/jit_print.c, lib/jit_x86.c: lib/Makefile.am: Update for the new annotation code. * configure.ac, check/Makefile.am: Update to work with latest automake.
This commit is contained in:
parent
4fe47942eb
commit
a34410eee2
17 changed files with 464 additions and 46 deletions
|
@ -125,6 +125,7 @@ jit_regset_scan1(jit_regset_t, jit_int32_t);
|
|||
* Types
|
||||
*/
|
||||
typedef union jit_data jit_data_t;
|
||||
typedef struct jit_note jit_note_t;
|
||||
typedef struct jit_block jit_block_t;
|
||||
typedef struct jit_value jit_value_t;
|
||||
typedef struct jit_function jit_function_t;
|
||||
|
@ -152,6 +153,13 @@ union jit_data {
|
|||
jit_node_t *n;
|
||||
};
|
||||
|
||||
struct jit_note {
|
||||
char *name;
|
||||
jit_int32_t *linenos;
|
||||
jit_int32_t *offsets;
|
||||
jit_word_t length;
|
||||
};
|
||||
|
||||
struct jit_node {
|
||||
jit_node_t *next;
|
||||
jit_code_t code;
|
||||
|
@ -269,6 +277,12 @@ struct jit_state {
|
|||
jit_word_t length;
|
||||
} pool;
|
||||
jit_node_t *list;
|
||||
struct {
|
||||
jit_note_t *ptr;
|
||||
jit_node_t *head; /* first note node */
|
||||
jit_node_t *tail; /* linked list insertion */
|
||||
jit_word_t length;
|
||||
} note;
|
||||
#if __arm__
|
||||
# if DISASSEMBLER
|
||||
struct {
|
||||
|
@ -378,9 +392,19 @@ _emit_stxi_d(jit_state_t*, jit_word_t, jit_int32_t, jit_int32_t);
|
|||
extern void jit_init_debug(void);
|
||||
extern void jit_finish_debug(void);
|
||||
|
||||
extern void jit_init_note(void);
|
||||
extern void jit_finish_note(void);
|
||||
#define jit_set_note(u, v, w) _jit_set_note(_jit, u, v, w)
|
||||
extern void _jit_set_note(jit_state_t*, char*, int, jit_int32_t);
|
||||
#define jit_get_note(u, v, w) _jit_get_note(_jit, u, v, w)
|
||||
extern jit_bool_t _jit_get_note(jit_state_t*,jit_uint8_t*,char**,int*);
|
||||
#define jit_annotate() _jit_annotate(_jit)
|
||||
extern void _jit_annotate(jit_state_t*);
|
||||
|
||||
/*
|
||||
* Externs
|
||||
*/
|
||||
extern jit_register_t _rvs[];
|
||||
extern const char *jit_progname;
|
||||
|
||||
#endif /* _jit_private_h */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue