Ruby  3.1.4p223 (2023-03-30 revision HEAD)
yjit_iface.h
1 //
2 // These are definitions YJIT uses to interface with the CRuby codebase,
3 // but which are only used internally by YJIT.
4 //
5 
6 #ifndef YJIT_IFACE_H
7 #define YJIT_IFACE_H 1
8 
9 #include "ruby/internal/config.h"
10 #include "ruby_assert.h" // for RUBY_DEBUG
11 #include "yjit.h" // for YJIT_STATS
12 #include "vm_core.h"
13 #include "yjit_core.h"
14 
15 #ifndef YJIT_DEFAULT_CALL_THRESHOLD
16 # define YJIT_DEFAULT_CALL_THRESHOLD 10
17 #endif
18 
19 RUBY_EXTERN struct rb_yjit_options rb_yjit_opts;
20 
21 static VALUE *yjit_iseq_pc_at_idx(const rb_iseq_t *iseq, uint32_t insn_idx);
22 static int yjit_opcode_at_pc(const rb_iseq_t *iseq, const VALUE *pc);
23 static void yjit_print_iseq(const rb_iseq_t *iseq);
24 
25 #if YJIT_STATS
26 // this function *must* return passed exit_pc
27 static const VALUE *yjit_count_side_exit_op(const VALUE *exit_pc);
28 #endif
29 
30 static void yjit_unlink_method_lookup_dependency(block_t *block);
31 static void yjit_block_assumptions_free(block_t *block);
32 
33 static VALUE yjit_get_code_page(uint32_t cb_bytes_needed, uint32_t ocb_bytes_needed);
34 //code_page_t *rb_yjit_code_page_unwrap(VALUE cp_obj);
35 //void rb_yjit_get_cb(codeblock_t* cb, uint8_t* code_ptr);
36 //void rb_yjit_get_ocb(codeblock_t* cb, uint8_t* code_ptr);
37 
38 #endif // #ifndef YJIT_IFACE_H
#define RUBY_EXTERN
Declaration of externally visible global variables.
Definition: dllexport.h:47
Basic block version Represents a portion of an iseq compiled with a given context Note: care must be ...
Definition: yjit_core.h:237
uintptr_t VALUE
Type that represents a Ruby object.
Definition: value.h:40