Skip to content

Commit 8a35077

Browse files
aidenfoxiveyk0kubun
authored andcommitted
ZJIT: Add missing module doc comments
1 parent a8a2f1f commit 8a35077

File tree

13 files changed

+25
-1
lines changed

13 files changed

+25
-1
lines changed

zjit/src/asm/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Model for creating generating textual assembler code.
2+
13
use std::collections::BTreeMap;
24
use std::fmt;
35
use std::ops::Range;

zjit/src/backend/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! A multi-platform assembler generation backend.
2+
13
#[cfg(target_arch = "x86_64")]
24
pub mod x86_64;
35

zjit/src/bitset.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Optimized bitset implementation.
2+
13
type Entry = u128;
24

35
const ENTRY_NUM_BITS: usize = Entry::BITS as usize;

zjit/src/cast.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Optimized [usize] casting trait.
2+
13
/// Trait for casting to [usize] that allows you to say `.as_usize()`.
24
/// Implementation conditional on the cast preserving the numeric value on
35
/// all inputs and being inexpensive.

zjit/src/codegen.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! This module is for native code generation.
2+
13
use std::cell::{Cell, RefCell};
24
use std::rc::Rc;
35
use std::ffi::{c_int, c_long, c_void};

zjit/src/distribution.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Type frequency distribution tracker.
2+
13
/// This implementation was inspired by the type feedback module from Google's S6, which was
24
/// written in C++ for use with Python. This is a new implementation in Rust created for use with
35
/// Ruby instead of Python.

zjit/src/gc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This module is responsible for marking/moving objects on GC.
1+
//! This module is responsible for marking/moving objects on GC.
22
33
use std::cell::RefCell;
44
use std::rc::Rc;

zjit/src/hir_type/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! High-level intermediate representation types.
2+
13
#![allow(non_upper_case_globals)]
24
use crate::cruby::{Qfalse, Qnil, Qtrue, VALUE, RUBY_T_ARRAY, RUBY_T_STRING, RUBY_T_HASH, RUBY_T_CLASS, RUBY_T_MODULE};
35
use crate::cruby::{rb_cInteger, rb_cFloat, rb_cArray, rb_cHash, rb_cString, rb_cSymbol, rb_cObject, rb_cTrueClass, rb_cFalseClass, rb_cNilClass, rb_cRange, rb_cSet, rb_cRegexp, rb_cClass, rb_cModule, rb_zjit_singleton_class_p};

zjit/src/invariants.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Code invalidation and patching for speculative optimizations.
2+
13
use std::{collections::{HashMap, HashSet}, mem};
24

35
use crate::{backend::lir::{asm_comment, Assembler}, cruby::{rb_callable_method_entry_t, rb_gc_location, ruby_basic_operators, src_loc, with_vm_lock, IseqPtr, RedefinitionFlag, ID, VALUE}, gc::IseqPayload, hir::Invariant, options::debug, state::{zjit_enabled_p, ZJITState}, virtualmem::CodePtr};

zjit/src/options.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Configurable options for ZJIT.
2+
13
use std::{ffi::{CStr, CString}, ptr::null};
24
use std::os::raw::{c_char, c_int, c_uint};
35
use crate::cruby::*;

0 commit comments

Comments
 (0)