summaryrefslogtreecommitdiff
path: root/ujit_iface.h
diff options
context:
space:
mode:
Diffstat (limited to 'ujit_iface.h')
-rw-r--r--ujit_iface.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/ujit_iface.h b/ujit_iface.h
new file mode 100644
index 0000000000..1e43c7c60c
--- /dev/null
+++ b/ujit_iface.h
@@ -0,0 +1,27 @@
+//
+// These are definitions uJIT uses to interface with the CRuby codebase,
+// but which are only used internally by uJIT.
+//
+
+#ifndef UJIT_IFACE_H
+#define UJIT_IFACE_H 1
+
+#include "stddef.h"
+#include "stdint.h"
+#include "stdbool.h"
+#include "internal.h"
+#include "vm_core.h"
+#include "vm_callinfo.h"
+#include "builtin.h"
+#include "ujit_core.h"
+
+#ifndef rb_callcache
+struct rb_callcache;
+#define rb_callcache rb_callcache
+#endif
+
+void map_addr2insn(void *code_ptr, int insn);
+int opcode_at_pc(const rb_iseq_t *iseq, const VALUE *pc);
+void assume_method_lookup_stable(const struct rb_callcache *cc, const rb_callable_method_entry_t *cme, ctx_t *ctx);
+
+#endif // #ifndef UJIT_IFACE_H