rename `control_flow_graph` to `graph`

This commit is contained in:
Niko Matsakis 2018-07-02 06:14:49 -04:00
parent 3c30415e96
commit 90c90ba542
21 changed files with 21 additions and 21 deletions

View File

@ -10,7 +10,7 @@
use cfg::*;
use middle::region;
use rustc_data_structures::control_flow_graph::implementation as graph;
use rustc_data_structures::graph::implementation as graph;
use syntax::ptr::P;
use ty::{self, TyCtxt};

View File

@ -11,7 +11,7 @@
//! Module that constructs a control-flow graph representing an item.
//! Uses `Graph` as the underlying representation.
use rustc_data_structures::control_flow_graph::implementation as graph;
use rustc_data_structures::graph::implementation as graph;
use ty::TyCtxt;
use hir;
use hir::def_id::DefId;

View File

@ -9,7 +9,7 @@
// except according to those terms.
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::control_flow_graph::implementation::{
use rustc_data_structures::graph::implementation::{
Direction, INCOMING, Graph, NodeIndex, OUTGOING
};

View File

@ -20,7 +20,7 @@ use infer::region_constraints::VerifyBound;
use middle::free_region::RegionRelations;
use rustc_data_structures::indexed_vec::{Idx, IndexVec};
use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::control_flow_graph::implementation::{Graph, Direction, NodeIndex, INCOMING, OUTGOING};
use rustc_data_structures::graph::implementation::{Graph, Direction, NodeIndex, INCOMING, OUTGOING};
use std::fmt;
use std::u32;
use ty::{self, TyCtxt};

View File

@ -22,7 +22,7 @@ use std::mem;
use std::usize;
use syntax::print::pprust::PrintState;
use rustc_data_structures::control_flow_graph::implementation::OUTGOING;
use rustc_data_structures::graph::implementation::OUTGOING;
use util::nodemap::FxHashMap;
use hir;

View File

@ -21,9 +21,9 @@ use mir::interpret::{EvalErrorKind, Scalar, Value};
use mir::visit::MirVisitable;
use rustc_apfloat::ieee::{Double, Single};
use rustc_apfloat::Float;
use rustc_data_structures::control_flow_graph::dominators::{dominators, Dominators};
use rustc_data_structures::control_flow_graph;
use rustc_data_structures::control_flow_graph::{GraphPredecessors, GraphSuccessors};
use rustc_data_structures::graph::dominators::{dominators, Dominators};
use rustc_data_structures::graph;
use rustc_data_structures::graph::{GraphPredecessors, GraphSuccessors};
use rustc_data_structures::indexed_vec::{Idx, IndexVec};
use rustc_data_structures::small_vec::SmallVec;
use rustc_data_structures::sync::Lrc;
@ -2289,23 +2289,23 @@ fn item_path_str(def_id: DefId) -> String {
ty::tls::with(|tcx| tcx.item_path_str(def_id))
}
impl<'tcx> control_flow_graph::DirectedGraph for Mir<'tcx> {
impl<'tcx> graph::DirectedGraph for Mir<'tcx> {
type Node = BasicBlock;
}
impl<'tcx> control_flow_graph::WithNumNodes for Mir<'tcx> {
impl<'tcx> graph::WithNumNodes for Mir<'tcx> {
fn num_nodes(&self) -> usize {
self.basic_blocks.len()
}
}
impl<'tcx> control_flow_graph::WithStartNode for Mir<'tcx> {
impl<'tcx> graph::WithStartNode for Mir<'tcx> {
fn start_node(&self) -> Self::Node {
START_BLOCK
}
}
impl<'tcx> control_flow_graph::WithPredecessors for Mir<'tcx> {
impl<'tcx> graph::WithPredecessors for Mir<'tcx> {
fn predecessors<'graph>(
&'graph self,
node: Self::Node,
@ -2314,7 +2314,7 @@ impl<'tcx> control_flow_graph::WithPredecessors for Mir<'tcx> {
}
}
impl<'tcx> control_flow_graph::WithSuccessors for Mir<'tcx> {
impl<'tcx> graph::WithSuccessors for Mir<'tcx> {
fn successors<'graph>(
&'graph self,
node: Self::Node,
@ -2323,12 +2323,12 @@ impl<'tcx> control_flow_graph::WithSuccessors for Mir<'tcx> {
}
}
impl<'a, 'b> control_flow_graph::GraphPredecessors<'b> for Mir<'a> {
impl<'a, 'b> graph::GraphPredecessors<'b> for Mir<'a> {
type Item = BasicBlock;
type Iter = IntoIter<BasicBlock>;
}
impl<'a, 'b> control_flow_graph::GraphSuccessors<'b> for Mir<'a> {
impl<'a, 'b> graph::GraphSuccessors<'b> for Mir<'a> {
type Item = BasicBlock;
type Iter = iter::Cloned<Successors<'b>>;
}

View File

@ -12,7 +12,7 @@
//! which do not.
use rustc_data_structures::bitvec::BitVector;
use rustc_data_structures::control_flow_graph::dominators::Dominators;
use rustc_data_structures::graph::dominators::Dominators;
use rustc_data_structures::indexed_vec::{Idx, IndexVec};
use rustc::mir::{self, Location, TerminatorKind};
use rustc::mir::visit::{Visitor, PlaceContext};

View File

@ -70,7 +70,7 @@ pub mod transitive_relation;
pub use ena::unify;
pub mod fx;
pub mod tuple_slice;
pub mod control_flow_graph;
pub mod graph;
pub mod flock;
pub mod sync;
pub mod owning_ref;

View File

@ -49,7 +49,7 @@ use rustc::dep_graph::debug::{DepNodeFilter, EdgeFilter};
use rustc::hir::def_id::DefId;
use rustc::ty::TyCtxt;
use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::control_flow_graph::implementation::{
use rustc_data_structures::graph::implementation::{
Direction, INCOMING, OUTGOING, NodeIndex
};
use rustc::hir;

View File

@ -23,7 +23,7 @@ use rustc::mir::{Terminator, TerminatorKind};
use rustc::ty::query::Providers;
use rustc::ty::{self, ParamEnv, TyCtxt};
use rustc_data_structures::control_flow_graph::dominators::Dominators;
use rustc_data_structures::graph::dominators::Dominators;
use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::indexed_set::IdxSetBuf;
use rustc_data_structures::indexed_vec::Idx;

View File

@ -29,7 +29,7 @@ use rustc::mir::{Terminator, TerminatorKind};
use rustc::mir::{Field, Operand, BorrowKind};
use rustc::ty::{self, ParamEnv};
use rustc_data_structures::indexed_vec::Idx;
use rustc_data_structures::control_flow_graph::dominators::Dominators;
use rustc_data_structures::graph::dominators::Dominators;
pub(super) fn generate_invalidates<'cx, 'gcx, 'tcx>(
infcx: &InferCtxt<'cx, 'gcx, 'tcx>,

View File

@ -16,7 +16,7 @@ use dataflow::indexes::BorrowIndex;
use rustc::mir::{BasicBlock, Location, Mir, Place};
use rustc::mir::{ProjectionElem, BorrowKind};
use rustc::ty::TyCtxt;
use rustc_data_structures::control_flow_graph::dominators::Dominators;
use rustc_data_structures::graph::dominators::Dominators;
/// Returns true if the borrow represented by `kind` is
/// allowed to be split into separate Reservation and