about summary refs log tree commit diff
path: root/src/librustc/hir/map
AgeCommit message (Collapse)AuthorLines
2017-05-31Build DefPathHash->DefId table when incr.comp. is enabledMichael Woerister-0/+24
2017-05-31Make a newtype for DefPathHash so they are not confused with content hashesMichael Woerister-11/+17
2017-05-25Improve intercrate hygiene.Jeffrey Seyfried-54/+78
2017-05-25Improve efficiency.Jeffrey Seyfried-2/+4
2017-05-25Hygienize lifetimes.Jeffrey Seyfried-1/+1
2017-05-25Hygienize `librustc_typeck`.Jeffrey Seyfried-6/+31
2017-05-18Use 128 instead of 64 bits for DefPath hashesMichael Woerister-8/+9
2017-05-15ICH: Hash lists of local trait impls as part of the HIR.Michael Woerister-2/+2
2017-05-06rustc: treat const bodies like fn bodies in middle::region.Eduard-Mihai Burtescu-5/+14
2017-05-02run MIR borrowck on the validated, not optimized, MIRNiko Matsakis-1/+1
2017-04-12First attempt at global_asm! macroA.J. Gardner-0/+2
2017-04-12Rollup merge of #41063 - nikomatsakis:issue-40746-always-exec-loops, r=eddybTim Neumann-0/+21
remove unnecessary tasks Remove various unnecessary tasks. All of these are "always execute" tasks that don't do any writes to tracked state (or else an assert would trigger, anyhow). In some cases, they issue lints or errors, but we''ll deal with that -- and anyway side-effects outside of a task don't cause problems for anything that I can see. The one non-trivial refactoring here is the borrowck conversion, which adds the requirement to go from a `DefId` to a `BodyId`. I tried to make a useful helper here. r? @eddyb cc #40746 cc @cramertj @michaelwoerister
2017-04-07ICH: Centrally compute and cache DefPath hashes as part of DefPathTable.Michael Woerister-37/+97
2017-04-06Introduce HashStable trait and base ICH implementations on it.Michael Woerister-0/+4
This initial commit provides implementations for HIR, MIR, and everything that also needs to be supported for those two.
2017-04-04push `borrowck` into its own taskNiko Matsakis-0/+21
2017-03-29Move `syntax::ext::hygiene` to `syntax_pos::hygiene`.Jeffrey Seyfried-1/+1
2017-03-23Remove internal liblogAlex Crichton-1/+1
This commit deletes the internal liblog in favor of the implementation that lives on crates.io. Similarly it's also setting a convention for adding crates to the compiler. The main restriction right now is that we want compiler implementation details to be unreachable from normal Rust code (e.g. requires a feature), and by default everything in the sysroot is reachable via `extern crate`. The proposal here is to require that crates pulled in have these lines in their `src/lib.rs`: #![cfg_attr(rustbuild, feature(staged_api, rustc_private))] #![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))] This'll mean that by default they're not using these attributes but when compiled as part of the compiler they do a few things: * Mark themselves as entirely unstable via the `staged_api` feature and the `#![unstable]` attribute. * Allow usage of other unstable crates via `feature(rustc_private)` which is required if the crate relies on any other crates to compile (other than std).
2017-03-22Allocate numerical values of DefIndexes from two seperate ranges.Michael Woerister-52/+128
This way we can have all item-likes occupy a dense range of DefIndexes, which is good for making fast, array-based dictionaries.
2017-03-22Introduce HirId, a replacement for NodeId after lowering to HIR.Michael Woerister-2/+221
HirId has a more stable representation than NodeId, meaning that modifications to one item don't influence (part of) the IDs within other items. The other part is a DefIndex for which there already is a way of stable hashing and persistence. This commit introduces the HirId type and generates a HirId for every NodeId during HIR lowering, but the resulting values are not yet used anywhere, except in consistency checks.
2017-03-10Refactor out `ast::ItemKind::MacroDef`.Jeffrey Seyfried-5/+1
2017-03-05Fix const expression macro invocations.Jeffrey Seyfried-11/+11
2017-03-01fix tests to handle the Typeof bodiesNiko Matsakis-2/+7
2017-02-28walk the bodies "in order" by traversing the crateNiko Matsakis-12/+17
Otherwise the errors from borrowck come out in an unpredictable order.
2017-02-25rustc_typeck: rework coherence to be almost completely on-demand.Eduard-Mihai Burtescu-0/+20
2017-02-25rustc_typeck: don't use Result for get_type_parameter_bounds and ↵Eduard-Mihai Burtescu-0/+24
ensure_super_predicates.
2017-01-26Point to immutable arg/fields when trying to use as &mutEsteban Küber-1/+1
Point to immutable borrow arguments and fields when trying to use them as mutable borrows. Add label to primary span on "cannot borrow as mutable" errors. Present the following output when trying to access an immutable borrow's field as mutable: ``` error[E0389]: cannot borrow data mutably in a `&` reference --> $DIR/issue-38147-1.rs:27:9 | 26 | fn f(&self) { | ----- use `&mut self` here to make mutable 27 | f.s.push('x'); | ^^^ assignment into an immutable reference ``` And the following when trying to access an immutable struct field as mutable: ``` error: cannot borrow immutable borrowed content `*self.s` as mutable --> $DIR/issue-38147-3.rs:17:9 | 12 | s: &'a String | ------------- use `&'a mut String` here to make mutable ...| 16 | fn f(&self) { | ----- use `&mut self` here to make mutable 17 | self.s.push('x'); | ^^^^^^ cannot borrow as mutable ```
2017-01-26rustc: don't call the HIR AST.Eduard-Mihai Burtescu-103/+103
2017-01-06rustc: store ty::Tables separately for each body (except closures').Eduard-Mihai Burtescu-197/+83
2017-01-06rustc: keep track of tables everywhere as if they were per-body.Eduard-Mihai Burtescu-19/+0
2016-12-28rustc: always print nested nodes where a HIR map is available.Eduard-Mihai Burtescu-25/+46
2016-12-28rustc: simplify constant cross-crate loading and rustc_passes::consts.Eduard-Mihai Burtescu-89/+98
2016-12-28rustc: move function arguments into hir::Body.Eduard-Mihai Burtescu-3/+8
2016-12-28rustc: separate bodies for static/(associated)const and embedded constants.Eduard-Mihai Burtescu-31/+57
2016-12-28rustc: separate TraitItem from their parent Item, just like ImplItem.Eduard-Mihai Burtescu-20/+39
2016-12-16Remove some more things that were only needed for inlined-HIR DefIdsMichael Woerister-204/+0
2016-12-16definitions: Add some documentation.Michael Woerister-2/+7
2016-12-16Move retrace_path() implementation to DefPathTableMichael Woerister-2/+31
2016-12-16No need to store Definitions in RefCell within HIR mapMichael Woerister-11/+11
2016-12-16definitions: Store DefPath data in separate table in metadataMichael Woerister-2/+10
2016-12-16definitions: Don't allocate DefIds for inlined HIRMichael Woerister-90/+5
2016-12-16Definitions: Extract DefPath interning into its own data structure.Michael Woerister-23/+85
2016-12-16Definitions: Split out NodeId <-> DefIndex mappingMichael Woerister-23/+21
2016-12-15Use StableHasher everywhereAriel Ben-Yehuda-3/+3
The standard implementations of Hasher have architecture-dependent results when hashing integers. This causes problems when the hashes are stored within metadata - metadata written by one host architecture can't be read by another. To fix that, implement an architecture-independent StableHasher and use it in all places an architecture-independent hasher is needed. Fixes #38177.
2016-12-12incr.comp.: Avoid creating an edge to DepNode::Krate when generating ↵Michael Woerister-3/+4
debuginfo namespaces.
2016-12-06annotate stricter lifetimes on LateLintPass methods to allow them to forward ↵Oliver Schneider-12/+12
to a Visitor
2016-11-30rustc: track the Span's of definitions across crates.Eduard-Mihai Burtescu-33/+26
2016-11-29revamp `Visitor` with a single method for controlling nested visitsNiko Matsakis-6/+7
2016-11-29Split nested_visit_mode function off from nested_visit_mapFlorian Diebold-2/+6
... and make the latter mandatory to implement.
2016-11-29Refactor inlined items some moreFlorian Diebold-14/+0
They don't implement FnLikeNode anymore, instead are handled differently further up in the call tree. Also, keep less information (just def ids for the args).
2016-11-29Add make tidy fixesFlorian Diebold-2/+5