From 98baa9b569b49162392ed4149dd435854fe941b8 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 12 Aug 2020 16:22:05 +0200 Subject: Rename ra_arena --- crates/ra_hir_ty/Cargo.toml | 2 +- crates/ra_hir_ty/src/db.rs | 2 +- crates/ra_hir_ty/src/diagnostics/match_check.rs | 2 +- crates/ra_hir_ty/src/infer.rs | 2 +- crates/ra_hir_ty/src/lower.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/ra_hir_ty') diff --git a/crates/ra_hir_ty/Cargo.toml b/crates/ra_hir_ty/Cargo.toml index 83397d579..fc68eaa8f 100644 --- a/crates/ra_hir_ty/Cargo.toml +++ b/crates/ra_hir_ty/Cargo.toml @@ -20,7 +20,7 @@ stdx = { path = "../stdx" } hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } -ra_arena = { path = "../ra_arena" } +arena = { path = "../arena" } ra_db = { path = "../ra_db" } ra_prof = { path = "../ra_prof" } ra_syntax = { path = "../ra_syntax" } diff --git a/crates/ra_hir_ty/src/db.rs b/crates/ra_hir_ty/src/db.rs index c773adc67..d396017bf 100644 --- a/crates/ra_hir_ty/src/db.rs +++ b/crates/ra_hir_ty/src/db.rs @@ -2,11 +2,11 @@ use std::sync::Arc; +use arena::map::ArenaMap; use hir_def::{ db::DefDatabase, expr::ExprId, DefWithBodyId, FunctionId, GenericDefId, ImplId, LocalFieldId, TypeParamId, VariantId, }; -use ra_arena::map::ArenaMap; use ra_db::{impl_intern_key, salsa, CrateId, Upcast}; use ra_prof::profile; diff --git a/crates/ra_hir_ty/src/diagnostics/match_check.rs b/crates/ra_hir_ty/src/diagnostics/match_check.rs index deca244db..7f007f1d6 100644 --- a/crates/ra_hir_ty/src/diagnostics/match_check.rs +++ b/crates/ra_hir_ty/src/diagnostics/match_check.rs @@ -218,13 +218,13 @@ //! ``` use std::sync::Arc; +use arena::Idx; use hir_def::{ adt::VariantData, body::Body, expr::{Expr, Literal, Pat, PatId}, AdtId, EnumVariantId, VariantId, }; -use ra_arena::Idx; use smallvec::{smallvec, SmallVec}; use crate::{db::HirDatabase, ApplicationTy, InferenceResult, Ty, TypeCtor}; diff --git a/crates/ra_hir_ty/src/infer.rs b/crates/ra_hir_ty/src/infer.rs index 3d12039a6..e003690b3 100644 --- a/crates/ra_hir_ty/src/infer.rs +++ b/crates/ra_hir_ty/src/infer.rs @@ -18,6 +18,7 @@ use std::mem; use std::ops::Index; use std::sync::Arc; +use arena::map::ArenaMap; use hir_def::{ body::Body, data::{ConstData, FunctionData, StaticData}, @@ -30,7 +31,6 @@ use hir_def::{ TypeAliasId, VariantId, }; use hir_expand::{diagnostics::DiagnosticSink, name::name}; -use ra_arena::map::ArenaMap; use ra_prof::profile; use ra_syntax::SmolStr; use rustc_hash::FxHashMap; diff --git a/crates/ra_hir_ty/src/lower.rs b/crates/ra_hir_ty/src/lower.rs index 7638f167b..7b805fe7a 100644 --- a/crates/ra_hir_ty/src/lower.rs +++ b/crates/ra_hir_ty/src/lower.rs @@ -7,6 +7,7 @@ //! This usually involves resolving names, collecting generic arguments etc. use std::{iter, sync::Arc}; +use arena::map::ArenaMap; use hir_def::{ adt::StructKind, builtin_type::BuiltinType, @@ -19,7 +20,6 @@ use hir_def::{ UnionId, VariantId, }; use hir_expand::name::Name; -use ra_arena::map::ArenaMap; use ra_db::CrateId; use smallvec::SmallVec; use stdx::impl_from; -- cgit v1.2.3 From 208b7bd7ba687fb570feb1b89219f14c63712ce8 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 12 Aug 2020 16:32:36 +0200 Subject: Rename ra_prof -> profile --- crates/ra_hir_ty/Cargo.toml | 2 +- crates/ra_hir_ty/src/db.rs | 3 +-- crates/ra_hir_ty/src/diagnostics.rs | 3 +-- crates/ra_hir_ty/src/infer.rs | 3 +-- crates/ra_hir_ty/src/method_resolution.rs | 5 ++--- crates/ra_hir_ty/src/traits.rs | 3 +-- crates/ra_hir_ty/src/traits/chalk.rs | 2 +- 7 files changed, 8 insertions(+), 13 deletions(-) (limited to 'crates/ra_hir_ty') diff --git a/crates/ra_hir_ty/Cargo.toml b/crates/ra_hir_ty/Cargo.toml index fc68eaa8f..380d5e601 100644 --- a/crates/ra_hir_ty/Cargo.toml +++ b/crates/ra_hir_ty/Cargo.toml @@ -22,7 +22,7 @@ hir_def = { path = "../ra_hir_def", package = "ra_hir_def" } hir_expand = { path = "../ra_hir_expand", package = "ra_hir_expand" } arena = { path = "../arena" } ra_db = { path = "../ra_db" } -ra_prof = { path = "../ra_prof" } +profile = { path = "../profile" } ra_syntax = { path = "../ra_syntax" } test_utils = { path = "../test_utils" } diff --git a/crates/ra_hir_ty/src/db.rs b/crates/ra_hir_ty/src/db.rs index d396017bf..7a28673b1 100644 --- a/crates/ra_hir_ty/src/db.rs +++ b/crates/ra_hir_ty/src/db.rs @@ -8,7 +8,6 @@ use hir_def::{ TypeParamId, VariantId, }; use ra_db::{impl_intern_key, salsa, CrateId, Upcast}; -use ra_prof::profile; use crate::{ method_resolution::{InherentImpls, TraitImpls}, @@ -123,7 +122,7 @@ pub trait HirDatabase: DefDatabase + Upcast { } fn infer_wait(db: &impl HirDatabase, def: DefWithBodyId) -> Arc { - let _p = profile("infer:wait").detail(|| match def { + let _p = profile::span("infer:wait").detail(|| match def { DefWithBodyId::FunctionId(it) => db.function_data(it).name.to_string(), DefWithBodyId::StaticId(it) => { db.static_data(it).name.clone().unwrap_or_else(Name::missing).to_string() diff --git a/crates/ra_hir_ty/src/diagnostics.rs b/crates/ra_hir_ty/src/diagnostics.rs index 7ab7f79db..55c02c1fe 100644 --- a/crates/ra_hir_ty/src/diagnostics.rs +++ b/crates/ra_hir_ty/src/diagnostics.rs @@ -8,7 +8,6 @@ use std::any::Any; use hir_def::DefWithBodyId; use hir_expand::diagnostics::{Diagnostic, DiagnosticSink}; use hir_expand::{name::Name, HirFileId, InFile}; -use ra_prof::profile; use ra_syntax::{ast, AstPtr, SyntaxNodePtr}; use stdx::format_to; @@ -17,7 +16,7 @@ use crate::db::HirDatabase; pub use crate::diagnostics::expr::{record_literal_missing_fields, record_pattern_missing_fields}; pub fn validate_body(db: &dyn HirDatabase, owner: DefWithBodyId, sink: &mut DiagnosticSink<'_>) { - let _p = profile("validate_body"); + let _p = profile::span("validate_body"); let infer = db.infer(owner); infer.add_diagnostics(db, owner, sink); let mut validator = expr::ExprValidator::new(owner, infer.clone(), sink); diff --git a/crates/ra_hir_ty/src/infer.rs b/crates/ra_hir_ty/src/infer.rs index e003690b3..784ae1c3c 100644 --- a/crates/ra_hir_ty/src/infer.rs +++ b/crates/ra_hir_ty/src/infer.rs @@ -31,7 +31,6 @@ use hir_def::{ TypeAliasId, VariantId, }; use hir_expand::{diagnostics::DiagnosticSink, name::name}; -use ra_prof::profile; use ra_syntax::SmolStr; use rustc_hash::FxHashMap; use stdx::impl_from; @@ -64,7 +63,7 @@ mod coerce; /// The entry point of type inference. pub(crate) fn infer_query(db: &dyn HirDatabase, def: DefWithBodyId) -> Arc { - let _p = profile("infer_query"); + let _p = profile::span("infer_query"); let resolver = def.resolver(db.upcast()); let mut ctx = InferenceContext::new(db, def, resolver); diff --git a/crates/ra_hir_ty/src/method_resolution.rs b/crates/ra_hir_ty/src/method_resolution.rs index fb4b30a13..3b3bee6a7 100644 --- a/crates/ra_hir_ty/src/method_resolution.rs +++ b/crates/ra_hir_ty/src/method_resolution.rs @@ -13,7 +13,6 @@ use hir_def::{ }; use hir_expand::name::Name; use ra_db::CrateId; -use ra_prof::profile; use rustc_hash::{FxHashMap, FxHashSet}; use super::Substs; @@ -109,7 +108,7 @@ pub struct TraitImpls { impl TraitImpls { pub(crate) fn trait_impls_in_crate_query(db: &dyn HirDatabase, krate: CrateId) -> Arc { - let _p = profile("trait_impls_in_crate_query"); + let _p = profile::span("trait_impls_in_crate_query"); let mut impls = Self { map: FxHashMap::default() }; let crate_def_map = db.crate_def_map(krate); @@ -135,7 +134,7 @@ impl TraitImpls { } pub(crate) fn trait_impls_in_deps_query(db: &dyn HirDatabase, krate: CrateId) -> Arc { - let _p = profile("trait_impls_in_deps_query"); + let _p = profile::span("trait_impls_in_deps_query"); let crate_graph = db.crate_graph(); let mut res = Self { map: FxHashMap::default() }; diff --git a/crates/ra_hir_ty/src/traits.rs b/crates/ra_hir_ty/src/traits.rs index 3f6d2cf35..2576a9dfc 100644 --- a/crates/ra_hir_ty/src/traits.rs +++ b/crates/ra_hir_ty/src/traits.rs @@ -5,7 +5,6 @@ use chalk_ir::cast::Cast; use chalk_solve::Solver; use hir_def::{lang_item::LangItemTarget, TraitId}; use ra_db::CrateId; -use ra_prof::profile; use crate::{db::HirDatabase, DebruijnIndex, Substs}; @@ -125,7 +124,7 @@ pub(crate) fn trait_solve_query( krate: CrateId, goal: Canonical>, ) -> Option { - let _p = profile("trait_solve_query").detail(|| match &goal.value.value { + let _p = profile::span("trait_solve_query").detail(|| match &goal.value.value { Obligation::Trait(it) => db.trait_data(it.trait_).name.to_string(), Obligation::Projection(_) => "projection".to_string(), }); diff --git a/crates/ra_hir_ty/src/traits/chalk.rs b/crates/ra_hir_ty/src/traits/chalk.rs index 1c7065364..3b6af5c9a 100644 --- a/crates/ra_hir_ty/src/traits/chalk.rs +++ b/crates/ra_hir_ty/src/traits/chalk.rs @@ -410,7 +410,7 @@ pub(crate) fn impl_datum_query( krate: CrateId, impl_id: ImplId, ) -> Arc { - let _p = ra_prof::profile("impl_datum"); + let _p = profile::span("impl_datum"); debug!("impl_datum {:?}", impl_id); let impl_: hir_def::ImplId = from_chalk(db, impl_id); impl_def_datum(db, krate, impl_id, impl_) -- cgit v1.2.3