Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YJIT: Constify EC to avoid an as pointer cast #7591

Merged
merged 1 commit into from Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion yjit.c
Expand Up @@ -335,7 +335,7 @@ rb_yjit_reserve_addr_space(uint32_t mem_size)

// Is anyone listening for :c_call and :c_return event currently?
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;
if (rb_multi_ractor_p()) {
Expand Down
2 changes: 1 addition & 1 deletion yjit/src/codegen.rs
Expand Up @@ -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 {
// Defer to C implementation in yjit.c
unsafe {
rb_c_method_tracing_currently_enabled(jit.ec as *mut rb_execution_context_struct)
rb_c_method_tracing_currently_enabled(jit.ec)
}
}

Expand Down
2 changes: 1 addition & 1 deletion yjit/src/cruby_bindings.inc.rs
Expand Up @@ -1210,7 +1210,7 @@ extern "C" {
) -> VALUE;
pub fn rb_yjit_get_page_size() -> u32;
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_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;
Expand Down