|
1 | | -//! This module deals with making relevant C functions available to Rust YJIT. |
| 1 | +//! This module deals with making relevant C functions available to Rust ZJIT. |
2 | 2 | //! Some C functions we use we maintain, some are public C extension APIs, |
3 | 3 | //! some are internal CRuby APIs. |
4 | 4 | //! |
5 | 5 | //! ## General notes about linking |
6 | 6 | //! |
7 | | -//! The YJIT crate compiles to a native static library, which for our purposes |
| 7 | +//! The ZJIT crate compiles to a native static library, which for our purposes |
8 | 8 | //! we can understand as a collection of object files. On ELF platforms at least, |
9 | 9 | //! object files can refer to "external symbols" which we could take some |
10 | 10 | //! liberty and understand as assembly labels that refer to code defined in other |
|
55 | 55 | //! and verified on CI like `make update-deps`. |
56 | 56 | //! |
57 | 57 | //! Upsides for this design: |
58 | | -//! - the YJIT static lib that links with miniruby and friends will not need bindgen |
| 58 | +//! - the ZJIT static lib that links with miniruby and friends will not need bindgen |
59 | 59 | //! as a dependency at all. This is an important property so Ruby end users can |
60 | | -//! build a YJIT enabled Ruby with no internet connection using a release tarball |
| 60 | +//! build a ZJIT enabled Ruby with no internet connection using a release tarball |
61 | 61 | //! - Less hand-typed boilerplate |
62 | 62 | //! - Helps reduce risk of C definitions and Rust declaration going out of sync since |
63 | 63 | //! CI verifies synchronicity |
|
67 | 67 | //! that the project is not committed to maintaining |
68 | 68 | //! - This setup assumes rust-bindgen gives deterministic output, which can't be taken |
69 | 69 | //! for granted |
70 | | -//! - YJIT contributors will need to install libclang on their system to get rust-bindgen |
| 70 | +//! - ZJIT contributors will need to install libclang on their system to get rust-bindgen |
71 | 71 | //! to work if they want to run the generation tool locally |
72 | 72 | //! |
73 | 73 | //! The elephant in the room is that we'll still need to use Unsafe Rust to call C functions, |
@@ -116,7 +116,7 @@ pub use autogened::*; |
116 | 116 |
|
117 | 117 | // These are functions we expose from C files, not in any header. |
118 | 118 | // Parsing it would result in a lot of duplicate definitions. |
119 | | -// Use bindgen for functions that are defined in headers or in yjit.c. |
| 119 | +// Use bindgen for functions that are defined in headers or in zjit.c. |
120 | 120 | #[cfg_attr(test, allow(unused))] // We don't link against C code when testing |
121 | 121 | unsafe extern "C" { |
122 | 122 | pub fn rb_check_overloaded_cme( |
@@ -438,8 +438,8 @@ impl VALUE { |
438 | 438 | pub fn class_of(self) -> VALUE { |
439 | 439 | if !self.special_const_p() { |
440 | 440 | let builtin_type = self.builtin_type(); |
441 | | - assert_ne!(builtin_type, RUBY_T_NONE, "YJIT should only see live objects"); |
442 | | - assert_ne!(builtin_type, RUBY_T_MOVED, "YJIT should only see live objects"); |
| 441 | + assert_ne!(builtin_type, RUBY_T_NONE, "ZJIT should only see live objects"); |
| 442 | + assert_ne!(builtin_type, RUBY_T_MOVED, "ZJIT should only see live objects"); |
443 | 443 | } |
444 | 444 |
|
445 | 445 | unsafe { rb_yarv_class_of(self) } |
@@ -807,7 +807,7 @@ where |
807 | 807 | let _ = catch_unwind(|| { |
808 | 808 | // IO functions can panic too. |
809 | 809 | eprintln!( |
810 | | - "YJIT panicked while holding VM lock acquired at {}:{}. Aborting...", |
| 810 | + "ZJIT panicked while holding VM lock acquired at {}:{}. Aborting...", |
811 | 811 | loc.file.to_string_lossy(), |
812 | 812 | line, |
813 | 813 | ); |
@@ -1159,7 +1159,7 @@ pub fn get_class_name(class: VALUE) -> String { |
1159 | 1159 | } |
1160 | 1160 |
|
1161 | 1161 | /// Interned ID values for Ruby symbols and method names. |
1162 | | -/// See [type@crate::cruby::ID] and usages outside of YJIT. |
| 1162 | +/// See [type@crate::cruby::ID] and usages outside of ZJIT. |
1163 | 1163 | pub(crate) mod ids { |
1164 | 1164 | use std::sync::atomic::AtomicU64; |
1165 | 1165 | /// Globals to cache IDs on boot. Atomic to use with relaxed ordering |
|
0 commit comments