about summary refs log tree commit diff
path: root/src/librustc_codegen_utils
AgeCommit message (Collapse)AuthorLines
2019-08-17Rollup merge of #63559 - eddyb:v0-mangling-off-by-1, r=estebankMazdak Farrokhzad-2/+10
rustc_codegen_utils: account for 1-indexed anonymous lifetimes in v0 mangling. I don't really understand why `anonymize_late_bound_regions` starts with `BrAnon(1)` instead of `BrAnon(0)`, but it does (maybe @nikomatsakis knows?): https://github.com/rust-lang/rust/blob/c43d03a19f326f4a323569328cc501e86eb6d22e/src/librustc/ty/fold.rs#L696-L712 Thankfully, the mangling format and demangler implementations are fine, and I just needed to offset the anonymized lifetime indices by `1` to get the correct mangling. cc @alexcrichton @michaelwoerister
2019-08-14rustc_codegen_utils: account for 1-indexed anonymous lifetimes in v0 mangling.Eduard-Mihai Burtescu-2/+10
2019-08-14Update rustc-demangle to 0.1.16.Eduard-Mihai Burtescu-1/+1
2019-08-05Clear the ParamEnv where its information is irrelevantOliver Scherer-1/+1
2019-08-05Fiddle param env through to `try_eval_bits` in most placesOliver Scherer-1/+1
2019-08-05Don't abort on unevaluated constants without at least tryting to eval themOliver Scherer-1/+1
2019-07-28Deny `unused_lifetimes` through rustbuildVadim Petrochenkov-2/+0
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-4/+0
rustbuild Remove some random unnecessary lint `allow`s
2019-07-08normalize use of backticks for compiler messages in librustc_codegenSamy Kacimi-1/+1
https://github.com/rust-lang/rust/issues/60532
2019-07-07rustc: Remove `dylib` crate type from most rustc cratesAlex Crichton-1/+0
Now that procedural macros no longer link transitively to libsyntax, this shouldn't be needed any more! This commit is an experiment in removing all dynamic libraries from rustc except for librustc_driver itself. Let's see how far we can get with that!
2019-07-05Rollup merge of #62168 - ljedrz:the_culmination_of_hiridification, r=ZoxcMazdak Farrokhzad-1/+1
The (almost) culmination of HirIdification It's finally over. This PR removes old `FIXME`s and renames some functions so that the `HirId` variant has the shorter name. All that remains (and rightfully so) is stuff in `resolve`, `save_analysis` and (as far as I can tell) in a few places where we can't replace `NodeId` with `HirId`.
2019-07-05Rollup merge of #61545 - flip1995:internal_lints, r=oli-obkMazdak Farrokhzad-1/+0
Implement another internal lints cc #49509 This adds ~~two~~ one internal lint~~s~~: 1. LINT_PASS_IMPL_WITHOUT_MACRO: Make sure, that the `{declare,impl}_lint_pass` macro is used to implement lint passes. cc #59669 2. ~~USAGE_OF_TYCTXT_AND_SPAN_ARGS: item 2 on the list in #49509~~ ~~With 2. I wasn't sure, if this lint should be applied everywhere. That means a careful review of 0955835 would be great. Also 73fb9b4 allows this lint on some functions. Should I also apply this lint there?~~ TODO (not directly relevant for review): - [ ] https://github.com/rust-lang/rust/pull/59316#discussion_r280186517 (not sure yet, if this works or how to query for `rustc_private`, since it's not in [`Features`](https://doc.rust-lang.org/nightly/nightly-rustc/syntax/feature_gate/struct.Features.html) :thinking: cc @eddyb) - [x] https://github.com/rust-lang/rust/pull/61735#discussion_r292389870 - [x] Check explicitly for the `{declare,impl}_lint_pass!` macros r? @oli-obk
2019-07-04rename hir::map::local_def_id_from_hir_id to local_def_idljedrz-1/+1
2019-07-03Remove needless lifetimesJeremy Stucki-1/+1
2019-06-24Enable internal lints in bootstrapflip1995-1/+0
2019-06-20rename hir::map::get_by_hir_id to getljedrz-1/+1
2019-06-14Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-5/+3
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-16/+16
2019-06-12Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-2/+1
2019-06-12rustc: remove some unnecessary lifetimes in -> TyCtxt methods.Eduard-Mihai Burtescu-2/+2
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-12/+12
2019-06-12Fix fallout from `deny(unused_lifetimes)`.Eduard-Mihai Burtescu-3/+3
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-21/+21
2019-06-11rustc_codegen_*: deny(unused_lifetimes).Eduard-Mihai Burtescu-0/+1
2019-06-08Remove unused `#![feature(custom_attribute)]`sVadim Petrochenkov-1/+0
2019-06-02remove unneeded depsMark Mansi-1/+0
2019-06-02move monoitemext to inherent methodsMark Mansi-2/+1
2019-06-02remove reexports of mir::mono::{MonoItem,CodegenUnit}Mark Mansi-1/+2
2019-06-02remove reexport of rustc::ty::InstanceMark Mansi-8/+4
2019-06-01codegen: change `$6d$` to `$u6d$`David Wood-1/+1
This changes a mistake introduced in #61195 where the mangling workaround used was incorrect.
2019-05-31rustc_codegen_utils: remove symbol name dumping/checking harness, and mw impl.Eduard-Mihai Burtescu-1018/+11
2019-05-31rustc_codegen_utils: update mw's symbol mangler implementation.Eduard-Mihai Burtescu-167/+218
2019-05-31rustc_codegen_utils: add harness for dumping/checking symbol names, and mw ↵Eduard-Mihai Burtescu-3/+954
mangling impl.
2019-05-31rustc_codegen_utils: don't ignore `Ctor` path components in symbols.Eduard-Mihai Burtescu-3/+1
2019-05-31rustc_codegen_utils: add new mangling scheme implementation.Eduard-Mihai Burtescu-486/+1190
2019-05-31rustc_codegen_utils: test demangler output, not just symbol names.Eduard-Mihai Burtescu-2/+7
2019-05-30Symbol name predicate list printed `+` excessivelyOliver Scherer-1/+1
2019-05-29Rollup merge of #61195 - davidtwco:seg-fault-mangler, r=eddybMazdak Farrokhzad-0/+3
Special-case `.llvm` in mangler Fixes #60925 and fixes #53912. r? @michaelwoerister cc @eddyb
2019-05-28Special-case `.llvm` in mangler to fix segfaultsDavid Wood-0/+3
This commit special cases `.llvm` in the mangler to print `.llvm$6d$` instead. This will avoid segfaults when names in a user's Rust code are `llvm`.
2019-05-26centralize Scalar size sanity checks and also do them in release buildsRalf Jung-1/+1
2019-05-25Only print integers in symbol path's constantsOliver Scherer-2/+10
2019-05-25rustc: integrate ty::Const into ty::print as print_const.Eduard-Mihai Burtescu-0/+8
2019-05-21Remove impls for `InternedString`/string equality.Nicholas Nethercote-2/+2
`Symbol` received the same treatment in #60630. Also, we can derive `PartialEq` for `InternedString`.
2019-05-20Introduce `InternedString::intern`.Nicholas Nethercote-6/+6
`InternedString::intern(x)` is preferable to `Symbol::intern(x).as_interned_str()`, because the former involves one call to `with_interner` while the latter involves two. The case within InternedString::decode() is particularly hot, and this change reduces the number of `with_interner` calls by up to 13%.
2019-05-13Remove the equality operation between `Symbol` and strings.Nicholas Nethercote-1/+1
And also the equality between `Path` and strings, because `Path` is made up of `Symbol`s.
2019-05-13Pass a `Symbol` to `check_name`, `emit_feature_err`, and related functions.Nicholas Nethercote-5/+7
2019-04-30Move metadata encoding earlier.Nicholas Nethercote-1/+3
This commit separates metadata encoding (`tcx.encode_metadata`) from the creation of the metadata module (which is now handled by `write_compressed_metadata`, formerly `write_metadata`). The metadata encoding now occurs slightly earlier in the pipeline, at the very start of code generation within `start_codegen`. Metadata *writing* still occurs near the end of compilation; that will be moved forward in subsequent commits.
2019-04-17Deny `internal` in stage0Mateusz Mikuła-1/+1
2019-04-03Deny internal lints on non conflicting cratesflip1995-0/+1
- libarena - librustc_allocator - librustc_borrowck - librustc_codegen_ssa - librustc_codegen_utils - librustc_driver - librustc_errors - librustc_incremental - librustc_metadata - librustc_passes - librustc_privacy - librustc_resolve - librustc_save_analysis - librustc_target - librustc_traits - libsyntax - libsyntax_ext - libsyntax_pos
2019-03-29rustc(codegen): uncache `def_symbol_name` prefix from `symbol_name`.Eduard-Mihai Burtescu-38/+15