/* forward typedefs ***********************************************************/
+typedef struct patchref_t patchref_t;
+
#include "config.h"
#include "vm/types.h"
-#include "toolbox/list.h"
+#include "toolbox/list.hpp"
#include "vm/global.h"
*******************************************************************************/
-typedef struct patchref_t {
+struct patchref_t {
ptrint mpc; /* absolute position in code segment */
ptrint datap; /* absolute position in data segment */
s4 disp; /* displacement of ref in the data segment */
void* ref; /* reference passed */
uint32_t mcode; /* machine code to be patched back in */
bool done; /* XXX preliminary: patch already applied? */
- listnode_t linkage;
-} patchref_t;
+};
/* macros *********************************************************************/
void patcher_list_reset(codeinfo *code);
void patcher_list_free(codeinfo *code);
+#if !defined(NDEBUG)
+void patcher_list_show(codeinfo *code);
+#endif
+
void patcher_add_patch_ref(jitdata *jd, functionptr patcher, void* ref, s4 disp);
void patcher_resolve(jitdata* jd);