some module comments
This commit is contained in:
parent
857305ff67
commit
aa5a9bc152
5 changed files with 11 additions and 4 deletions
|
|
@ -1,3 +1,5 @@
|
|||
//! Main evaluator loop and setting up the initial stack frame.
|
||||
|
||||
use rand::rngs::StdRng;
|
||||
use rand::SeedableRng;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
//! Global machine state as well as implementation of the interpreter engine
|
||||
//! `Machine` trait.
|
||||
|
||||
use std::rc::Rc;
|
||||
use std::borrow::Cow;
|
||||
use std::collections::HashMap;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
#![allow(unused)]
|
||||
|
||||
//! Implements a map from integer indices to data.
|
||||
//! Rather than storing data for every index, internally, this maps entire ranges to the data.
|
||||
//! To this end, the APIs all work on ranges, not on individual integers. Ranges are split as
|
||||
|
|
@ -8,7 +6,6 @@
|
|||
//! via the iteration APIs.
|
||||
|
||||
use std::ops;
|
||||
use std::num::NonZeroU64;
|
||||
|
||||
use rustc::ty::layout::Size;
|
||||
|
||||
|
|
@ -158,7 +155,7 @@ impl<T> RangeMap<T> {
|
|||
let mut end_idx = first_idx; // when the loop is done, this is the first excluded element.
|
||||
loop {
|
||||
// Compute if `end` is the last element we need to look at.
|
||||
let done = (self.v[end_idx].range.end >= offset+len);
|
||||
let done = self.v[end_idx].range.end >= offset+len;
|
||||
// We definitely need to include `end`, so move the index.
|
||||
end_idx += 1;
|
||||
debug_assert!(done || end_idx < self.v.len(), "iter_mut: end-offset {} is out-of-bounds", offset+len);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
//! Implements "Stacked Borrows". See <https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md>
|
||||
//! for further information.
|
||||
|
||||
use std::cell::RefCell;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::rc::Rc;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
//! Implement thread-local storage.
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use rustc_target::abi::LayoutOf;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue