Skip to content

Commit dfacd05

Browse files
aidenfoxiveyk0kubun
authored andcommitted
Change mentions of YJIT to ZJIT (Shopify/zjit#113)
1 parent 74f4d8b commit dfacd05

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

zjit/src/asm/arm64/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Arm64
22

3-
This module is responsible for encoding YJIT operands into an appropriate Arm64 encoding.
3+
This module is responsible for encoding ZJIT operands into an appropriate Arm64 encoding.
44

55
## Architecture
66

zjit/src/backend/lir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ impl From<VALUE> for Opnd {
270270
#[derive(Clone, Debug)]
271271
pub enum Target
272272
{
273-
/// Pointer to a piece of YJIT-generated code
273+
/// Pointer to a piece of ZJIT-generated code
274274
CodePtr(CodePtr),
275275
// Side exit with a counter
276276
SideExit(FrameState),

zjit/src/cruby.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
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.
22
//! Some C functions we use we maintain, some are public C extension APIs,
33
//! some are internal CRuby APIs.
44
//!
55
//! ## General notes about linking
66
//!
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
88
//! we can understand as a collection of object files. On ELF platforms at least,
99
//! object files can refer to "external symbols" which we could take some
1010
//! liberty and understand as assembly labels that refer to code defined in other
@@ -55,9 +55,9 @@
5555
//! and verified on CI like `make update-deps`.
5656
//!
5757
//! 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
5959
//! 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
6161
//! - Less hand-typed boilerplate
6262
//! - Helps reduce risk of C definitions and Rust declaration going out of sync since
6363
//! CI verifies synchronicity
@@ -67,7 +67,7 @@
6767
//! that the project is not committed to maintaining
6868
//! - This setup assumes rust-bindgen gives deterministic output, which can't be taken
6969
//! 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
7171
//! to work if they want to run the generation tool locally
7272
//!
7373
//! 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::*;
116116

117117
// These are functions we expose from C files, not in any header.
118118
// 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.
120120
#[cfg_attr(test, allow(unused))] // We don't link against C code when testing
121121
unsafe extern "C" {
122122
pub fn rb_check_overloaded_cme(
@@ -438,8 +438,8 @@ impl VALUE {
438438
pub fn class_of(self) -> VALUE {
439439
if !self.special_const_p() {
440440
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");
443443
}
444444

445445
unsafe { rb_yarv_class_of(self) }
@@ -807,7 +807,7 @@ where
807807
let _ = catch_unwind(|| {
808808
// IO functions can panic too.
809809
eprintln!(
810-
"YJIT panicked while holding VM lock acquired at {}:{}. Aborting...",
810+
"ZJIT panicked while holding VM lock acquired at {}:{}. Aborting...",
811811
loc.file.to_string_lossy(),
812812
line,
813813
);
@@ -1159,7 +1159,7 @@ pub fn get_class_name(class: VALUE) -> String {
11591159
}
11601160

11611161
/// 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.
11631163
pub(crate) mod ids {
11641164
use std::sync::atomic::AtomicU64;
11651165
/// Globals to cache IDs on boot. Atomic to use with relaxed ordering

zjit/src/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ pub extern "C" fn rb_zjit_init(options: *const u8) {
142142

143143
rb_bug_panic_hook();
144144

145-
// YJIT enabled and initialized successfully
145+
// ZJIT enabled and initialized successfully
146146
assert!(unsafe{ !rb_zjit_enabled_p });
147147
unsafe { rb_zjit_enabled_p = true; }
148148
});

0 commit comments

Comments
 (0)