YJIT: Constify EC to avoid an as
pointer cast (#7591)
This commit is contained in:
parent
7149f5763e
commit
35e9b5348d
Notes:
git
2023-03-24 16:36:35 +00:00
Merged-By: maximecb <maximecb@ruby-lang.org>
2
yjit.c
2
yjit.c
@ -335,7 +335,7 @@ rb_yjit_reserve_addr_space(uint32_t mem_size)
|
|||||||
|
|
||||||
// Is anyone listening for :c_call and :c_return event currently?
|
// Is anyone listening for :c_call and :c_return event currently?
|
||||||
bool
|
bool
|
||||||
rb_c_method_tracing_currently_enabled(rb_execution_context_t *ec)
|
rb_c_method_tracing_currently_enabled(const rb_execution_context_t *ec)
|
||||||
{
|
{
|
||||||
rb_event_flag_t tracing_events;
|
rb_event_flag_t tracing_events;
|
||||||
if (rb_multi_ractor_p()) {
|
if (rb_multi_ractor_p()) {
|
||||||
|
@ -4712,7 +4712,7 @@ fn lookup_cfunc_codegen(def: *const rb_method_definition_t) -> Option<MethodGenF
|
|||||||
fn c_method_tracing_currently_enabled(jit: &JITState) -> bool {
|
fn c_method_tracing_currently_enabled(jit: &JITState) -> bool {
|
||||||
// Defer to C implementation in yjit.c
|
// Defer to C implementation in yjit.c
|
||||||
unsafe {
|
unsafe {
|
||||||
rb_c_method_tracing_currently_enabled(jit.ec as *mut rb_execution_context_struct)
|
rb_c_method_tracing_currently_enabled(jit.ec)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1210,7 +1210,7 @@ extern "C" {
|
|||||||
) -> VALUE;
|
) -> VALUE;
|
||||||
pub fn rb_yjit_get_page_size() -> u32;
|
pub fn rb_yjit_get_page_size() -> u32;
|
||||||
pub fn rb_yjit_reserve_addr_space(mem_size: u32) -> *mut u8;
|
pub fn rb_yjit_reserve_addr_space(mem_size: u32) -> *mut u8;
|
||||||
pub fn rb_c_method_tracing_currently_enabled(ec: *mut rb_execution_context_t) -> bool;
|
pub fn rb_c_method_tracing_currently_enabled(ec: *const rb_execution_context_t) -> bool;
|
||||||
pub fn rb_full_cfunc_return(ec: *mut rb_execution_context_t, return_value: VALUE);
|
pub fn rb_full_cfunc_return(ec: *mut rb_execution_context_t, return_value: VALUE);
|
||||||
pub fn rb_iseq_encoded_size(iseq: *const rb_iseq_t) -> ::std::os::raw::c_uint;
|
pub fn rb_iseq_encoded_size(iseq: *const rb_iseq_t) -> ::std::os::raw::c_uint;
|
||||||
pub fn rb_iseq_get_yjit_payload(iseq: *const rb_iseq_t) -> *mut ::std::os::raw::c_void;
|
pub fn rb_iseq_get_yjit_payload(iseq: *const rb_iseq_t) -> *mut ::std::os::raw::c_void;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user