Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move IdxSetBuf and BitSlice to rustc_data_structures #36991

Merged
merged 1 commit into from
Oct 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/librustc_borrowck/borrowck/mir/dataflow/graphviz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

use syntax::ast::NodeId;
use rustc::mir::repr::{BasicBlock, Mir};
use rustc_data_structures::bitslice::bits_to_string;
use rustc_data_structures::indexed_set::{IdxSet};
use rustc_data_structures::indexed_vec::Idx;

use dot;
Expand All @@ -27,8 +29,6 @@ use std::path::Path;

use super::super::MoveDataParamEnv;
use super::super::MirBorrowckCtxtPreDataflow;
use bitslice::bits_to_string;
use indexed_set::{IdxSet};
use super::{BitDenotation, DataflowState};

impl<O: BitDenotation> DataflowState<O> {
Expand Down
7 changes: 3 additions & 4 deletions src/librustc_borrowck/borrowck/mir/dataflow/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

use rustc::ty::TyCtxt;
use rustc::mir::repr::{self, Mir, Location};
use rustc_data_structures::bitslice::BitSlice; // adds set_bit/get_bit to &[usize] bitvector rep.
use rustc_data_structures::bitslice::{BitwiseOperator};
use rustc_data_structures::indexed_set::{IdxSet};
use rustc_data_structures::indexed_vec::Idx;

use super::super::gather_moves::{MoveOutIndex, MovePathIndex};
Expand All @@ -21,10 +24,6 @@ use super::super::on_lookup_result_bits;

use super::{BitDenotation, BlockSets, DataflowOperator};

use bitslice::BitSlice; // adds set_bit/get_bit to &[usize] bitvector rep.
use bitslice::{BitwiseOperator};
use indexed_set::{IdxSet};

// Dataflow analyses are built upon some interpretation of the
// bitvectors attached to each basic block, represented via a
// zero-sized structure.
Expand Down
5 changes: 2 additions & 3 deletions src/librustc_borrowck/borrowck/mir/dataflow/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use rustc_data_structures::indexed_set::{IdxSet, IdxSetBuf};
use rustc_data_structures::indexed_vec::Idx;
use rustc_data_structures::bitslice::{bitwise, BitwiseOperator};

use rustc::ty::TyCtxt;
use rustc::mir::repr::{self, Mir};
Expand All @@ -22,9 +24,6 @@ use std::usize;
use super::MirBorrowckCtxtPreDataflow;
use super::MoveDataParamEnv;

use bitslice::{bitwise, BitwiseOperator};
use indexed_set::{IdxSet, IdxSetBuf};

pub use self::sanity_check::sanity_check_via_rustc_peek;
pub use self::impls::{MaybeInitializedLvals, MaybeUninitializedLvals};
pub use self::impls::{DefinitelyInitializedLvals, MovingOutStatements};
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_borrowck/borrowck/mir/elaborate_drops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use indexed_set::IdxSetBuf;
use super::gather_moves::{MoveData, MovePathIndex, LookupResult};
use super::dataflow::{MaybeInitializedLvals, MaybeUninitializedLvals};
use super::dataflow::{DataflowResults};
Expand All @@ -23,6 +22,7 @@ use rustc::mir::transform::{Pass, MirPass, MirSource};
use rustc::middle::const_val::ConstVal;
use rustc::middle::lang_items;
use rustc::util::nodemap::FnvHashMap;
use rustc_data_structures::indexed_set::IdxSetBuf;
use rustc_data_structures::indexed_vec::Idx;
use syntax_pos::Span;

Expand Down
2 changes: 0 additions & 2 deletions src/librustc_borrowck/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ pub use borrowck::{AnalysisData, BorrowckCtxt, ElaborateDrops};
pub mod diagnostics;

mod borrowck;
mod bitslice;
mod indexed_set;

pub mod graphviz;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// FIXME: move this to `rustc_data_structures` and potentially merge
// with `bitvec` there.
// FIXME: merge with `bitvec`

use std::mem;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// FIXME: move this to `rustc_data_structures`

use std::fmt;
use std::marker::PhantomData;
use std::mem;
use std::ops::{Deref, DerefMut, Range};
use bitslice::{BitSlice, Word};
use bitslice::{bitwise, Union, Subtract};

use rustc_data_structures::indexed_vec::Idx;
use indexed_vec::Idx;

/// Represents a set (or packed family of sets), of some element type
/// E, where each E is identified by some unique index type `T`.
Expand Down
2 changes: 2 additions & 0 deletions src/librustc_data_structures/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ extern crate serialize as rustc_serialize; // used by deriving
#[cfg(unix)]
extern crate libc;

pub mod bitslice;
pub mod bitvec;
pub mod graph;
pub mod ivar;
pub mod indexed_set;
pub mod indexed_vec;
pub mod obligation_forest;
pub mod snapshot_map;
Expand Down