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 cfg::*;
use middle::region; 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 syntax::ptr::P;
use ty::{self, TyCtxt}; use ty::{self, TyCtxt};

View File

@ -11,7 +11,7 @@
//! Module that constructs a control-flow graph representing an item. //! Module that constructs a control-flow graph representing an item.
//! Uses `Graph` as the underlying representation. //! 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 ty::TyCtxt;
use hir; use hir;
use hir::def_id::DefId; use hir::def_id::DefId;

View File

@ -9,7 +9,7 @@
// except according to those terms. // except according to those terms.
use rustc_data_structures::fx::FxHashMap; 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 Direction, INCOMING, Graph, NodeIndex, OUTGOING
}; };

View File

@ -20,7 +20,7 @@ use infer::region_constraints::VerifyBound;
use middle::free_region::RegionRelations; use middle::free_region::RegionRelations;
use rustc_data_structures::indexed_vec::{Idx, IndexVec}; use rustc_data_structures::indexed_vec::{Idx, IndexVec};
use rustc_data_structures::fx::FxHashSet; 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::fmt;
use std::u32; use std::u32;
use ty::{self, TyCtxt}; use ty::{self, TyCtxt};

View File

@ -22,7 +22,7 @@ use std::mem;
use std::usize; use std::usize;
use syntax::print::pprust::PrintState; 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 util::nodemap::FxHashMap;
use hir; use hir;

View File

@ -21,9 +21,9 @@ use mir::interpret::{EvalErrorKind, Scalar, Value};
use mir::visit::MirVisitable; use mir::visit::MirVisitable;
use rustc_apfloat::ieee::{Double, Single}; use rustc_apfloat::ieee::{Double, Single};
use rustc_apfloat::Float; use rustc_apfloat::Float;
use rustc_data_structures::control_flow_graph::dominators::{dominators, Dominators}; use rustc_data_structures::graph::dominators::{dominators, Dominators};
use rustc_data_structures::control_flow_graph; use rustc_data_structures::graph;
use rustc_data_structures::control_flow_graph::{GraphPredecessors, GraphSuccessors}; use rustc_data_structures::graph::{GraphPredecessors, GraphSuccessors};
use rustc_data_structures::indexed_vec::{Idx, IndexVec}; use rustc_data_structures::indexed_vec::{Idx, IndexVec};
use rustc_data_structures::small_vec::SmallVec; use rustc_data_structures::small_vec::SmallVec;
use rustc_data_structures::sync::Lrc; 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)) 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; type Node = BasicBlock;
} }
impl<'tcx> control_flow_graph::WithNumNodes for Mir<'tcx> { impl<'tcx> graph::WithNumNodes for Mir<'tcx> {
fn num_nodes(&self) -> usize { fn num_nodes(&self) -> usize {
self.basic_blocks.len() 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 { fn start_node(&self) -> Self::Node {
START_BLOCK START_BLOCK
} }
} }
impl<'tcx> control_flow_graph::WithPredecessors for Mir<'tcx> { impl<'tcx> graph::WithPredecessors for Mir<'tcx> {
fn predecessors<'graph>( fn predecessors<'graph>(
&'graph self, &'graph self,
node: Self::Node, 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>( fn successors<'graph>(
&'graph self, &'graph self,
node: Self::Node, 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 Item = BasicBlock;
type Iter = IntoIter<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 Item = BasicBlock;
type Iter = iter::Cloned<Successors<'b>>; type Iter = iter::Cloned<Successors<'b>>;
} }

View File

@ -12,7 +12,7 @@
//! which do not. //! which do not.
use rustc_data_structures::bitvec::BitVector; 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_data_structures::indexed_vec::{Idx, IndexVec};
use rustc::mir::{self, Location, TerminatorKind}; use rustc::mir::{self, Location, TerminatorKind};
use rustc::mir::visit::{Visitor, PlaceContext}; use rustc::mir::visit::{Visitor, PlaceContext};

View File

@ -70,7 +70,7 @@ pub mod transitive_relation;
pub use ena::unify; pub use ena::unify;
pub mod fx; pub mod fx;
pub mod tuple_slice; pub mod tuple_slice;
pub mod control_flow_graph; pub mod graph;
pub mod flock; pub mod flock;
pub mod sync; pub mod sync;
pub mod owning_ref; 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::hir::def_id::DefId;
use rustc::ty::TyCtxt; use rustc::ty::TyCtxt;
use rustc_data_structures::fx::FxHashSet; use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::control_flow_graph::implementation::{ use rustc_data_structures::graph::implementation::{
Direction, INCOMING, OUTGOING, NodeIndex Direction, INCOMING, OUTGOING, NodeIndex
}; };
use rustc::hir; use rustc::hir;

View File

@ -23,7 +23,7 @@ use rustc::mir::{Terminator, TerminatorKind};
use rustc::ty::query::Providers; use rustc::ty::query::Providers;
use rustc::ty::{self, ParamEnv, TyCtxt}; 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::fx::FxHashSet;
use rustc_data_structures::indexed_set::IdxSetBuf; use rustc_data_structures::indexed_set::IdxSetBuf;
use rustc_data_structures::indexed_vec::Idx; 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::mir::{Field, Operand, BorrowKind};
use rustc::ty::{self, ParamEnv}; use rustc::ty::{self, ParamEnv};
use rustc_data_structures::indexed_vec::Idx; 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>( pub(super) fn generate_invalidates<'cx, 'gcx, 'tcx>(
infcx: &InferCtxt<'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::{BasicBlock, Location, Mir, Place};
use rustc::mir::{ProjectionElem, BorrowKind}; use rustc::mir::{ProjectionElem, BorrowKind};
use rustc::ty::TyCtxt; 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 /// Returns true if the borrow represented by `kind` is
/// allowed to be split into separate Reservation and /// allowed to be split into separate Reservation and