* src/vm/jit/show.cpp (show_method): Now shows patcher references as well.
[cacao.git] / src / vm / jit / patcher-common.hpp
index 5f25ae83f77e0cd21a5817f2a929cdb3230bd7a2..159c6f5aa9e9ad53fdb023836c0ce21c8a153732 100644 (file)
 
 /* 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"
 
@@ -45,7 +47,7 @@
 
 *******************************************************************************/
 
-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    */
@@ -53,8 +55,7 @@ typedef struct patchref_t {
        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 *********************************************************************/
@@ -70,6 +71,10 @@ void patcher_list_create(codeinfo *code);
 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);