summaryrefslogtreecommitdiff
path: root/yjit
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2022-11-27 15:15:52 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2022-11-27 21:11:33 -0800
commit6844bcc6b4cdc50def1c0d30d4e8b5045fb43443 (patch)
treee76f3b03120395c52007d1fcaec6e42ace508561 /yjit
parent6d26f78f684607a39249882ea686a231f8768bd5 (diff)
MJIT: Use a String buffer in builtin compilers
instead of FILE*. Using C.fprintf is slower than String manipulation on memory. I'm going to change the way MJIT writes files, and this is a prerequisite for it.
Diffstat (limited to 'yjit')
-rw-r--r--yjit/src/cruby.rs7
-rw-r--r--yjit/src/cruby_bindings.inc.rs2
2 files changed, 1 insertions, 8 deletions
diff --git a/yjit/src/cruby.rs b/yjit/src/cruby.rs
index d37af38320..229cfa109e 100644
--- a/yjit/src/cruby.rs
+++ b/yjit/src/cruby.rs
@@ -270,13 +270,6 @@ pub struct rb_method_cfunc_t {
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
}
-/// Opaque FILE type from the C standard library
-#[repr(C)]
-pub struct FILE {
- _data: [u8; 0],
- _marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
-}
-
/// Opaque call-cache type from vm_callinfo.h
#[repr(C)]
pub struct rb_callcache {
diff --git a/yjit/src/cruby_bindings.inc.rs b/yjit/src/cruby_bindings.inc.rs
index 78967cd4ce..ea57bd69d8 100644
--- a/yjit/src/cruby_bindings.inc.rs
+++ b/yjit/src/cruby_bindings.inc.rs
@@ -1047,7 +1047,7 @@ pub struct rb_builtin_function {
pub name: *const ::std::os::raw::c_char,
pub compiler: ::std::option::Option<
unsafe extern "C" fn(
- arg1: *mut FILE,
+ arg1: VALUE,
arg2: ::std::os::raw::c_long,
arg3: ::std::os::raw::c_uint,
arg4: bool,